Fine-grained and accurate source code differencing
Open accessThe DOI matches its Crossref record; 24 of the 24 references it cites were found in a registry or an index.
Abstract
At the heart of software evolution is a sequence of edit actions, called an edit script, made to a source code file. Since software systems are stored version by version, the edit script has to be computed from these versions, which is known as a complex task. Existing approaches usually compute edit scripts at the text granularity with only add line and delete line actions. However, inferring syntactic changes from such an edit script is hard. Since moving code is a frequent action performed when editing code, it should also be taken into account. In this paper, we tackle these issues by introducing an algorithm computing edit scripts at the abstract syntax tree granularity including move actions. Our objective is to compute edit scripts that are short and close to the original developer intent. Our algorithm is implemented in a freely-available and extensible tool that has been intensively validated.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
The Measurement of Observer Agreement for Categorical Data
Landis, J. R., & Koch, G. G. (1977) · Biometrics · doi:10.2307/2529310 · Cited by 81,148
A Coefficient of Agreement for Nominal Scales
Cohen, J. (1960) · Educational and Psychological Measurement · doi:10.1177/001316446002000104 · Cited by 42,398
Measuring nominal scale agreement among many raters.
Fleiss, J. L. (1971) · Psychological Bulletin · doi:10.1037/h0031619 · Cited by 8,733
Educational and Psychological Measurement
(1982) · Serials Review · doi:10.1080/00987913.1982.10763392 · Cited by 1,410
AnO(ND) difference algorithm and its variations
Myers, E. W. (1986) · Algorithmica · doi:10.1007/bf01840446 · Cited by 893
A survey on tree edit distance and related problems
Bille, P. (2005) · Theoretical Computer Science · doi:10.1016/j.tcs.2004.12.030 · Cited by 751 · cited 4×
“The tree differencing problem has been largely investigated when considering only the add node, delete node and update node actions [4].”
BackgroundInfluentialChange Distilling:Tree Differencing for Fine-Grained Source Code Change Extraction
Fluri, B., Wursch, M., PInzger, M., & Gall, H. (2007) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2007.70731 · Cited by 607
Change detection in hierarchically structured information
Chawathe, S. S., Rajaraman, A., Garcia-Molina, H., & Widom, J. (1996) · Proceedings of the 1996 ACM SIGMOD international conference on Management of data - SIGMOD '96 · doi:10.1145/233269.233366 · Cited by 484
Detecting changes in XML documents
Cobena, G., Abiteboul, S., & Marian, A. (2003) · Proceedings 18th International Conference on Data Engineering · doi:10.1109/icde.2002.994696 · Cited by 422
On understanding laws, evolution, and conservation in the large-program life cycle
Lehman, M. M. (1979) · Journal of Systems and Software · doi:10.1016/0164-1212(79)90022-0 · Cited by 377
Cited by
A Novel Neural Source Code Representation Based on Abstract Syntax Tree
Zhang, J., Wang, X., Zhang, H., Sun, H., Wang, K., & Liu, X. (2019) · 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE) · doi:10.1109/icse.2019.00086 · Cited by 655
CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generation
Lu, S., Guo, D., Ren, S., Huang, J., Svyatkovskiy, A., Blanco, A., Clement, C., Drain, D., Jiang, D., Tang, D., et al. (2021) · arXiv · doi:10.48550/arxiv.2102.04664 · Cited by 536
“To achieve this, they employ the GumTree Spoon AST Diff tool [17].”
MethodNopol: Automatic Repair of Conditional Statement Bugs in Java Programs
Xuan, J., Martinez, M., DeMarco, F., Clement, M., Marcote, S. L., Durieux, T., Le Berre, D., & Monperrus, M. (2017) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2016.2560811 · Cited by 430
Self-citationAn Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation
Tufano, M., Watson, C., Bavota, G., Penta, M. D., White, M., & Poshyvanyk, D. (2019) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3340544 · Cited by 370
Le, X. B. D., Lo, D., & Le Goues, C. (2016) · 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER) · doi:10.1109/saner.2016.76 · Cited by 332
Shaping program repair space with existing patches and similar code
Jiang, J., Xiong, Y., Zhang, H., Gao, Q., & Chen, X. (2018) · Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis · doi:10.1145/3213846.3213871 · Cited by 329
“GumTree [9] improves ChangeDistiller by removing the assumption that leaf nodes contains a significant amount of text.”
BackgroundMethodInfluentialTBar: revisiting template-based automated program repair
Liu, K., Koyuncu, A., Kim, D., & Bissyandé, T. F. (2019) · Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis · doi:10.1145/3293882.3330577 · Cited by 321
VulPecker: an automated vulnerability detection system based on code similarity analysis
Li, Z., Zou, D., Xu, S., Jin, H., Qi, H., & Hu, J. (2016) · Proceedings of the 32nd Annual Conference on Computer Security Applications · doi:10.1145/2991079.2991102 · Cited by 234
“, Types 3–Type 5 in Table 1), can be extracted via a sequence of edit actions from the unpatched piece of code to the patched one using, for example, the gumtree algorithm [11].”
MethodGetafix: learning to fix bugs automatically
Bader, J., Scott, A., Pradel, M., & Chandra, S. (2019) · Proceedings of the ACM on Programming Languages · doi:10.1145/3360585 · Cited by 227
“To extract edits from a given pair of ASTs, Getafix builds on the GumTree algorithm [Falleri et al. 2014], a tree-based technique to compute fine-grained edit steps that lead from one AST to another.”
MethodS3: syntax- and semantic-guided repair synthesis via programming by examples
Le, X.-B. D., Chu, D.-H., Lo, D., Le Goues, C., & Visser, W. (2017) · Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering · doi:10.1145/3106237.3106309 · Cited by 220
On Learning Meaningful Code Changes Via Neural Machine Translation
Tufano, M., Pantiuchina, J., Watson, C., Bavota, G., & Poshyvanyk, D. (2019) · 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE) · doi:10.1109/icse.2019.00021 · Cited by 207
“In the first step, we rely on GumTreeDiff [38] to establish the file-to-file mapping, performed using semantic anchors, between pre-and post-PR files and disregarding any file added/removed during the code review process.”
MethodAVATAR: Fixing Semantic Bugs with Fix Patterns of Static Analysis Violations
Liu, K., Koyuncu, A., Kim, D., & Bissyande, T. F. (2019) · 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner.2019.8667970 · Cited by 171
API code recommendation using statistical learning from fine-grained changes
Nguyen, A. T., Hilton, M., Codoban, M., Nguyen, H. A., Mast, L., Rademacher, E., Nguyen, T. N., & Dig, D. (2016) · Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering · doi:10.1145/2950290.2950333 · Cited by 163
“The state-of-the-art differencing tool GumTree [13] is used.”
MethodInfluentialA Large-Scale Empirical Study on Code-Comment Inconsistencies
Wen, F., Nagy, C., Bavota, G., & Lanza, M. (2019) · 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC) · doi:10.1109/icpc.2019.00019 · Cited by 105
A critical review on the evaluation of automated program repair systems
Liu, K., Li, L., Koyuncu, A., Kim, D., Liu, Z., Klein, J., & Bissyandé, T. F. (2021) · Journal of Systems and Software · doi:10.1016/j.jss.2020.110817 · Cited by 79
“We further define the ‘‘ impacted statements ’’ as the statements that are used to fix a bug in terms of modifying the code with one of four code change actions (i.e., ‘‘ Update ’’, ‘‘ Delete ’’, ‘‘ Insert ’’, and ‘‘ Move ’’) (Falleri et al., 2014; Liu et al., 2018b).”
BackgroundFIRA: fi ne-grained g ra ph-based code change representation for automated commit message generation
Dong, J., Lou, Y., Zhu, Q., Sun, Z., Li, Z., Zhang, W., & Hao, D. (2022) · Proceedings of the 44th International Conference on Software Engineering · doi:10.1145/3510003.3510069 · Cited by 61
“GumTree [11] is a representative AST mapping algorithm and has been widely adopted in various tasks [5, 14, 18, 24, 26, 31].”
MethodAutomating just-in-time comment updating
Liu, Z., Xia, X., Yan, M., & Li, S. (2020) · Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering · doi:10.1145/3324884.3416581 · Cited by 56
“To do this, we first leveraged GumTree [8] to calculate method mappings between two revisions.”
MethodCode Review Automation: Strengths and Weaknesses of the State of the Art
Tufano, R., Dabić, O., Mastropaolo, A., Ciniselli, M., & Bavota, G. (2024) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2023.3348172 · Cited by 48
“The AST-level changes have been extracted using Gumtree Spoon AST Diff [14].”
MethodUnderstanding semi-structured merge conflict characteristics in open-source Java projects
Accioly, P., Borba, P., & Cavalcanti, G. (2018) · Empirical Software Engineering · doi:10.1007/s10664-017-9586-1 · Cited by 48
Program merge conflict resolution via neural transformers
Svyatkovskiy, A., Fakhoury, S., Ghorbani, N., Mytkowicz, T., Dinella, E., Bird, C., Jang, J., Sundaresan, N., & Lahiri, S. K. (2022) · Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3540250.3549163 · Cited by 38
“In an effort to accurately and fairly identify semantically equivalent merges, we use GumTree [16], an AST differencing tool, to identify and ignore semantically equivalent differences between JD IME output and the user resolution, such as reordered method declarations.”
MethodPredictive Comment Updating With Heuristics and AST-Path-Based Neural Learning: A Two-Phase Approach
Lin, B., Wang, S., Liu, Z., Xia, X., & Mao, X. (2023) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2022.3185458 · Cited by 27
“To extract the structure information, we first generate the ASTs of the old (AO) and new methods (AN ) using a widely-adopted tool, Gumtree [56].”
MethodMARBLE: Mining for Boilerplate Code to Identify API Usability Problems
Nam, D., Horvath, A., Macvean, A., Myers, B., & Vasilescu, B. (2019) · 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2019.00063 · Cited by 19
The IntelliJ Platform: A Framework for Building Plugins and Mining Software Data
Kurbatova, Z., Golubev, Y., Kovalenko, V., & Bryksin, T. (2021) · 2021 36th IEEE/ACM International Conference on Automated Software Engineering Workshops (ASEW) · doi:10.1109/asew52652.2021.00016 · Cited by 17
AI in Software Engineering at Facebook
Bader, J., Seohyun Kim, S., Sifei Luan, F., Chandra, S., & Meijer, E. (2021) · IEEE Software · doi:10.1109/ms.2021.3061664 · Cited by 16
Orca: differential bug localization in large-scale services
(2018) · Operating Systems Design and Implementation · doi:10.5555/3291168.3291205 · Cited by 15
Deep Just-In-Time Inconsistency Detection Between Comments and Source Code
Panthaplackel, S., Li, J. J., Gligoric, M., & Mooney, R. J. (2021) · Proceedings of the AAAI Conference on Artificial Intelligence · doi:10.1609/aaai.v35i1.16119 · Cited by 2
Metadata
- Authors
- Falleri, J.-R., Morandat, F., Blanc, X., Martinez, M., & Monperrus, M.
- Venue
- Proceedings of the 29th ACM/IEEE International Conference on Automated Software Engineering
- Publisher
- ACM
- Published
- 2014-09-15
- Pages
- 313-324
- OpenAlex
- W2065489029
- Cited by
- 549
- References
- 24
- FWCI
- 15.10
- Type
- conference paper
- Language
- en
- Open access
- green
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.