Abstract

Design patterns represent the best practices used by experienced java developers. Design patterns abstract reusable object-oriented software designs which are solutions to general problems that software developers faced during software development. Each pattern solves design problems that occur in every day development. The detection of design patterns during the process of software reverse engineering can provide a better understanding of the software system. The most recent approaches in design pattern detection rely on the abstract syntax tree representation of the source code for fact extraction. This paper proposes a new way to detect design pattern in Java applications by analyzing the java source code. This paper discussed about the relations both between classes and objects and established the derivative design pattern about model property. Using the roles, responsibilities and collaboration information of each design pattern define static definitions. The static definitions are used to find candidate instances during the static analysis by using BCEL. After the static analysis the found candidate instances are validated by using the dynamic behavior of design patterns. We instrument the Java byte code of the application we are analyzing with additional code fragments and extract method traces from the running application. These method traces represent the dynamic facts of an application. The several restrictions are presented to define design patterns dynamically. Four common patterns of original GoF design patterns are tested and the results are analyzed which give better results in detecting design patterns comparing with other tools. In addition a Java source code static checking tool, an Eclipse plug-in, is implemented. Finally several java applications source codes were analyzed by using the plug-in, and verified the feasibility of the approach.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call