Remodularizing Java programs for improved locality of feature implementations in source code

Explicit traceability between features and source code is known to help programmers to understand and modify programs during maintenance tasks. However, the complex relations between features and their implementations are not evident from the source code of object-oriented Java programs. Consequently, the implementations of individual features are difficult to locate, comprehend, and modify in isolation. In this paper, we present a novel remodularization approach that improves the representation of features in the source code of Java programs. Both forward and reverse restructurings are supported through on-demand bidirectional restructuring between feature-oriented and object-oriented decompositions. The approach includes a feature location phase based on tracing of program execution, a feature representation phase that reallocates classes into a new package structure based on single-feature and multi-feature packages, and an annotation-based reverse transformation of code. Case studies performed on two open-source projects indicate that our approach requires relatively little manual effort and reduces tangling and scattering of feature implementations in the source code.

[1]  Kecheng Liu,et al.  Requirements recovery from legacy systems by analysing and modelling behaviour , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[2]  Jim Davies,et al.  Science of Computer Programming , 2014 .

[3]  Norman Wilde,et al.  Software reconnaissance: Mapping program features to code , 1995, J. Softw. Maintenance Res. Pract..

[4]  Walter F. Tichy,et al.  Proceedings 25th International Conference on Software Engineering , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[5]  Andrew David Eisenberg,et al.  Dynamic feature traces: finding features in unfamiliar code , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[6]  Susan Elliott Sim,et al.  My Repository Runneth Over: An Empirical Study on Diversifying Data Sources to Improve Feature Search , 2010, 2010 IEEE 18th International Conference on Program Comprehension.

[8]  Spiros Mancoridis,et al.  A hierarchy of dynamic software views: from object-interactions to feature-interactions , 2004, 20th IEEE International Conference on Software Maintenance, 2004. Proceedings..

[9]  J.A. Gomez,et al.  Locating user functionality in old code , 1992, Proceedings Conference on Software Maintenance 1992.

[10]  Arie van Deursen,et al.  Trace visualization for program comprehension: A controlled experiment , 2009, 2009 IEEE 17th International Conference on Program Comprehension.

[11]  Thomas Leich,et al.  An orthogonal access modifier model for feature-oriented programming , 2009, FOSD '09.

[12]  Romain Robbes,et al.  Recovering inter-project dependencies in software ecosystems , 2010, ASE.

[13]  Oscar Nierstrasz,et al.  Feature driven browsing , 2007, ICDL '07.

[14]  Bente Anda,et al.  Understanding cost drivers of software evolution: a quantitative and qualitative investigation of change effort in two evolving software systems , 2010, Empirical Software Engineering.

[15]  Sven Apel,et al.  Granularity in software product lines , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[16]  Stephen Travis Pope,et al.  A cookbook for using the model-view controller user interface paradigm in Smalltalk-80 , 1988 .

[17]  Jan Bosch Object-Oriented Frameworks : Problems & Experiences , 1997 .

[18]  John D. McGregor,et al.  Understanding object-oriented: a unifying paradigm , 1990, CACM.

[19]  Gregor Kiczales,et al.  Aspect-oriented programming , 1996, CSUR.

[20]  Iris Vessey,et al.  The Role of Cognitive Fit in the Relationship Between Software Comprehension and Modification , 2006, MIS Q..

[21]  Jan Jürjens,et al.  The Logical Modularity of Programs , 2009, 2009 16th Working Conference on Reverse Engineering.

[22]  Rainer Koschke,et al.  Locating Features in Source Code , 2003, IEEE Trans. Software Eng..

[23]  Matthias Riebisch,et al.  Architecting for evolvability by means of traceability and features , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering - Workshops.

[24]  Rainer Koschke,et al.  On dynamic feature location , 2005, ASE.

[25]  Don S. Batory,et al.  Scaling step-wise refinement , 2004, IEEE Transactions on Software Engineering.

