Analyzing Impact of Dependency Injection on Software Maintainability
Peter Sun, Dae-Kyoo Kim

TL;DR
This paper introduces a new metric, DCBO, to quantify dependency injection in Java projects and demonstrates its potential to assess maintainability through static code analysis.
Contribution
It proposes the DCBO metric for measuring DI, implements it in CKJM-Analyzer, and validates its effectiveness on open-source Java projects.
Findings
DCBO effectively quantifies dependency injection levels.
The tool accurately detects DI using static analysis.
Higher DCBO correlates with improved maintainability.
Abstract
Dependency injection (DI) is generally known to improve maintainability by keeping application classes separate from the library. Particularly within the Java environment, there are many applications using the principles of DI with the aim to improve maintainability. There exists some work that provides an inference on the impact of DI on maintainability, but no conclusive evidence is provided. The fact that there are no publicly available tools for quantifying DI makes such an evidence more difficult to be produced. In this paper, we propose a novel metric, DCBO, to measure the proportion of DI in a project based on weighted couplings. We describe how DCBO can serve as a more meaningful metric in computing maintainability when DI is also considered. The metric is implemented in the CKJM-Analyzer, an extension of the CKJM tool that utilizes static code analysis to detect DI. We discuss…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software System Performance and Reliability · Software Reliability and Analysis Research
