JIAD: a tool to infer design patterns in refactoring

Refactoring in object-orientation has gained increased attention due to its ability to improve design quality. Refactoring using design patterns (DPs) leads to production of high quality software systems. Although numerous tools related to refactoring exist, only a few of them apply design patterns in refactoring. Even these do not clearly specify where refactoring can be applied and when to apply appropriate design patterns.In this paper, we propose a tool, JIAD (Java based Intent-Aspects Detector) which addresses the refactoring issues such as, the scope for applying DPs in the code and the appropriate selection of DPs. The tool automates the identification of Intent-Aspects (IAs) which helps in applying suitable design patterns while refactoring the Java code. By automating the process of identifying IAs, the whole process of refactoring using DPs can be automated which enables rapid development of software systems. Also, the tool minimizes the number of possible errors while inferring the suitable DPs to apply refactoring. Our approach primarily focuses on Java code refactoring using declarative programming and AspectJ compiler. Finally, the tool is validated using two applications namely, JLex and Java2Prolog written in Java.

[1]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[2]  Elliot Berk,et al.  JLex: A lexical analyzer generator for Java , 2004 .

[3]  Ralph E. Johnson,et al.  A Refactoring Tool for Smalltalk , 1997, Theory Pract. Object Syst..

[4]  Carl G. Davis,et al.  A Hierarchical Model for Object-Oriented Design Quality Assessment , 2002, IEEE Trans. Software Eng..

[5]  Joshua Kerievsky,et al.  Refactoring to Patterns , 2004, XP/Agile Universe.

[6]  William G. Griswold,et al.  Automated assistance for program restructuring , 1993, TSEM.

[7]  Mel Ó Cinnéide Automated refactoring to introduce design patterns , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[8]  Leon Moonen,et al.  Java quality assurance by detecting code smells , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..

[9]  D. Janaki Ram,et al.  An implemntation mechanism for design patterns , 1998, SOEN.

[10]  Don Batory,et al.  Automated Software Evolution via Design Pattern Transformations , 1995 .

[11]  Motoshi Saeki,et al.  Metrics for applying GOF design patterns in refactoring processes , 2001, IWPSE '01.

[12]  Tom Mens,et al.  Identifying refactoring opportunities using logic meta programming , 2003, Seventh European Conference onSoftware Maintenance and Reengineering, 2003. Proceedings..

[13]  Don Roberts,et al.  Practical analysis for refactoring , 1999 .

[14]  William G. Griswold,et al.  Automated support for program refactoring using invariants , 2001, Proceedings IEEE International Conference on Software Maintenance. ICSM 2001.

[15]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .

[16]  Kris De Volder,et al.  Type-Oriented Logic Meta Programming , 1998 .