SlideShare a Scribd company logo
1 of 26
Download to read offline
Have Java Production Methods
Co-Evolved With Test Methods
Properly?:
A Fine-Grained Repository-
Based Co-Evolution Analysis
Tenma Kita*1
Hirohisa Aman*1
Sousuke Amasaki*2
Tomoyuki Yokogawa*2
Minoru Kawahara*1
SEAA2022 (C) 2022 Hirohisa Aman
*1) Ehime University,
Matsuyama, Ehime, Japan
*2) Okayama Prefectural Univ.,
Soja, Okayama, Japan
0
Overview
 Aim
To detect Java methods that might not be properly
tested through code evolutions
 Method
We examine co-evolution relationships
(logical couplings) of production code with test code,
using a fine-grained code repository;
We propose a metric for evaluating their logical links
 Result
We empirically proved that most Java methods (98%
on average) have co-evolved with test methods, but
some have not; our metric detected some risky ones
SEAA2022 (C) 2022 Hirohisa Aman 1
Outline
 Background & Related Work
 Logical Coupling Between Production &
Test Methods
 Case Study
 Conclusion & Future Work
SEAA2022 (C) 2022 Hirohisa Aman 2
Outline
 Background & Related Work
 Logical Coupling Between Production &
Test Methods
 Case Study
 Conclusion & Future Work
SEAA2022 (C) 2022 Hirohisa Aman 3
Co-Evolution
Between Production and test code
 A set of source code (repository) includes not
only the production code but the test code
SEAA2022 (C) 2022 Hirohisa Aman 4
src
main
test
ConnectionStateManager.java
TestConnectionStateManager.java
…
…
update
update
When developers update a production code,
they should update or add the test code too
Co‐Evolution
Logical Coupling
 A successful co-evolution between production
and test code form a logical coupling
 Our focus is on a poor logical coupling
 Such a production code may have little or no
corresponding test code
SEAA2022 (C) 2022 Hirohisa Aman 5
commits
P1 T1 P1 T1 P1 T2
new code
creation
functionality
change
bugfix
P1
change
T1 T2
change
logical
coupling
Related Work (1/2)
 Luben et al.[9] emphasized the successful
maintenance of test cases in test-driven
development
 They analyzed logical couplings between
Java production classes and JUnit test
classes for a successful maintenance
SEAA2022 (C) 2022 Hirohisa Aman 6
 Although it is a valuable previous study, the
analysis is at class-level and coarse-grained
 To analyze those relationships from a finer-
grained point of view, we utilize a method-
level code repository in this study
Related Work (2/2)
 Marsavina et al.[5] & Vidacs and Pinzger[10]
performed a fine-grained code change analysis
to extract co-evolution patterns
 Ex. “A production class addition/removal tends to
cause a test class addition/removal”
SEAA2022 (C) 2022 Hirohisa Aman 7
 Those studies yield profound insights into co-
evolution relationships
 However, their main focuses were on the co-
evolution patterns, but poorly tested code (poor
logical coupling) was out of their analysis;
We focus on such a poor logical coupling to
detect a problematic code
Outline
 Background & Related Work
 Logical Coupling Between Production &
Test Methods
 Case Study
 Conclusion & Future Work
SEAA2022 (C) 2022 Hirohisa Aman 8
Analysis Granularity: Method
 As a file-level analysis seems to be coarse
and insufficient, we will trace logical
couplings at method level
 To this end, we utilize a fine-grained code
repository, FinerGit[8]
 FinerGit can convert a file-level normal Git
repository to a method-level Git repository
 In the converted repository, each Java method
corresponds to each file
 We can easily trace a method-level change history
through Git commands
SEAA2022 (C) 2022 Hirohisa Aman 9
Logical Coupling & Its Strength
 For a relation 𝒑 𝒕, the following
confidence value presents its strength of link:
SEAA2022 (C) 2022 Hirohisa Aman 10
When developers change a Java method
𝒑 at a commit, they tend to also change
another method 𝒕 at the same commit
𝒑 𝒕
𝒑 𝒕) =
𝒑 𝒕
𝒑
𝜎
𝜎(x) is # of 
x’s changes
Two or more test methods may
correspond to a production method
 The confidence value corresponds to a
conditional probability P( 𝒕 | 𝒑)
 Similarly, we can consider probability that at
least one test method is changed as
SEAA2022 (C) 2022 Hirohisa Aman 11
0.4
0.3 The probability that 
both 𝑚 and 𝑚
are not changed
P( 𝒕 𝒕 | 𝒑) P( 𝒕 𝒕 | 𝒑)
Proposed metric:
 Some production methods might be linked to
other production methods, and the latter
ones are tested, i.e., indirect test links
 We propose a novel metric, , to cover
