Just-in-time defect identification and localization: A two-phase framework
Defect localization aims to locate buggy program elements (e.g., buggy files, methods or lines of code) based on defect symptoms, e.g., bug reports or program spectrum. However, when we receive the defect symptoms, the defect has been exposed and negative impacts have been introduced. Thus, one chal...
Saved in:
Main Authors: | , , , , , |
---|---|
Format: | text |
Language: | English |
Published: |
Institutional Knowledge at Singapore Management University
2022
|
Subjects: | |
Online Access: | https://ink.library.smu.edu.sg/sis_research/5899 https://ink.library.smu.edu.sg/context/sis_research/article/6902/viewcontent/JIT_Defect_Ident_tse2020_av.pdf |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Singapore Management University |
Language: | English |
id |
sg-smu-ink.sis_research-6902 |
---|---|
record_format |
dspace |
spelling |
sg-smu-ink.sis_research-69022022-02-16T01:07:39Z Just-in-time defect identification and localization: A two-phase framework YAN, Meng XIA, Xin FAN, Yuanrui HASSAN, Ahmed E. LO, David LI, Shanping Defect localization aims to locate buggy program elements (e.g., buggy files, methods or lines of code) based on defect symptoms, e.g., bug reports or program spectrum. However, when we receive the defect symptoms, the defect has been exposed and negative impacts have been introduced. Thus, one challenging task is: whether we can locate buggy program prior to appearance of the defect symptom at an early time (e.g., when buggy program elements are being checked-in). We refer to this type of defect localization as “Just-In-Time (JIT) Defect localization”. Although many prior studies have proposed various JIT defect identification methods to identify whether a new change is buggy, these prior methods do not locate the suspicious positions. Thus, JIT defect localization is the next step of JIT defect identification (i.e., after a buggy change is identified, suspicious source code lines are located). To address this problem, we propose a two-phase framework, i.e., JIT defect identification and JIT defect localization. Given a new change, JIT defect identification will identify it as buggy change or clean change first. If a new change is identified as buggy, JIT defect localization will rank the source code lines introduced by the new change according to their suspiciousness scores. The source code lines ranked at the top of the list are estimated as the defect location. For JIT defect identification phase, we use 14 change-level features to build a classifier by following existing approach. For JIT defect localization phase, we propose a JIT defect localization approach that leverages software naturalness with the N-gram model. To evaluate the proposed framework, we conduct an empirical study on 14 open source projects with a total of 177,250 changes. The results show that software naturalness is effective for our JIT defect localization. Our model achieves a reasonable performance, and outperforms the two baselines (i.e., random guess and a static bug finder (i.e., PMD)) by a substantial margin in terms of four ranking measures. 2022-01-01T08:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/5899 info:doi/10.1109/TSE.2020.2978819 https://ink.library.smu.edu.sg/context/sis_research/article/6902/viewcontent/JIT_Defect_Ident_tse2020_av.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Defect Localization Fans History Just-in-Time Software Software Naturalness Task analysis Computer bugs Defect Identification Software Engineering |
institution |
Singapore Management University |
building |
SMU Libraries |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
SMU Libraries |
collection |
InK@SMU |
language |
English |
topic |
Defect Localization Fans History Just-in-Time Software Software Naturalness Task analysis Computer bugs Defect Identification Software Engineering |
spellingShingle |
Defect Localization Fans History Just-in-Time Software Software Naturalness Task analysis Computer bugs Defect Identification Software Engineering YAN, Meng XIA, Xin FAN, Yuanrui HASSAN, Ahmed E. LO, David LI, Shanping Just-in-time defect identification and localization: A two-phase framework |
description |
Defect localization aims to locate buggy program elements (e.g., buggy files, methods or lines of code) based on defect symptoms, e.g., bug reports or program spectrum. However, when we receive the defect symptoms, the defect has been exposed and negative impacts have been introduced. Thus, one challenging task is: whether we can locate buggy program prior to appearance of the defect symptom at an early time (e.g., when buggy program elements are being checked-in). We refer to this type of defect localization as “Just-In-Time (JIT) Defect localization”. Although many prior studies have proposed various JIT defect identification methods to identify whether a new change is buggy, these prior methods do not locate the suspicious positions. Thus, JIT defect localization is the next step of JIT defect identification (i.e., after a buggy change is identified, suspicious source code lines are located). To address this problem, we propose a two-phase framework, i.e., JIT defect identification and JIT defect localization. Given a new change, JIT defect identification will identify it as buggy change or clean change first. If a new change is identified as buggy, JIT defect localization will rank the source code lines introduced by the new change according to their suspiciousness scores. The source code lines ranked at the top of the list are estimated as the defect location. For JIT defect identification phase, we use 14 change-level features to build a classifier by following existing approach. For JIT defect localization phase, we propose a JIT defect localization approach that leverages software naturalness with the N-gram model. To evaluate the proposed framework, we conduct an empirical study on 14 open source projects with a total of 177,250 changes. The results show that software naturalness is effective for our JIT defect localization. Our model achieves a reasonable performance, and outperforms the two baselines (i.e., random guess and a static bug finder (i.e., PMD)) by a substantial margin in terms of four ranking measures. |
format |
text |
author |
YAN, Meng XIA, Xin FAN, Yuanrui HASSAN, Ahmed E. LO, David LI, Shanping |
author_facet |
YAN, Meng XIA, Xin FAN, Yuanrui HASSAN, Ahmed E. LO, David LI, Shanping |
author_sort |
YAN, Meng |
title |
Just-in-time defect identification and localization: A two-phase framework |
title_short |
Just-in-time defect identification and localization: A two-phase framework |
title_full |
Just-in-time defect identification and localization: A two-phase framework |
title_fullStr |
Just-in-time defect identification and localization: A two-phase framework |
title_full_unstemmed |
Just-in-time defect identification and localization: A two-phase framework |
title_sort |
just-in-time defect identification and localization: a two-phase framework |
publisher |
Institutional Knowledge at Singapore Management University |
publishDate |
2022 |
url |
https://ink.library.smu.edu.sg/sis_research/5899 https://ink.library.smu.edu.sg/context/sis_research/article/6902/viewcontent/JIT_Defect_Ident_tse2020_av.pdf |
_version_ |
1770575657110077440 |