Annotation refactoring: inferring upgrade transformations for legacy applications
Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
Hi-index | 0.00 |
Since annotations were added to the Java language, many enterprise frameworks have been transitioning to using annotated Plain Old Java Objects (POJOs) in their latest releases. Our automated refactoring tool, Trailblazer, alleviates the maintenance burden of such annotation refactoring tasks. The tool implements a novel approach that leverages a machine learning algorithm to infer semantics-preserving rules that are then used to automatically transform legacy Java classes. Using Trailblazer involves two phases. First, given an XML-based framework application, a programmer creates an annotation-based version of the application by hand, with Trailblazer recording the programmer's actions. Trailblazer then uses inductive learning to infer generalized upgrade rules. In the second phase, other programmers can apply the inferred general transformation rules to upgrade any other application that uses the same framework. Thus, once one developer has trailblazed through the hurdles of manually upgrading for a given framework, other developers can automatically follow along the beaten path. In this demonstration, we will use transparent persistence as our example domain to show how Trailblazer can infer generalized rules and then automatically upgrade a legacy enterprise application that uses EJB 2.0 XML configuration files, to use EJB 3.0 annotations.