such indirect logical couplings as well
SEAA2022 (C) 2022 Hirohisa Aman 12
0.4
0.3
0.1
0.7
0.2
0.3
𝑐𝑜𝑛𝑓 0.58
𝑐𝑜𝑛𝑓 0.73
𝑇𝑐𝑜𝑛𝑓
1 1 0.2 · 0.58 · 1 0.3 · 0.73
1 0.884 · 0.781
0.310
𝑇𝑐𝑜𝑛𝑓 0.310
What evaluates?
 The value of a production method
evaluates the likelihood that the production
method co-evolves with one or more test
methods in either direct or indirect manners
 A production method with a low
value might be problematic as it has not
been co-evolved with test methods
SEAA2022 (C) 2022 Hirohisa Aman 13
Outline
 Background & Related Work
 Logical Coupling Between Production &
Test Methods
 Case Study
 Conclusion & Future Work
SEAA2022 (C) 2022 Hirohisa Aman 14
Studied Projects
 We conducted a case study using ten Apache
top-level projects to demonstrate how
helps detect the problematic Java methods
SEAA2022 (C) 2022 Hirohisa Aman 15
Results(1/2): Curator project
 Distribution of values in the Curator project
SEAA2022 (C) 2022 Hirohisa Aman 16
mean 0.9948
𝑇𝑐𝑜𝑛𝑓
0.5 0.5 0.999 ≃ 1
0.43% 0.64% 𝟗𝟖. 𝟗𝟑%
Most production methods
(over 98%) in this project
have co-evolved with at
least one test method
Results(2/2): Other Projects
 All other projects showed similar results
SEAA2022 (C) 2022 Hirohisa Aman 17
Fineract Flume Maven Parquet
PDFBox Ranger RocketMQ Shiro
Zookeeper
𝑇𝑐𝑜𝑛𝑓 𝐚𝐥𝐥 𝐩𝐫𝐨𝐣𝐞𝐜𝐭𝐬
0.5 0.5 0.999 ≃ 1
0.67% 1.33% 𝟗𝟖. 𝟎𝟎%
Discussions(1/4)
 As a result, we found that 98% of production
methods have , i.e., they have co-
evolved with one or more test methods
 Nonetheless, we also found some production
methods with low values
 They included simple accessor methods like:
Indeed, the above simple method does not need to be
carefully tested …
SEAA2022 (C) 2022 Hirohisa Aman 18
𝑇𝑐𝑜𝑛𝑓 0
Discussions(2/4)
 So, we filtered out the following methods:
 It has appeared in the commit history only once
 It has the lowest cyclomatic complexity (=1)
 Even if we filtered simple methods, there are
some production methods with
SEAA2022 (C) 2022 Hirohisa Aman 19
Discussions(3/4)
 An example of
production method
with
 LOC = 44
 Cyclomatic complexity = 7
 Number of commits = 2
SEAA2022 (C) 2022 Hirohisa Aman 20
Although the developers
might prepare test code for
this method independently,
it is worth it to detect such
a method and alert it
Discussions(4/4)
 Notice that a low value does not
directly indicate the poor quality
 Nonetheless, can detect the methods
that have not been successfully co-evolved
with test methods
 By alerting such potentially problematic
production methods to the developers,
can contribute somewhat to the
successful software evolution
SEAA2022 (C) 2022 Hirohisa Aman 21
Threats to Validity
 Construct Validity:
 There might be a delayed logical coupling
 Internal Validity:
 Some non-functional changes (refactoring or
comment changes) might become noise data
 External Validity:
 We studied only ten Java projects
 It is an impactful factor if the project adopt the
test-driven development or not
SEAA2022 (C) 2022 Hirohisa Aman 22
Outline
 Background & Related Work
 Logical Coupling Between Production &
Test Methods
 Case Study
 Conclusion & Future Work
SEAA2022 (C) 2022 Hirohisa Aman 23
Conclusion
 We focused on the co-evolution (logical
coupling) between Java production and test
methods
 We proposed as a metric for evaluating
how a Java production method has properly
co-evolved with test methods
 A case study showed that
 Most methods (98% on average) had been co-
evolved successfully
 helps us to detect some potentially
problematic methods as well
SEAA2022 (C) 2022 Hirohisa Aman 24
Future Work
 A validation study of by getting
feedback from the developers
 An empirical study of relationship between
value and the overlooked faults
 Further analyses focusing on the code change
details and delayed logical couplings where
the test method’s commit occurs after the
production one’s commit
SEAA2022 (C) 2022 Hirohisa Aman 25

More Related Content

Similar to Have Java Production Methods Co-Evolved With Test Methods Properly?: A Fine-Grained Repository- Based Co-Evolution Analysis

Staroletov testing TDD BDD MBT
Staroletov testing TDD BDD MBTStaroletov testing TDD BDD MBT
Staroletov testing TDD BDD MBTSergey Staroletov
 
Codex AI.pdf
Codex AI.pdfCodex AI.pdf
Codex AI.pdfepetitjr
 
