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: 2
- T. Copeland, PMD Applied, vol. 10. Arexandria, VA, USA: Centen- nial Books, 2005.
- M. Tomczak and E. Tomczak, "The need to report effect size esti- mates revisited. An overview of some recommended measures of effect size," Trends Sport Sci., vol. 21, no. 1, pp. 19-25, 2014.
Cited by
Items 101–134 of 134
Xu, J., Chen, P., Yin, B., Huang, Z., & Qiu, Q. (2023) · IEEE International Conference on Software Quality, Reliability and Security (QRS) · doi:10.1109/qrs60937.2023.00017 · Cited by 5
“As a substitute, we compared our approach with Line-DP [8] in RQ1, which also utilizes BOW+RF.”
BackgroundMethodResultInfluentialLine-level defect prediction based on preceding line-aware and inter-line semantics enhancement
Zhu, X., Zhang, T., Chen, X., Li, Z., & Jing, X. (2025) · Information and Software Technology · doi:10.1016/j.infsof.2025.107993 · Cited by 2
Zhou, Y., Liu, X., Guo, Z., Zhou, Y., Zhang, C., & Qian, J. (2024) · Journal of Software Evolution and Process · doi:10.1002/smr.2696 · Cited by 2
“In, 1 during the evaluation of DeepLineDP, all comment lines were assigned a score of 0.”
InfluentialTelecontext-Enhanced Recursive Interactive Attention Fusion Method for Line-Level Defect Prediction
He, H., Yan, B., Xu, K., & Yu, L. (2024) · Computers, materials & continua/Computers, materials & continua (Print) · doi:10.32604/cmc.2024.058779 · Cited by 1
The Need for a Fine-grained approach in Just-in-Time Defect PredictionPreprint
Ng, G., & Cheng, C. K. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2110.00579 · Cited by 1
“This is consistent with the works by [60, 61].”
ResultAn Empirical Study on Model-Agnostic Techniques for Source Code-Based Defect Prediction
Zhu, Y., Gao, Y., & Yu, Q. (2023) · International Journal of Software Engineering and Knowledge Engineering · doi:10.1142/s0218194023500572 · Cited by 1
CodeSift: Approach for detecting source code feature redundancy
Xu, A., Zhu, Y., Yu, Q., & Hao, G. (2024) · International Symposium on Computer Applications and Information Systems (ISCAIS) · doi:10.1117/12.3034805
“In conclusion, CodeSift significantly outperforms traditional defect prediction methods that solely rely on Word2Vec for generating word vectors, demonstrating practical value for defect prediction models.”
InfluentialCSTLineDP: A Fine-grained Software Defect Prediction Framework Based on CST and Bi-GRU
Li, X., & Zhang, C. (2024) · International Conference on Electronic Information Engineering and Computer Communication (EIECC) · doi:10.1109/eiecc64539.2024.10929201
“The first dataset is from the Apache open source project software defect dataset collected by S. Wattanakriengkrai and P. Thongtanunam et al. The dataset contains 9 open-source projects and 32 software versions [4].”
Can We Trust the Actionable Guidance from Explainable AI Techniques in Defect Prediction?
Lee, G., Ju, H., & Lee, S. U.-J. (2025) · IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner64311.2025.00051 · Cited by 3
“Wattanakriengkrai et al. [16] proposed LINE-DP, a SDP model that utilizes code tokens as features and applies LIME to identify the tokens influencing defect predictions most significantly.”
Wu, Q., Su, Z., Shi, Y., Qi, K., Wu, D., Chen, Z., & Li, H. (2025) · Communications in computer and information science · doi:10.1007/978-981-96-7008-6_20
Jadhav, V. J., Devale, P., & Kadam, A. (2025) · International Conference on Computing for Sustainable Global Development · doi:10.23919/indiacom66777.2025.11115684
“From the analysis, it is determined that [16] suffers from a class imbalance problem, [17] has major decision errors, and [18] results in many false positive predictions.”
A Review of Software Defect Prediction in Intelligent Vehicles
He, Y., Li, X., & Yue, C. (2025) · Communications in computer and information science · doi:10.1007/978-981-95-0848-8_12
Zou, Q., Yang, Z., Qiu, X.-R., Yu, J., Shi, Y., & Chen, N. (2025) · IEEE Transactions on Reliability · doi:10.1109/tr.2025.3611079 · Cited by 2
“Global explanations aim to provide a comprehensive understanding of the model’s overall behavior, particularly in assessing the relative significance of features in the model’s decision-making process [24], [25], [26].”
Lightweight Developer-Friendly Explanations for Software Defect Prediction
Awny, N. E. A., Zaid, L. A., El‐Ramly, M., & Mansour, M. B. M. (2025) · International Conference on Intelligent Computing and Information Systems (ICICIS) · doi:10.1109/icicis66182.2025.11313159
“LIME explains a prediction by approximating the complex RF model with an interpretable local surrogate model [18].”
Source Code Vulnerability Detection and Interpretability with Language Models
Silveira, L., Lélis, C. A. S., Marcondes, C. A. C., & Verri, F. A. N. (2026) · Communications in computer and information science · doi:10.1007/978-3-032-11539-3_15
How vulnerability explanations help software practitioners confirm and fix code vulnerabilities
Debeyan, F. A., Hall, T., Madeyski, L., & Winter, E. (2026) · Information and Software Technology · doi:10.1016/j.infsof.2026.108086 · Cited by 2
JIT-DCK: A KAN Multi-Task Model for Just-In-Time Code Defect Prediction and Localization
Wang, J., Li, C., Wang, S., Li, H., Zhan, F., Qiao, N., & Guo, S. (2026) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3801547
“With the rise of interpretability-driven methods, Wattanakriengkrai et al. [47] combined logistic regression with LIME (Local Interpretable Model-Agnostic Explanations) to generate line-level defect contribution heatmaps.”
Ahasanuzzaman, M., Oliva, G. A., Hassan, A. E., & Jiang, Z. M. (2026) · Empirical Software Engineering · doi:10.1007/s10664-026-10829-z
VulFocus: Interpret AI Models in Software Vulnerability Detection
Guo, Y., Dong, Z., & Tang, Q. (2026) · Communications in computer and information science · doi:10.1007/978-3-032-21177-4_3
Lin, J.-R., Huang, C., & Fang, C. (2026) · Journal of Software Evolution and Process · doi:10.1002/smr.70115
Zhao, Y., Yuan, X., Gong, L., & Huang, Z. (2026) · Journal of Software Evolution and Process · doi:10.1002/smr.70118
PRaFFLineDP: Feature fusion with progressive ranking for efficient line-level defect prediction
Han, F., Yang, F., Chen, J., Zhong, F., Xiao, P., & Liang, Q. (2026) · Empirical Software Engineering · doi:10.1007/s10664-026-10855-x
“Therefore, CLDP (Ray et al. 2016; Wattanakriengkrai et al. 2020 ; Jiarpakdee et al. 2020 ) has become a key direction for enhancing the efficiency of software quality assurance efficiency, as it can assist in locating defects at a finer granularity.”
InfluentialLine-level bug-finding power of static analysis rules: a case study of Teamscale
Ye, L., Nie, Y., Zhou, Y., Yang, Y., Lu, H., Qian, J., & Zhou, Y. (2026) · Empirical Software Engineering · doi:10.1007/s10664-026-10895-3
Zhou, Y., Ding, H., Tang, H., Zhu, L., Zhou, Z., & Qian, J. (2026) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2026.3704180
“When facing numerous warning lines of identical priority, developers either review them randomly or follow the simplistic baseline strategy of examining warning lines sequentially by line number [9], [10], [11], [12], [13], [14], [15], [16].”
InfluentialBeyond the Data: Architectural Choices for Imbalanced Learning in Vulnerability Detection
Foulefack, R. Z. L., Djifack, U. D., & Marchetto, A. (2026) · SN Computer Science · doi:10.1007/s42979-026-05164-5
Mitigating the Risk of Defects and Improving Knowledge Distribution with Code Reviewer Recommenders
Esfahani, M. S., & Rigby, P. C. (2026) · Proceedings of the ACM on software engineering. · doi:10.1145/3797070 · Cited by 1
Towards integrating large model with small model for Just-in-Time Defect Prediction and Localization
Huang, Y., Chen, M., Chen, X., & Liu, Y. (2026) · Information and Software Technology · doi:10.1016/j.infsof.2026.108244
Leveraging Commit-Size Context and Hyper Co-Change Graph Centralities for Defect Prediction
Kumar, A., Ethari, H., & Agarwal, S. (2026) · IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner67736.2026.00009
“[ 28], [50]–[55].”
Understanding and Improving ML-based Static Analysis Result Classification via Explainable AI
Yerramreddy, S., Rafieian, M., Wei, S., & Porter, A. (2026) · IEEE International Conference on Software Testing, Verification and Validation (ICST) · doi:10.1109/icst69053.2026.00043
“…} (whether any relevant line appears among the top-k ranked lines), common in rationale benchmarks and Information Retrieval (IR) style evaluations [52], [53], ( 2) Initial False Alarm (IFA), the number of non-relevant lines a developer inspects before the first relevant line, widely used as an…”
InfluentialTwo-phase Feature Optimization for Fast and Accurate Software Defect Prediction
Gao, S., & Wang, W. (2026) · International Journal of Software Engineering and Knowledge Engineering · doi:10.1142/s0218194026500592
Less is more: balancing models performance and complexity for software defects prediction
Chouchen, M., Ouni, A., Rajbahadur, G. K., & Hassan, A. E. (2026) · Empirical Software Engineering · doi:10.1007/s10664-026-10913-4
An Empirical Study on Deep Learning-based Line-Level Software Defect Prediction
Zhang, E., Jiang, Y., Zhang, T., & Tong, H. (2026) · International Conference on Mining Software Repositories (MSR) · doi:10.1145/3793302.3793359
LLM-Based Detection of Tangled Code Changes for Higher-Quality Method-Level Bug Datasets
Opu, M. N. I., Wang, S., & Chowdhury, S. (2026) · International Conference on Mining Software Repositories (MSR) · doi:10.1145/3793302.3793351 · Cited by 9
Towards Budget-Aware Early Candidate Selection for Vulnerability Analysis
Zhao, X., & Santos, J. C. S. (2026) · doi:10.1145/3842650.3843175
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
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.