Is Static Analysis Able to Identify Unnecessary Source Code?


연구 분야: Strategies



학회: ACM Transactions on Software Engineering and Methodology (TOSEM), Volume 29, Issue 1


초록

Grown software systems often contain code that is not necessary anymore. Such unnecessary code wastes resources during development and maintenance, for example, when preparing code for migration or certification. Running a profiler may reveal code that is not used in production, but it is often time-consuming to obtain representative data in this way. We investigate to what extent a static analysis approach, which is based on code stability and code centrality, is able to identify unnecessary code and whether its recommendations are relevant in practice. To study the feasibility and usefulness of our approach, we conducted a study involving 14 open-source and closed-source software systems. As there is no perfect oracle for unnecessary code, we compared recommendations for unnecessary code with historical cleanups, runtime usage data, and feedback from 25 developers of five software projects. Our study shows that recommendations generated from stability and centrality information point to unnecessary code that cannot be identified by dead code detectors. Developers confirmed that 34% of recommendations were indeed unnecessary and deleted 20% of the recommendations shortly after our interviews. Overall, our results suggest that static analysis can provide quick feedback on unnecessary code and is useful in practice.


Author Profile
Roman Haas

CQSE GmbH Munich Germany

Germany
Author Profile
Rainer Niedermayr

University of Stuttgart CQSE GmbH Germany

Germany
Author Profile
Tobias Roehm

CQSE GmbH Stuttgart Germany

Germany

📄 논문 정보

발행 연도 2020년
인용수 16
출판 국가 Germany
사이트 ACM
좋아요 수 0

연관 논문 목록 (84건)