skip to main content
10.1145/2245276.2231959acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
research-article

RefactoringNG: a flexible Java refactoring tool

Published: 26 March 2012 Publication History

Abstract

The Java programming language and the Java API evolve and this evolution certainly will continue in future. Upgrade to a new version of programming language or API is nowadays usually done manually. We describe a new flexible refactoring tool for the Java programming language that can upgrade the code almost automatically. The tool performs refactoring rules described in the special language based on the abstract syntax trees. Each rule consists of two abstract syntax trees: the pattern and the rewrite. First, we search for the pattern and then replace each pattern occurrence with the rewrite. Searching and replacement is performed on the abstract syntax trees that are built and fully attributed by the Java compiler. Complete syntactic and semantic information about the source code and flexibility in refactoring rules give the tool competitive advantage over most similar tools.

References

[1]
Boshernitsan, M., and Graham, S. L. Interactive transformation of Java programs in Eclipse. International Conference on Software Engineering, pp. 791--794, 2006.
[2]
Compiler Tree API. http://download.oracle.com/javase/6/docs/jdk/api/javac/tree/
[3]
Cordy, J. R., Halpern-Hamu, C. D., and Promislow, E. TXL: A rapid prototyping system for programming language dialects. Computer Languages, Volume 16, Issue 1, pp. 97--107, 1991.
[4]
Dagenais, B., and Robillard, M. P. Recommending adaptive changes for framework evolution. International Conference on Software Engineering, pp. 481--490, 2008.
[5]
Dig, D., and Johnson, R. How do APIs evolve? A story of refactoring. Journal of Software Maintenance and Evolution: Research and Practice, Volume 18, Issue 2, pp. 83--107, 2006.
[6]
Eclipse IDE. http://www.eclipse.org
[7]
Fowler, M., Beck, K., Brant, J., Opdyke, W., and Roberts, D. Refactoring: Improving the design of existing code. Addison-Wesley, 1999.
[8]
Henkel, J., and Diwan, A. CatchUp!: capturing and replaying refactorings to support API evolution. International Conference on Software Engineering, pp. 274--283, 2005.
[9]
IntelliJ IDE. http://www.jetbrains.com/idea
[10]
Jackpot project. http://wiki.netbeans.org/Jackpot
[11]
JSR 199: Java Compiler API. http://www.jcp.org/en/jsr/detail?id=199
[12]
Kapur, P., Cossette, B., and Walker, J. R. Refactoring references for library migration. OOPSLA, pp. 726--738, 2010.
[13]
NetBeans IDE. http://www.netbeans.org
[14]
Nita, M. and Notking, D. Using twinning to adapt programs to alternative APIs. International Conference on Software Engineering, pp. 205--214, 2010.
[15]
RefactoringNG project. http://kenai.com/projects/refactoringng

Cited By

View all
  • (2024) ReInstancer: An automatic refactoring approach for Instanceof pattern matching Journal of Software: Evolution and Process10.1002/smr.2661Online publication date: 12-Mar-2024
  • (2017)The Spartanizer: Massive automatic refactoring2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER.2017.7884657(477-481)Online publication date: Feb-2017

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SAC '12: Proceedings of the 27th Annual ACM Symposium on Applied Computing
March 2012
2179 pages
ISBN:9781450308571
DOI:10.1145/2245276
  • Conference Chairs:
  • Sascha Ossowski,
  • Paola Lecca
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 26 March 2012

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. API evolution
  2. Java
  3. refactoring
  4. software evolution

Qualifiers

  • Research-article

Conference

SAC 2012
Sponsor:
SAC 2012: ACM Symposium on Applied Computing
March 26 - 30, 2012
Trento, Italy

Acceptance Rates

SAC '12 Paper Acceptance Rate 270 of 1,056 submissions, 26%;
Overall Acceptance Rate 1,650 of 6,669 submissions, 25%

Upcoming Conference

SAC '25
The 40th ACM/SIGAPP Symposium on Applied Computing
March 31 - April 4, 2025
Catania , Italy

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)9
  • Downloads (Last 6 weeks)1
Reflects downloads up to 20 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024) ReInstancer: An automatic refactoring approach for Instanceof pattern matching Journal of Software: Evolution and Process10.1002/smr.2661Online publication date: 12-Mar-2024
  • (2017)The Spartanizer: Massive automatic refactoring2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER.2017.7884657(477-481)Online publication date: Feb-2017

View Options

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