Predicting Defective Lines Using a Model-Agnostic Technique
Open accessThe DOI matches its Crossref record; 107 of the 109 references it cites were found in a registry or an index.
Abstract
Defect prediction models are proposed to help a team prioritize the areas of source code files that need Software Quality Assurance (SQA) based on the likelihood of having defects. However, developers may waste their unnecessary effort on the whole file while only a small fraction of its source code lines are defective. Indeed, we find that as little as 1-3 percent of lines of a file are defective. Hence, in this work, we propose a novel framework (calledLine-DP) to identify defective lines using a model-agnostic technique, i.e., an Explainable AI technique that provides information why the model makes such a prediction. Broadly speaking, ourLine-DPfirst builds a file-level defect model using code token features. Then, ourLine-DPuses a state-of-the-art model-agnostic technique (i.e., LIME) to identify risky tokens, i.e., code tokens that lead the file-level defect model to predict that the file will be defective. Then, the lines that contain risky tokens are predicted as defective lines. Through a case study of 32 releases of nine Java open source systems, our evaluation results show that ourLine-DPachieves an average recall of 0.61, a false alarm rate of 0.47, a top 20%LOC recall of 0.27, and an initial false alarm of 16, which are statistically better than six baseline approaches. Our evaluation shows that ourLine-DPrequires an average computation time of 10 seconds including model construction and defective line identification time. In addition, we find that 63 percent of defective lines that can be identified by ourLine-DPare related to common defects (e.g., argument change, condition change). These results suggest that ourLine-DPcan effectively identify defective lines that contain common defects while requiring a smaller amount of inspection effort and a manageable computation cost. The contribution of this paper builds an important step towards line-level defect prediction by leveraging a model-agnostic technique.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
In the citing paper
“Local approaches, like just-in-time defect prediction [158], line-level defect prediction to improve debugging [215], analysis of the quality of code [200], prediction of the retention of syntax knowledge [143, 199], and counterfactual explanations [43, 75] explain individual predictions.”
From A 2030 Roadmap for Software Engineering (2025) · cites this paper as [215]
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Breiman, L. (2001) · Machine Learning · doi:10.1023/a:1010933404324 · Cited by 133,538 · cited 1×
“Unlike the traditional model interpretation techniques (TMI) like variable importance for random forest [9] or the coefficients analysis for logistic regression models [27], the model-agnostic techniques can identify important features for a given file by estimating the contribution of each token…”
MethodStatistical power analysis for the behavioral sciences
(1990) · Computers, Environment and Urban Systems · doi:10.1016/0198-9715(90)90050-4 · Cited by 65,269
Statistical Power Analysis for the Behavioral Sciences
Cohen, J. (2013) · doi:10.4324/9780203771587 · Cited by 25,373
"Why Should I Trust You?": Explaining the Predictions of Any Classifier
Ribeiro, M. T., Singh, S., & Guestrin, C. (2016) · Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining · doi:10.1145/2939672.2939778 · Cited by 17,555
(2017) · Cited by 16,319
Harrell, F. E. (2001) · Springer Series in Statistics · doi:10.1007/978-1-4757-3462-1 · Cited by 9,195
(2005) · PubMed · Cited by 7,011
Harrell (2015) · Springer Series in Statistics · doi:10.1007/978-3-319-19425-7 · Cited by 6,878
“Why Should I Trust You?”: Explaining the Predictions of Any Classifier
Ribeiro, M., Singh, S., & Guestrin, C. (2016) · Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Demonstrations · doi:10.18653/v1/n16-3020 · Cited by 6,682
Extended static checking for Java
Flanagan, C., Leino, K. R. M., Lillibridge, M., Nelson, G., Saxe, J. B., & Stata, R. (2002) · Proceedings of the ACM SIGPLAN 2002 conference on Programming language design and implementation · doi:10.1145/512529.512558 · Cited by 1,340 · cited 1×
“ch as null pointer dereferencing and buffer overflows) at the line level. Various static analysis approaches are proposed including heuristic rule-based techniques (e.g., PMD [12]), complex algorithms [20], and hybrid approaches like FindBugs2 which incorporates the static data-flow analysis and the patternmatching anal…”
Method
Research works printed but not linked: 5
- 10.1023/A:I0I0933404324 · doi:10.1023/a:i0i0933404324
- Copeland, 2005, PMD Applied, 10
- 2020, Release Management Process
- Ribeiro, Proc. 22nd ACM SIGKDD Int. Conf. Knowl. Discov. Data Mining, 1135
- Tomczak, 2014, The need to report effect size estimates revisited. An overview of some recommended measures of effect size, Trends Sport Sci., 21, 19
Cited by
LineVul: a transformer-based line-level vulnerability prediction
Fu, M., & Tantithamthavorn, C. (2022) · Proceedings of the 19th International Conference on Mining Software Repositories · doi:10.1145/3524842.3528452 · Cited by 384
“[60] proposed a machine learning-based approach with LIME model-agnostic technique (BoW+RF+LIME) to predict which lines are likely to be defective in the future.”
BackgroundMethodResultInfluentialSelf-citationSemi-Supervised Log-Based Anomaly Detection via Probabilistic Label Estimation
Yang, L., Chen, J., Wang, Z., Wang, W., Jiang, J., Dong, X., & Zhang, W. (2021) · 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE) · doi:10.1109/icse43902.2021.00130 · Cited by 244
“Moreover, recent studies have presented that making software analytics models interpretable to software practitioners is as important as achieving accurate prediction [75]–[77].”
BackgroundLineVD: statement-level vulnerability detection using graph neural networks
Hin, D., Kan, A., Chen, H., & Babar, M. A. (2022) · Proceedings of the 19th International Conference on Mining Software Repositories · doi:10.1145/3524842.3527949 · Cited by 218
“Particularly, there have been works attempting to detecting lines-level information by leveraging explainable artificial intelligence for software engineering tasks, such as detecting source code lines for defect prediction [50, 58].”
BackgroundVulRepair: a T5-based automated software vulnerability repair
Fu, M., Tantithamthavorn, C., Le, T., Nguyen, V., & Phung, D. (2022) · Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3540250.3549098 · Cited by 207
Self-citationCode Prediction by Feeding Trees to Transformers
Kim, S., Zhao, J., Tian, Y., & Chandra, S. (2021) · 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE) · doi:10.1109/icse43902.2021.00026 · Cited by 209
“For example, [43], [44] used LIME [45], a model-agnostic explainability method, to pinpoint the defective lines of code from defect detection models.”
Method
Metadata
- Authors
- Wattanakriengkrai, S., Thongtanunam, P., Tantithamthavorn, C., Hata, H., & Matsumoto, K.
- Affiliations
- Nara Institute of Science and Technology (JP)
- The University of Melbourne (AU)
- Monash University (AU)
- ORCID
- Venue
- IEEE Transactions on Software Engineering
- Published
- 2022-05-01
- Volume
- 48
- Issue
- 5
- Pages
- 1480-1496
- ISSN
- 0098-5589 (ISSN-L)
- 1939-3520
- 2326-3881
- OpenAlex
- W3083954092
- Cited by
- 137
- References
- 109
- Citations by year
- 2026: 21 · 2025: 24 · 2024: 38 · 2023: 24 · 2022: 15
- FWCI
- 12.69
- Type
- journal article
- Language
- en
- Open access
- hybrid
- doi.org
- Locations
- IEEE Transactions on Software Engineering (publishedVersion, cc-by)
- Institutional Repositories DataBase (IRDB) (publishedVersion, cc-by)
- arXiv (Cornell University) (submittedVersion)
- Minerva Access (University of Melbourne) (submittedVersion, cc-by)
- Monash University Research Portal (Monash University) (submittedVersion, other-oa)
- NAIST Digital Library (Nara Institute of Science and Technology) (submittedVersion, cc-by-nc-nd)
- arXiv (Cornell University) (cc-by)
- Funders
- JSPS KAKENHI (16H05857, 20H05706)
- Australian Research Council (DE200100941, DE210101091)
- Monash-FIT Early Career Researcher
- Topics
- Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- Physical Sciences › Computer Science › Software › Software Testing and Debugging Techniques
- Physical Sciences › Computer Science › Software › Software Reliability and Analysis Research
- Keywords
- model-agnostic explanation, lime, explainable AI, software defect prediction, software quality assurance
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
How to cite
Cite CoChat for the checks on this page, and the paper for its own findings.
- This page
- CoChat. (2026). Citation check: Predicting Defective Lines Using a Model-Agnostic Technique. https://app.cochat.ai/papers/10.1109/tse.2020.3023177
- The paper
- Wattanakriengkrai, S., Thongtanunam, P., Tantithamthavorn, C., Hata, H., & Matsumoto, K. (2022). Predicting Defective Lines Using a Model-Agnostic Technique. IEEE Transactions on Software Engineering. https://doi.org/10.1109/tse.2020.3023177
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.