2023 · 46 citations · 57 references
ComputingComputer ScienceData MiningMachine LearningNatural Language ProcessingChange-point DetectionData-flow AnalysisDeep Learning-based Change DetectionEmpirical EvaluationProgram TransformationPython AutomationSource Code Change AnalysisSource Code Transformation
Because of the naturalness of software and the rapid evolution of Machine Learning (ML) techniques, frequently repeated code change patterns (CPATs) occur often. They range from simple API migrations to changes involving several complex control structures such as for loops. While manually performing CPATs is tedious, the current state-of-the-art techniques for inferring transformation rules are not advanced enough to handle unseen variants of complex CPATs, resulting in a low recall rate. In this paper we present a novel, automated workflow that mines CPATs, infers the transformation rules, and then transplants them automatically to new target sites. We designed, implemented, evaluated and released this in a tool, PYEVOLVE. At its core is a novel data-flow, control-flow aware transformation rule inference engine. Our technique allows us to advance the state-of-the-art for transformation-by-example tools; without it, 70% of the code changes that PYEVOLVE transforms would not be possible to automate. Our thorough empirical evaluation of over 40,000 transformations shows 97% precision and 94% recall. By accepting 90% of CPATs generated by PYEVOLVE in famous open-source projects, developers confirmed its changes are useful.
57
Automating string processing in spreadsheets using input-output examples
Sumit Gulwani · 2011 · 446 citations
Advanced C++ Programming Styles and Idioms
James O. Coplien · 2005 · 370 citations
The TXL source transformation language
James R. Cordy · Science of Computer Programming · 2006 · 358 citations
On the naturalness of software
Abram Hindle, Earl T. Barr, Mark Gabel et al. · Communications of the ACM · 2016 · 291 citations
Why we refactor? confessions of GitHub contributors
Danilo Silva, Nikolaos Tsantalis, Marco Túlio Valente · 2016 · 278 citations · Full text