Affiliation:
1. Virginia Tech, Blacksburg, VA, USA
Abstract
Since annotations were added to the Java language, many frameworks have moved to using annotated Plain Old Java Objects (POJOs) in their newest releases. Legacy applications are thus forced to undergo extensive restructuring in order to migrate from old framework versions to new versions based on annotations (
Version Lock-in
). Additionally, because annotations are embedded in the application code, changing between framework vendors may also entail largescale manual changes (
Vendor Lock-in
).
This paper presents a novel refactoring approach that effectively solves these two problems. Our approach infers a concise set of semantics-preserving transformation rules from two versions of a single class. Unlike prior approaches that detect only simple structural refactorings, our algorithm can infer general composite refactorings and is more than 97% accurate on average. We demonstrate the effectiveness of our approach by automatically upgrading more than 80K lines of the unit testing code of four open-source Java applications to use the latest version of the popular JUnit testing framework.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference45 articles.
1. Test Infected: Programmers love writing tests;Beck K.;Java Report,1998
2. Aligning development tools with the way programmers think about code changes
Cited by
5 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Grace: Language Models Meet Code Edits;Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering;2023-11-30
2. Tool support for managing repetitive program changes in evolving software;IET Software;2019-10
3. Language composition using source code annotations;Computer Science and Information Systems;2016
4. XML to annotations mapping definition with patterns;Computer Science and Information Systems;2014
5. Regrowing a language;ACM SIGPLAN Notices;2009-10-25