• DocumentCode
    3142123
  • Title

    Lase: Locating and applying systematic edits by learning from examples

  • Author

    Na Meng ; Miryung Kim ; McKinley, Kathryn S.

  • Author_Institution
    Univ. of Texas at Austin, Austin, TX, USA
  • fYear
    2013
  • fDate
    18-26 May 2013
  • Firstpage
    502
  • Lastpage
    511
  • Abstract
    Adding features and fixing bugs often require systematic edits that make similar, but not identical, changes to many code locations. Finding all the relevant locations and making the correct edits is a tedious and error-prone process for developers. This paper addresses both problems using edit scripts learned from multiple examples. We design and implement a tool called LASE that (1) creates a context-aware edit script from two or more examples, and uses the script to (2) automatically identify edit locations and to (3) transform the code. We evaluate LASE on an oracle test suite of systematic edits from Eclipse JDT and SWT. LASE finds edit locations with 99% precision and 89% recall, and transforms them with 91% accuracy. We also evaluate LASE on 37 example systematic edits from other open source programs and find LASE is accurate and effective. Furthermore, we confirmed with developers that LASE found edit locations which they missed. Our novel algorithm that learns from multiple examples is critical to achieving high precision and recall; edit scripts created from only one example produce too many false positives, false negatives, or both. Our results indicate that LASE should help developers in automating systematic editing. Whereas most prior work either suggests edit locations or performs simple edits, LASE is the first to do both for nontrivial program edits.
  • Keywords
    program debugging; program testing; public domain software; text editing; Eclipse JDT; LASE; SWT; automatic edit location identification; bug fixing; code transformation; context-aware edit script; false negatives; false positives; locating and applying systematic edit; nontrivial program edit; open source programs; oracle test suite; Abstracts; Cloning; Computer bugs; Concrete; Context; Systematics; Transforms;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Engineering (ICSE), 2013 35th International Conference on
  • Conference_Location
    San Francisco, CA
  • Print_ISBN
    978-1-4673-3073-2
  • Type

    conf

  • DOI
    10.1109/ICSE.2013.6606596
  • Filename
    6606596