SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
29th IEEE/ACM International Conference on Program Comprehension
Using Grammar Patterns to Interpret Test
Method Name Evolution
Anthony Peruma, Emily Hu, Jiajun Chen, Eman Abdullah AlOmar, Mohamed Wiem Mkaouer and Christian D. Newman
SUMMARY
We examine how developers craft
method names in test suites. We
use grammar patterns, to
understand test naming practices.
01
BACKGROUND
Identifier names help developers understand the purpose of
the identifier
Test methods names describe the entity that is being tested
and actions taken by the test
Names can be used to generate code for the test methods
automatically
Prior studies on method naming do not differentiate between
production and test method naming structures
02
OUR
GOAL
Understand the evolution of
structure and meaning of test
method names and their relation to
statically-verifiable code behavior.
03
IMPACT
Findings from our study facilitate research
and development of tools to aid in test
name recommendation and appraisal.
04
RESEARCH
QUESTIONS
02
03
Based on the grammar patterns:
• Typical structure of method names
• Structure evolution
• Comparison with existing patterns
Relation between changes in grammar
patterns and semantic meanings
Based on terms in a name:
• Most common term changes
• Relationship between the added
term and removed term
01
05
OUR CONTRIBUTIONS
Annotated
Grammar
Patterns Dataset
New Grammar
Patterns &
Trends
Discussion on the
Evolution of Test
Method Names
06
STUDY DESIGN
07
EXPERIMENT RESULTS
08
RESULTS: RQ 1 – COMMON GRAMMAR PATTERNS
● We look at complete grammar
patterns and prefix patterns
● We corroborate grammar patterns
cataloged in prior studies and identify
new patterns
● Test names are crafted differently
from production names
○ Test method names are highly
specific to their intended
behavior
○ Patterns include determiners,
prepositions, and adverbs
● Renames do not typically change the
part-of-speech tag of a word
Newpatterns
● V V N P+
○ testReadFileFromClasspath
● N V+
○ projectClosed
● + VM +
○ deleteindexNotExists
● + DT +
○ testExecuteAll
09
RESULTS: RQ 2 – SEMANTIC CHANGES
Term Changes
● Frequent changes to the meaning of a
test method’s name
○ testLog →
testEigenSingularValues
○ Contrasts with prior research:
names tend to narrow in
meaning
● Preserve meanings are mostly due to
digits, underscore, or title case
Prefix Patterns
● Prefix pattern mostly associated with a
change in meaning: V V → V V
● Prefix pattern mostly associated with a
narrowing and broadening in meaning:
V V → V NM
● As the number of prefixes increases,
the volume of instances decreases
10
RESULTS: RQ 3 – COMMON TERM CHANGES
● Frequent changes include swapping of
sequence numbers appended to the
name
○ test15_6_5 → test16_9_5
● Frequent changes to names, without
numerical digits:
○ has → contains
○ test → can / should / is
○ all of → at least
○ with → when
Determiningrelationshipsis
challenging!
● Ambiguous terms
○ LBDevice → Zeus
● Multiple term replacements
○ not started → closed
● Replaced terms are unrelated
○ latency → metrics
11
KEY TAKEAWAYS
03
Test method name refactorings
tend to change the meaning of
terms in the name
04
There are common words and
phrases which are synonymous
in test method renames
01
Difference in structure between
test and production method
names; Useful in providing test-
specific recommendations
02
Some of the prefixes detected in
our dataset indicate the
existence of additional test
name patterns
12
Our Identifier Naming Structure Catalogue is available at: https://scanl.org
THANK
YOU!
For more of what we do, visit:
https://www.scanl.org/
Using Grammar Patterns to Interpret Test Method Name Evolution

Contenu connexe

Similaire à Using Grammar Patterns to Interpret Test Method Name Evolution

Experimental design
Experimental designExperimental design
Experimental design
metalkid132
 

Similaire à Using Grammar Patterns to Interpret Test Method Name Evolution (20)

Understanding Digits in Identifier Names: An Exploratory Study
Understanding Digits in Identifier Names: An Exploratory StudyUnderstanding Digits in Identifier Names: An Exploratory Study
Understanding Digits in Identifier Names: An Exploratory Study
 
