This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Locating Features in Source Code
March 2003 (vol. 29 no. 3)
pp. 210-224

Abstract—Understanding the implementation of a certain feature of a system requires identification of the computational units of the system that contribute to this feature. In many cases, the mapping of features to the source code is poorly documented. In this paper, we present a semiautomatic technique that reconstructs the mapping for features that are triggered by the user and exhibit an observable behavior. The mapping is in general not injective; that is, a computational unit may contribute to several features. Our technique allows for the distinction between general and specific computational units with respect to a given set of features. For a set of features, it also identifies jointly and distinctly required computational units. The presented technique combines dynamic and static analyses to rapidly focus on the system's parts that relate to a specific set of features. Dynamic information is gathered based on a set of scenarios invoking the features. Rather than assuming a one-to-one correspondence between features and scenarios as in earlier work, we can now handle scenarios that invoke many features. Furthermore, we show how our method allows incremental exploration of features while preserving the “mental map” the analyst has gained through the analysis.

[1] M.M. Lehman, “Programs, Life Cycles and the Laws of Software Evolution,” Proc. IEEE, Special Issue on Software Evolution, vol. 68, no. 9, pp. 1060-1076, Sept. 1980.
[2] R. Koschke, “Atomic Architectural Component Recovery for Program Understanding and Evolution,” Dissertation, Univ. Stuttgart, Germany, 2000.
[3] T. Eisenbarth, R. Koschke, and D. Simon, “Locating Features in Source Code—Case Studies,” available athttp://www.bauhaus-stuttgart.de/bauhauspapers /, Oct. 2002.
[4] T. Eisenbarth, R. Koschke, and D. Simon, “Derivation of Feature-Component Maps by Means of Concept Analysis,” Proc. Fifth European Conf. Software Maintenance and Reeng., pp. 176-179, Mar. 2001.
[5] “The XFIG Drawing Tool,” version 3.2.3d, available athttp:/www.xfig.org, 2001.
[6] J. Rumbaugh, I. Jacobson, and G. Booch, The Unified Modeling Language Reference Manual. Addison-Wesley, 1999.
[7] N. Wilde and M.C. Scully, “Software Reconnaissance: Mapping Program Features to Code,” J. Software Maintenance: Research and Practice. vol. 7, pp. 49-62, Jan. 1995.
[8] S. Horwitz, T. Reps, and D. Binkley, “Interprocedural Slicing Using Dependence Graphs,” ACM Trans. Programming Languages and Systems. vol. 12, no. 1, pp. 26-60, Jan. 1990.
[9] Á. Beszédes, T. Gergely, Z.M. Szabó, J. Csirik, and T. Gyimóthy, “Dynamic Slicing Method for Maintenance of Large C Programs,” Proc. Fifth European Conf. Software Maintenance and Reeng., pp. 105-113, Mar. 2001.
[10] L.O. Andersen, “Program Analysis and Specialization for the C Programming Language,” PhD thesis, DIKU, Univ. of Copenhagen, Danmark, 1994.
[11] G. Antoniol, F. Calzolari, and P. Tonella, “Impact of Function Pointers on the Call Graph,” Proc. European Conf. Software Maintenance and Reeng., pp. 51-59, Mar. 1999.
[12] B.-C. Cheng and W.-M.W. Hwu, “Modular Interprocedural Pointer Analysis Using Access Paths,” Proc. Conf. Programming Language Design and Implementation, pp. 57-69, 2000.
[13] M. Das, “Unification-Based Pointer Analysis with Directional Assignments,” Proc. Conf. Programming Language Design and Implementation, pp. 35-46, 2000.
[14] M. Emami, R. Ghiya, and L.J. Hendren, “Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers,” Proc. Conf. Programming Language Design and Implementation, pp. 242-257, 1994.
[15] R.P. Wilson and M.S. Lam, “Efficient Context-Sensitive Pointer Analysis for C Programs,” Proc. Conf. Programming Language Design and Implementation. pp. 1-12, 1995.
[16] S. Zhang, B.G. Ryder, and W. Landi, “Program Decompositon for Pointer Aliasing: A Step Towards Pratical Analyses,” Proc. Symp. Foundations of Software Eng., pp. 81-92, 1996.
[17] B. Steensgaard, “Points-To Analysis in Almost Linear Time,” Proc. Symp. Principles of Programming Languages. pp. 32-41, Jan. 1996.
[18] A. Diwan, K. McKinley, and E. Moss, “Using Types to Analyze and Optimize Object-Oriented Programs,” Programming Languages and Systems, vol. 23, no. 1, pp. 30-72, 2001.
[19] A. Rountev, A. Milanova, and B.G. Ryder, “Points-To Analysis for Java Using Annotated Constraints,” Proc. Conf. Object Oriented Programming Systems, Languages, and Applications, pp. 43-55, Oct. 2001.
[20] A. Milanova, A. Rountev, and B.G. Ryder, “Precise Call Graph Construction in the Presence of Function Pointers,” Proc. Second Int'l Workshop Source Code Analysis and Manipulation, Oct. 2002.
[21] G. Birkhoff, Lattice Theory. vol. 25,, Providence, RI.: Am. Math. Soc. Colloquium Publications, 1940.
[22] B. Ganter and R. Wille, Formal Concept Analysis—Mathematical Foundations. Springer, 1999.
[23] “IDEF0,” available athttp://www.idef.comidef0.html, Dec. 1993.
[24] K. Koskimies and H. Mössenböck, “Scenario-Based Browsing of Object-Oriented Systems with Scene,” Technical Report 4, Johannes Kepler Univ., Linz, Austria Aug. 1995.
[25] D.B. Lange and Y. Nakamura, “Program Explorer: A Program Visualizer for C++,” Proc. USENIX Conf. Object-Oriented Technologies. June 1995.
[26] D.B. Lange and Y. Nakamura, “Object-Oriented Program Tracing and Visualization,” Computer, vol. 30, no. 5, pp. 63-70, May 1997.
[27] N. Wilde, J.A. Gomez, T. Gust, and D. Strasburg, “Locating User Functionality in Old Code,” Proc. Int'l Conf. Software Maintenance, pp. 200-205, Nov. 1992.
[28] W.E. Wong, S.S. Gokhale, J.R. Horgan, and K.S. Trivedi, “Locating Program Features Using Execution Slices,” Proc. IEEE Symp. Application-Specific Systems and Software Eng. and Technology, pp. 194-203, Mar. 1999.
[29] W.E. Wong, S.S. Gokhale, and J.R. Hogan, “Quantifying the Closeness between Program Components and Features,” The J. Systems and Software, vol. 54, no. 2, pp. 87-98, Oct. 2000.
[30] K. Chen and V. Rajlich, “Case Study of Feature Location Using Dependence Graph,” Proc. Eighth Int'l Workshop Program Comprehension, pp. 241-249, June 2000.
[31] N. Wilde, M. Buckellew, H. Page, and V. Rajlich, “A Case Study of Feature Location in Unstructured Legacy Fortran Code,” Proc. Fifth European Conf. Software Maintenance and Reeng., pp. 68-75, Mar. 2001.
[32] G. Snelting and F. Tip, “Reengineering Class Hierarchies using Concept Analysis,” Proc. Sixth SIGSOFT Symp. Foundations of Software Eng., pp. 99-110, Nov. 1998.
[33] M. Krone and G. Snelting, “On The Inference of Configuration Structures from Source Code,” Proc. 16th Int'l Conf. Software Eng., pp. 49-58, May 1994.
[34] G. Snelting, “Reengineering of Configurations Based on Mathematical Concept Analysis,” ACM Trans. Software Eng. and Methodology, vol. 5, no. 2, pp. 146-189, Apr. 1996.
[35] T. Kuipers and L. Moonen, “Types and Concept Analysis for Legacy Systems,” Proc. Eighth Int'l Workshop Program Comprehension, pp. 221–230, June 2000.
[36] G. Canfora, A. Cimitile, A. DeLucia, and G.A. DiLucca, “A Case Study of Applying an Eclectic Approach to Identify Objects in Code,” Proc. Seventh Int'l Workshop Program Comprehension, pp. 136-143, May 1999.
[37] H. Graudejus, “Implementing a Concept Analysis Tool for Identifying Abstract Data Types in C Code,” Diplomarbeit, Univ. Kaiserslautern, Germany, 1998.
[38] C. Lindig and G. Snelting, “Assessing Modular Structure of Legacy Code Based on Mathematical Concept Analysis,” Proc. 19th Int'l Conf. Software Eng., pp. 349-359, May 1997.
[39] H. Sahraoui, W. Melo, H. Lounis, and F. Dumont, “Applying Concept Formation Methods to Object Identification in Procedural Code,” Proc. Int'l Conf. Automated Software Eng., pp. 210-218, Nov. 1997.
[40] M. Siff and T. Reps, “Identifying Modules via Concept Analysis,” Proc. Int'l Conf. Software Maintenance, pp. 170-179, Oct. 1997.
[41] A. van Deursen and T. Kuipers, “Identifying Objects Using Cluster and Concept Analysis,” Proc. 21st Int'l Conf. Software Eng., pp. 246-255, 1999.
[42] P. Tonella, “Concept Analysis for Module Restructuring,” IEEE Trans. Software Eng., vol. 27, no. 4, pp. 351-363, Apr. 2001.
[43] T. Ball, “The Concept of Dynamic Analysis,” ACM SIGSOFT Software Eng. Notes, vol. 24, no. 6, pp. 216-234, Nov. 1999.
[44] T. Eisenbarth, R. Koschke, and D. Simon, “Aiding Program Comprehension by Static and Dynamic Feature Analysis,” Proc. Int'l Conf. Software Maintainence, pp. 602-611, Nov. 2001.
[45] T. Eisenbarth, R. Koschke, and D. Simon, “Incremental Location of Combined Features for Large-Scale Programs,” Proc. Int'l Conf. Software Maintainence, pp. 273-282, Oct. 2002
[46] “The New Bauhaus Stuttgart,” available athttp:/www.bauhaus-stuttgart.de/, 2002.

Index Terms:
Program comprehension, formal concept analysis, feature location, program analysis, software architecture recovery.
Citation:
Thomas Eisenbarth, Rainer Koschke, Daniel Simon, "Locating Features in Source Code," IEEE Transactions on Software Engineering, vol. 29, no. 3, pp. 210-224, March 2003, doi:10.1109/TSE.2003.1183929
Usage of this product signifies your acceptance of the Terms of Use.