Laleh M. Eshkevari, Ph.D Dissertation Defense
Automatic Detection and
Classification of Renamings
Supervisors:
Dr. Antoniol
Dr. Guéhéneuc
Department of Computer and Software Engineering
Ecole Polytechnique de Montreal, Quebec, Canada
14 December 2015
❖ Context and Motivation
❖ Thesis Statement
❖ Taxonomy of Renaming
❖ Detection
❖ Classification
❖ Conclusion and Future Works
2
Outline
{Java and PHP
Identifiers are added, deleted, or modified, i.e.,
renamed.
Why identifiers are renamed?
❖ Improve consistency
❖ Adjust naming convention
❖ Correct typos
3
Context and Motivation
❖ Developer A:
“There’s a balance to be struck: - identifiers are communication, and as the code
is refactored it is critical that identifiers continue to correctly describe their
purpose - changing identifiers tends to break APIs, and sometimes they’re used
for unintended purposes, over-frequent change is not good.”
❖ Developer B:
“I encountered a problem when my colleague wrote Java code which uses
reflection. I avoided renaming some classes/methods which will be inspected by
the reflection, since doing so can introduce unpredictable bugs.”
4
Context and Motivation
g ->
rebuildTypesAffectedByMissingSecondaryTypes ->
sessState ->
e ->
verifyAXFR ->
jj_3R_70 ->
length ->
generalization
sessionState
t
verifyStream
jj_3R_69
rebuildTypesAffectedBySecondaryTypes
l
MicroContainerNotAdvisedAnnotationOverrideProxyAdvisorTestCase ->
MicrocontainerAdvisedAnnotationOverrideProxyAdvisorTestCase
5
Examples of Renaming
parameter, Exception ->
local var, MGeneralization ->
local var, SessionState
local var, int
method, private, boolean, final
method, public, byte
Throwable
Object
Invited: 739 developers
Open-source and industrial programs
Object-Oriented
Participated: 71
❖ How often do developers rename?
❖ When do they rename?
❖ Is renaming straightforward?
❖ Already postpone a renaming?
6
Developers Opinion on Renamings
7
How often do developers rename?
Very frequently (almost every day)
Frequently (few times per week)
Occasionally (few times per month)
Rarely (up to once per month)
13% 25% 38% 50%
14%
46%
18%
21%
8
When do the developers rename?
When changing the functionality
When adding new functionality
When performing refactoring
When understanding code
When fixing a bug
Apart from other development activities
23% 45% 68% 90%
17%
42%
51%
90%
65%
89%
9
Is renaming straightforward?
In most cases yes
Requires time and effort
Sometimes no, sometimes
In most cases no
Identifier renaming is straightforward
10% 20% 30% 40%
8%
24%
32%
17%
25%
10
Already postponed a renaming?
High impact on the system
Too risky (could introduce bugs)
Potential impact on other systems
High effort required
15% 30% 45% 60%
25%
52%
35%
25%
Goal: To understand when, why, and how developers
rename identifiers.
11
Thesis Statement
Detection and linguistic analysis of identifier renamings
provides valuable insight on how, why, when developers
rename identifiers.
Tool supports, programming language, and naming
convention are factors that impact renamings frequency.
❖ We defined a Taxonomy of renaming based on grounded-theory
approach [Strauss, 1987; Glaser, 1992 ].
❖ We manually analyzed 500 renaming to identify dimensions of
renaming [Eshkevari et al, Arnaoudova et al].
12
Taxonomy of Renamings
Eshkevari et al. An exploratory study of identifier renamings. MSR 2011
Grammar
changes
Entity
kind
Form of
renamings
Semantic
changes
Arnaoudova et al. REPENT : Analyzing the Nature of Identifier Renamings. TSE 2014
13
Taxonomy of Renamings
Entity
kind
package
class
method
constructor
field
parameters
local vars
Form of
renamings
Semantic
changes
Grammar
changes
simple
complex
formatting only
term reordering
preserve meaning
change meaning
narrow meaning
add meaning
broaden meaning
remove meaning
none
part of speech change
none
hypernym color

hyponym red

holonym tree

meronym trunk
14
Taxonomy of Renamings
Form of
renamings
simple
complex
formatting only
term reordering
override -> overriding
JavaExtension -> JAVA_EXTENSION
setDelaySocketClose -> setSocketCloseDelay
IsAssignmentWithNoEffectMASK -> AssignmentHasNoEffect
15
Taxonomy of Renamings
Semantic
changes
preserve meaning
change meaning
narrow meaning
add meaning
broaden meaning
remove meaning
none
synonym
synonym phrase
spelling error
expansion
abbreviation
isPotentialMatch -> isPossibleMatch
notVisibleReference -> hiddenReference
sourceField -> fiieldInfo
collab -> collaboration
operationDesc -> opDesc
opposite
opposite phrase
whole-part
whole-part phrase
unrelated
disableLookups -> enableLookups
isNotPrimitiveType -> isPrimitiveType
body -> node
Path -> FileAndDirectory
expressionModel -> scriptModel
specialization
specialization phrase
thrownExceptionSize -> boundExceptionLength
item -> toDoItemgeneralization
generalization phrase
getAccessRestriction -> getAccessRuleSet
eventName -> name
flags -> typeAndFlags
removedPackagePath -> packagePath
extension -> Extension
16
Taxonomy of Renamings
Grammar
changes
part of speech change
none
getUpdatedSize -> updateFigGroupSize
isPotentialMatch -> isPossibleMatch
private int invParamsPtr =-1;
private int invalidParamReferencesPtr=-1;
Entity
kind
Form of
renamings
Semantic
changes
Grammer
changes
complex preserve meaning
add meaning
field plural to singular
invParamsPtr -> invalidParamReferencesPtr
17
Example
18
Detection and Classification Approach
Detection
Line mapping
Entity mapping
19
Renaming Detection
Detection
Line mapping
Entity mapping
Data flow analysis
20
Renaming Detection
❖ We build a symbol table considering entities scope, signature, and
line number
❖ Identify modifications and uses within and across file by resolving
imported files
Detection
Line mapping
Entity mapping
Data flow analysis
Score of mapping
21
Renaming Detection
❖ We use the Normalized Levenshtein edit Distance (NLD)
NLD=
LD(Si,Sj)
Length(Si) + Length(Sj)
Hungarian algorithm
maximize score
Statement Similarity
Threshold (SST)
similarity_score=1- NLD Declaration Similarity
Threshold (DST)
Detection
Line mapping
Entity mapping
Data flow analysis
Score of mapping
22
Renaming Detection
score=sum(Si,j)
i,j ∈ mapped statements
{
numMatched >= NST
numMatched < NST
score=0
score(El,Ek)=
O1 -> N1
O2 -> N2
O3 -> N4
score(STATE_INITIAL,STATE_PRE_INIT)=1+1+1=3
Number of
matched
Statement
Threshold
Detection
Line mapping
Entity mapping
Data flow analysis
Score of mapping
23
Renaming Detection
Renaming detection
Hungarian algorithm
maximize score
24
Analyzed Programs
Programs
Tomcat
Eclipse-JDT
ArgoUML
JBoss
dnsjava
46,498
54,571
68,400
25,028
1,415
RevisionsPeriod Total files
1999–2006
2001–2006
1998-2012
1999–2011
1998–2011
12,205
5,758
300
40,003
365
ArgoUML
17%
18%
10%
54%
Type
Field
Constructor
Method
LocalVar
parameter
dnsjava
41%
13%
20%
15%
5%6%
Eclipse-JDT
26%
31%
26%
1%
16%1%
JBoss
25%
24% 29%
3%
13%
5%
Tomcat
21%
18%
35%
2%
20%
3%
25
Detection Results
How accurate is the set of renamings detected by REPENT?
❖ Sample size, 95%, 5% = 1,723
❖ Two evaluators, voting, conflict resolved by third evaluator
26
Detection Accuracy
Precision =
| TPS | + | FPS |
| TPS |
= 88% Programs
Tomcat
Eclipse-JDT
ArgoUml
JBoss
dnsjava
Precision
80%
94%
97%
91%
78%
Low precision in detection of parameter:
dnsjava: 54%
Tomcat : 67%
Not enough parameters when calibrating
the thresholds
+-
How complete is the set of renamings detected by REPENT?
❖ Commit logs “renam”, remove false positives
27
Detection Accuracy
Recall =
| DCR |
| DCR ∩ DR|
= 92%
Programs
Tomcat
Eclipse-JDT
ArgoUml
JBoss
dnsjava
Recall
100%
63%
75%
96%
98%
Eclipse-JDT: Failed to identify Class
renamings due to missed file renamings.
ArgoUML: 3/4 documente renamings is
identified. The missed case was a combination
combination of renaming and refactoring
❖ We identify 33,812 renamings in five open source
programs.
❖ We manually validated a sample size (95% +- 5%) of
1,723 renamings.
❖ The overall precision of detection is 88%.
❖ The overall recall of detection is 92%.
❖ The high precision and recall make our approach
suitable for identifying renamings.
28
Detection Summary
29
Detection and Classification Approach
30
Taxonomy of Renamings
Entity
kind
package
class
method
constructor
field
parameters
local vars
Form of
renamings
Semantic
changes
Grammar
changes
simple
complex
formatting only
term reordering
preserve meaning
change meaning
narrow meaning
add meaning
broaden meaning
remove meaning
none
part of speech change
none
Classification
Identifier splitting
31
Renaming Classification
invParamsPtr -> invalidParamReferencesPtr
inv Params Ptr invalid Param References Ptr
Classification
Identifier splitting
32
Renaming Classification
invParamsPtr -> invalidParamReferencesPtr
inv Params Ptr invalid Param References Ptr
Term mapping
inv
Params
Ptr
invalid
Param
References
Ptr
Classification
Identifier splitting
33
Renaming Classification
invParamsPtr -> invalidParamReferencesPtr
inv Params Ptr invalid Param References Ptr
Term mapping
inv ->
invalid
param
References
ptr
?
exactMatch(t11,t21)?
caseDiff(t11,t21)?
semanticMatch(t11,t21)?
sameStem(t11,t21)?
N
N
N
Y
Y
Y
Y
t11 matched t21
t11 matched t21
t11 matched t21
t11 matched t21
N
WordNet,
prefix,suffix,NLD
Porter stemming
repeat for t11 and t22
inv ->
params ->
- ->
ptr ->
invalid
param
References
ptr
Semantic analyzer
Classification
Identifier splitting
34
Renaming Classification
invParamsPtr -> invalidParamReferencesPtr
inv Params Ptr invalid Param References Ptr
Term mapping
inv ->
params ->
- ->
ptr ->
invalid
param
References
ptr
Semantic analyzer
{
{
{
NN NNS VBP
{
{
JJ NN VBP
{
{
NNS
expansion
related
added
exact match
expansion, POS change
plural to singular
added
exact match
Stanford Part-of-Speech AnalyzerPOS tagger
35
Results for Form of Renaming
ArgoUML
45%
43%
12%
Complex
Formatting only
Simple
Term reordering
dnsjava
82%
11%8%
Eclipse
63%
1%
36%
JBoss
60%
5%
35%
Tomcat
69%
2%
28%
36
Results Semantic changes
1,750
3,500
5,250
7,000
ArgoUML dnsjava Eclipse JBoss Tomcat
Preserve meaning
Change meaning
Narrow meaning
Broaden meaning
Add meaning
Remove meaning
None
37
Results Grammar Change
ArgoUML
1%
83%
1%
15%
POS
Singular-Plural
None
Verb conj change
dnsjava
77%
1%
22%
Eclipse
2%
71%
5%
22%
JBoss
1%
78%
2%
19%
Tomcat
1%
76%
2%
20%
How accurate is the set of classified renamings?
❖ Sample size, 95%, 10% , for each level of dimension
❖ 330 , 1102, 355, for each dimension respectively.
❖ Two evaluators, voting, conflict was resolve
38
Classification Accuracy
Programs
Tomcat
Eclipse-JDT
ArgoUML
JBoss
dnsjava
Form of
renaming
96%
96%
100%
98%
100%
Semantic
changes
72%
82%
88%
79%
92%
Grammar
changes
61%
75%
88%
72%
100%
+
-
39
Classification Accuracy
Programs
Tomcat
Eclipse-JDT
ArgoUML
JBoss
dnsjava
Form of
renaming
96%
96%
100%
98%
100%
Semantic
changes
72%
82%
88%
79%
92%
Grammar
changes
61%
75%
88%
72%
100%
wrong term mapping
add or remove meaning
- wrong splitting of all lower-cased
narrow or broaden meaning
- wrong splitting,
- wrong term mapping,
- wrong relations between terms
is -> get hyponym
long -> short antonym
- accurate in singular/plural
- fairly accurate in verb conj change
- low precision in other POS
Gupta et al. Part-of-Speech Tagging of Program Identifiers for Improved Text-based Software Engineering Tools . ICP 2013
❖ Java is a statically type and object-oriented language.
❖ We are interested to investigate the applicability of
our approach to a language different from Java.
❖ We choose PHP as it is a popular language, it is a
dynamically type language and it allows scripting,
procedural and object-oriented programming.
40
Applicability to other languages
41
Challenges!!
Entity
kind
package
class
method
constructor
field
parameters
local vars
namespace
class
method
constructor
field
parameters
vars
function
Form of
renaming
Semantic
changes
Grammar
changes
Renamings Detection
-Line mappings
-Extracting entity declarations
-Extracting def-uses
- All entities except variables
have declaration
- Assignments are considered
as declarations of variables
- Access entities defined in other files
- Java: import, fixed location
- PHP: include, any location
42
PHP Renamings Detection
Detection
Line mapping
Entity mapping
Data flow analysis
Score of mapping
Renaming detection
- Resolve the include
- We use same thresholds SST,NST, DST as calibrated for
Java programs
Fixed point algorithm:
- Eclipse PDT tool to expect AST
- Heuristic
- Symbolic execution
Eshkevari et al. Identifying and Locating Interference Issues in PHP Applications. ICPC 2014
- Resolve the include
- Resolve the type, method/function binding
- Perform inter/intra procedural, flow sensitive- context
insensitive analysis to extract the def-uses
43
Challenges!!
Entity
kind
namespace
class
method
constructor
filed
parameters
local vars
function
Form of
renaming
Semantic
changes
Grammar
changes
Identifier splitting
- no naming convention in PHP
- PHP is case insensitive
44
Analyzed Programs
Programs
Wordpress
Drupal
phpBB
386
322
368
RevisionsPeriod Total files
06 March 2015
06 April 2015
18 Jun 2006
21 July 2006
547
492
143
19 March 2011
30 May 2011
45
Detection Results
Wordpress
10%
80%
10%
Type
Field
LocalVar
Constructor
Method
parameter
Drupal
77%
23%
phpBB
6%
94%
Programs
Wordpress
Drupal
phpBB
Precision
100%
78%
84%
Precision =
| TPS | + | FPS |
| TPS |
= 85%
Recall =
| TPS | + | FNS |
| TPS |
= 78%
Recall
62%
81%
87%
46
Results for Form of Renaming
Wordpress
90%
10%
Complex
Formatting only
Simple
Term reordering
Drupal
100%
phpBB
79%
14%
7%
Programs
Wordpress
Drupal
phpBB
Precision
100%
100%
100%
47
Results Semantic changes
0
7.5
15
22.5
30
Wordpress phpBB Drupal
Preserve meaning
Change meaning
Add meaning
Remove meaning
Broaden meaning
Narrow meaning
None
_update_8000_node_get_types -> _update_7000_node_get_types
48
Precision of Semantic Change
Semantic
change
Preserve meaning
Broaden meaning
None
Narrow meaning
Change meaning
Add meaning
Remove meaning
Wordpress Drupal phpBB
100%- -
60% 57%-
0% 100%-
100% 50%-
0% - -
100% - -
100% 100%-
WP_Customize_Upload_Control->WP_Customize_Media_Control
title->link_text ACL_NO->ACL_NEVER
module_name->module_basename
49
Results Grammar Change
Wordpress
80%
10%
10%
POS
Singular-Plural
None
Verb conj change
Drupal
100%
phpBB
86%
14%
50
Precision of Grammar Change
Semantic
change
Singular/Plural
None
Verb conj change
Other POS
Wordpress Drupal phpBB
-100% -
- --
100% 100%-
100% 100%100%
tags-> tag
{
NNS
{
NN
ACL_NO-> ACL_NEVER
{
NN
{
NN
{RB
{
RB
new_content -> new_src
JJ
{
JJ
{
{
NN
{
NN
column_type -> orig_column_type
{
NN
{
NN
{
NN
{
NN
{
VBG
Construct validity:
❖ File renamings: thresholds 60%, CVS verging system
❖ Precision: human errors, subjectiveness
❖ Recall: small number of documented renamings
Internal validity:
❖ Calibration of thresholds, different results with different thresholds
External validity:
❖ Five open-source Java programs, different domain and size
51
Limitations of Detection
Construct validity:
❖ Precision and recall of detection
❖ Precision: human errors, subjectiveness
Internal validity:
❖ Use of threshold for term mapping, abbreviation and
expansion
External validity:
❖ Generalization, Java and PHP, different trends
52
Limitations of Classification
53
Lesson Learned
Goal: To understand when, why, and how developers rename
identifiers.
❖ We know that renaming is quite a frequent activity during
program evolution.
❖ It is mostly done when functionality of entities are changed and
also during refactoring.
❖ Though sometimes there is an urge for renaming, it is avoided
due to its cost and efforts.
❖ Developers tends to add and remove terms to rename identifiers,
while keeping the part of speech intact.
54
Conclusion
❖ Recommending a name for a new entity or an entity
being renamed.
❖ Extends the study to other programming languages.
❖ Support automatic renamings in PHP programs.
55
Future Works
Thank you :)
Thesis+of+laleh+eshkevari.ppt
g ->
rebuildTypesAffectedByMissingSecondaryTypes ->
sessState ->
e ->
verifyAXFR ->
jj_3R_70 ->
v ->
length ->
generalization
sessionState
t
verifyStream
jj_3R_69
rebuildTypesAffectedBySecondaryTypes
list
l
MicroContainerNotAdvisedAnnotationOverrideProxyAdvisorTestCase ->
MicrocontainerAdvisedAnnotationOverrideProxyAdvisorTestCase
58
Examples of Renaming
parameter, Exception ->
local var, MGeneralization ->
local var, SessionState
local var, Vector ->
local var, int
method, private, boolean, final
method, public, byte
method, protected, void
Throwable
Object
List
59
Detection and Classification Approach
60
Thresholds for Detection
Declaration Similarity Threshold (DST) -> 0.7
Number of matched Statement Threshold (NST) -> [0,1] step +0.1
Statement Similarity Threshold (SST) -> for each fixed NST, [0,1] step +0.1
NST= 0.1 -> SST = 0.1 ,0.2,…. 0.9,1
NST= 0.2 -> SST = 0.1 ,0.2,…. 0.9,1
…
NST= 0.9 -> SST = 0.1 ,0.2,…. 0.9,1
NST= 1 -> SST = 0.1 ,0.2,…. 0.9,1
NST= 0.1, SST = 0.1
NST= 0.1, SST = 0.2
…
NST= 0.1, SST = 0.9
NST= 0.1, SST = 1
DR1
DR2
…
DR9
DR10
INTERSECT = DR1 ∩ DR2 ∩ … DR9 ∩ DR10
UNION = DR1 ∪ DR2 ∪ … DR9 ∪ DR10
COMPLEMENT = UNION - INTERSECT
manual validation Oracle
724, Tomcat
manual validation
Oracle
2,265
❖ include(“./f1.php”)
❖ include_once (“./” . “f1.php”)
❖ require (PATH. “f1.php”)
❖ require_once (getRoot(). “f1.php”)
61
Include Statements
62
Include Resolution
Fixed point algorithm:
- Eclipse PDT tool to expect AST
- Heuristic
- Symbolic execution
63
Experiment
Programs UnknownRelease
Includes
statements
629
3
17
95
114
Wordpress
NextGen Gallery
Google XML Sitemap
Contact Form 7
Akismet
SEO by YOAST
WP Sitemap Page
Google XML Sitemaps
for qTranslate
YARPP
Jetpack
W3 Total Cache
3.6 – 3.7
2.5.6 – 2.5.9
3.5 - 4.4.1
2.7 - 2.3.5
1.9.3 – 2.0.40
3.2 - 3.6
3.2.7 - 3.3.1
1.1.7 - 1.4.22
0.9.2.4 - 0.9.3
1.0.12 - 1.0.12
3.2.7.1 - 3.3.1
- 649
- 3
- 26
- 126
- 144
16 - 19
5
22 - 42
592 - 436
- 5
1 - 1
6 - 6
37
0
16
37
26
- 37
- 0
- 23
- 63
- 37
15 - 18
2
18 - 35
335 - 168
- 2
1 - 1
2 - 2
64
Experiment
Programs Unknown
Includes
statements
629
3
17
95
114
Wordpress
NextGen Gallery
Google XML Sitemap
Contact Form 7
Akismet
SEO by YOAST
WP Sitemap Page
Google XML Sitemaps
for qTranslate
YARPP
Jetpack
W3 Total Cache
- 649
- 3
- 26
- 126
- 144
16 - 19
5
22 - 42
592 - 436
- 5
1 - 1
6 - 6
37
0
16
37
26
- 37
- 0
- 23
- 63
- 37
15 - 18
2
18 - 35
335 - 168
- 2
1 - 1
2 - 2
Resolved
2
0
11
22
14
- 2
- 0
- 19
- 43
- 15
11 - 13
2
16 - 33
290 - 135
- 2
1 - 1
2 - 2
65
Limitation of Static Resolution
Dynamic analysis
-Use TXL to instrument the include statements
- Installed wordpress 3.6 with all 10 plugins
- Five simple scenarios
- Logged the actual files at run time
Software lexicon:
❖ Identifiers
❖ Comments
❖ Literal
Importance of lexicon
❖ Program comprehension
❖ Traceability links
❖ Concept location
66
Context and Motivation
❖ Methods and parameters renamings are unavoidable due to evolution, i.e.,
constant changes in requirements.
❖ Using APIs without planning for change can cause ripple effect on the
client lexicon.
❖It is important to choose the naming conventions for each specific project in
an early stage of the development process and following it consistently.
❖ It is worth taking the effort to identify the right order of terms constituting
an identifier to clarify its meaning and avoid possible misunderstandings.
❖ To avoid the need for a sequence of renamings towards spelling error
correction, it is worth taking the time to spellcheck the identifier name when
creating or modifying an entity.
67
Lesson Learned
❖ It is worth investigating which one of the two, an abbreviation or
its English alternative, is more common and thus should be used
❖ Identifiers that contain negation tend to be renamed towards
positive names.
❖ The majority of semantic changes during renamings change,
narrow, broaden, add, or remove a meaning to the identifier, as
part of the evolution process and thus cannot be avoided.
❖It is worth the effort to assure consistency between, on the one
hand, the name of an entity, and, on the other hand, its
functionality, type, or other entities.
68
Lesson Learned

More Related Content

PDF
PDF
PPTX
Mksong proposal-slide
PDF
PPTX
ThesisPresentation
PDF
What java developers (don’t) know about api compatibility
PDF
Core java part1
PDF
A Taxonomy for Program Metamodels in Program Reverse Engineering
Mksong proposal-slide
ThesisPresentation
What java developers (don’t) know about api compatibility
Core java part1
A Taxonomy for Program Metamodels in Program Reverse Engineering

What's hot (16)

PDF
10 Ways To Improve Your Code( Neal Ford)
PDF
Icpc13.ppt
PDF
Istqb ctfl syll 2011
PDF
Class Diagram Extraction from Textual Requirements Using NLP Techniques
ODP
Concepts of JetBrains MPS
PPTX
Deep learning based code smell detection - Qualifying Talk
PDF
Complete java
PDF
IRJET - Pseudocode to Python Translation using Machine Learning
PPT
00 Fundamentals of csharp course introduction
PDF
Butler
PPT
Csci360 20
PPT
Csci360 20 (1)
PPT
Expressive And Modular Predicate Dispatch In Java
PDF
An Introduction to Object Oriented Programming
PDF
Intelligent query converter a domain independent interfacefor conversion
10 Ways To Improve Your Code( Neal Ford)
Icpc13.ppt
Istqb ctfl syll 2011
Class Diagram Extraction from Textual Requirements Using NLP Techniques
Concepts of JetBrains MPS
Deep learning based code smell detection - Qualifying Talk
Complete java
IRJET - Pseudocode to Python Translation using Machine Learning
00 Fundamentals of csharp course introduction
Butler
Csci360 20
Csci360 20 (1)
Expressive And Modular Predicate Dispatch In Java
An Introduction to Object Oriented Programming
Intelligent query converter a domain independent interfacefor conversion
Ad

Similar to Thesis+of+laleh+eshkevari.ppt (20)

PDF
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
PDF
Contextualizing Rename Decisions using Refactorings and Commit Messages
DOCX
2014 IEEE JAVA SOFTWARE ENGINEERING PROJECT Repent analyzing the nature of id...
PDF
Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
PDF
Understanding Digits in Identifier Names: An Exploratory Study
PDF
MSR11.ppt
PDF
Dipenta msr2011-renaming
PDF
A Primer on High-Quality Identifier Naming [ASE 2022]
PDF
Using Grammar Patterns to Interpret Test Method Name Evolution
PDF
Extracting Executable Transformations from Distilled Code Changes
PDF
Naming Things Book : Simple Book Review!
PPTX
Source code comprehension on evolving software
PDF
PDF
Effective Detection of Model Changes
PPTX
Naming Standards, Clean Code
PDF
130817 latifa guerrouj - context-aware source code vocabulary normalization...
PDF
Analyzing Changes in Software Systems From ChangeDistiller to FMDiff
PDF
IDEAL: An Open-Source Identifier Name Appraisal Tool
PDF
A Primer on High-Quality Identifier Naming
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
Contextualizing Rename Decisions using Refactorings and Commit Messages
2014 IEEE JAVA SOFTWARE ENGINEERING PROJECT Repent analyzing the nature of id...
Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
Understanding Digits in Identifier Names: An Exploratory Study
MSR11.ppt
Dipenta msr2011-renaming
A Primer on High-Quality Identifier Naming [ASE 2022]
Using Grammar Patterns to Interpret Test Method Name Evolution
Extracting Executable Transformations from Distilled Code Changes
Naming Things Book : Simple Book Review!
Source code comprehension on evolving software
Effective Detection of Model Changes
Naming Standards, Clean Code
130817 latifa guerrouj - context-aware source code vocabulary normalization...
Analyzing Changes in Software Systems From ChangeDistiller to FMDiff
IDEAL: An Open-Source Identifier Name Appraisal Tool
A Primer on High-Quality Identifier Naming
Ad

More from Ptidej Team (20)

PDF
From IoT to Software Miniaturisation
PDF
Presentation
PDF
Presentation
PDF
Presentation
PDF
Presentation by Lionel Briand
PDF
Manel Abdellatif
PDF
Azadeh Kermansaravi
PDF
Mouna Abidi
PDF
CSED - Manel Grichi
PDF
Cristiano Politowski
PDF
Will io t trigger the next software crisis
PDF
PDF
Thesis+of+nesrine+abdelkafi.ppt
PDF
Medicine15.ppt
PDF
Qrs17b.ppt
PDF
Icpc11c.ppt
PDF
Icsme16.ppt
PDF
Msr17a.ppt
PDF
Icsoc15.ppt
PDF
Thesis+of+étienne+duclos.ppt
From IoT to Software Miniaturisation
Presentation
Presentation
Presentation
Presentation by Lionel Briand
Manel Abdellatif
Azadeh Kermansaravi
Mouna Abidi
CSED - Manel Grichi
Cristiano Politowski
Will io t trigger the next software crisis
Thesis+of+nesrine+abdelkafi.ppt
Medicine15.ppt
Qrs17b.ppt
Icpc11c.ppt
Icsme16.ppt
Msr17a.ppt
Icsoc15.ppt
Thesis+of+étienne+duclos.ppt

Recently uploaded (20)

PDF
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PPTX
GSA Content Generator Crack (2025 Latest)
PDF
Time Tracking Features That Teams and Organizations Actually Need
PPTX
Introduction to Windows Operating System
PPTX
CNN LeNet5 Architecture: Neural Networks
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
PDF
Microsoft Office 365 Crack Download Free
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PDF
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Cost to Outsource Software Development in 2025
PDF
Salesforce Agentforce AI Implementation.pdf
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PDF
Visual explanation of Dijkstra's Algorithm using Python
PPTX
assetexplorer- product-overview - presentation
PDF
Designing Intelligence for the Shop Floor.pdf
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
GSA Content Generator Crack (2025 Latest)
Time Tracking Features That Teams and Organizations Actually Need
Introduction to Windows Operating System
CNN LeNet5 Architecture: Neural Networks
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
Microsoft Office 365 Crack Download Free
Oracle Fusion HCM Cloud Demo for Beginners
Autodesk AutoCAD Crack Free Download 2025
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
Topaz Photo AI Crack New Download (Latest 2025)
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
Computer Software and OS of computer science of grade 11.pptx
Cost to Outsource Software Development in 2025
Salesforce Agentforce AI Implementation.pdf
How to Use SharePoint as an ISO-Compliant Document Management System
Visual explanation of Dijkstra's Algorithm using Python
assetexplorer- product-overview - presentation
Designing Intelligence for the Shop Floor.pdf

Thesis+of+laleh+eshkevari.ppt

  • 1. Laleh M. Eshkevari, Ph.D Dissertation Defense Automatic Detection and Classification of Renamings Supervisors: Dr. Antoniol Dr. Guéhéneuc Department of Computer and Software Engineering Ecole Polytechnique de Montreal, Quebec, Canada 14 December 2015
  • 2. ❖ Context and Motivation ❖ Thesis Statement ❖ Taxonomy of Renaming ❖ Detection ❖ Classification ❖ Conclusion and Future Works 2 Outline {Java and PHP
  • 3. Identifiers are added, deleted, or modified, i.e., renamed. Why identifiers are renamed? ❖ Improve consistency ❖ Adjust naming convention ❖ Correct typos 3 Context and Motivation
  • 4. ❖ Developer A: “There’s a balance to be struck: - identifiers are communication, and as the code is refactored it is critical that identifiers continue to correctly describe their purpose - changing identifiers tends to break APIs, and sometimes they’re used for unintended purposes, over-frequent change is not good.” ❖ Developer B: “I encountered a problem when my colleague wrote Java code which uses reflection. I avoided renaming some classes/methods which will be inspected by the reflection, since doing so can introduce unpredictable bugs.” 4 Context and Motivation
  • 5. g -> rebuildTypesAffectedByMissingSecondaryTypes -> sessState -> e -> verifyAXFR -> jj_3R_70 -> length -> generalization sessionState t verifyStream jj_3R_69 rebuildTypesAffectedBySecondaryTypes l MicroContainerNotAdvisedAnnotationOverrideProxyAdvisorTestCase -> MicrocontainerAdvisedAnnotationOverrideProxyAdvisorTestCase 5 Examples of Renaming parameter, Exception -> local var, MGeneralization -> local var, SessionState local var, int method, private, boolean, final method, public, byte Throwable Object
  • 6. Invited: 739 developers Open-source and industrial programs Object-Oriented Participated: 71 ❖ How often do developers rename? ❖ When do they rename? ❖ Is renaming straightforward? ❖ Already postpone a renaming? 6 Developers Opinion on Renamings
  • 7. 7 How often do developers rename? Very frequently (almost every day) Frequently (few times per week) Occasionally (few times per month) Rarely (up to once per month) 13% 25% 38% 50% 14% 46% 18% 21%
  • 8. 8 When do the developers rename? When changing the functionality When adding new functionality When performing refactoring When understanding code When fixing a bug Apart from other development activities 23% 45% 68% 90% 17% 42% 51% 90% 65% 89%
  • 9. 9 Is renaming straightforward? In most cases yes Requires time and effort Sometimes no, sometimes In most cases no Identifier renaming is straightforward 10% 20% 30% 40% 8% 24% 32% 17% 25%
  • 10. 10 Already postponed a renaming? High impact on the system Too risky (could introduce bugs) Potential impact on other systems High effort required 15% 30% 45% 60% 25% 52% 35% 25%
  • 11. Goal: To understand when, why, and how developers rename identifiers. 11 Thesis Statement Detection and linguistic analysis of identifier renamings provides valuable insight on how, why, when developers rename identifiers. Tool supports, programming language, and naming convention are factors that impact renamings frequency.
  • 12. ❖ We defined a Taxonomy of renaming based on grounded-theory approach [Strauss, 1987; Glaser, 1992 ]. ❖ We manually analyzed 500 renaming to identify dimensions of renaming [Eshkevari et al, Arnaoudova et al]. 12 Taxonomy of Renamings Eshkevari et al. An exploratory study of identifier renamings. MSR 2011 Grammar changes Entity kind Form of renamings Semantic changes Arnaoudova et al. REPENT : Analyzing the Nature of Identifier Renamings. TSE 2014
  • 13. 13 Taxonomy of Renamings Entity kind package class method constructor field parameters local vars Form of renamings Semantic changes Grammar changes simple complex formatting only term reordering preserve meaning change meaning narrow meaning add meaning broaden meaning remove meaning none part of speech change none hypernym color hyponym red holonym tree meronym trunk
  • 14. 14 Taxonomy of Renamings Form of renamings simple complex formatting only term reordering override -> overriding JavaExtension -> JAVA_EXTENSION setDelaySocketClose -> setSocketCloseDelay IsAssignmentWithNoEffectMASK -> AssignmentHasNoEffect
  • 15. 15 Taxonomy of Renamings Semantic changes preserve meaning change meaning narrow meaning add meaning broaden meaning remove meaning none synonym synonym phrase spelling error expansion abbreviation isPotentialMatch -> isPossibleMatch notVisibleReference -> hiddenReference sourceField -> fiieldInfo collab -> collaboration operationDesc -> opDesc opposite opposite phrase whole-part whole-part phrase unrelated disableLookups -> enableLookups isNotPrimitiveType -> isPrimitiveType body -> node Path -> FileAndDirectory expressionModel -> scriptModel specialization specialization phrase thrownExceptionSize -> boundExceptionLength item -> toDoItemgeneralization generalization phrase getAccessRestriction -> getAccessRuleSet eventName -> name flags -> typeAndFlags removedPackagePath -> packagePath extension -> Extension
  • 16. 16 Taxonomy of Renamings Grammar changes part of speech change none getUpdatedSize -> updateFigGroupSize isPotentialMatch -> isPossibleMatch
  • 17. private int invParamsPtr =-1; private int invalidParamReferencesPtr=-1; Entity kind Form of renamings Semantic changes Grammer changes complex preserve meaning add meaning field plural to singular invParamsPtr -> invalidParamReferencesPtr 17 Example
  • 20. Detection Line mapping Entity mapping Data flow analysis 20 Renaming Detection ❖ We build a symbol table considering entities scope, signature, and line number ❖ Identify modifications and uses within and across file by resolving imported files
  • 21. Detection Line mapping Entity mapping Data flow analysis Score of mapping 21 Renaming Detection ❖ We use the Normalized Levenshtein edit Distance (NLD) NLD= LD(Si,Sj) Length(Si) + Length(Sj) Hungarian algorithm maximize score Statement Similarity Threshold (SST) similarity_score=1- NLD Declaration Similarity Threshold (DST)
  • 22. Detection Line mapping Entity mapping Data flow analysis Score of mapping 22 Renaming Detection score=sum(Si,j) i,j ∈ mapped statements { numMatched >= NST numMatched < NST score=0 score(El,Ek)= O1 -> N1 O2 -> N2 O3 -> N4 score(STATE_INITIAL,STATE_PRE_INIT)=1+1+1=3 Number of matched Statement Threshold
  • 23. Detection Line mapping Entity mapping Data flow analysis Score of mapping 23 Renaming Detection Renaming detection Hungarian algorithm maximize score
  • 24. 24 Analyzed Programs Programs Tomcat Eclipse-JDT ArgoUML JBoss dnsjava 46,498 54,571 68,400 25,028 1,415 RevisionsPeriod Total files 1999–2006 2001–2006 1998-2012 1999–2011 1998–2011 12,205 5,758 300 40,003 365
  • 26. How accurate is the set of renamings detected by REPENT? ❖ Sample size, 95%, 5% = 1,723 ❖ Two evaluators, voting, conflict resolved by third evaluator 26 Detection Accuracy Precision = | TPS | + | FPS | | TPS | = 88% Programs Tomcat Eclipse-JDT ArgoUml JBoss dnsjava Precision 80% 94% 97% 91% 78% Low precision in detection of parameter: dnsjava: 54% Tomcat : 67% Not enough parameters when calibrating the thresholds +-
  • 27. How complete is the set of renamings detected by REPENT? ❖ Commit logs “renam”, remove false positives 27 Detection Accuracy Recall = | DCR | | DCR ∩ DR| = 92% Programs Tomcat Eclipse-JDT ArgoUml JBoss dnsjava Recall 100% 63% 75% 96% 98% Eclipse-JDT: Failed to identify Class renamings due to missed file renamings. ArgoUML: 3/4 documente renamings is identified. The missed case was a combination combination of renaming and refactoring
  • 28. ❖ We identify 33,812 renamings in five open source programs. ❖ We manually validated a sample size (95% +- 5%) of 1,723 renamings. ❖ The overall precision of detection is 88%. ❖ The overall recall of detection is 92%. ❖ The high precision and recall make our approach suitable for identifying renamings. 28 Detection Summary
  • 30. 30 Taxonomy of Renamings Entity kind package class method constructor field parameters local vars Form of renamings Semantic changes Grammar changes simple complex formatting only term reordering preserve meaning change meaning narrow meaning add meaning broaden meaning remove meaning none part of speech change none
  • 31. Classification Identifier splitting 31 Renaming Classification invParamsPtr -> invalidParamReferencesPtr inv Params Ptr invalid Param References Ptr
  • 32. Classification Identifier splitting 32 Renaming Classification invParamsPtr -> invalidParamReferencesPtr inv Params Ptr invalid Param References Ptr Term mapping inv Params Ptr invalid Param References Ptr
  • 33. Classification Identifier splitting 33 Renaming Classification invParamsPtr -> invalidParamReferencesPtr inv Params Ptr invalid Param References Ptr Term mapping inv -> invalid param References ptr ? exactMatch(t11,t21)? caseDiff(t11,t21)? semanticMatch(t11,t21)? sameStem(t11,t21)? N N N Y Y Y Y t11 matched t21 t11 matched t21 t11 matched t21 t11 matched t21 N WordNet, prefix,suffix,NLD Porter stemming repeat for t11 and t22 inv -> params -> - -> ptr -> invalid param References ptr Semantic analyzer
  • 34. Classification Identifier splitting 34 Renaming Classification invParamsPtr -> invalidParamReferencesPtr inv Params Ptr invalid Param References Ptr Term mapping inv -> params -> - -> ptr -> invalid param References ptr Semantic analyzer { { { NN NNS VBP { { JJ NN VBP { { NNS expansion related added exact match expansion, POS change plural to singular added exact match Stanford Part-of-Speech AnalyzerPOS tagger
  • 35. 35 Results for Form of Renaming ArgoUML 45% 43% 12% Complex Formatting only Simple Term reordering dnsjava 82% 11%8% Eclipse 63% 1% 36% JBoss 60% 5% 35% Tomcat 69% 2% 28%
  • 36. 36 Results Semantic changes 1,750 3,500 5,250 7,000 ArgoUML dnsjava Eclipse JBoss Tomcat Preserve meaning Change meaning Narrow meaning Broaden meaning Add meaning Remove meaning None
  • 37. 37 Results Grammar Change ArgoUML 1% 83% 1% 15% POS Singular-Plural None Verb conj change dnsjava 77% 1% 22% Eclipse 2% 71% 5% 22% JBoss 1% 78% 2% 19% Tomcat 1% 76% 2% 20%
  • 38. How accurate is the set of classified renamings? ❖ Sample size, 95%, 10% , for each level of dimension ❖ 330 , 1102, 355, for each dimension respectively. ❖ Two evaluators, voting, conflict was resolve 38 Classification Accuracy Programs Tomcat Eclipse-JDT ArgoUML JBoss dnsjava Form of renaming 96% 96% 100% 98% 100% Semantic changes 72% 82% 88% 79% 92% Grammar changes 61% 75% 88% 72% 100% + -
  • 39. 39 Classification Accuracy Programs Tomcat Eclipse-JDT ArgoUML JBoss dnsjava Form of renaming 96% 96% 100% 98% 100% Semantic changes 72% 82% 88% 79% 92% Grammar changes 61% 75% 88% 72% 100% wrong term mapping add or remove meaning - wrong splitting of all lower-cased narrow or broaden meaning - wrong splitting, - wrong term mapping, - wrong relations between terms is -> get hyponym long -> short antonym - accurate in singular/plural - fairly accurate in verb conj change - low precision in other POS Gupta et al. Part-of-Speech Tagging of Program Identifiers for Improved Text-based Software Engineering Tools . ICP 2013
  • 40. ❖ Java is a statically type and object-oriented language. ❖ We are interested to investigate the applicability of our approach to a language different from Java. ❖ We choose PHP as it is a popular language, it is a dynamically type language and it allows scripting, procedural and object-oriented programming. 40 Applicability to other languages
  • 41. 41 Challenges!! Entity kind package class method constructor field parameters local vars namespace class method constructor field parameters vars function Form of renaming Semantic changes Grammar changes Renamings Detection -Line mappings -Extracting entity declarations -Extracting def-uses - All entities except variables have declaration - Assignments are considered as declarations of variables - Access entities defined in other files - Java: import, fixed location - PHP: include, any location
  • 42. 42 PHP Renamings Detection Detection Line mapping Entity mapping Data flow analysis Score of mapping Renaming detection - Resolve the include - We use same thresholds SST,NST, DST as calibrated for Java programs Fixed point algorithm: - Eclipse PDT tool to expect AST - Heuristic - Symbolic execution Eshkevari et al. Identifying and Locating Interference Issues in PHP Applications. ICPC 2014 - Resolve the include - Resolve the type, method/function binding - Perform inter/intra procedural, flow sensitive- context insensitive analysis to extract the def-uses
  • 44. 44 Analyzed Programs Programs Wordpress Drupal phpBB 386 322 368 RevisionsPeriod Total files 06 March 2015 06 April 2015 18 Jun 2006 21 July 2006 547 492 143 19 March 2011 30 May 2011
  • 46. 46 Results for Form of Renaming Wordpress 90% 10% Complex Formatting only Simple Term reordering Drupal 100% phpBB 79% 14% 7% Programs Wordpress Drupal phpBB Precision 100% 100% 100%
  • 47. 47 Results Semantic changes 0 7.5 15 22.5 30 Wordpress phpBB Drupal Preserve meaning Change meaning Add meaning Remove meaning Broaden meaning Narrow meaning None _update_8000_node_get_types -> _update_7000_node_get_types
  • 48. 48 Precision of Semantic Change Semantic change Preserve meaning Broaden meaning None Narrow meaning Change meaning Add meaning Remove meaning Wordpress Drupal phpBB 100%- - 60% 57%- 0% 100%- 100% 50%- 0% - - 100% - - 100% 100%- WP_Customize_Upload_Control->WP_Customize_Media_Control title->link_text ACL_NO->ACL_NEVER module_name->module_basename
  • 50. 50 Precision of Grammar Change Semantic change Singular/Plural None Verb conj change Other POS Wordpress Drupal phpBB -100% - - -- 100% 100%- 100% 100%100% tags-> tag { NNS { NN ACL_NO-> ACL_NEVER { NN { NN {RB { RB new_content -> new_src JJ { JJ { { NN { NN column_type -> orig_column_type { NN { NN { NN { NN { VBG
  • 51. Construct validity: ❖ File renamings: thresholds 60%, CVS verging system ❖ Precision: human errors, subjectiveness ❖ Recall: small number of documented renamings Internal validity: ❖ Calibration of thresholds, different results with different thresholds External validity: ❖ Five open-source Java programs, different domain and size 51 Limitations of Detection
  • 52. Construct validity: ❖ Precision and recall of detection ❖ Precision: human errors, subjectiveness Internal validity: ❖ Use of threshold for term mapping, abbreviation and expansion External validity: ❖ Generalization, Java and PHP, different trends 52 Limitations of Classification
  • 54. Goal: To understand when, why, and how developers rename identifiers. ❖ We know that renaming is quite a frequent activity during program evolution. ❖ It is mostly done when functionality of entities are changed and also during refactoring. ❖ Though sometimes there is an urge for renaming, it is avoided due to its cost and efforts. ❖ Developers tends to add and remove terms to rename identifiers, while keeping the part of speech intact. 54 Conclusion
  • 55. ❖ Recommending a name for a new entity or an entity being renamed. ❖ Extends the study to other programming languages. ❖ Support automatic renamings in PHP programs. 55 Future Works
  • 58. g -> rebuildTypesAffectedByMissingSecondaryTypes -> sessState -> e -> verifyAXFR -> jj_3R_70 -> v -> length -> generalization sessionState t verifyStream jj_3R_69 rebuildTypesAffectedBySecondaryTypes list l MicroContainerNotAdvisedAnnotationOverrideProxyAdvisorTestCase -> MicrocontainerAdvisedAnnotationOverrideProxyAdvisorTestCase 58 Examples of Renaming parameter, Exception -> local var, MGeneralization -> local var, SessionState local var, Vector -> local var, int method, private, boolean, final method, public, byte method, protected, void Throwable Object List
  • 60. 60 Thresholds for Detection Declaration Similarity Threshold (DST) -> 0.7 Number of matched Statement Threshold (NST) -> [0,1] step +0.1 Statement Similarity Threshold (SST) -> for each fixed NST, [0,1] step +0.1 NST= 0.1 -> SST = 0.1 ,0.2,…. 0.9,1 NST= 0.2 -> SST = 0.1 ,0.2,…. 0.9,1 … NST= 0.9 -> SST = 0.1 ,0.2,…. 0.9,1 NST= 1 -> SST = 0.1 ,0.2,…. 0.9,1 NST= 0.1, SST = 0.1 NST= 0.1, SST = 0.2 … NST= 0.1, SST = 0.9 NST= 0.1, SST = 1 DR1 DR2 … DR9 DR10 INTERSECT = DR1 ∩ DR2 ∩ … DR9 ∩ DR10 UNION = DR1 ∪ DR2 ∪ … DR9 ∪ DR10 COMPLEMENT = UNION - INTERSECT manual validation Oracle 724, Tomcat manual validation Oracle 2,265
  • 61. ❖ include(“./f1.php”) ❖ include_once (“./” . “f1.php”) ❖ require (PATH. “f1.php”) ❖ require_once (getRoot(). “f1.php”) 61 Include Statements
  • 62. 62 Include Resolution Fixed point algorithm: - Eclipse PDT tool to expect AST - Heuristic - Symbolic execution
  • 63. 63 Experiment Programs UnknownRelease Includes statements 629 3 17 95 114 Wordpress NextGen Gallery Google XML Sitemap Contact Form 7 Akismet SEO by YOAST WP Sitemap Page Google XML Sitemaps for qTranslate YARPP Jetpack W3 Total Cache 3.6 – 3.7 2.5.6 – 2.5.9 3.5 - 4.4.1 2.7 - 2.3.5 1.9.3 – 2.0.40 3.2 - 3.6 3.2.7 - 3.3.1 1.1.7 - 1.4.22 0.9.2.4 - 0.9.3 1.0.12 - 1.0.12 3.2.7.1 - 3.3.1 - 649 - 3 - 26 - 126 - 144 16 - 19 5 22 - 42 592 - 436 - 5 1 - 1 6 - 6 37 0 16 37 26 - 37 - 0 - 23 - 63 - 37 15 - 18 2 18 - 35 335 - 168 - 2 1 - 1 2 - 2
  • 64. 64 Experiment Programs Unknown Includes statements 629 3 17 95 114 Wordpress NextGen Gallery Google XML Sitemap Contact Form 7 Akismet SEO by YOAST WP Sitemap Page Google XML Sitemaps for qTranslate YARPP Jetpack W3 Total Cache - 649 - 3 - 26 - 126 - 144 16 - 19 5 22 - 42 592 - 436 - 5 1 - 1 6 - 6 37 0 16 37 26 - 37 - 0 - 23 - 63 - 37 15 - 18 2 18 - 35 335 - 168 - 2 1 - 1 2 - 2 Resolved 2 0 11 22 14 - 2 - 0 - 19 - 43 - 15 11 - 13 2 16 - 33 290 - 135 - 2 1 - 1 2 - 2
  • 65. 65 Limitation of Static Resolution Dynamic analysis -Use TXL to instrument the include statements - Installed wordpress 3.6 with all 10 plugins - Five simple scenarios - Logged the actual files at run time
  • 66. Software lexicon: ❖ Identifiers ❖ Comments ❖ Literal Importance of lexicon ❖ Program comprehension ❖ Traceability links ❖ Concept location 66 Context and Motivation
  • 67. ❖ Methods and parameters renamings are unavoidable due to evolution, i.e., constant changes in requirements. ❖ Using APIs without planning for change can cause ripple effect on the client lexicon. ❖It is important to choose the naming conventions for each specific project in an early stage of the development process and following it consistently. ❖ It is worth taking the effort to identify the right order of terms constituting an identifier to clarify its meaning and avoid possible misunderstandings. ❖ To avoid the need for a sequence of renamings towards spelling error correction, it is worth taking the time to spellcheck the identifier name when creating or modifying an entity. 67 Lesson Learned
  • 68. ❖ It is worth investigating which one of the two, an abbreviation or its English alternative, is more common and thus should be used ❖ Identifiers that contain negation tend to be renamed towards positive names. ❖ The majority of semantic changes during renamings change, narrow, broaden, add, or remove a meaning to the identifier, as part of the evolution process and thus cannot be avoided. ❖It is worth the effort to assure consistency between, on the one hand, the name of an entity, and, on the other hand, its functionality, type, or other entities. 68 Lesson Learned