Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1109/ASE.2019.00046acmconferencesArticle/Chapter ViewAbstractPublication PagesaseConference Proceedingsconference-collections
research-article

Understanding automatically-generated patches through symbolic invariant differences

Published: 07 February 2020 Publication History

Abstract

Developer trust is a major barrier to the deployment of automatically-generated patches. Understanding the effect of a patch is a key element of that trust. We find that differences in sets of formal invariants characterize patch differences and that implication-based distances in invariant space characterize patch similarities. When one patch is similar to another it often contains the same changes as well as additional behavior; this pattern is well-captured by logical implication. We can measure differences using a theorem prover to verify implications between invariants implied by separate programs. Although effective, theorem provers are computationally intensive; we find that string distance is an efficient heuristic for implication-based distance measurements. We propose to use distances between patches to construct a hierarchy highlighting patch similarities. We evaluated this approach on over 300 patches and found that it correctly categorizes programs into semantically similar clusters. Clustering programs reduces human effort by reducing the number of semantically distinct patches that must be considered by over 50%, thus reducing the time required to establish trust in automatically generated repairs.

References

[1]
G. M. Alarcon, L. G. Militello, P. Ryan, S. A. Jessup, C. S. Calhoun, and J. B. Lyons. A descriptive model of computer code trustworthiness. Journal of Cognitive Engineering and Decision Making, 11(2):107--121, 2017.
[2]
T. Ball and S. K. Rajamani. Automatically validating temporal safety properties of interfaces. In Workshop on Model Checking Software (SPIN), pages 103--122, 2001.
[3]
L. De Moura and N. Bjørner. Z3: An efficient smt solver. In International conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 337--340. Springer, 2008.
[4]
Z. Y. Ding, Y. Lyu, C. S. Timperley, and C. L. Goues. Leveraging program invariants to promote population diversity in search-based automatic program repair. In Genetic Improvement, 2019.
[5]
M. D. Ernst, J. H. Perkins, P. J. Guo, S. McCamant, C. Pacheco, M. S. Tschantz, and C. Xiao. The daikon system for dynamic detection of likely invariants. Science of Computer Programming, 69(1-3):35--45, 2007.
[6]
I. Gronau and S. Moran. Optimal implementations of upgma and other common clustering algorithms. Information Processing Letters, 104(6):205--210, 2007.
[7]
S. O. Haraldsson, J. R. Woodward, A. E. I. Brownlee, and K. Siggeirsdottir. Fixing bugs in your sleep: How genetic improvement became an overnight success. In Proceedings of the Genetic and Evolutionary Computation Conference Companion, pages 1513--1520, 2017.
[8]
R. Just, D. Jalali, and M. D. Ernst. Defects4j: A database of existing faults to enable controlled testing studies for java programs. In Proceedings of the 2014 International Symposium on Software Testing and Analysis, pages 437--440. ACM, 2014.
[9]
C. Le Goues, N. Holtschulte, E. K. Smith, Y. Brun, P. Devanbu, S. Forrest, and W. Weimer. The manybugs and introclass benchmarks for automated repair of c programs. IEEE Transactions on Software Engineering, 41(12):1236--1256, 2015.
[10]
C. Le Goues, T. Nguyen, S. Forrest, and W. Weimer. Genprog: A genetic method for automatic software repair. IEEE Transactions on Software Engineering, 38(1):54--72, Jan 2012.
[11]
F. Long and M. Rinard. Automatic patch generation by learning correct code. ACM SIGPLAN Notices, 51(1):298--312, 2016.
[12]
A. Marginean, J. Bader, S. Chandra, M. Harman, Y. Jia, K. Mao, A. Mols, and A. Scott. Sapfix: Automated end-to-end repair at scale. In International Conference on Software Engineering (ICSE), Software Enginering in Practice (SEIP) track, 2019.
[13]
M. Martinez and M. Monperrus. Astor: A program repair library for java. In Proceedings of the 25th Intl. Symp. on Software Testing and Analysis, pages 441--444. ACM, 2016.
[14]
M. Monperrus. Automatic software repair: a bibliography. ACM Computing Surveys (CSUR), 51(1):17, 2018.
[15]
G. Navarro. A guided tour to approximate string matching. ACM computing surveys (CSUR), 33(1):31--88, 2001.
[16]
H. D. T. Nguyen, D. Qi, A. Roychoudhury, and S. Chandra. Semfix: Program repair via semantic analysis. In Proceedings of the 2013 International Conference on Software Engineering, pages 772--781. IEEE Press, 2013.
[17]
Z. Qi, F. Long, S. Achour, and M. Rinard. An analysis of patch plausibility and correctness for generate-and-validate patch generation systems. In Proceedings of the 2015 International Symposium on Software Testing and Analysis, pages 24--36. ACM, 2015.
[18]
E. K. Smith, E. T. Barr, C. Le Goues, and Y. Brun. Is the cure worse than the disease? overfitting in automated program repair. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering, pages 532--543. ACM, 2015.
[19]
X. Yin, J. C. Knight, E. A. Nguyen, and W. Weimer. Formal verification by reverse synthesis. In Computer Safety, Reliability, and Security, pages 305--319, 2008.
[20]
Y. Yuan and W. Banzhaf. ARJA: automated repair of java programs via multi-objective genetic programming. CoRR, abs/1712.07804, 2017.

Cited By

View all
  • (2024)Test-based patch clustering for automatically-generated patches assessmentEmpirical Software Engineering10.1007/s10664-024-10503-229:5Online publication date: 24-Jul-2024
  • (2023)Automated Program Repair from Fuzzing PerspectiveProceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3597926.3598101(854-866)Online publication date: 12-Jul-2023
  • (2023)Evolving Software: Combining Online Learning with Mutation-Based Stochastic SearchACM Transactions on Evolutionary Learning and Optimization10.1145/35976173:4(1-32)Online publication date: 23-May-2023
  • Show More Cited By
  1. Understanding automatically-generated patches through symbolic invariant differences

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ASE '19: Proceedings of the 34th IEEE/ACM International Conference on Automated Software Engineering
    November 2019
    1333 pages
    ISBN:9781728125084

    Sponsors

    In-Cooperation

    • IEEE CS

    Publisher

    IEEE Press

    Publication History

    Published: 07 February 2020

    Check for updates

    Qualifiers

    • Research-article

    Conference

    ASE '19
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 82 of 337 submissions, 24%

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)4
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 30 Sep 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Test-based patch clustering for automatically-generated patches assessmentEmpirical Software Engineering10.1007/s10664-024-10503-229:5Online publication date: 24-Jul-2024
    • (2023)Automated Program Repair from Fuzzing PerspectiveProceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3597926.3598101(854-866)Online publication date: 12-Jul-2023
    • (2023)Evolving Software: Combining Online Learning with Mutation-Based Stochastic SearchACM Transactions on Evolutionary Learning and Optimization10.1145/35976173:4(1-32)Online publication date: 23-May-2023
    • (2022)Digging into Semantics: Where Do Search-Based Software Repair Methods Search?Parallel Problem Solving from Nature – PPSN XVII10.1007/978-3-031-14721-0_1(3-18)Online publication date: 10-Sep-2022
    • (2020)GEVOACM Transactions on Architecture and Code Optimization10.1145/341805517:4(1-28)Online publication date: 25-Nov-2020

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media