|
ABSTRACT
Tools and analyses that find bugs in software are becoming increasingly prevalent. However, even after the potential false alarms raised by such tools are dealt with, many real reported errors may go unfixed. In such cases the programmers have judged the benefit of fixing the bug to be less than the time cost of understanding and fixing it.The true utility of a bug-finding tool lies not in the number of bugs it finds but in the number of bugs it causes to be fixed.Analyses that find safety-policy violations typically give error reports as annotated backtraces or counterexamples. We propose that bug reports additionally contain a specially-constructed patch describing an example way in which the program could be modified to avoid the reported policy violation. Programmers viewing the analysis output can use such patches as guides, starting points, or as an additional way of understanding what went wrong.We present an algorithm for automatically constructing such patches given model-checking and policy information typically already produced by most such analyses. We are not aware of any previous automatic techniques for generating patches in response to safety policy violations. Our patches can suggest additional code not present in the original program, and can thus help to explain bugs related to missing program elements. In addition, our patches do not introduce any new violations of the given safety policy.To evaluate our method we performed a software engineering experiment, applying our algorithm to over 70 bug reports produced by two off-the-shelf bug-finding tools running on large Java programs. Bug reports also accompanied by patches were three times as likely to be addressed as standard bug reports.This work represents an early step toward developing new ways to report bugs and to make it easier for programmers to fix them. Even a minor increase in our ability to fix bugs would be a great increase for the quality of software.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
A. V. Aho and T. G. Peterson. A minimum-distance error-correcting parser for context-free languages. SIAM Journal of Computation, 1(4):305--312, Dec. 1972.
|
 |
3
|
Rajeev Alur , Pavol Černý , P. Madhusudan , Wonhong Nam, Synthesis of interface specifications for Java classes, Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.98-109, January 12-14, 2005, Long Beach, California, USA
|
 |
4
|
|
| |
5
|
|
 |
6
|
|
| |
7
|
|
| |
8
|
|
 |
9
|
|
| |
10
|
H. Chen, D. Dean, and D. Wagner. Model checking one million lines of C code. In Network and Distributed System Security Symposium (NDSS), San Diego, CA, Feb. 2004.
|
 |
11
|
E. M. Clarke , O. Grumberg , K. L. McMillan , X. Zhao, Efficient generation of counterexamples and witnesses in symbolic model checking, Proceedings of the 32nd ACM/IEEE conference on Design automation, p.427-432, June 12-16, 1995, San Francisco, California, United States
[doi> 10.1145/217474.217565]
|
 |
12
|
James C. Corbett , Matthew B. Dwyer , John Hatcliff , Roby, Bandera: a source-level interface for model checking Java programs, Proceedings of the 22nd international conference on Software engineering, p.762-765, June 04-11, 2000, Limerick, Ireland
[doi> 10.1145/337180.337625]
|
| |
13
|
L. Cosmides, J. Tooby, A. Montaldi, and N. Thrall. Character counts: Cheater detection is relaxed for honest individuals. In 11th Annual Meeting of the Human Behavior and Evolution Society, Salt Lake City, Utah, June 1999.
|
 |
14
|
|
 |
15
|
|
 |
16
|
|
| |
17
|
|
 |
18
|
|
 |
19
|
|
| |
20
|
|
| |
21
|
P. Eggert, M. Haertel, D. Hayes, R. Stallman, and L. Tower. diff - compare files line by line. In http://www.gnu.org/software/diffutils/diffutils.html, 2005.
|
| |
22
|
D. Engler, B. Chelf, A. Chou, and S. Hallem. Checking system rules using system-specific, programmer-written compiler extensions. In Symposium on Operating Systems Design and Implementation, 2000.
|
 |
