Identifying refactoring opportunities by identifying dependency cycles

The purpose of refactoring is to improve the quality of a software system by changing its internal design so that it is easier to understand or modify, or less prone to errors and so on. One challenge in performing a refactoring is quickly determining where to apply it. We present a tool (Jepends) that analyses the source code of a system in order to identify classes as possible refactoring candidates. Our tool identifies dependency cycles among classes because long cycles are detrimental to understanding, testing and reuse. We demonstrate our tool on a widely-downloaded, open-source, medium-sized Java program and show how cycles can be eliminated through a simple refactoring.

[1]  Michel Dagenais,et al.  An analysis framework for understanding layered software architectures , 1998, Proceedings. 6th International Workshop on Program Comprehension. IWPC'98 (Cat. No.98TB100242).

[2]  Clemens A. Szyperski,et al.  Component software - beyond object-oriented programming , 2002 .

[3]  Yijun Yu,et al.  Removing false code dependencies to speedup software build processes , 2003, CASCON.

[4]  John Stuart Lakos,et al.  Large-Scale C++ Software Design , 1996 .

[5]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[6]  Guy L. Steele,et al.  Java(TM) Language Specification , 2005 .

[7]  Grady Booch,et al.  Software Component with ADA , 1987 .

[8]  Grady Booch,et al.  Book Reviews , 1936, Computer.

[9]  B. Cockerham Parallel compilation of Ada units , 1989, TRI-Ada '88.

[10]  David Budgen,et al.  Software design , 2020, International computer science series.

[11]  Michele Marchesi,et al.  Power Laws in Smalltalk , 2004 .

[12]  Noga Alon,et al.  Finding and counting given length cycles , 1997, Algorithmica.

[13]  Sue Black,et al.  Computing ripple effect for software maintenance , 2001, J. Softw. Maintenance Res. Pract..

[14]  Steve Counsell,et al.  Power law distributions in class relationships , 2003, Proceedings Third IEEE International Workshop on Source Code Analysis and Manipulation.

[15]  Giovanni Lagorio Capturing ghost dependencies in Java sources , 2004, J. Object Technol..

[16]  Arthur J. Riel,et al.  Object-Oriented Design Heuristics , 1996 .

[17]  Edwin Hautus,et al.  IMPROVING JAVA SOFTWARE THROUGH PACKAGE STRUCTURE ANALYSIS , 2002 .

[18]  Guy L. Steele,et al.  Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley)) , 2005 .

[19]  Lionel C. Briand,et al.  A Unified Framework for Coupling Measurement in Object-Oriented Systems , 1999, IEEE Trans. Software Eng..

[20]  Yoichi Muraoka,et al.  On the Number of Operations Simultaneously Executable in Fortran-Like Programs and Their Resulting Speedup , 1972, IEEE Transactions on Computers.

[21]  Noga Alon,et al.  Finding and Counting Given Length Cycles (Extended Abstract) , 1994, ESA.