How to remove dependencies from large software projects with confidence

More Info
expand_more

Abstract

Dependency management is an important task in software maintenance. However, identifying and removing unused dependencies takes a lot of effort from developers as existing tools may discover many false positives which are challenging to distinguish. This paper proposes a decision framework to improve unused dependency detection. It is applied to an industrial Maven project. Firstly, OPAL(a call graph tool) augments the call graph of a dependency analysis tool DepClean to support dynamic features of Java. Secondly, the classification of the relationship between dependencies simplifies the comprehension of an unused dependency. Thirdly, a decision process prioritizes the test of removing unnecessary dependencies. Results show that developers can focus their efforts on maintaining bloated dependencies by following the recommendation of the proposed decision process. It is particularly noteworthy that this decision framework helps reduce one-third of false positives of unused dependencies in a given industrial Maven project. In addition, our suggestions are compared to the motive of removing dependencies in three open-source Maven projects. Results indicate that our advice is consistent in the reasoning behind removing dependencies. Hence, this work reduces the effort for developers to decide on dependency elimination.