Two-Level Information-Retrieval-Based Model for Bug Localization Based on Bug Reports

Software bugs are a noteworthy concern for developers and maintainers. When a failure is detected late, it costs more to be fixed. To repair the bug that caused the software failure, the location of the bug must first be known. The process of finding the defective source code elements that led to th...

Full description

Bibliographic Details
Main Authors: Shatha Alsaedi, Ahmed A. A. Gad-Elrab, Amin Noaman, Fathy Eassa
Format: Article
Language:English
Published: MDPI AG 2024-01-01
Series:Electronics
Subjects:
Online Access:https://www.mdpi.com/2079-9292/13/2/321
_version_ 1797344194881126400
author Shatha Alsaedi
Ahmed A. A. Gad-Elrab
Amin Noaman
Fathy Eassa
author_facet Shatha Alsaedi
Ahmed A. A. Gad-Elrab
Amin Noaman
Fathy Eassa
author_sort Shatha Alsaedi
collection DOAJ
description Software bugs are a noteworthy concern for developers and maintainers. When a failure is detected late, it costs more to be fixed. To repair the bug that caused the software failure, the location of the bug must first be known. The process of finding the defective source code elements that led to the failure of the software is called bug localization. Effective approaches for automatically locating bugs using bug reports are highly desirable, as they would reduce bug-fixing time, consequently lowering software maintenance costs. With the increasing size and complexity of software projects, manual bug localization methods have become complex, challenging, and time-consuming tasks, which motivates research on automated bug localization techniques. This paper introduces a novel bug localization model, which works on two levels. The first level localizes the buggy classes using an information retrieval approach and it has two additional sub-phases, namely the class-level feature scoring phase and the class-level final score and ranking phase, which ranks the top buggy classes. The second level localizes the buggy methods inside these classes using an information retrieval approach and it has two sub-phases, which are the method-level feature scoring phase and the method-level final score and ranking phase, which ranks the top buggy methods inside the localized classes. A model is evaluated using an AspectJ dataset, and it can correctly localize and rank more than 350 classes and more than 136 methods. The evaluation results show that the proposed model outperforms several state-of-the-art approaches in terms of the mean reciprocal rank (MRR) metrics and the mean average precision (MAP) in class-level bug localization.
first_indexed 2024-03-08T10:58:51Z
format Article
id doaj.art-11c05e47cbc94167aa3be420d635f7bf
institution Directory Open Access Journal
issn 2079-9292
language English
last_indexed 2024-03-08T10:58:51Z
publishDate 2024-01-01
publisher MDPI AG
record_format Article
series Electronics
spelling doaj.art-11c05e47cbc94167aa3be420d635f7bf2024-01-26T16:13:36ZengMDPI AGElectronics2079-92922024-01-0113232110.3390/electronics13020321Two-Level Information-Retrieval-Based Model for Bug Localization Based on Bug ReportsShatha Alsaedi0Ahmed A. A. Gad-Elrab1Amin Noaman2Fathy Eassa3Department of Computer Science, Faculty of Computing and Information Technology, King Abdulaziz University, Jeddah 21589, Saudi ArabiaDepartment of Computer Science, Faculty of Computing and Information Technology, King Abdulaziz University, Jeddah 21589, Saudi ArabiaDepartment of Computer Science, Faculty of Computing and Information Technology, King Abdulaziz University, Jeddah 21589, Saudi ArabiaDepartment of Computer Science, Faculty of Computing and Information Technology, King Abdulaziz University, Jeddah 21589, Saudi ArabiaSoftware bugs are a noteworthy concern for developers and maintainers. When a failure is detected late, it costs more to be fixed. To repair the bug that caused the software failure, the location of the bug must first be known. The process of finding the defective source code elements that led to the failure of the software is called bug localization. Effective approaches for automatically locating bugs using bug reports are highly desirable, as they would reduce bug-fixing time, consequently lowering software maintenance costs. With the increasing size and complexity of software projects, manual bug localization methods have become complex, challenging, and time-consuming tasks, which motivates research on automated bug localization techniques. This paper introduces a novel bug localization model, which works on two levels. The first level localizes the buggy classes using an information retrieval approach and it has two additional sub-phases, namely the class-level feature scoring phase and the class-level final score and ranking phase, which ranks the top buggy classes. The second level localizes the buggy methods inside these classes using an information retrieval approach and it has two sub-phases, which are the method-level feature scoring phase and the method-level final score and ranking phase, which ranks the top buggy methods inside the localized classes. A model is evaluated using an AspectJ dataset, and it can correctly localize and rank more than 350 classes and more than 136 methods. The evaluation results show that the proposed model outperforms several state-of-the-art approaches in terms of the mean reciprocal rank (MRR) metrics and the mean average precision (MAP) in class-level bug localization.https://www.mdpi.com/2079-9292/13/2/321fault localizationsoftware maintenanceinformation retrievalclass localizationmethod localization
spellingShingle Shatha Alsaedi
Ahmed A. A. Gad-Elrab
Amin Noaman
Fathy Eassa
Two-Level Information-Retrieval-Based Model for Bug Localization Based on Bug Reports
Electronics
fault localization
software maintenance
information retrieval
class localization
method localization
title Two-Level Information-Retrieval-Based Model for Bug Localization Based on Bug Reports
title_full Two-Level Information-Retrieval-Based Model for Bug Localization Based on Bug Reports
title_fullStr Two-Level Information-Retrieval-Based Model for Bug Localization Based on Bug Reports
title_full_unstemmed Two-Level Information-Retrieval-Based Model for Bug Localization Based on Bug Reports
title_short Two-Level Information-Retrieval-Based Model for Bug Localization Based on Bug Reports
title_sort two level information retrieval based model for bug localization based on bug reports
topic fault localization
software maintenance
information retrieval
class localization
method localization
url https://www.mdpi.com/2079-9292/13/2/321
work_keys_str_mv AT shathaalsaedi twolevelinformationretrievalbasedmodelforbuglocalizationbasedonbugreports
AT ahmedaagadelrab twolevelinformationretrievalbasedmodelforbuglocalizationbasedonbugreports
AT aminnoaman twolevelinformationretrievalbasedmodelforbuglocalizationbasedonbugreports
AT fathyeassa twolevelinformationretrievalbasedmodelforbuglocalizationbasedonbugreports