Quantifying the benefits of code hints for refactoring deprecated Java APIs
Cristina David, Pascal Kesseli, Daniel Kroening, Hanliang Zhang

TL;DR
This paper evaluates how code hints in Javadoc improve the automation of refactoring deprecated Java APIs, demonstrating that hints significantly increase the success rate of automated tools.
Contribution
It introduces symbolic and neural engines for automated refactoring and quantifies the impact of Javadoc code hints on refactoring effectiveness.
Findings
Code hints enable 71% correct refactoring with the worst engine.
Without hints, the success rate drops to 14%.
Adding more hints improves refactoring automation.
Abstract
When done manually, refactoring legacy code in order to eliminate uses of deprecated APIs is an error-prone and time-consuming process. In this paper, we investigate to which degree refactorings for deprecated Java APIs can be automated, and quantify the benefit of Javadoc code hints for this task. To this end, we build a symbolic and a neural engine for the automatic refactoring of deprecated APIs. The former is based on type-directed and component-based program synthesis, whereas the latter uses LLMs. We applied our engines to refactor the deprecated methods in the Oracle JDK 15. Our experiments show that code hints are enabling for the automation of this task: even the worst engine correctly refactors 71% of the tasks with code hints, which drops to at best 14% on tasks without. Adding more code hints to Javadoc can hence boost the refactoring of code that uses deprecated APIs.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software System Performance and Reliability · Advanced Software Engineering Methodologies
