skip to main content
10.1145/3106237.3106253acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
research-article
Public Access

Automatic inference of code transforms for patch generation

Published: 21 August 2017 Publication History

Abstract

We present a new system, Genesis, that processes human patches to automatically infer code transforms for automatic patch generation. We present results that characterize the effectiveness of the Genesis inference algorithms and the complete Genesis patch generation system working with real-world patches and defects collected from 372 Java projects. To the best of our knowledge, Genesis is the first system to automatically infer patch generation transforms or candidate patch search spaces from previous successful patches.

References

[1]
Spring Data REST. http://projects.spring.io/spring-data-rest/. (????).
[2]
GitHub. https://github.com/. (2008).
[3]
Mining and Understanding Software Enclaves (MUSE) Program. https://wiki. museprogram.org. (2016).
[4]
Activiti. http://activiti.org/. (2017).
[5]
Apache maven. https://maven.apache.org/. (2017).
[6]
Bukkit. https://bukkit.org. (2017).
[7]
Dataflow Java SDK. https://github.com/GoogleCloudPlatform/DataflowJavaSDK. (2017).
[8]
dyn.js. http://dynjs.org/. (2017).
[9]
Error Prone. http://errorprone.info/. (2017).
[10]
Hamcrest Bean. https://github.com/eXparity/hamcrest-bean. (2017).
[11]
HdrHistogram. https://github.com/HdrHistogram/HdrHistogram. (2017).
[12]
HikariCP. https://brettwooldridge.github.io/HikariCP/. (2017).
[13]
Html Elements framework. https://github.com/yandex-qatools/htmlelements. (2017).
[14]
jade4j. https://github.com/neuland/jade4j. (2017).
[15]
Javaslang. http://www.javaslang.io/. (2017).
[16]
JGit - Eclipse. https://eclipse.org/jgit/. (2017).
[17]
Joda-Time. http://www.joda.org/joda-time/. (2017).
[18]
jPOS. http://www.jpos.org/. (2017).
[19]
JUnit. http://junit.org/. (2017).
[20]
MapStruct - Java Bean Mappings, the Easy Way! http://mapstruct.org/. (2017).
[21]
OrientDB. http://orientdb.com/orientdb/. (2017).
[22]
Simple, Intelligent, Object Mapping. http://modelmapper.org/. (2017).
[23]
Earl T Barr, Mark Harman, Yue Jia, Alexandru Marginean, and Justyna Petke. 2015. Automated software transplantation. In Proceedings of the 2015 International Symposium on Software Testing and Analysis. ACM, 257–269.
[24]
Pavol Bielik, Veselin Vechev, and Martin Vechev. 2016. PHOG: Prababilistic Model for Code. In Proceedings of the 33rd International Conference on Machine Learning.
[25]
Satish Chandra, Emina Torlak, Shaon Barman, and Rastislav Bodik. 2011. Angelic Debugging. In Proceedings of the 33rd International Conference on Software Engineering (ICSE ’11’). ACM, New York, NY, USA, 121–130.
[26]
Loris D’Antoni, Roopsha Samanta, and Rishabh Singh. 2016. Qlose: Program Repair with Quantitative Objectives. In Computer-Aided Verification (CAV).
[27]
Favio DeMarco, Jifeng Xuan, Daniel Le Berre, and Martin Monperrus. 2014. Automatic Repair of Buggy if Conditions and Missing Preconditions with SMT. In Proceedings of the 6th International Workshop on Constraints in Software Testing, Verification, and Analysis (CSTVA 2014). ACM, New York, NY, USA, 30–39.
[28]
Brian Demsky, Michael D. Ernst, Philip J. Guo, Stephen McCamant, Jeff H. Perkins, and Martin C. Rinard. 2006. Inference and enforcement of data structure consistency specifications. In Proceedings of the ACM/SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2006, Portland, Maine, USA, July 17-20, 2006. 233–244.
[29]
Brian Demsky and Martin C. Rinard. 2006. Goal-Directed Reasoning for Specification-Based Data Structure Repair. IEEE Trans. Software Eng. 32, 12 (2006), 931–951.
[30]
Thomas Durieux, Matias Martinez, Martin Monperrus, Romain Sommerard, and Jifeng Xuan. 2015. Automatic Repair of Real Bugs: An Experience Report on the Defects4J Dataset. CoRR abs/1505.07002 (2015). http://arxiv.org/abs/1505.07002
[31]
Inc. Gurobi Optimization. Gurobi Optimizer Reference Manual. (2015). http: //www.gurobi.com
[32]
Sarfraz Khurshid, Iván García, and Yuk Lai Suen. 2005. Repairing Structurally Complex Data. In Model Checking Software, 12th International SPIN Workshop, San Francisco, CA, USA, August 22-24, 2005, Proceedings. 123–138.
[33]
Dongsun Kim, Jaechang Nam, Jaewoo Song, and Sunghun Kim. 2013. Automatic Patch Generation Learned from Human-written Patches. In Proceedings of the 2013 International Conference on Software Engineering (ICSE ’13’). IEEE Press, 802–811. http://dl.acm.org/citation.cfm?id=2486788.2486893
[34]
Xuan-Bach D. Le, David Lo, and Claire Le Goues. 2016. History Driven Program Repair. In IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016, Suita, Osaka, Japan, March 14-18, 2016. 213–224.
[35]
Claire Le Goues, Michael Dewey-Vogt, Stephanie Forrest, and Westley Weimer. 2012. A Systematic Study of Automated Program Repair: Fixing 55 out of 105 Bugs for $8 Each. In Proceedings of the 2012 International Conference on Software Engineering (ICSE 2012). IEEE Press, 3–13. http://dl.acm.org/citation.cfm?id= 2337223.2337225
[36]
Fan Long, Peter Amidon, and Martin Rinard. 2016. Automatic Inference of Code Transforms and Search Spaces for Automatic Patch Generation Systems. Technical Report MIT-CSAIL-TR-2016-010. http://hdl.handle.net/1721.1/103556
[37]
Fan Long and Martin Rinard. Automatic patch generation by learning correct code. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2016, St. Petersburg, FL, USA, January 20 - 22, 2016. 298–312.
[38]
Fan Long and Martin Rinard. 2015. Staged Program Repair with Condition Synthesis. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering (ESEC/FSE 2015). ACM, New York, NY, USA, 166–178.
[39]
Fan Long and Martin C. Rinard. 2016. An analysis of the search spaces for generate and validate patch generation systems. In Proceedings of the 38th International Conference on Software Engineering, ICSE 2016, Austin, TX, USA, May 14-22, 2016. 702–713.
[40]
Sergey Mechtaev, Jooyong Yi, and Abhik Roychoudhury. 2016. Angelix: scalable multiline program patch synthesis via symbolic analysis. In Proceedings of the 38th International Conference on Software Engineering, ICSE 2016, Austin, TX, USA, May 14-22, 2016. 691–701.
[41]
Na Meng, Lisa Hua, Miryung Kim, and Kathryn S. McKinley. 2015. Does Automated Refactoring Obviate Systematic Editing?. In Proceedings of the 37th International Conference on Software Engineering - Volume 1 (ICSE ’15’). IEEE Press, Piscataway, NJ, USA, 392–402. http://dl.acm.org/citation.cfm?id=2818754.2818804
[42]
Na Meng, Miryung Kim, and Kathryn S. McKinley. 2011. Systematic Editing: Generating Program Transformations from an Example. In Proceedings of the 32Nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’11’). ACM, New York, NY, USA, 329–342.
[43]
Na Meng, Miryung Kim, and Kathryn S. McKinley. 2013. LASE: locating and applying systematic edits by learning from examples. In 35th International Conference on Software Engineering, ICSE ’13, San Francisco, CA, USA, May 18-26, 2013. 502–511.
[44]
Martin Monperrus. 2014. A Critical Review of "Automatic Patch Generation Learned from Human-written Patches": Essay on the Problem Statement and the Evaluation of Automatic Software Repair. In Proceedings of the 36th International Conference on Software Engineering (ICSE 2014). ACM, New York, NY, USA, 234– 242.
[45]
Hoang Duong Thien Nguyen, Dawei Qi, Abhik Roychoudhury, and Satish Chandra. 2013. SemFix: Program Repair via Semantic Analysis. In Proceedings of the 2013 International Conference on Software Engineering (ICSE ’13’). IEEE Press, Piscataway, NJ, USA, 772–781. http://dl.acm.org/citation.cfm?id=2486788.2486890
[46]
Renaud Pawlak, Martin Monperrus, Nicolas Petitprez, Carlos Noguera, and Lionel Seinturier. 2015. Spoon: A Library for Implementing Analyses and Transformations of Java Source Code. Software: Practice and Experience (2015), na.
[47]
Jeff H. Perkins, Sunghun Kim, Sam Larsen, Saman Amarasinghe, Jonathan Bachrach, Michael Carbin, Carlos Pacheco, Frank Sherwood, Stelios Sidiroglou, Greg Sullivan, Weng-Fai Wong, Yoav Zibin, Michael D. Ernst, and Martin Rinard. 2009. Automatically patching errors in deployed software. In Proceedings of the ACM SIGOPS 22nd symposium on Operating systems principles (SOSP ’09). ACM, 87–102.
[48]
Yuhua Qi, Xiaoguang Mao, Yan Lei, Ziying Dai, and Chengsong Wang. 2014. The Strength of Random Search on Automated Program Repair. In Proceedings of the 36th International Conference on Software Engineering (ICSE 2014). ACM, New York, NY, USA, 254–265.
[49]
Zichao Qi, Fan Long, Sara Achour, and Martin Rinard. 2015. An Anlysis of Patch Plausibility and Correctness for Generate-and-Validate Patch Generation Systems. In Proceedings of the ACM/SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2015.
[50]
Veselin Raychev, Pavol Bielik, Martin Vechev, and Andreas Krause. 2016. Learning Programs from Noisy Data. In Proceedings of the 43rd Annual ACM SIGPLANSIGACT Symposium on Principles of Programming Languages (POPL ’16’). ACM, New York, NY, USA, 761–774.
[51]
Veselin Raychev, Martin Vechev, and Andreas Krause. 2015. Predicting Program Properties from "Big Code". In Proceedings of the 42Nd Annual ACM SIGPLANSIGACT Symposium on Principles of Programming Languages (POPL ’15’). ACM, New York, NY, USA, 111–124.
[52]
Veselin Raychev, Martin Vechev, and Eran Yahav. 2014. Code Completion with Statistical Language Models. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’14’). ACM, New York, NY, USA, 419–428.
[53]
Martin Rinard, Cristian Cadar, Daniel Dumitran, Daniel M. Roy, Tudor Leu, and William S. Beebee. 2004. Enhancing Server Availability and Security Through Failure-Oblivious Computing. In OSDI. 303–316.
[54]
Reudismam Rolim, Gustavo Soares, Loris D’Antoni, Oleksandr Polozov, Sumit Gulwani, Rohit Gheyi, Ryo Suzuki, and Bjoern Hartmann. Learning Syntactic Program Transformations from Examples. (Aug. 2016). arXiv:arXiv:1608.09000
[55]
Reudismam Rolim, Gustavo Soares, Loris D’Antoni, Oleksandr Polozov, Sumit Gulwani, Rohit Gheyi, Ryo Suzuki, and Björn Hartmann. 2017. Learning syntactic program transformations from examples. In Proceedings of the 39th International Conference on Software Engineering, ICSE 2017, Buenos Aires, Argentina, May 20-28, 2017.
[56]
Hesam Samimi, Max Schäfer, Shay Artzi, Todd D. Millstein, Frank Tip, and Laurie J. Hendren. 2012. Automated repair of HTML generation errors in PHP applications using string constraint solving. In ICSE 2012, June 2-9, 2012, Zurich, Switzerland. 277–287. Automatic Inference of Code Transforms for Patch Generation ESEC/FSE’17, September 4-8, 2017, Paderborn, Germany
[57]
Stelios Sidiroglou, Eric Lahtinen, Fan Long, and Martin Rinard. 2015. Automatic Error Elimination by Multi-Application Code Transfer. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM.
[58]
Stelios Sidiroglou-Douskos, Eric Lantinen, Anthony Eden, Fan Long, and Martin Rinard. 2017. CodeCarbonCopy. In Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering (ESEC/FSE 2017).
[59]
Sooel Son, Kathryn S. McKinley, and Vitaly Shmatikov. 2011. RoleCast: finding missing security checks when you do not know what checks are. In Proceedings of the 26th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2011, part of SPLASH 2011, Portland, OR, USA, October 22 - 27, 2011. 1069–1084.
[60]
Sooel Son, Kathryn S McKinley, and Vitaly Shmatikov. 2013. Fix Me Up: Repairing Access-Control Bugs in Web Applications. In NDSS.
[61]
Westley Weimer, Zachary P. Fry, and Stephanie Forrest. 2013. Leveraging program equivalence for adaptive program repair: Models and first results. In ASE’13. 356– 366.
[62]
Westley Weimer, ThanhVu Nguyen, Claire Le Goues, and Stephanie Forrest. 2009. Automatically Finding Patches Using Genetic Programming. In Proceedings of the 31st International Conference on Software Engineering (ICSE ’09’). IEEE Computer Society, 364–374.
[63]
Yingfei Xiong, Jie Wang, Runfa Yan, Jiachen Zhang, Shi Han, Gang Huang, and Lu Zhang. 2017. Precise Condition Synthesis for Program Repair. In Proceedings of the 39th International Conference on Software Engineering (ICSE ’17). IEEE Press, Piscataway, NJ, USA, 416–426.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ESEC/FSE 2017: Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering
August 2017
1073 pages
ISBN:9781450351058
DOI:10.1145/3106237
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 21 August 2017

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. Code transform
  2. Patch Generation
  3. Search space inference

Qualifiers

  • Research-article

Funding Sources

Conference

ESEC/FSE'17
Sponsor:

Acceptance Rates

Overall Acceptance Rate 112 of 543 submissions, 21%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)161
  • Downloads (Last 6 weeks)22
Reflects downloads up to 31 Dec 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media