Bug Localization from Bug Reports: A Multi-Objective Approach
Organizations: FAST School of Computing, National University of Computer and Emerging Sciences, Lahore, Pakistan
Abstract
Bug localization is a labor-intensive task, particularly in large software systems. When abnormal behavior occurs, developers must perform repetitive and time-consuming steps to identify faulty files. Previous studies have mainly focused on single-objective localization methods, many of which are limited to specific programming languages. In addition, relying solely on lexical similarity between source code and bug reports is often insufficient due to the natural language nature of bug descriptions. In this study, we propose a class-level automated multi-objective search-based system to identify and rank potentially buggy classes from bug reports. The main objective is to maximize similarity while minimizing the number of suggested faulty files. The evolutionary optimization algorithm SPEA-2 was applied to six open-source Java projects comprising more than 22,000 bug reports. The proposed approach was evaluated against two widely used algorithms, NSGA-II and MOEA/D. Results indicate that SPEA-2 achieved higher precision and recall than both multi-objective and single-objective baseline methods. The proposed recommender system successfully identified buggy classes or files for 88.5% of bug reports within the top 10 recommendations and 94% within the top 20. The effectiveness of the model was further validated on an industrial Android project written in Kotlin, demonstrating its adaptability across programming languages.
Figures & tables
| Author and Reference | Year | Algorithm | Technique | Dataset |
|---|---|---|---|---|
| Saha et al. [ 8 ] | 2013 | BLUiR (Bug Localization Using Information Retrieval ) | Information Retrieval | Four Eclipse open source datasets [ 9 ] |
| Pandiyan et al. [ 10 ] | 2015 | Tabu Search Fault Localization with Path Branch and Bound (TSFL-PBB) | Search-based Software Engineering | 2 UCI datasets |
| Rahman et al. [ 11 ] | 2015 | Improved Vector Space Model | Information Retrieval | ZXing, SWT, and Guava |
| Almhana et al. [ 1 ] | 2016 | NSGA-II | Search-based Software Engineering | Six open source datasets [ 7 ] |
| Lam et al. [ 42 ] | 2017 | DNNLOC (rVSM + DNN) | Combining IR with DNN | Six Benchmark datasets [ 7 ] |
| Xiao et al. [ 12 ] | 2017 | DeepLocator: Enchaned CNN using rTF-IDuF(Revised term frequency-user focused inverse document frequency) | Machine Learning | AspectJ, Eclipse, JDT, SWT and Tomcat projects |
| Project Name | No. of Bug Reports | No. of files in project | No. of fixed classes per bug report | No. of API |
| SWT | 4151 | 2056 | 3 | 161 |
| AspectJ | 593 | 4439 | 2 | 54 |
| Tomcat | 1056 | 1552 | 1 | 389 |
| Birt | 4178 | 6841 | 1 | 957 |
| JDT | 6274 | 8184 | 2 | 1329 |
| Eclipse UI | 6495 | 3464 | 2 | 1314 |
| k | NSGA-II | NSGA-II using proposed tokenization | Lexical similarity | History-based Similarity | MOEA/D | SPEA-2 |
| 5 | 76 | 83 | 67 | 68 | 75 | 86 |
| 10 | 72.5 | 80 | 60 | 60 | 72 | 82 |
| 15 | 65 | 71 | 57 | 51 | 69 | 76 |
| 20 | 61.4 | 68 | 48 | 47 | 64 | 71 |
| k | NSGA-II | NSGA-II using proposed tokenization | Lexical similarity | History-based Similarity | MOEA/D | SPEA-2 |
| 5 | 67 | 71 | 53 | 61 | 69.5 | 73 |
| 10 | 74 | 81 | 43 | 57 | 76 | 81 |
| 15 | 79.5 | 86 | 57 | 63 | 81.4 | 86.5 |
| 20 | 83 | 90 | 71 | 68 | 87 | 91.3 |
| k | NSGA-II | NSGA-II using proposed tokenization | Lexical similarity | History-based Similarity | MOEA/D | SPEA-2 |
| 5 | 61 | 65 | 49 | 32 | 62 | 68 |
| 10 | 74.4 | 85 | 72 | 63 | 83.5 | 88.5 |
| 15 | 82 | 92 | 81 | 70 | 90.8 | 91 |
| 20 | 87.3 | 95 | 86 | 69 | 92 | 94 |
| k | Precision | Recall | Accuracy | ||||||
|---|---|---|---|---|---|---|---|---|---|
| NSGA-II | MOEA /D | SPEA-2 | NSGA-II | MOEA /D | SPEA-2 | NSGA-II | MOEA /D | SPEA-2 | |
| 5 | 42.9 | 39 | 44 | 18.8 | 17 | 20.4 | 42 | 39 | 45 |
| 10 | 50 | 47 | 53.5 | 43.8 | 41.3 | 46.2 | 64 | 62.5 | 67 |
| 15 | 52.7 | 49.5 | 56 | 62.5 | 59 | 65 | 72 | 67 | 74 |
| 20 | 44.5 | 41 | 48 | 75 | 71.8 | 78.2 | 84 | 75.3 | 88.5 |
| NSGA-II (Improved version) | SPEA-2 | MOEA/D | Lexical similarity | History-based Similarity |
| 2874 | 3410 | 3123 | 5982 | 6863 |
Automated Software Engineering
Automated Software Engineering uses AI, search, and verification methods to automate tasks across the software development lifecycle.
See all 82 papers