Elena Bolshakova and Natalia Efremova - A Heuristic Strategy for Extracting T...
Elena Bolshakova and Natalia Efremova - A Heuristic Strategy for Extracting T...Elena Bolshakova and Natalia Efremova - A Heuristic Strategy for Extracting T...
Elena Bolshakova and Natalia Efremova - A Heuristic Strategy for Extracting T...
 
CV_DhalapathyShunmugam
CV_DhalapathyShunmugamCV_DhalapathyShunmugam
CV_DhalapathyShunmugam
 
Study_of_Sequence_labeling_Systems
Study_of_Sequence_labeling_SystemsStudy_of_Sequence_labeling_Systems
Study_of_Sequence_labeling_Systems
 
Test Anti-Patterns: From Definition to Detection
Test Anti-Patterns: From Definition to DetectionTest Anti-Patterns: From Definition to Detection
Test Anti-Patterns: From Definition to Detection
 
Experimental design
Experimental designExperimental design
Experimental design
 
The Components of Test Specifications
The Components of Test SpecificationsThe Components of Test Specifications
The Components of Test Specifications
 
Enriching Word Vectors with Subword Information
Enriching Word Vectors with Subword InformationEnriching Word Vectors with Subword Information
Enriching Word Vectors with Subword Information
 
Parts of speech tagger
Parts of speech taggerParts of speech tagger
Parts of speech tagger
 
Lt j-test construction procedure
Lt j-test construction procedureLt j-test construction procedure
Lt j-test construction procedure
 
Part of speech tagger English - By sadak pramodh
Part of speech tagger   English - By sadak pramodhPart of speech tagger   English - By sadak pramodh
Part of speech tagger English - By sadak pramodh
 
Level-based Resume Classification on Nursing Positions
Level-based Resume Classification on Nursing PositionsLevel-based Resume Classification on Nursing Positions
Level-based Resume Classification on Nursing Positions
 
Thesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptThesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.ppt
 
om
omom
om
 
om
omom
om
 
Group b3 Learning Theories by Education Technology Class
Group b3 Learning Theories by Education Technology ClassGroup b3 Learning Theories by Education Technology Class
Group b3 Learning Theories by Education Technology Class
 
Patterns of Interaction Description Including Aspects of Constraints
Patterns of Interaction Description Including Aspects of ConstraintsPatterns of Interaction Description Including Aspects of Constraints
Patterns of Interaction Description Including Aspects of Constraints
 
Characterization of Open-Source Applications and Test Suites
Characterization of Open-Source Applications and Test Suites Characterization of Open-Source Applications and Test Suites
Characterization of Open-Source Applications and Test Suites
 
How to improve your unit tests?
How to improve your unit tests?How to improve your unit tests?
How to improve your unit tests?
 
Pragmatic software testing education - SIGCSE 2019
Pragmatic software testing education - SIGCSE 2019Pragmatic software testing education - SIGCSE 2019
Pragmatic software testing education - SIGCSE 2019
 

Plus de University of Hawai‘i at Mānoa

Plus de University of Hawai‘i at Mānoa (15)

A Primer on High-Quality Identifier Naming [ASE 2022]
A Primer on High-Quality Identifier Naming [ASE 2022]A Primer on High-Quality Identifier Naming [ASE 2022]
A Primer on High-Quality Identifier Naming [ASE 2022]
 
Preparing for the Academic Job Market: Experience and Tips from a Recent F...
Preparing for the  Academic Job Market:  Experience and Tips from  a Recent F...Preparing for the  Academic Job Market:  Experience and Tips from  a Recent F...
Preparing for the Academic Job Market: Experience and Tips from a Recent F...
 
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
 
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
 
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
 
IDEAL: An Open-Source Identifier Name Appraisal Tool
IDEAL: An Open-Source Identifier Name Appraisal ToolIDEAL: An Open-Source Identifier Name Appraisal Tool
IDEAL: An Open-Source Identifier Name Appraisal Tool
 
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
 
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
 
On the Distribution of Test Smells in Open Source Android Applications: An Ex...
On the Distribution of Test Smells in Open Source Android Applications: An Ex...On the Distribution of Test Smells in Open Source Android Applications: An Ex...
On the Distribution of Test Smells in Open Source Android Applications: An Ex...
 
A Preliminary Study of Android Refactorings
A Preliminary Study of Android RefactoringsA Preliminary Study of Android Refactorings
A Preliminary Study of Android Refactorings
 
