The Community for Technology Leaders
RSS Icon
Subscribe
Issue No.01 - Jan. (2013 vol.39)
pp: 45-62
Miryung Kim , The University of Texas at Austin, Austin
David Notkin , University of Washington, Seattle
Dan Grossman , University of Washington, Seattle
Gary Wilson , The University of Texas at Austin, Austin
ABSTRACT
Programmers often need to reason about how a program evolved between two or more program versions. Reasoning about program changes is challenging as there is a significant gap between how programmers think about changes and how existing program differencing tools represent such changes. For example, even though modification of a locking protocol is conceptually simple and systematic at a code level, diff extracts scattered text additions and deletions per file. To enable programmers to reason about program differences at a high level, this paper proposes a rule-based program differencing approach that automatically discovers and represents systematic changes as logic rules. To demonstrate the viability of this approach, we instantiated this approach at two different abstraction levels in Java: first at the level of application programming interface (API) names and signatures, and second at the level of code elements (e.g., types, methods, and fields) and structural dependences (e.g., method-calls, field-accesses, and subtyping relationships). The benefit of this approach is demonstrated through its application to several open source projects as well as a focus group study with professional software engineers from a large e-commerce company.
INDEX TERMS
Systematics, Syntactics, Inference algorithms, Cloning, Software, Semantics, Libraries, logic-based program representation, Software evolution, program differencing, rule learning
CITATION
Miryung Kim, David Notkin, Dan Grossman, Gary Wilson, "Identifying and Summarizing Systematic Code Changes via Rule Inference", IEEE Transactions on Software Engineering, vol.39, no. 1, pp. 45-62, Jan. 2013, doi:10.1109/TSE.2012.16
REFERENCES
[1] A.J. Ko, R. DeLine, and G. Venolia, "Information Needs in Collocated Software Development Teams," Proc. 29th Int'l Conf. Software Eng., pp. 344-353, 2007.
[2] J. Sillito, G.C. Murphy, and K.D. Volder, "Asking and Answering Questions during a Programming Change Task," IEEE Trans. Software Eng., vol. 34, no. 4, pp. 434-451, July/Aug. 2008.
[3] R.C. Miller and B.A. Myers, "Outlier Finding: Focusing User Attention on Possible Errors," Proc. 14th Ann. ACM Symp. User Interface Software and Technology, pp. 81-90, 2001.
[4] Z. Xing and E. Stroulia, "UMLDiff: An Algorithm for Object-Oriented Design Differencing," Proc. IEEE/ACM 20th Int'l Conf. Automated Software Eng., pp. 54-65, 2005.
[5] P. Weißgerber and S. Diehl, "Identifying Refactorings from Source-Code Changes," Proc. IEEE/ACM 21st Int'l Conf. Automated Software Eng., pp. 231-240, 2006.
[6] W. Wu, Y.-G. Guéhéneuc, G. Antoniol, and M. Kim, "AURA: A Hybrid Approach to Identify Framework Evolutions," Proc. ACM/IEEE 32nd Int'l Conf. Software Eng., pp. 325-334, 2010.
[7] H.A. Nguyen, T.T. Nguyen, G. Wilson, A.T. Nguyen, M. Kim, and T. Nguyen, "A Graph-Based Approach to API Evolution," Proc. ACM SIGPLAN Int'l Conf. Systems, Programming, Languages and Applications, p. 10, 2010.
[8] S. Kim, K. Pan, and J.E. James Whitehead, "When Functions Change Their Names: Automatic Detection of Origin Relationships," Proc. 12th Working Conf. Reverse Eng., pp. 143-152, 2005.
[9] D. Dig, C. Comertoglu, D. Marinov, and R. Johnson, "Automated Detection of Refactorings in Evolving Components," Proc. European Conf. Object-Oriented Programming, pp. 404-428, 2006.
[10] J.W. Hunt and T.G. Szymanski, "A Fast Algorithm for Computing Longest Common Subsequences," Comm. ACM, vol. 20, no. 5, pp. 350-353, 1977.
[11] B. Fluri, M. Würsch, M. Pinzger, and H.C. Gall, "Change Distilling: Tree Differencing for Fine-Grained Source Code Change Extraction," IEEE Trans. Software Eng., vol. 33, no. 11, p. 725-743, Nov. 2007.
[12] I. Neamtiu, J.S. Foster, and M. Hicks, "Understanding Source Code Evolution Using Abstract Syntax Tree Matching," Proc. Int'l Workshop Mining Software Repositories, pp. 2-6, 2005.
[13] S. Raghavan, R. Rohana, D. Leon, A. Podgurski, and V. Augustine, "Dex: A Semantic-Graph Differencing Tool for Studying Changes in Large Code Bases," Proc. 20th IEEE Int'l Conf. Software Maintenance, pp. 188-197, 2004.
[14] W. Yang, "Identifying Syntactic Differences between Two Programs," Software—Practice and Experience, vol. 21, no. 7, pp. 739-755, 1991.
[15] T. Apiwattanapong, A. Orso, and M.J. Harrold, "A Differencing Algorithm for Object-Oriented Programs," Proc. IEEE 19th Int'l Conf. Automated Software Eng., pp. 2-13, 2004.
[16] S. Horwitz, "Identifying the Semantic and Textual Differences between Two Versions of a Program," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation, pp. 234-245, 1990.
[17] D. Jackson and D.A. Ladd, "Semantic Diff: A Tool for Summarizing the Effects of Modifications," Proc. Int'l Conf. Software Maintenance, pp. 243-252, 1994.
[18] O.C. Chesley, X. Ren, and B.G. Ryder, "Crisp: A Debugging Tool for Java Programs," Proc. 21st Int'l IEEE Conf. Software Maintenance, pp. 401-410, 2005.
[19] S. Demeyer, S. Ducasse, and O. Nierstrasz, "Finding Refactorings via Change Metrics," Proc. 15th ACM SIGPLAN Conf. Object-Oriented Programming, Systems, Languages, and Applications, pp. 166-177, 2000.
[20] L. Zou and M.W. Godfrey, "Using Origin Analysis to Detect Merging and Splitting of Source Code Entities," IEEE Trans. Software Eng., vol. 31, no. 2, pp. 166-181, Feb. 2005.
[21] F.V. Rysselberghe and S. Demeyer, "Reconstruction of Successful Software Evolution Using Clone Detection," Proc. Sixth Int'l Workshop Principles of Software Evolution, pp. 126-130, 2003.
[22] G. Antoniol, M.D. Penta, and E. Merlo, "An Automatic Approach to Identify Class Evolution Discontinuities," Proc. Seventh Int'l Workshop Principles of Software Evolution, pp. 31-40, 2004.
[23] T. Kamiya, S. Kusumoto, and K. Inoue, "CCFinder: A Multilinguistic Token-Based Code Clone Detection System for Large Scale Source Code," IEEE Trans. Software Eng., vol. 28, no. 7, pp. 654-670, July 2002.
[24] K. Prete, N. Rachatasumrit, N. Sudan, and M. Kim, "Template-Based Reconstruction of Complex Refactorings," Proc. IEEE Int'l Conf. Software Maintenance, pp. 1-10, 2010.
[25] E. Visser, "Program Transformation with Stratego/XT: Rules, Strategies, Tools, and Systems in Strategoxt-0.9," Domain-Specific Program Generation, vol. 3016, pp. 216-238, 2004.
[26] J.R. Cordy, "The TXL Source Transformation Languages," Science of Computer Programming, vol. 61, no. 3, pp. 190-210, 2006.
[27] M. Boshernitsan, S.L. Graham, and M.A. Hearst, "Aligning Development Tools with the Way Programmers Think About Code Changes," Proc. SIGCHI Conf. Human factors in Computing Systems, pp. 567-576, 2007.
[28] Y. Padioleau, J. Lawall, R.R. Hansen, and G. Muller, "Documenting and Automating Collateral Evolutions in Linux Device Drivers," Proc. Third ACM SIGOPS/EuroSys European Conf. Computer Systems, pp. 247-260, 2008.
[29] T. Zimmermann, P. Weißgerber, S. Diehl, and A. Zeller, "Mining Version Histories to Guide Software Changes," Proc. 26th Int'l Conf. Software Eng., pp. 563-572, 2004.
[30] X. Ren, F. Shah, F. Tip, B.G. Ryder, and O. Chesley, "Chianti: A Tool for Change Impact Analysis of Java Programs," Proc. 19th Ann. ACM SIGPLAN Conf. Object-Oriented Programming, Systems, Languages, and Applications, pp. 432-448, 2004.
[31] J. Wloka, B.G. Ryder, and F. Tip, "JUnitMX—A Change-Aware Unit Testing Tool," Proc. 31st Int'l Conf. Software Eng., pp. 567-570, 2009.
[32] W.F. Opdyke and R.E. Johnson, "Refactoring: An Aid in Designing Application Frameworks and Evolving Object-Oriented Systems," Proc. Symp. Object Oriented Programming Emphasizing Practical Applications, 2000.
[33] M. Fowler, Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, 2000.
[34] T. Mens and T. Tourwe, "A Survey of Software Refactoring," IEEE Trans. Software Eng., vol. 30, no. 2, pp. 126-139, Feb. 2004.
[35] G. Kiczales, J. Lamping, A. Menhdhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin, "Aspect-Oriented Programming," Proc. 11th European Conf. Object-Oriented Programming, pp. 220-242, 1997.
[36] P. Tarr, H. Ossher, W. Harrison, J. Stanley, and M. Sutton, "N Degrees of Separation: Multi-Dimensional Separation of Concerns," Proc. 21st Int'l Conf. Software Eng., pp. 107-119, 1999.
[37] S. Breu and T. Zimmermann, "Mining Aspects from Version History," Proc. 28th Int'l Conf. Automated Software Eng., pp. 221-230, 2006.
[38] W. Griswold, "Coping with Crosscutting Software Changes Using Information Transparency," Proc. Third Int'l Conf. Metalevel Architectures and Separation of Crosscutting Concerns, pp. 250-265, 2001.
[39] M. Kim and D. Notkin, "Discovering and Representing Systematic Code Changes," Proc. 31st Int'l Conf. Software Eng., pp. 309-319, 2009.
[40] D. Janzen and K.D. Volder, "Navigating and Querying Code without Getting Lost," Proc. Int'l Conf. Aspect Oriented Software Development, pp. 178-187, 2003.
[41] M. Kim, "Analyzing and Inferring the Structure of Code Changes," PhD dissertation, Univ. of Washington, 2008.
[42] K.D. Volder, "Type-Oriented Logic Meta Programming," PhD dissertation, Vrije Universiteit Brussel, 1998.
[43] E. Balas and M.W. Padberg, "Set Partitioning: A Survey," SIAM Rev., vol. 18, pp. 710-760, 1976.
[44] S. Kok and P. Domingos, "Learning the Structure of Markov Logic Networks," Proc. 22nd Int'l Conf. Machine Learning, pp. 441-448, 2005.
[45] M. Kim, D. Notkin, and D. Grossman, "Automatic Inference of Structural Changes for Matching Across Program Versions," Proc. 29th Int'l Conf. Software Eng., pp. 333-343, 2007.
[46] L.R. Dice, "Measures of the Amount of Ecologic Association between Species," Ecology, vol. 26, no. 3, pp. 297-302, 1945.
[47] A. Loh and M. Kim, "LSdiff: A Program Differencing Tool to Identify Systematic Structural Differences," Proc. ACM/IEEE 32nd Int'l Conf. Software Eng., pp. 263-266, 2010.
[48] B. Dagenais and M.P. Robillard, "Recommending Adaptive Changes for Framework Evolution," Proc. 30th Int'l Conf. Software Eng., pp. 481-490, 2008.
[49] T. Schäfer, J. Jonas, and M. Mezini, "Mining Framework Usage Changes from Instantiation Code," Proc. 30th Int'l Conf. Software Eng., pp. 471-480, 2008.
[50] K. Taneja, D. Dig, and T. Xie, "Automated Detection of API Refactorings in Libraries," Proc. IEEE/ACM 22nd Int'l Conf. Automate Software Eng., pp. 377-380, 2007.
66 ms
(Ver 2.0)

Marketing Automation Platform Marketing Automation Tool