Using Grammar Patterns to Interpret Test Method Name Evolution

It is good practice to name test methods such that they are comprehensible to developers; they must be written in such a way that their purpose and functionality are clear to those who will maintain them. Unfortunately, there is little automated support for writing or maintaining the names of test methods. This can lead to inconsistent and low-quality test names and increase the maintenance cost of supporting these methods. Due to this risk, it is essential to help developers in maintaining their test method names over time. In this paper, we use grammar patterns, and how they relate to test method behavior, to understand test naming practices. This data will be used to support an automated tool for maintaining test names.

[1]  Einar W. Høst,et al.  Debugging Method Names , 2009, ECOOP.

[2]  Gabriele Bavota,et al.  Why Developers Refactor Source Code: A Mining-based Study , 2021, ArXiv.

[3]  Mohamed Wiem Mkaouer,et al.  On the Relationship Between Developer Experience and Refactoring: An Exploratory Study and Preliminary Results , 2020, ICSE.

[4]  Michael Hucka,et al.  Spiral: splitters for identifiers in source code files , 2018, J. Open Source Softw..

[5]  Emily Hill,et al.  Automatically Generating Test Templates from Test Names (N) , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[6]  Hui Liu,et al.  Identifying Renaming Opportunities by Expanding Conducted Rename Refactorings , 2015, IEEE Transactions on Software Engineering.

[7]  David W. Binkley,et al.  Improving identifier informativeness using part of speech information , 2011, MSR '11.

[8]  Gabriele Bavota,et al.  On the Quality of Identifiers in Test Code , 2019, 2019 19th International Working Conference on Source Code Analysis and Manipulation (SCAM).

[9]  Gordon Fraser,et al.  Generating unit tests with descriptive names or: would you name your children thing1 and thing2? , 2017, ISSTA.

[10]  Mohamed Wiem Mkaouer,et al.  On the Generation, Structure, and Semantics of Grammar Patterns in Source Code Identifiers , 2020, J. Syst. Softw..

[11]  Mohamed Wiem Mkaouer,et al.  An Exploratory Study on the Refactoring of Unit Test Files in Android Applications , 2020, ICSE.

[12]  Anthony Peruma A Preliminary Study of Android Refactorings , 2019, 2019 IEEE/ACM 6th International Conference on Mobile Software Engineering and Systems (MOBILESoft).

[13]  Mohamed Wiem Mkaouer,et al.  An empirical investigation of how and why developers rename identifiers , 2018, IWoR@ASE.

[14]  Harald C. Gall,et al.  A large-scale empirical exploration on refactoring activities in open source software projects , 2019, Sci. Comput. Program..

[15]  Roger S. Pressman,et al.  Software Engineering: A Practitioner's Approach , 1982 .

[16]  Christoph Bockisch,et al.  A Survey of Refactoring Detection Tools , 2019, Software Engineering.

[17]  Yann-Gaël Guéhéneuc,et al.  REPENT: Analyzing the Nature of Identifier Renamings , 2014, IEEE Transactions on Software Engineering.

[18]  Andrew Begel,et al.  Cognitive Perspectives on the Role of Naming in Computer Programs , 2006, PPIG.

[19]  Yves Le Traon,et al.  Learning to Spot and Refactor Inconsistent Method Names , 2019, 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE).

[20]  Mohamed Wiem Mkaouer,et al.  On the distribution of test smells in open source Android applications: an exploratory study , 2019, CASCON.

[21]  Yue Luo,et al.  Nomen est Omen: Exploring and Exploiting Similarities between Argument and Parameter Names , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[22]  Danny Dig,et al.  Accurate and Efficient Refactoring Detection in Commit History , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE).

[23]  Mohamed Wiem Mkaouer,et al.  Contextualizing rename decisions using refactorings, commit messages, and data types , 2020, J. Syst. Softw..

[24]  Emily Hill,et al.  Towards automatically generating descriptive names for unit tests , 2016, 2016 31st IEEE/ACM International Conference on Automated Software Engineering (ASE).

[25]  James Clause,et al.  A Pattern-based Approach to Detect and Improve Non-descriptive Test Names , 2020, J. Syst. Softw..

[26]  Stephan Kleuker JUnit , 2019, Qualitätssicherung durch Softwaretests.

[27]  Mohamed Wiem Mkaouer,et al.  How We Refactor and How We Document it? On the Use of Supervised Machine Learning Algorithms to Classify Refactoring Documentation , 2021, Expert Syst. Appl..

[28]  He Jiang,et al.  Machine Learning Based Recommendation of Method Names: How Far are We , 2019, 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[29]  Charles A. Sutton,et al.  Learning natural coding conventions , 2014, SIGSOFT FSE.

[30]  Mohamed Wiem Mkaouer,et al.  Contextualizing Rename Decisions using Refactorings and Commit Messages , 2019, 2019 19th International Working Conference on Source Code Analysis and Manipulation (SCAM).

[31]  Giuliano Antoniol,et al.  Linguistic antipatterns: what they are and how developers perceive them , 2015, Empirical Software Engineering.

[32]  Marco Tulio Valente,et al.  Why we refactor? confessions of GitHub contributors , 2016, SIGSOFT FSE.

[33]  Charles A. Sutton,et al.  Suggesting accurate method and class names , 2015, ESEC/SIGSOFT FSE.

[34]  Vahid Garousi,et al.  Smells in software test code: A survey of knowledge in industry and academia , 2018, J. Syst. Softw..

[35]  Siyuan Liu,et al.  Exploring the Characteristics of Identifiers: A Large-Scale Empirical Study on 5,000 Open Source Projects , 2020, IEEE Access.

[36]  Meiyappan Nagappan,et al.  Curating GitHub for engineered software projects , 2017, Empirical Software Engineering.