23
|
Cormac Flanagan , K. Rustan M. Leino , Mark Lillibridge , Greg Nelson , James B. Saxe , Raymie Stata, Extended static checking for Java, Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, June 17-19, 2002, Berlin, Germany
|
| |
24
|
D. Freedman, R. Pisani, and R. Purves. Statistics. Third edition. W. W. Norton, 1998.
|
| |
25
|
G. Gigerenzer and K. Hug. Domain-specific reasoning: social contracts, cheating and perspective change. In Cognition, volume 43, pages 127--171, 1992.
|
| |
26
|
A. Groce. Error explanation with distance metrics. In Lecture Notes in Computer Science, volume 2988, pages 108--122, Jan. 2004.
|
| |
27
|
A. Groce and D. Kroening. Making the most of bmc counterexamples. In Electronic Notes in Theoreitcal Computer Science, volume 119, pages 67--81, 2005.
|
| |
28
|
A. Groce and W. Visser. What went wrong: Explaining counterexamples. In Lecture Notes in Computer Science, volume 2648, pages 121--135, Jan. 2003.
|
 |
29
|
Thomas A. Henzinger , Ranjit Jhala , Rupak Majumdar , Grégoire Sutre, Lazy abstraction, Proceedings of the 29th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.58-70, January 16-18, 2002, Portland, Oregon
|
 |
30
|
David Hovemeyer , William Pugh, Finding bugs is easy, Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, October 24-28, 2004, Vancouver, BC, CANADA
[doi> 10.1145/1028664.1028717]
|
 |
31
|
|
| |
32
|
|
 |
33
|
Ted Kremenek , Ken Ashcraft , Junfeng Yang , Dawson Engler, Correlation exploitation in error ranking, Proceedings of the 12th ACM SIGSOFT twelfth international symposium on Foundations of software engineering, October 31-November 06, 2004, Newport Beach, CA, USA
|
| |
34
|
T. Kremenek and D. Engler. Z-ranking: Using statistical analysis to counter the impact of static analysis approximations. In Static Analysis, 10th International Symposium (SAS), pages 295--315, Jan. 2003.
|
| |
35
|
|
 |
36
|
|
 |
37
|
Roman Manevich , Manu Sridharan , Stephen Adams , Manuvir Das , Zhe Yang, PSE: explaining program failures via postmortem static analysis, Proceedings of the 12th ACM SIGSOFT twelfth international symposium on Foundations of software engineering, October 31-November 06, 2004, Newport Beach, CA, USA
|
| |
38
|
V. P. Ranganath, T. Amtoft, A. Banerjee, M. B. Dwyer, and J. Hatcliff. A new foundation for control-dependence and slicing for modern program structures. In European Symposium on Programming (ESOP), pages 77--93, Jan. 2005.
|
 |
39
|
|
| |
40
|
U. Shankar, K. Talwar, J. S. Foster, and D. Wagner. Detecting format string vulnerabilities with type qualifiers. In USENIX Security Symposium, pages 201--220, 2001.
|
| |
41
|
|
 |
42
|
|
 |
43
|
Westley Weimer , George C. Necula, Finding and preventing run-time error handling mistakes, Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 24-28, 2004, Vancouver, BC, Canada
|
 |
44
|
|
CITED BY 9
|
|
Henrik Stuart , René Rydhof Hansen , Julia L. Lawall , Jesper Andersen , Yoann Padioleau , Gilles Muller, Towards easing the diagnosis of bugs in OS code, Proceedings of the 4th workshop on Programming languages and operating systems, October 18-18, 2007, Stevenson, Washington
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Nicolas Bettenburg , Sascha Just , Adrian Schröter , Cathrin Weiss , Rahul Premraj , Thomas Zimmermann, What makes a good bug report?, Proceedings of the 16th ACM SIGSOFT International Symposium on Foundations of software engineering, November 09-14, 2008, Atlanta, Georgia
|
|
|
|
|
|
Stephanie Forrest , ThanhVu Nguyen , Westley Weimer , Claire Le Goues, A genetic programming approach to automated software repair, Proceedings of the 11th Annual conference on Genetic and evolutionary computation, July 08-12, 2009, Montreal, Québec, Canada
|
|
|
|
INDEX TERMS
Primary Classification:
D.
Software
D.2
SOFTWARE ENGINEERING
D.2.5
Testing and Debugging
Subjects:
Debugging aids
Additional Classification:
I.
Computing Methodologies
I.2
ARTIFICIAL INTELLIGENCE
I.2.2
Automatic Programming
Subjects:
Program modification
General Terms:
Algorithms,
Experimentation,
Human Factors,
Languages,
Verification
Keywords:
bug,
bug report,
counterexample,
error,
explanation,
localization,
patch
|