arXiv:2608.27089cs.NEAug 2026

Manuscript Offprint

arXiv:2608.27089

Bug Localization from Bug Reports: A Multi-Objective Approach

Waleed Ahmad, Mehtab Kiran Suddle, Maryam Bashir

Waleed Ahmad, Mehtab Kiran Suddle and Maryam Bashir *

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.

Keywords: Search-based Software Engineering, Bug Localization, Information Retrieval, Multi-objective Optimization

1. Introduction

Software has become an integral part of modern society, with its widespread use influencing nearly every aspect of daily life, ranging from mobile applications to office software. Today, software is no longer merely a convenience but a necessity, particularly in safety-critical and security-sensitive domains such as nuclear energy, aviation, and healthcare. This increasing dependence on software has resulted in greater system complexity and a higher likelihood of software bugs, which may lead to operational failures. Software bugs, commonly caused by logic or coding errors, manifest when a system produces incorrect outputs or exhibits abnormal behavior during execution [1]. When such unexpected behavior arises, developers or users document it in the form of a bug report [42].

Bug reports provide structured information that assists in identifying and resolving software defects. As software systems continue to scale in size and complexity, the number of reported bugs increases substantially. For instance, repositories such as Mozilla and Eclipse collectively contain more than 215,000 documented bug reports, according to recent datasets. These reports play a crucial role in supporting developers and maintainers by guiding system updates and improving software reliability. However, low-quality bug reports can negatively impact bug localization, making the process more time-consuming and error-prone [1]. Manually identifying faulty components from natural language descriptions requires extensive system knowledge, highlighting the need for automated bug localization techniques. This process aims to locate defective code segments in order to enhance system reliability, safety, and performance [4].

Effective automated bug localization techniques aim to identify code components that are most likely re-

∗^{*}Corresponding author. E-mail: maryam.bashir@nu.edu.pk

0000-0000/09/$00.00 © 2009 – IOS Press and the authors. All rights reserved

Bug ID: 378535

Summary: "Close All" and "Close Others" menu options available when right clicking on tab in PartStack when no part is closeable.

Description: If I create a PartStack that contains multiple parts but none of the parts are closeable, when I right click on any of the tabs I get menu options for "Close All" and "Close Others". Selection of either of the menu options doesn't cause any tabs to be closed since none of the tabs can be closed.

Reported: 2012-05-04 14:03

Fig. 1. An Eclipse Bug Report Example (ID 378535)

sponsible for reported defects, thereby improving developer productivity by reducing the time and effort required to locate bug sources [6]. Although many existing approaches employ Text Retrieval (TR) techniques for bug localization, their effectiveness is often limited by the quality of query formulation and evaluation strategies [4]. Furthermore, the linguistic gap between natural language bug reports and programming language source code reduces the effectiveness of purely lexical matching methods [1].

Bug reports are typically written in natural language, whereas source code is expressed using programming languages. As a result, similarity scores between bug reports and source code are generally higher when extensive comments are present or when bug reports explicitly mention code element names. Figure 1 illustrates an example of a bug report describing an issue related to incorrect menu options for non-closeable parts. The resolution involves examining three related classes extracted from the Eclipse project. As shown in Figure 3, the StackRenderer class contains a variable named uiElement of type MUIElement. Figure 3 also presents the API specifications of the MUIElement interface, which include terms such as “parts” and “menus” that appear in the bug report description in Figure 2. This lexical overlap between API documentation and bug reports can contribute to more accurate identification of relevant faulty classes.

This study focuses on automatically ranking files or classes that are most likely to contain defects based on bug report descriptions. The primary objective is to balance reducing the number of ranked files or classes while increasing both history-based and lexical-based similarity using a proposed multi-objective model. The following observations motivate this work:

– Similar content in previously resolved bug reports may indicate relevance to a new bug report.

– API documentation is more informative than code comments or element names alone.

– Recently modified code may still contain defects that lead to abnormal system behavior.

– The model should prioritize ranking a minimal number of highly relevant classes to reduce time consumption [1].

To address these observations, we propose two comprehensive approaches using multi-objective SPEA-2, an enhanced version of the original Strength Pareto Evolutionary Algorithm (SPEA), and a multi-objective evolutionary algorithm based on decomposition (MOEA/D). Additionally, we introduce a novel tokenization technique as a preprocessing step to improve localization accuracy. Our evaluation includes six open-source Java projects [7] as well as an industrial Kotlin-based Android project containing a repository of 100 bug reports.

References (42)