Software testing effort estimation with cobb douglas function a practical app...
Software testing effort estimation with cobb douglas function a practical app...Software testing effort estimation with cobb douglas function a practical app...
Software testing effort estimation with cobb douglas function a practical app...eSAT Publishing House
 
Software testing effort estimation with cobb douglas function- a practical ap...
Software testing effort estimation with cobb douglas function- a practical ap...Software testing effort estimation with cobb douglas function- a practical ap...
Software testing effort estimation with cobb douglas function- a practical ap...eSAT Journals
 
Quality Engineering and Testing with TMAP in DevOps IT delivery
Quality Engineering and Testing with TMAP in DevOps IT deliveryQuality Engineering and Testing with TMAP in DevOps IT delivery
Quality Engineering and Testing with TMAP in DevOps IT deliveryRik Marselis
 
Testing survey by_directions
Testing survey by_directionsTesting survey by_directions
Testing survey by_directionsTao He
 
International Journal of Soft Computing and Engineering (IJS
International Journal of Soft Computing and Engineering (IJSInternational Journal of Soft Computing and Engineering (IJS
International Journal of Soft Computing and Engineering (IJShildredzr1di
 
Agile principles and practices
Agile principles and practicesAgile principles and practices
Agile principles and practicesVipin Jose
 
The effectiveness of test-driven development approach on software projects: A...
The effectiveness of test-driven development approach on software projects: A...The effectiveness of test-driven development approach on software projects: A...
The effectiveness of test-driven development approach on software projects: A...journalBEEI
 
STATISTICAL ANALYSIS FOR PERFORMANCE COMPARISON
STATISTICAL ANALYSIS FOR PERFORMANCE COMPARISONSTATISTICAL ANALYSIS FOR PERFORMANCE COMPARISON
STATISTICAL ANALYSIS FOR PERFORMANCE COMPARISONijseajournal
 
Comparison between Test-Driven Development and Conventional Development: A Ca...
Comparison between Test-Driven Development and Conventional Development: A Ca...Comparison between Test-Driven Development and Conventional Development: A Ca...
Comparison between Test-Driven Development and Conventional Development: A Ca...IJERA Editor
 
DETERMINING THE RISKY SOFTWARE PROJECTS USING ARTIFICIAL NEURAL NETWORKS
DETERMINING THE RISKY SOFTWARE PROJECTS USING ARTIFICIAL NEURAL NETWORKSDETERMINING THE RISKY SOFTWARE PROJECTS USING ARTIFICIAL NEURAL NETWORKS
DETERMINING THE RISKY SOFTWARE PROJECTS USING ARTIFICIAL NEURAL NETWORKSijseajournal
 
Importance of Testing in SDLC
Importance of Testing in SDLCImportance of Testing in SDLC
Importance of Testing in SDLCIJEACS
 
Test automation with the Gauge framework: Experience and best practices -- SE...
Test automation with the Gauge framework: Experience and best practices -- SE...Test automation with the Gauge framework: Experience and best practices -- SE...
Test automation with the Gauge framework: Experience and best practices -- SE...Vahid Garousi
 
GTR-The End Of Testing As We Know It
GTR-The End Of Testing As We Know ItGTR-The End Of Testing As We Know It
GTR-The End Of Testing As We Know ItRik Marselis
 

Similar to Have Java Production Methods Co-Evolved With Test Methods Properly?: A Fine-Grained Repository- Based Co-Evolution Analysis (20)

Staroletov testing TDD BDD MBT
Staroletov testing TDD BDD MBTStaroletov testing TDD BDD MBT
Staroletov testing TDD BDD MBT
 
Codex AI.pdf
Codex AI.pdfCodex AI.pdf
Codex AI.pdf
 
Software testing effort estimation with cobb douglas function a practical app...
Software testing effort estimation with cobb douglas function a practical app...Software testing effort estimation with cobb douglas function a practical app...
Software testing effort estimation with cobb douglas function a practical app...
 
Software testing effort estimation with cobb douglas function- a practical ap...
Software testing effort estimation with cobb douglas function- a practical ap...Software testing effort estimation with cobb douglas function- a practical ap...
Software testing effort estimation with cobb douglas function- a practical ap...
 
Quality Engineering and Testing with TMAP in DevOps IT delivery
Quality Engineering and Testing with TMAP in DevOps IT deliveryQuality Engineering and Testing with TMAP in DevOps IT delivery
Quality Engineering and Testing with TMAP in DevOps IT delivery
 
Testing survey by_directions
Testing survey by_directionsTesting survey by_directions
Testing survey by_directions
 
International Journal of Soft Computing and Engineering (IJS
International Journal of Soft Computing and Engineering (IJSInternational Journal of Soft Computing and Engineering (IJS
International Journal of Soft Computing and Engineering (IJS
 
C41041120
C41041120C41041120
C41041120
 
Agile principles and practices
Agile principles and practicesAgile principles and practices
Agile principles and practices
 
The effectiveness of test-driven development approach on software projects: A...
The effectiveness of test-driven development approach on software projects: A...The effectiveness of test-driven development approach on software projects: A...
The effectiveness of test-driven development approach on software projects: A...
 
STATISTICAL ANALYSIS FOR PERFORMANCE COMPARISON
STATISTICAL ANALYSIS FOR PERFORMANCE COMPARISONSTATISTICAL ANALYSIS FOR PERFORMANCE COMPARISON
STATISTICAL ANALYSIS FOR PERFORMANCE COMPARISON
 
Comparison between Test-Driven Development and Conventional Development: A Ca...
Comparison between Test-Driven Development and Conventional Development: A Ca...Comparison between Test-Driven Development and Conventional Development: A Ca...
Comparison between Test-Driven Development and Conventional Development: A Ca...
 
DETERMINING THE RISKY SOFTWARE PROJECTS USING ARTIFICIAL NEURAL NETWORKS
DETERMINING THE RISKY SOFTWARE PROJECTS USING ARTIFICIAL NEURAL NETWORKSDETERMINING THE RISKY SOFTWARE PROJECTS USING ARTIFICIAL NEURAL NETWORKS
DETERMINING THE RISKY SOFTWARE PROJECTS USING ARTIFICIAL NEURAL NETWORKS
 
Manualtestingppt
ManualtestingpptManualtestingppt
Manualtestingppt
 
Introduction & Manual Testing
Introduction & Manual TestingIntroduction & Manual Testing
Introduction & Manual Testing
 
Testing
TestingTesting
Testing
 
Importance of Testing in SDLC
Importance of Testing in SDLCImportance of Testing in SDLC
Importance of Testing in SDLC
 
Test-Driven Code Review: An Empirical Study
Test-Driven Code Review: An Empirical StudyTest-Driven Code Review: An Empirical Study
Test-Driven Code Review: An Empirical Study
 
Test automation with the Gauge framework: Experience and best practices -- SE...
Test automation with the Gauge framework: Experience and best practices -- SE...Test automation with the Gauge framework: Experience and best practices -- SE...
Test automation with the Gauge framework: Experience and best practices -- SE...
 
GTR-The End Of Testing As We Know It
GTR-The End Of Testing As We Know ItGTR-The End Of Testing As We Know It
GTR-The End Of Testing As We Know It
 

More from SEAA 2022

Risk and Engineering Knowledge Integration in Cyber-physical Production Syste...
Risk and Engineering Knowledge Integration in Cyber-physical Production Syste...Risk and Engineering Knowledge Integration in Cyber-physical Production Syste...
Risk and Engineering Knowledge Integration in Cyber-physical Production Syste...SEAA 2022
 
Bad Smells in Industrial Automation: Sniffing out Feature Envy
Bad Smells in Industrial Automation: Sniffing out Feature EnvyBad Smells in Industrial Automation: Sniffing out Feature Envy
Bad Smells in Industrial Automation: Sniffing out Feature EnvySEAA 2022
 
Software Architecture Challenges in Process Automation - From Code Generation...
Software Architecture Challenges in Process Automation - From Code Generation...Software Architecture Challenges in Process Automation - From Code Generation...
Software Architecture Challenges in Process Automation - From Code Generation...SEAA 2022
 
From Traditional to Digital: How software, data and AI are transforming the e...
From Traditional to Digital: How software, data and AI are transforming the e...From Traditional to Digital: How software, data and AI are transforming the e...
From Traditional to Digital: How software, data and AI are transforming the e...SEAA 2022
 
Exploiting dynamic analysis for architectural smell detection: a preliminary ...
Exploiting dynamic analysis for architectural smell detection: a preliminary ...Exploiting dynamic analysis for architectural smell detection: a preliminary ...
Exploiting dynamic analysis for architectural smell detection: a preliminary ...SEAA 2022
 
On the Role of Personality Traits in Implementation Tasks: A Preliminary Inve...
On the Role of Personality Traits in Implementation Tasks: A Preliminary Inve...On the Role of Personality Traits in Implementation Tasks: A Preliminary Inve...
On the Role of Personality Traits in Implementation Tasks: A Preliminary Inve...SEAA 2022
 
An Empirical Analysis of Microservices Systems Using Consumer-Driven Contract...
An Empirical Analysis of Microservices Systems Using Consumer-Driven Contract...An Empirical Analysis of Microservices Systems Using Consumer-Driven Contract...
An Empirical Analysis of Microservices Systems Using Consumer-Driven Contract...SEAA 2022
 
A Preliminary Conceptualization and Analysis on Automated Static Analysis Too...
A Preliminary Conceptualization and Analysis on Automated Static Analysis Too...A Preliminary Conceptualization and Analysis on Automated Static Analysis Too...
A Preliminary Conceptualization and Analysis on Automated Static Analysis Too...SEAA 2022
 
An Evaluation of Effort-Aware Fine-Grained Just-in-Time Defect Prediction Met...
An Evaluation of Effort-Aware Fine-Grained Just-in-Time Defect Prediction Met...An Evaluation of Effort-Aware Fine-Grained Just-in-Time Defect Prediction Met...
An Evaluation of Effort-Aware Fine-Grained Just-in-Time Defect Prediction Met...SEAA 2022
 
The Impact of Forced Working-From-Home on Code Technical Debt: An Industrial ...
The Impact of Forced Working-From-Home on Code Technical Debt: An Industrial ...The Impact of Forced Working-From-Home on Code Technical Debt: An Industrial ...
The Impact of Forced Working-From-Home on Code Technical Debt: An Industrial ...SEAA 2022
 
Service Classification through Machine Learning: Aiding in the Efficient Ide...
 Service Classification through Machine Learning: Aiding in the Efficient Ide... Service Classification through Machine Learning: Aiding in the Efficient Ide...
Service Classification through Machine Learning: Aiding in the Efficient Ide...SEAA 2022
 
Maintainability Challenges inML:ASLR
Maintainability Challenges inML:ASLRMaintainability Challenges inML:ASLR
Maintainability Challenges inML:ASLRSEAA 2022
 
Model-Driven Optimization: Generating Smart Mutation Operators for Multi-Obj...
 Model-Driven Optimization: Generating Smart Mutation Operators for Multi-Obj... Model-Driven Optimization: Generating Smart Mutation Operators for Multi-Obj...
Model-Driven Optimization: Generating Smart Mutation Operators for Multi-Obj...SEAA 2022
 
An Industrial Experience Report about Challenges from Continuous Monitoring, ...
An Industrial Experience Report about Challenges from Continuous Monitoring, ...An Industrial Experience Report about Challenges from Continuous Monitoring, ...
An Industrial Experience Report about Challenges from Continuous Monitoring, ...SEAA 2022
 
API Deprecation: A Systematic Mapping Study
API Deprecation: A Systematic Mapping StudyAPI Deprecation: A Systematic Mapping Study
API Deprecation: A Systematic Mapping StudySEAA 2022
 
MDEML_UMLsec4Edge Extending UMLsec to model data-protection-compliant edge co...
MDEML_UMLsec4Edge Extending UMLsec to model data-protection-compliant edge co...MDEML_UMLsec4Edge Extending UMLsec to model data-protection-compliant edge co...
MDEML_UMLsec4Edge Extending UMLsec to model data-protection-compliant edge co...SEAA 2022
 
EMMM: A Unified Meta-Model for Tracking Machine Learning Experiments
 EMMM: A Unified Meta-Model for Tracking Machine Learning Experiments EMMM: A Unified Meta-Model for Tracking Machine Learning Experiments
EMMM: A Unified Meta-Model for Tracking Machine Learning ExperimentsSEAA 2022
 
Easing the Reuse of ML Solutions by Interactive Clustering-based Autotuning i...
Easing the Reuse of ML Solutions by Interactive Clustering-based Autotuning i...Easing the Reuse of ML Solutions by Interactive Clustering-based Autotuning i...
Easing the Reuse of ML Solutions by Interactive Clustering-based Autotuning i...SEAA 2022
 

More from SEAA 2022 (18)

Risk and Engineering Knowledge Integration in Cyber-physical Production Syste...
Risk and Engineering Knowledge Integration in Cyber-physical Production Syste...Risk and Engineering Knowledge Integration in Cyber-physical Production Syste...
Risk and Engineering Knowledge Integration in Cyber-physical Production Syste...
 
Bad Smells in Industrial Automation: Sniffing out Feature Envy
Bad Smells in Industrial Automation: Sniffing out Feature EnvyBad Smells in Industrial Automation: Sniffing out Feature Envy
Bad Smells in Industrial Automation: Sniffing out Feature Envy
 
Software Architecture Challenges in Process Automation - From Code Generation...
Software Architecture Challenges in Process Automation - From Code Generation...Software Architecture Challenges in Process Automation - From Code Generation...
Software Architecture Challenges in Process Automation - From Code Generation...
 
From Traditional to Digital: How software, data and AI are transforming the e...
From Traditional to Digital: How software, data and AI are transforming the e...From Traditional to Digital: How software, data and AI are transforming the e...
From Traditional to Digital: How software, data and AI are transforming the e...
 
Exploiting dynamic analysis for architectural smell detection: a preliminary ...
Exploiting dynamic analysis for architectural smell detection: a preliminary ...Exploiting dynamic analysis for architectural smell detection: a preliminary ...
Exploiting dynamic analysis for architectural smell detection: a preliminary ...
 
On the Role of Personality Traits in Implementation Tasks: A Preliminary Inve...
On the Role of Personality Traits in Implementation Tasks: A Preliminary Inve...On the Role of Personality Traits in Implementation Tasks: A Preliminary Inve...
On the Role of Personality Traits in Implementation Tasks: A Preliminary Inve...
 
An Empirical Analysis of Microservices Systems Using Consumer-Driven Contract...
An Empirical Analysis of Microservices Systems Using Consumer-Driven Contract...An Empirical Analysis of Microservices Systems Using Consumer-Driven Contract...
An Empirical Analysis of Microservices Systems Using Consumer-Driven Contract...
 
A Preliminary Conceptualization and Analysis on Automated Static Analysis Too...
A Preliminary Conceptualization and Analysis on Automated Static Analysis Too...A Preliminary Conceptualization and Analysis on Automated Static Analysis Too...
A Preliminary Conceptualization and Analysis on Automated Static Analysis Too...
 
An Evaluation of Effort-Aware Fine-Grained Just-in-Time Defect Prediction Met...
An Evaluation of Effort-Aware Fine-Grained Just-in-Time Defect Prediction Met...An Evaluation of Effort-Aware Fine-Grained Just-in-Time Defect Prediction Met...
An Evaluation of Effort-Aware Fine-Grained Just-in-Time Defect Prediction Met...
 
The Impact of Forced Working-From-Home on Code Technical Debt: An Industrial ...
The Impact of Forced Working-From-Home on Code Technical Debt: An Industrial ...The Impact of Forced Working-From-Home on Code Technical Debt: An Industrial ...
The Impact of Forced Working-From-Home on Code Technical Debt: An Industrial ...
 
Service Classification through Machine Learning: Aiding in the Efficient Ide...
 Service Classification through Machine Learning: Aiding in the Efficient Ide... Service Classification through Machine Learning: Aiding in the Efficient Ide...
Service Classification through Machine Learning: Aiding in the Efficient Ide...
 
Maintainability Challenges inML:ASLR
Maintainability Challenges inML:ASLRMaintainability Challenges inML:ASLR
Maintainability Challenges inML:ASLR
 
Model-Driven Optimization: Generating Smart Mutation Operators for Multi-Obj...
 Model-Driven Optimization: Generating Smart Mutation Operators for Multi-Obj... Model-Driven Optimization: Generating Smart Mutation Operators for Multi-Obj...
Model-Driven Optimization: Generating Smart Mutation Operators for Multi-Obj...
 
An Industrial Experience Report about Challenges from Continuous Monitoring, ...
An Industrial Experience Report about Challenges from Continuous Monitoring, ...An Industrial Experience Report about Challenges from Continuous Monitoring, ...
An Industrial Experience Report about Challenges from Continuous Monitoring, ...
 
API Deprecation: A Systematic Mapping Study
API Deprecation: A Systematic Mapping StudyAPI Deprecation: A Systematic Mapping Study
API Deprecation: A Systematic Mapping Study
 
MDEML_UMLsec4Edge Extending UMLsec to model data-protection-compliant edge co...
MDEML_UMLsec4Edge Extending UMLsec to model data-protection-compliant edge co...MDEML_UMLsec4Edge Extending UMLsec to model data-protection-compliant edge co...
MDEML_UMLsec4Edge Extending UMLsec to model data-protection-compliant edge co...
 
EMMM: A Unified Meta-Model for Tracking Machine Learning Experiments
 EMMM: A Unified Meta-Model for Tracking Machine Learning Experiments EMMM: A Unified Meta-Model for Tracking Machine Learning Experiments
EMMM: A Unified Meta-Model for Tracking Machine Learning Experiments
 
Easing the Reuse of ML Solutions by Interactive Clustering-based Autotuning i...
Easing the Reuse of ML Solutions by Interactive Clustering-based Autotuning i...Easing the Reuse of ML Solutions by Interactive Clustering-based Autotuning i...
Easing the Reuse of ML Solutions by Interactive Clustering-based Autotuning i...
 

Recently uploaded

Recombination DNA Technology (Microinjection)
Recombination DNA Technology (Microinjection)Recombination DNA Technology (Microinjection)
Recombination DNA Technology (Microinjection)Jshifa
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡anilsa9823
 
Genomic DNA And Complementary DNA Libraries construction.
Genomic DNA And Complementary DNA Libraries construction.Genomic DNA And Complementary DNA Libraries construction.
Genomic DNA And Complementary DNA Libraries construction.k64182334
 
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfAnalytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfSwapnil Therkar
 
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxSwapnil Therkar
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsSérgio Sacani
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PPRINCE C P
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxAArockiyaNisha
 
The Black hole shadow in Modified Gravity
The Black hole shadow in Modified GravityThe Black hole shadow in Modified Gravity
The Black hole shadow in Modified GravitySubhadipsau21168
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfSELF-EXPLANATORY
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...Sérgio Sacani
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)DHURKADEVIBASKAR
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett SquareIsiahStephanRadaza
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...RohitNehra6
 

Recently uploaded (20)

Recombination DNA Technology (Microinjection)
Recombination DNA Technology (Microinjection)Recombination DNA Technology (Microinjection)
Recombination DNA Technology (Microinjection)
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
 
Genomic DNA And Complementary DNA Libraries construction.
Genomic DNA And Complementary DNA Libraries construction.Genomic DNA And Complementary DNA Libraries construction.
Genomic DNA And Complementary DNA Libraries construction.
 
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfAnalytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
 
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C P
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
 
The Black hole shadow in Modified Gravity
The Black hole shadow in Modified GravityThe Black hole shadow in Modified Gravity
The Black hole shadow in Modified Gravity
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett Square
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...
 

Have Java Production Methods Co-Evolved With Test Methods Properly?: A Fine-Grained Repository- Based Co-Evolution Analysis

  • 1. Have Java Production Methods Co-Evolved With Test Methods Properly?: A Fine-Grained Repository- Based Co-Evolution Analysis Tenma Kita*1 Hirohisa Aman*1 Sousuke Amasaki*2 Tomoyuki Yokogawa*2 Minoru Kawahara*1 SEAA2022 (C) 2022 Hirohisa Aman *1) Ehime University, Matsuyama, Ehime, Japan *2) Okayama Prefectural Univ., Soja, Okayama, Japan 0
  • 2. Overview  Aim To detect Java methods that might not be properly tested through code evolutions  Method We examine co-evolution relationships (logical couplings) of production code with test code, using a fine-grained code repository; We propose a metric for evaluating their logical links  Result We empirically proved that most Java methods (98% on average) have co-evolved with test methods, but some have not; our metric detected some risky ones SEAA2022 (C) 2022 Hirohisa Aman 1
  • 3. Outline  Background & Related Work  Logical Coupling Between Production & Test Methods  Case Study  Conclusion & Future Work SEAA2022 (C) 2022 Hirohisa Aman 2
  • 4. Outline  Background & Related Work  Logical Coupling Between Production & Test Methods  Case Study  Conclusion & Future Work SEAA2022 (C) 2022 Hirohisa Aman 3
  • 5. Co-Evolution Between Production and test code  A set of source code (repository) includes not only the production code but the test code SEAA2022 (C) 2022 Hirohisa Aman 4 src main test ConnectionStateManager.java TestConnectionStateManager.java … … update update When developers update a production code, they should update or add the test code too Co‐Evolution
  • 6. Logical Coupling  A successful co-evolution between production and test code form a logical coupling  Our focus is on a poor logical coupling  Such a production code may have little or no corresponding test code SEAA2022 (C) 2022 Hirohisa Aman 5 commits P1 T1 P1 T1 P1 T2 new code creation functionality change bugfix P1 change T1 T2 change logical coupling
  • 7. Related Work (1/2)  Luben et al.[9] emphasized the successful maintenance of test cases in test-driven development  They analyzed logical couplings between Java production classes and JUnit test classes for a successful maintenance SEAA2022 (C) 2022 Hirohisa Aman 6  Although it is a valuable previous study, the analysis is at class-level and coarse-grained  To analyze those relationships from a finer- grained point of view, we utilize a method- level code repository in this study
  • 8. Related Work (2/2)  Marsavina et al.[5] & Vidacs and Pinzger[10] performed a fine-grained code change analysis to extract co-evolution patterns  Ex. “A production class addition/removal tends to cause a test class addition/removal” SEAA2022 (C) 2022 Hirohisa Aman 7  Those studies yield profound insights into co- evolution relationships  However, their main focuses were on the co- evolution patterns, but poorly tested code (poor logical coupling) was out of their analysis; We focus on such a poor logical coupling to detect a problematic code
  • 9. Outline  Background & Related Work  Logical Coupling Between Production & Test Methods  Case Study  Conclusion & Future Work SEAA2022 (C) 2022 Hirohisa Aman 8
  • 10. Analysis Granularity: Method  As a file-level analysis seems to be coarse and insufficient, we will trace logical couplings at method level  To this end, we utilize a fine-grained code repository, FinerGit[8]  FinerGit can convert a file-level normal Git repository to a method-level Git repository  In the converted repository, each Java method corresponds to each file  We can easily trace a method-level change history through Git commands SEAA2022 (C) 2022 Hirohisa Aman 9
  • 11. Logical Coupling & Its Strength  For a relation 𝒑 𝒕, the following confidence value presents its strength of link: SEAA2022 (C) 2022 Hirohisa Aman 10 When developers change a Java method 𝒑 at a commit, they tend to also change another method 𝒕 at the same commit 𝒑 𝒕 𝒑 𝒕) = 𝒑 𝒕 𝒑 𝜎 𝜎(x) is # of  x’s changes
  • 12. Two or more test methods may correspond to a production method  The confidence value corresponds to a conditional probability P( 𝒕 | 𝒑)  Similarly, we can consider probability that at least one test method is changed as SEAA2022 (C) 2022 Hirohisa Aman 11 0.4 0.3 The probability that  both 𝑚 and 𝑚 are not changed P( 𝒕 𝒕 | 𝒑) P( 𝒕 𝒕 | 𝒑)
  • 13. Proposed metric:  Some production methods might be linked to other production methods, and the latter ones are tested, i.e., indirect test links  We propose a novel metric, , to cover such indirect logical couplings as well SEAA2022 (C) 2022 Hirohisa Aman 12 0.4 0.3 0.1 0.7 0.2 0.3 𝑐𝑜𝑛𝑓 0.58 𝑐𝑜𝑛𝑓 0.73 𝑇𝑐𝑜𝑛𝑓 1 1 0.2 · 0.58 · 1 0.3 · 0.73 1 0.884 · 0.781 0.310 𝑇𝑐𝑜𝑛𝑓 0.310
  • 14. What evaluates?  The value of a production method evaluates the likelihood that the production method co-evolves with one or more test methods in either direct or indirect manners  A production method with a low value might be problematic as it has not been co-evolved with test methods SEAA2022 (C) 2022 Hirohisa Aman 13
  • 15. Outline  Background & Related Work  Logical Coupling Between Production & Test Methods  Case Study  Conclusion & Future Work SEAA2022 (C) 2022 Hirohisa Aman 14
  • 16. Studied Projects  We conducted a case study using ten Apache top-level projects to demonstrate how helps detect the problematic Java methods SEAA2022 (C) 2022 Hirohisa Aman 15
  • 17. Results(1/2): Curator project  Distribution of values in the Curator project SEAA2022 (C) 2022 Hirohisa Aman 16 mean 0.9948 𝑇𝑐𝑜𝑛𝑓 0.5 0.5 0.999 ≃ 1 0.43% 0.64% 𝟗𝟖. 𝟗𝟑% Most production methods (over 98%) in this project have co-evolved with at least one test method
  • 18. Results(2/2): Other Projects  All other projects showed similar results SEAA2022 (C) 2022 Hirohisa Aman 17 Fineract Flume Maven Parquet PDFBox Ranger RocketMQ Shiro Zookeeper 𝑇𝑐𝑜𝑛𝑓 𝐚𝐥𝐥 𝐩𝐫𝐨𝐣𝐞𝐜𝐭𝐬 0.5 0.5 0.999 ≃ 1 0.67% 1.33% 𝟗𝟖. 𝟎𝟎%
  • 19. Discussions(1/4)  As a result, we found that 98% of production methods have , i.e., they have co- evolved with one or more test methods  Nonetheless, we also found some production methods with low values  They included simple accessor methods like: Indeed, the above simple method does not need to be carefully tested … SEAA2022 (C) 2022 Hirohisa Aman 18 𝑇𝑐𝑜𝑛𝑓 0
  • 20. Discussions(2/4)  So, we filtered out the following methods:  It has appeared in the commit history only once  It has the lowest cyclomatic complexity (=1)  Even if we filtered simple methods, there are some production methods with SEAA2022 (C) 2022 Hirohisa Aman 19
  • 21. Discussions(3/4)  An example of production method with  LOC = 44  Cyclomatic complexity = 7  Number of commits = 2 SEAA2022 (C) 2022 Hirohisa Aman 20 Although the developers might prepare test code for this method independently, it is worth it to detect such a method and alert it
  • 22. Discussions(4/4)  Notice that a low value does not directly indicate the poor quality  Nonetheless, can detect the methods that have not been successfully co-evolved with test methods  By alerting such potentially problematic production methods to the developers, can contribute somewhat to the successful software evolution SEAA2022 (C) 2022 Hirohisa Aman 21
  • 23. Threats to Validity  Construct Validity:  There might be a delayed logical coupling  Internal Validity:  Some non-functional changes (refactoring or comment changes) might become noise data  External Validity:  We studied only ten Java projects  It is an impactful factor if the project adopt the test-driven development or not SEAA2022 (C) 2022 Hirohisa Aman 22
  • 24. Outline  Background & Related Work  Logical Coupling Between Production & Test Methods  Case Study  Conclusion & Future Work SEAA2022 (C) 2022 Hirohisa Aman 23
  • 25. Conclusion  We focused on the co-evolution (logical coupling) between Java production and test methods  We proposed as a metric for evaluating how a Java production method has properly co-evolved with test methods  A case study showed that  Most methods (98% on average) had been co- evolved successfully  helps us to detect some potentially problematic methods as well SEAA2022 (C) 2022 Hirohisa Aman 24
  • 26. Future Work  A validation study of by getting feedback from the developers  An empirical study of relationship between value and the overlooked faults  Further analyses focusing on the code change details and delayed logical couplings where the test method’s commit occurs after the production one’s commit SEAA2022 (C) 2022 Hirohisa Aman 25