Permission Issues in Open-Source Android Apps: An Exploratory Study
Permission Issues in Open-Source Android Apps: An Exploratory StudyPermission Issues in Open-Source Android Apps: An Exploratory Study
Permission Issues in Open-Source Android Apps: An Exploratory Study
 
A Career In IT
A Career In ITA Career In IT
A Career In IT
 
Web Content Management - Introduction
Web Content Management - IntroductionWeb Content Management - Introduction
Web Content Management - Introduction
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
 
SharePoint 2013 - Search Driven Publishing
SharePoint 2013 - Search Driven PublishingSharePoint 2013 - Search Driven Publishing
SharePoint 2013 - Search Driven Publishing
 

Dernier

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Dernier (20)

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 

Using Grammar Patterns to Interpret Test Method Name Evolution

  • 1. 29th IEEE/ACM International Conference on Program Comprehension Using Grammar Patterns to Interpret Test Method Name Evolution Anthony Peruma, Emily Hu, Jiajun Chen, Eman Abdullah AlOmar, Mohamed Wiem Mkaouer and Christian D. Newman
  • 2. SUMMARY We examine how developers craft method names in test suites. We use grammar patterns, to understand test naming practices. 01
  • 3. BACKGROUND Identifier names help developers understand the purpose of the identifier Test methods names describe the entity that is being tested and actions taken by the test Names can be used to generate code for the test methods automatically Prior studies on method naming do not differentiate between production and test method naming structures 02
  • 4. OUR GOAL Understand the evolution of structure and meaning of test method names and their relation to statically-verifiable code behavior. 03
  • 5. IMPACT Findings from our study facilitate research and development of tools to aid in test name recommendation and appraisal. 04
  • 6. RESEARCH QUESTIONS 02 03 Based on the grammar patterns: • Typical structure of method names • Structure evolution • Comparison with existing patterns Relation between changes in grammar patterns and semantic meanings Based on terms in a name: • Most common term changes • Relationship between the added term and removed term 01 05
  • 7. OUR CONTRIBUTIONS Annotated Grammar Patterns Dataset New Grammar Patterns & Trends Discussion on the Evolution of Test Method Names 06
  • 10. RESULTS: RQ 1 – COMMON GRAMMAR PATTERNS ● We look at complete grammar patterns and prefix patterns ● We corroborate grammar patterns cataloged in prior studies and identify new patterns ● Test names are crafted differently from production names ○ Test method names are highly specific to their intended behavior ○ Patterns include determiners, prepositions, and adverbs ● Renames do not typically change the part-of-speech tag of a word Newpatterns ● V V N P+ ○ testReadFileFromClasspath ● N V+ ○ projectClosed ● + VM + ○ deleteindexNotExists ● + DT + ○ testExecuteAll 09
  • 11. RESULTS: RQ 2 – SEMANTIC CHANGES Term Changes ● Frequent changes to the meaning of a test method’s name ○ testLog → testEigenSingularValues ○ Contrasts with prior research: names tend to narrow in meaning ● Preserve meanings are mostly due to digits, underscore, or title case Prefix Patterns ● Prefix pattern mostly associated with a change in meaning: V V → V V ● Prefix pattern mostly associated with a narrowing and broadening in meaning: V V → V NM ● As the number of prefixes increases, the volume of instances decreases 10
  • 12. RESULTS: RQ 3 – COMMON TERM CHANGES ● Frequent changes include swapping of sequence numbers appended to the name ○ test15_6_5 → test16_9_5 ● Frequent changes to names, without numerical digits: ○ has → contains ○ test → can / should / is ○ all of → at least ○ with → when Determiningrelationshipsis challenging! ● Ambiguous terms ○ LBDevice → Zeus ● Multiple term replacements ○ not started → closed ● Replaced terms are unrelated ○ latency → metrics 11
  • 13. KEY TAKEAWAYS 03 Test method name refactorings tend to change the meaning of terms in the name 04 There are common words and phrases which are synonymous in test method renames 01 Difference in structure between test and production method names; Useful in providing test- specific recommendations 02 Some of the prefixes detected in our dataset indicate the existence of additional test name patterns 12 Our Identifier Naming Structure Catalogue is available at: https://scanl.org
  • 14. THANK YOU! For more of what we do, visit: https://www.scanl.org/