[26]  David Coppit,et al.  Spotlight: A Prototype Tool for Software Plans , 2007, 29th International Conference on Software Engineering (ICSE'07).

[27]  R. E. Kurt Stirewalt,et al.  The interleaving problem in program understanding , 1995, Proceedings of 2nd Working Conference on Reverse Engineering.

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

[29]  Stéphane Ducasse,et al.  How Developers Develop Features , 2007, 11th European Conference on Software Maintenance and Reengineering (CSMR'07).

[30]  Xin Yao,et al.  Software Module Clustering as a Multi-Objective Search Problem , 2011, IEEE Transactions on Software Engineering.

[31]  Harold Ossher,et al.  On the Need for On-Demand Remodularization , 2000 .

[32]  Grady Booch,et al.  Object-oriented development , 1986, IEEE Transactions on Software Engineering.

[33]  Martin P. Robillard,et al.  Separating features in source code: an exploratory study , 2001, Proceedings of the 23rd International Conference on Software Engineering. ICSE 2001.

[34]  Swapna S. Gokhale,et al.  Locating program features using execution slices , 1999, Proceedings 1999 IEEE Symposium on Application-Specific Systems and Software Engineering and Technology. ASSET'99 (Cat. No.PR00122).

[35]  Jia Liu,et al.  Feature oriented refactoring of legacy applications , 2006, ICSE.

[36]  George T. Heineman,et al.  Evolving legacy system features into fine-grained components , 2002, ICSE '02.

[37]  Václav Rajlich,et al.  Intensions are a key to program comprehension , 2009, 2009 IEEE 17th International Conference on Program Comprehension.

[38]  Kris De Volder,et al.  Programming with Crosscutting Effective Views , 2004, ECOOP.

[39]  Alexander L. Wolf,et al.  A conceptual basis for feature engineering , 1999, J. Syst. Softw..

[40]  Alfred V. Aho,et al.  CERBERUS: Tracing Requirements to Source Code Using Information Retrieval, Dynamic Analysis, and Program Analysis , 2008, 2008 16th IEEE International Conference on Program Comprehension.

[41]  Lionel C. Briand,et al.  A Unified Framework for Cohesion Measurement in Object-Oriented Systems , 2004, Empirical Software Engineering.

[42]  Sandro Morasca,et al.  Property-Based Software Engineering Measurement , 1996, IEEE Trans. Software Eng..

[43]  Christian Prehofer,et al.  Feature-Oriented Programming: A Fresh Look at Objects , 1997, ECOOP.

[44]  Bogdan Dit,et al.  Using Data Fusion and Web Mining to Support Feature Location in Software , 2010, 2010 IEEE 18th International Conference on Program Comprehension.

[45]  Matthew Flatt,et al.  Jiazzi: new-age components for old-fasioned Java , 2001, OOPSLA '01.

[46]  Gul A. Agha,et al.  Concurrent object-oriented programming , 1993, CACM.

[47]  James H. Cross,et al.  Reverse engineering and design recovery: a taxonomy , 1990, IEEE Software.

[48]  Ted J. Biggerstaff,et al.  The concept assignment problem in program understanding , 1993, [1993] Proceedings Working Conference on Reverse Engineering.

[49]  Elliot Soloway,et al.  Delocalized Plans and Program Comprehension , 1986, IEEE Software.

[50]  Norman Wilde,et al.  The role of concepts in program comprehension , 2002, Proceedings 10th International Workshop on Program Comprehension.

[51]  Bo Nørregaard Jørgensen,et al.  Featureous: A Tool for Feature-Centric Analysis of Java Software , 2010, 2010 IEEE 18th International Conference on Program Comprehension.

[52]  Keith H. Bennett,et al.  Software maintenance and evolution: a roadmap , 2000, ICSE '00.

[53]  Bo Nørregaard Jørgensen,et al.  Remodularizing Java programs for comprehension of features , 2009, FOSD '09.

[54]  Jan Bosch,et al.  Object-oriented framework-based software development: problems and experiences , 2000, CSUR.

[55]  Stéphane Ducasse,et al.  Correlating features and code using a compact two-sided trace analysis approach , 2005, Ninth European Conference on Software Maintenance and Reengineering.

[56]  D. L. Parnas,et al.  On the criteria to be used in decomposing systems into modules , 1972, Software Pioneers.

[57]  Václav Rajlich,et al.  Case study of feature location using dependence graph , 2000, Proceedings IWPC 2000. 8th International Workshop on Program Comprehension.