Studying Co-evolution of Production and Test Code Using Association Rule Mining

Long version of the short paper accepted for publication in the proceedings of the 6th International Working Conference on Mining Software Repositories (MSR 2009). Unit tests are generally acknowledged as an important aid to produce high quality code, as they provide quick feedback to developers on the correctness of their code. In order to achieve high quality, well-maintained tests are needed. Ideally, tests co-evolve with the production code to test changes as soon as possible. In this paper, we explore an approach to determine whether production and test code co-evolve synchronously. Our approach is based on applying association rule mining to the change history of product and test code classes. Based on these co-evolution rules, we introduce a number of measures to assess the co-evolution of product and test code classes. Through two case studies, one with an open source and another one with an industrial software system, we show that association rule mining and our set of measures allows one to assess the co-evolution of product and test code in a software project and, moreover, to uncover the distribution of programmer effort over pure coding, pure testing, or a more test-driven-like practice.

[1]  Kent Beck,et al.  Test-infected: programmers love writing tests , 2000 .

[2]  DucasseStéphane,et al.  Polymetric Views-A Lightweight Visual Approach to Reverse Engineering , 2003 .

[3]  Ramakrishnan Srikant,et al.  Fast Algorithms for Mining Association Rules in Large Databases , 1994, VLDB.

[4]  Dirk Beyer,et al.  Animated Visualization of Software History using Evolution Storyboards , 2006, 2006 13th Working Conference on Reverse Engineering.

[5]  Arie van Deursen,et al.  Mining Software Repositories to Study Co-Evolution of Production & Test Code , 2008, 2008 1st International Conference on Software Testing, Verification, and Validation.

[6]  Daniel M. German,et al.  On the use of visualization to support awareness of human activities in software development: a survey and a framework , 2005, SoftVis '05.

[7]  Tom Mens,et al.  Challenges in software evolution , 2005, Eighth International Workshop on Principles of Software Evolution (IWPSE'05).

[8]  Stéphane Ducasse,et al.  Yesterday's Weather: guiding early reverse engineering efforts by summarizing the evolution of changes , 2004, 20th IEEE International Conference on Software Maintenance, 2004. Proceedings..

[9]  Rajeev Motwani,et al.  Dynamic itemset counting and implication rules for market basket data , 1997, SIGMOD '97.

[10]  E. B. Swanson,et al.  Software maintenance management , 1980 .

[11]  Michael W. Godfrey,et al.  Release Pattern Discovery via Partitioning: Methodology and Case Study , 2007, Fourth International Workshop on Mining Software Repositories (MSR'07:ICSE Workshops 2007).

[12]  Meir M. Lehman,et al.  Program evolution: processes of software change , 1985 .

[13]  Anthony K. H. Tung,et al.  Breaking the barrier of transactions: mining inter-transaction association rules , 1999, KDD '99.

[14]  Wynne Hsu,et al.  Mining association rules with multiple minimum supports , 1999, KDD '99.

[15]  Eleni Stroulia,et al.  Understanding the Evolution and Co-evolution of Classes in Object-oriented Systems , 2006, Int. J. Softw. Eng. Knowl. Eng..

[16]  Dirk Beyer,et al.  Evolution Storyboards: Visualization of Software Structure Dynamics , 2006, 14th IEEE International Conference on Program Comprehension (ICPC'06).

[17]  Dorothy Graham,et al.  Software test automation: effective use of test execution tools , 1999 .

[18]  DemeyerSerge,et al.  Studying the co-evolution of production and test code in open source and industrial developer test processes through repository mining , 2011 .

[19]  Michael W. Godfrey,et al.  Evolution in open source software: a case study , 2000, Proceedings 2000 International Conference on Software Maintenance.

[20]  M A Branch,et al.  Software maintenance management , 1986 .

[21]  Jonathan I. Maletic,et al.  What's a Typical Commit? A Characterization of Open Source Software Repositories , 2008, 2008 16th IEEE International Conference on Program Comprehension.

[22]  Harald C. Gall,et al.  Software evolution observations based on product release history , 1997, 1997 Proceedings International Conference on Software Maintenance.

[23]  Robert V. Binder,et al.  Testing Object-Oriented Systems: Models, Patterns, and Tools , 1999 .

[24]  Harald C. Gall,et al.  Visualizing multiple evolution metrics , 2005, SoftVis '05.

[25]  Tomasz Imielinski,et al.  Mining association rules between sets of items in large databases , 1993, SIGMOD Conference.

[26]  AgrawalRakesh,et al.  Mining association rules between sets of items in large databases , 1993 .

[27]  David Lorge Parnas,et al.  Software aging , 1994, Proceedings of 16th International Conference on Software Engineering.

[28]  Harald C. Gall,et al.  Do Code and Comments Co-Evolve? On the Relation between Source Code and Comment Changes , 2007, 14th Working Conference on Reverse Engineering (WCRE 2007).

[29]  HuYa-Han,et al.  Mining association rules with multiple minimum supports , 2006 .

[30]  Harald C. Gall,et al.  Detection of logical coupling based on product release history , 1998, Proceedings. International Conference on Software Maintenance (Cat. No. 98CB36272).

[31]  Michele Lanza,et al.  The evolution matrix: recovering software evolution using software visualization techniques , 2001, IWPSE '01.

[32]  Daniel M. German Using software trails to reconstruct the evolution of software: Research Articles , 2004 .

[33]  Tao Xie,et al.  Mining software engineering data , 2007, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[34]  Harvey Siy,et al.  If your ver-sion control system could talk , 1997 .

[35]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[36]  Andreas Zeller,et al.  Mining Version Histories to Guide Software Changes , 2004 .

[37]  Audris Mockus,et al.  Does Code Decay? Assessing the Evidence from Change Management Data , 2001, IEEE Trans. Software Eng..

[38]  Margaret H. Dunham,et al.  Data Mining: Introductory and Advanced Topics , 2002 .

[39]  Per Runeson,et al.  A survey of unit testing practices , 2006, IEEE Software.

[40]  Michele Lanza,et al.  The evolution radar: visualizing integrated logical coupling information , 2006, MSR '06.

[41]  Kent L. Beck,et al.  Test-driven Development - by example , 2002, The Addison-Wesley signature series.