In the process of software development,the ability to localize faults is crucial for improving the efficiency of debugging.Generally speaking,detecting and repairing errant behavior at an early stage of the developmen...In the process of software development,the ability to localize faults is crucial for improving the efficiency of debugging.Generally speaking,detecting and repairing errant behavior at an early stage of the development cycle considerably reduces costs and development time.Researchers have tried to utilize various methods to locate the faulty codes.However,failing test cases usually account for a small portion of the test suite,which inevitably leads to the class-imbalance phenomenon and hampers the effectiveness of fault localization.Accordingly,in this work,we propose a new fault localization approach named ContextAug.After obtaining dynamic execution through test cases,ContextAug traces these executions to build an information model;subsequently,it constructs a failure context with propagation dependencies to intersect with new model-domain failing test samples synthesized by the minimum variability of the minority feature space.In contrast to traditional test generation directly from the input domain,ContextAug seeks a new perspective to synthesize failing test samples from the model domain,which is much easier to augment test suites.Through conducting empirical research on real large-sized programs with 13 state-of-the-art fault localization approaches,ContextAug could significantly improve fault localization effectiveness with up to 54.53%.Thus,ContextAug is verified as able to improve fault localization effectiveness.展开更多
Fault localization techniques are originally proposed to assist in manual debugging by generally producing a rank list of suspicious locations.With the increasing popularity of automated program repair,the fault local...Fault localization techniques are originally proposed to assist in manual debugging by generally producing a rank list of suspicious locations.With the increasing popularity of automated program repair,the fault localization techniques have been introduced to effectively reduce the search space of automated program repair.Unlike developers who mainly focus on the rank information,current automated program repair has two strategies to use the fault localization information:suspiciousness-first algorithm(SFA)based on the suspiciousness accuracy and rank-first algorithm(RFA)relying on the rank accuracy.However,despite the fact that the two different usages are widely adopted by current automated program repair and may result in different repair results,little is known about the impacts of the two strategies on automated program repair.In this paper we empirically compare the performance of SFA and RFA in the context of automated program repair.Specifically,we implement the two strategies and six well-studied fault localization techniques into four state-of-the-art automated program repair tools,and then use these tools to perform repair experiments on 60 real-world bugs from Defects4J.Our study presents a number of interesting findings:RFA outperforms SFA in 70.02%of cases when measured by the number of candidate patches generated before a valid patch is found(NCP),while SFA performs better in parallel repair and patch diversity;the performance of SFA can be improved by increasing the suspiciousness accuracy of fault localization techniques;finally,we use SimFix that deploys SFA to successfully repair four extra Defects4J bugs which cannot be repaired by SimFix originally using RFA.These observations provide a new perspective for future research on the usage and improvement of fault localization in automated program repair.展开更多
文摘In the process of software development,the ability to localize faults is crucial for improving the efficiency of debugging.Generally speaking,detecting and repairing errant behavior at an early stage of the development cycle considerably reduces costs and development time.Researchers have tried to utilize various methods to locate the faulty codes.However,failing test cases usually account for a small portion of the test suite,which inevitably leads to the class-imbalance phenomenon and hampers the effectiveness of fault localization.Accordingly,in this work,we propose a new fault localization approach named ContextAug.After obtaining dynamic execution through test cases,ContextAug traces these executions to build an information model;subsequently,it constructs a failure context with propagation dependencies to intersect with new model-domain failing test samples synthesized by the minimum variability of the minority feature space.In contrast to traditional test generation directly from the input domain,ContextAug seeks a new perspective to synthesize failing test samples from the model domain,which is much easier to augment test suites.Through conducting empirical research on real large-sized programs with 13 state-of-the-art fault localization approaches,ContextAug could significantly improve fault localization effectiveness with up to 54.53%.Thus,ContextAug is verified as able to improve fault localization effectiveness.
基金This research was supported in part by the National Natural Science Foundation of China(Grant Nos.61672529,61379054,61602504,61502015)the Fundamental Research Funds for the Central Universities(2019CDXYRJ0011)National Defense Science Foundation of China(3001010).
文摘Fault localization techniques are originally proposed to assist in manual debugging by generally producing a rank list of suspicious locations.With the increasing popularity of automated program repair,the fault localization techniques have been introduced to effectively reduce the search space of automated program repair.Unlike developers who mainly focus on the rank information,current automated program repair has two strategies to use the fault localization information:suspiciousness-first algorithm(SFA)based on the suspiciousness accuracy and rank-first algorithm(RFA)relying on the rank accuracy.However,despite the fact that the two different usages are widely adopted by current automated program repair and may result in different repair results,little is known about the impacts of the two strategies on automated program repair.In this paper we empirically compare the performance of SFA and RFA in the context of automated program repair.Specifically,we implement the two strategies and six well-studied fault localization techniques into four state-of-the-art automated program repair tools,and then use these tools to perform repair experiments on 60 real-world bugs from Defects4J.Our study presents a number of interesting findings:RFA outperforms SFA in 70.02%of cases when measured by the number of candidate patches generated before a valid patch is found(NCP),while SFA performs better in parallel repair and patch diversity;the performance of SFA can be improved by increasing the suspiciousness accuracy of fault localization techniques;finally,we use SimFix that deploys SFA to successfully repair four extra Defects4J bugs which cannot be repaired by SimFix originally using RFA.These observations provide a new perspective for future research on the usage and improvement of fault localization in automated program repair.