SlideShare une entreprise Scribd logo
1  sur  31
Co-occurring code
critics
Angela Lozano, Gabriela Arevalo, Kim Mens	

SOFT - Vrije Universiteit Brusels
* Work in progress
*
Agenda
• What are code critics?	

• Motivation:Why are we analyzing them? 	

• Approach: How are we analyzing them?	

• Results so far
What are code critics?
• Recommendation facility of the Pharo
Smalltalk IDE. 	

• Signal controversial implementation choices
(such as code smells) at class- and method-
level.
Code Critics - Pharo 1.4
Code Critics - Pharo 1.4
Code Critics - Pharo 1.4
Code Critics - Pharo 1.4
Code Critics - Pharo 1.4
Code Critics - Pharo 1.4
GodMethod:= Long methods + Long Parameter List + Switch Statements
Motivation
• Current approaches to detect code smells:
Lines Of Code (LOC):
Number Of Parameters (NOP):
Number Of Local Variables (NOLV):
Maximum Number Of Branches (MNOB):
number of lines of code in a method, including comments and white-lines................
number of parameters in the signature of a method...................................
number of local variables are declared within a method...................
number of nested branches (if-else and/or case) in a method
God Method:= (LOC, TopValues(20%)) butnotin (LOC, LowerThan(70)) and
((NOP, HigherThan(4) or (NOLV, HigherThan(4))) and
(MNOB, HIgherThan(4))
Motivation
• Current approaches to detect code smells:
Motivation
• Current approaches to detect code smells:	

• top - down = right aggregation strategy?	

• depend on metrics 	

• absolute = subjective	

• relative = depend on application + version	

• not reliable = different results for different tools +
might not assess what you want	

• use heuristics = incomplete	

• GOAL: go bottom-up!
Approach
• ∀ critics*, ∀ methods / classes, ∀ packages	

• Find pairs of critics that tend to co-occur	

• Filter [obvious | noisy | uninteresting]	

• Analyze these pairs 	

• Classify pairs by the nature of their relation
* We eliminated spelling critics (non native speakers are more likely to violate these rules = noise)
CC09. Instc variables !read & written 	

CC16. Sends ‘questionable’ message 	

CC7. Excessive number of variables	

CC6. Excessive number of methods	

CC20.Variables not referenced AmbiguousSelector	

BlockNode	

Encoder	

LiteralVariableNode	

VariableNode	

CommentNode	

UndVariableReference	

MessageNode	

AssignmentNode	

ParseNode	

MethodNode	

Decompiler	

Compiler	

Parser	

BytecodeEncoder	

TempVariableNode
distance between rules
=5/6=0.83
CC01 	

CC02	

CC03	

CC04	

CC05	

CC06	

...
Class1	

Class2	

Class3	

Class4	

Class5	

Class6	

Class7	

Class8	

Class9	

...
C1 C2 C3 C4 C5 C6 C7 C8 C9 ...
r1 1 0 1 0 0 0 0 0 1
r2 0 0 0 1 1 0 0 0 0
r3 1 1 0 0 0 0 1 1 0
r4 0 1 0 0 0 1 0 0 0
r5 1 0 0 0 0 1 1 0 1
r6 0 0 1 0 0 0 0 0 1
C1 C2 C3 C4 C5 C6 C7 C8 C9 ...
r1 1 0 1 0 0 0 0 0 1
r2 0 0 0 1 1 0 0 0 0
r3 1 1 0 0 0 0 1 1 0
r4 0 1 0 0 0 1 0 0 0
r5 1 0 0 0 0 1 1 0 1
r6 0 0 1 0 0 0 0 0 1
C1 C2 C3 C4 C5 C6 C7 C8 C9 ...
r1 1 0 1 0 0 0 0 0 1
r2 0 0 0 1 1 0 0 0 0
r3 1 1 0 0 0 0 1 1 0
r4 0 1 0 0 0 1 0 0 0
r5 1 0 0 0 0 1 1 0 1
r6 0 0 1 0 0 0 0 0 1
C1 C2 C3 C4 C5 C6 C7 C8 C9 ...
r1 1 1 1 1 0 0 0 0 0
r2 0 0 0 1 1 0 0 0 0
r3 1 1 0 0 0 0 1 1 0
r4 0 1 0 0 0 1 0 0 0
r5 1 0 0 0 0 1 1 0 1
r6 1 1 1 1 0 0 0 0 0
...
distance
filtering
r1 r2 r3 r4 r5 r6 r7 r8 r9 ...
r1 0
r2 0
r3 0
r4 0
r5 0
r6 0
r7 0
r8 0
r9 0
... 0
r1 r2 r3 r4 r5 r6 r7 r8 r9 ...
r1 0
r2 0
r3 0
r4 0
r5 0
r6 0
r7 0
r8 0
r9 0
... 0
r1 r2 r3 r4 r5 r6 r7 r8 r9 .
r1 0
r2 0
r3 0
r4 0
r5 0
r6 0
r7 0
r8 0
r9 0
... 0
r1 r2 r3 r4 r5 r6 r7 r8 r9
r1 0
r2 0
r3 0
r4 0
r5 0
r6 0
r7 0
r8 0
r9 0
...
cc1 cc2 cc3 cc4 cc5 cc6 cc7 cc8 cc9
cc1 0
cc2 1 0
cc3 0.8 1 0
cc4 1 1 0.8 0
cc5 0.6 1 0.6 0.8 0
cc6 0 0.8 0.6 0.8 0.8 0
cc7 0
cc8 0
cc9 0
...
dist-P1 1stR-P1 2ndR-P1 ovlp-P1 dist-P2 1stR-P2 2ndR-P2 ovlp-P2 dist-P3 1stR-P3 2ndR-P3 .....
cc1-cc2 1 3 2 0
cc1-cc3 0.8 3 4 1
cc1-cc4 1 3 2 0
cc1-cc5 0.6 3 4 2
cc1-cc6 0 2 2 2
cc2-cc3 1 2 4 0
70+ packages
Results
Graphs of relations between critics
4Classvariablecapitalization
3Classvariablenames
16Variablereferencedinonlyonemethodandalwaysassignedfirst
4Excessivenumberofvariables
1AmetamodelclassisnotproperlyFame-describedbya<MSEClass:super:>pragma
1Ametamodelclassoverrideamethodthatitshouldnotoverride
27Ametamodelclassdoesnotoverrideamethodthatitshouldoverride
42Referstoclassnameinsteadofselfclass
51Sendsquestionablemessage
76Methodprotocols
22Excessivenumberofmethods
12Methoddefinedinallsubclasses,butnotinsuperclass
5Subclassofcollectionthathasinstancevariablebutdoesn''tdefinecopyEmpty
5Instancevariablesdefinedinallsubclasses
12Referencesanabstractclass
6Subclassresponsibilitynotdefined
26Instancevariablenames
6Variableisonlyassignedasingleliteralvalue
57InstancevariablesnotreadANDwritten
41Variablesnotreferenced
53Hasclassinstancevariablesbutnoinitializemethod
158Classnotreferenced
127Classcomments
5Defines=butnothash
166Classnames
560Noclasscomment
418Classcategories
0.30.40.50.60.70.80.91.0
Desktop/colabArgentina/AllMooseClasses.txt
hclust (*, "complete")
distance
Results
Graphs of relations between critics
• Nodes	

• color: current category of the critic	

• shape: type of rule (box = transformation)	

• thickness: number of relations	

• Edges: 	

• color: frequency of the relation (in terms of packages where it occurs)	

• Frequent | Rare 	

• thickness: distance between the rules (ratio of coincidence in the same
SCEs)	

• Similar (d-->0) | Different (d-->1)
Bug
Pot. Bug
Des. Flaw
Optimization
Idiom
Style
Unclassified
1 2
7
9
11
16
20
3 4 56
8
10
14
15
17
19
18
12 13
1 A metamodel class does not override a method that
2 Class not referenced	

3 Class variable capitalization	

4 Defines = but not hash	

5 Excessive inheritance depth	

6 Excessive number of methods	

7 Excessive number of variables	

8 Instance variables defined in all subclasses	

9 Instance variables not read AND written	

10 Method defined in all subclasses, but not in supercl
11 No class comment	

12 Number of addDependent: messages > removeDep
13 Overrides a 'special' message	

14 References an abstract class	

15 Refers to class name instead of 'self class'	

16 Sends 'questionable' message	

17 Subclass responsibility not defined	

18Variable is only assigned a single literal value	

19Variable referenced in only one method and always
20Variables not referenced
1
2
3
4
5
6
7
8
9
10
11
Results
Co-occurring Class Critics
Results
Co-occurring Method Critics
2 = nil -> isNil AND ~= nil -> notNil	

4 add translations to strings in menus	

6 Debugging code left in methods	

8 Eliminate guarding clauses	

10 Excessive number of arguments	

11 Guarding clauses	

12 ifTrue:/ifFalse: returns instead of and:/or:'s	

13 Inconsistent method classification	

14 Inspect instances of A + B * C might be A + (B * C)	

16 Law of demeter
19 Long methods	

20 Menus missing translations	

21 Messages sent but not implemented	

22 Method has no timeStamp	

24 Methods implemented but not sent	

25 Move assignment out of unwind blocks	

26 Move variable assignment outside of single statement ifTrue:ifFalse: blocks	

27 Possible missing ; yourself	

30 Rewrite ifTrue:ifFalse: using min:/max:	

34 Sends unknown message to global
35 String concatenation instead of streams	

36 Temporaries read before written	

38 Temporary variables not read AND writte
39 Unclassified methods	

42 Unnecessary assignment or return in bloc
43 Use cascaded nextPutAll:'s instead of #, in
44 Uses (a and: [b]) and: [c] instead of a and: [
48 Uses do: instead of collect: or select:'s	

50 Uses size = 0, = nil, or at: 1 instead of isEm
55 Utility methods
1
47 2
12
16
19
26
30
50
3
4
5
6
21
36
43
78
11
9
10
27
13
22
39
14
15
2435
44
55
17
40
2038
48
34
25
42
5 7 9
13
15 17
40
18 23 28
49
29 31
33
32 37 41 45 46 51 52 53 54
Results
Refactorings suggested for code critics
• CIC-1: Misleading name	

!
• CIC-2:Too general	

!
• CIC-3:Too tolerant	

!
• CIC-4:Too restrictive	

!
• CIC-5:Too many results	

!
• CIC-6: Missing critics	

!
• CIC-7: Good critics
References an abstract class	

Instance variables not read AND written
Overrides a ‘special’ message	

Sends questionable messages
Refers to classname instead of self
anObject isKindOf: X
X allSubclasses
X new
self class == X
Excessive inheritance Depth
Excessive inheritance Depth
Inheritance Smells
Not overridden
self superMessage
super superMessage
Defines = but not hash	

Method defined in all subclasses, but not in superclasses
Due to evolution: deprecated or refactoring critics
Results
PCC-1 Redundant critics
1
47 2
16
19
26
30
3 5
6
36
8
11
10
14
35
44
38
25
#detect:ifNone: -> anySatisfy:
Uses detect:ifNone: instead of contains:
19
3 5
21
7 9
10
27
13
22
39
15
24
55
17
40
18
2038
8
34
23 28
49
29
Uses do: instead of contains: or detect:'s
Replace with #allSatisfy:, #anySatisfy: or #noneSatisfy:
28
49
29 31
33
32 37 41 45 46 51 52 53 54Rewrite super messages to self messages when both refer to same method
Sends different super message
Critics positively contribute to another one, without being
an implication
Results
PCC-2 Accidental correlation
1 2
7
9
11
16
20
3 4 56
8
10
14
15
17
19
18
12 131 2
7
9
11
16
20
3 4 56
8
10
14
15
17
19
18
12 13
Excessive number of variables
Excessive number of methods
Sends questionable message
No common root cause 	

Kind-of-correlation but no causal link	

Solving one does not fix the other	

Trial-and-error code
Part of Critic1 = Part of Critic 2	

Both rules need refactoring
Results
PCC-3: Requires splitting
7
9
11
16
20
8
19
18
Variables not referenced
Instance variables not read AND written
Instc. var notReferenced
Class var notReferenced
Instc. var only read
Instc. var only written
Instc. var notReferenced
Rule1 + Rule2 are more useful (as it is more
specific)
Results
PCC-4: Requires merging
21
27
13
22
39
40
20
34
49 33Inconsistent method classification
Unclassified methods
Inconsistently unclassified methods
Correlation due to specific kind of source
entity targeted
Results
PCC-5: Same niche
1
7
9
11
16
20
6
8
10
14
15
17
19
18
Subclass responsibility not defined
References an abstract class
In practice, the majority of results for one are
also results for the other
Results
PCC-6:Almost subset
2
7
9
11
16
20
3 4 5
8
10 19
18
12 13
Variable referenced in only one method and always assigned first
Instance variables not read AND written
results CC19
results CC09
Restructure
CC09
If the ill-defined critic were fixed, the
correlation would probably disappear
Results
PCC-7: Ill defined
Restructure
CC15
7
9
11
16
20
8
10
14
15
17
19
18
Refers to classname instead of self class
Sends questionable message
anObject isKindOf: X
X allSubclasses
X new
self class == X
One of the pair generates many results
Results
PCC-8: Noisy correlation
1 2
7
9
11
16
20
3 4 56
8
10
14
15
17
19
18
Excessive number of methods
Meaningful correlations
Results
PCC-9: High level critic
16
19
50 4
6
21
36
43
11
10
27
13
22
14
24
44
55
2038
48
34
25
42
Law of Demeter
Utility methods
Methods implemented but not sent
Future work
• Analyze other low-level controversial
implementation choices: FindBugs, PMD,
CheckStyle	

• Check if the same critiques apply.	

• Repeat the analysis iteratively	

• Propose high-level groupings for the
controversial implementation choices
Questions
!
!
!
!
More info:	

alozano@soft.vub.ac.be

Contenu connexe

En vedette

Test powerpoint
Test powerpointTest powerpoint
Test powerpointemlinger
 
Salesforce_Certified_Advanced_Administrator
Salesforce_Certified_Advanced_AdministratorSalesforce_Certified_Advanced_Administrator
Salesforce_Certified_Advanced_AdministratorAllister McKenzie
 
Christmas Blessings
Christmas BlessingsChristmas Blessings
Christmas Blessingssynconi
 
CA UIM for z Systems Technical Deep Dive: Get the Right People Solving Probl...
CA UIM for z Systems Technical  Deep Dive: Get the Right People Solving Probl...CA UIM for z Systems Technical  Deep Dive: Get the Right People Solving Probl...
CA UIM for z Systems Technical Deep Dive: Get the Right People Solving Probl...CA Technologies
 
IT Operations - Queue Approach
IT Operations - Queue ApproachIT Operations - Queue Approach
IT Operations - Queue ApproachAgron Fazliu
 
iMentor - 10 Leadership Lessons From Steve Jobs
iMentor - 10 Leadership Lessons From Steve JobsiMentor - 10 Leadership Lessons From Steve Jobs
iMentor - 10 Leadership Lessons From Steve JobsKumar Gauraw
 

En vedette (9)

Rádio popular
Rádio popularRádio popular
Rádio popular
 
Jo 3.16
Jo 3.16Jo 3.16
Jo 3.16
 
Test powerpoint
Test powerpointTest powerpoint
Test powerpoint
 
Salesforce_Certified_Advanced_Administrator
Salesforce_Certified_Advanced_AdministratorSalesforce_Certified_Advanced_Administrator
Salesforce_Certified_Advanced_Administrator
 
Christmas Blessings
Christmas BlessingsChristmas Blessings
Christmas Blessings
 
CA UIM for z Systems Technical Deep Dive: Get the Right People Solving Probl...
CA UIM for z Systems Technical  Deep Dive: Get the Right People Solving Probl...CA UIM for z Systems Technical  Deep Dive: Get the Right People Solving Probl...
CA UIM for z Systems Technical Deep Dive: Get the Right People Solving Probl...
 
IT Operations - Queue Approach
IT Operations - Queue ApproachIT Operations - Queue Approach
IT Operations - Queue Approach
 
iMentor - 10 Leadership Lessons From Steve Jobs
iMentor - 10 Leadership Lessons From Steve JobsiMentor - 10 Leadership Lessons From Steve Jobs
iMentor - 10 Leadership Lessons From Steve Jobs
 
Delirium
DeliriumDelirium
Delirium
 

Similaire à Co occurring code critics

Bad Code Smells
Bad Code SmellsBad Code Smells
Bad Code Smellskim.mens
 
The operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzerThe operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzerAndrey Karpov
 
Monitoring a program that monitors computer networks
Monitoring a program that monitors computer networksMonitoring a program that monitors computer networks
Monitoring a program that monitors computer networksPVS-Studio
 
Safety on the Max: How to Write Reliable C/C++ Code for Embedded Systems
Safety on the Max: How to Write Reliable C/C++ Code for Embedded SystemsSafety on the Max: How to Write Reliable C/C++ Code for Embedded Systems
Safety on the Max: How to Write Reliable C/C++ Code for Embedded SystemsAndrey Karpov
 
Reaching reliable agreement in an unreliable world
Reaching reliable agreement in an unreliable worldReaching reliable agreement in an unreliable world
Reaching reliable agreement in an unreliable worldHeidi Howard
 
PHP Forum Paris 2012: Magic behind the numbers. Software metrics in practice
PHP Forum Paris 2012: Magic behind the numbers. Software metrics in practicePHP Forum Paris 2012: Magic behind the numbers. Software metrics in practice
PHP Forum Paris 2012: Magic behind the numbers. Software metrics in practiceSebastian Marek
 
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...Antonio de la Torre Fernández
 
NDepend Public PPT (2008)
NDepend Public PPT (2008)NDepend Public PPT (2008)
NDepend Public PPT (2008)NDepend
 
Rails Conf 2014 Concerns, Decorators, Presenters, Service-objects, Helpers, H...
Rails Conf 2014 Concerns, Decorators, Presenters, Service-objects, Helpers, H...Rails Conf 2014 Concerns, Decorators, Presenters, Service-objects, Helpers, H...
Rails Conf 2014 Concerns, Decorators, Presenters, Service-objects, Helpers, H...Justin Gordon
 
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...AboutYouGmbH
 
Text-to-SQL with Data-Driven Templates
Text-to-SQL with Data-Driven TemplatesText-to-SQL with Data-Driven Templates
Text-to-SQL with Data-Driven TemplatesJinho Choi
 
Data oriented design and c++
Data oriented design and c++Data oriented design and c++
Data oriented design and c++Mike Acton
 
Monitoring a program that monitors computer networks
Monitoring a program that monitors computer networksMonitoring a program that monitors computer networks
Monitoring a program that monitors computer networksAndrey Karpov
 
100 bugs in Open Source C/C++ projects
100 bugs in Open Source C/C++ projects100 bugs in Open Source C/C++ projects
100 bugs in Open Source C/C++ projectsPVS-Studio
 

Similaire à Co occurring code critics (20)

Bad Code Smells
Bad Code SmellsBad Code Smells
Bad Code Smells
 
Clean Code V2
Clean Code V2Clean Code V2
Clean Code V2
 
The operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzerThe operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzer
 
CodeChecker Overview Nov 2019
CodeChecker Overview Nov 2019CodeChecker Overview Nov 2019
CodeChecker Overview Nov 2019
 
Monitoring a program that monitors computer networks
Monitoring a program that monitors computer networksMonitoring a program that monitors computer networks
Monitoring a program that monitors computer networks
 
Safety on the Max: How to Write Reliable C/C++ Code for Embedded Systems
Safety on the Max: How to Write Reliable C/C++ Code for Embedded SystemsSafety on the Max: How to Write Reliable C/C++ Code for Embedded Systems
Safety on the Max: How to Write Reliable C/C++ Code for Embedded Systems
 
Reaching reliable agreement in an unreliable world
Reaching reliable agreement in an unreliable worldReaching reliable agreement in an unreliable world
Reaching reliable agreement in an unreliable world
 
PHP Forum Paris 2012: Magic behind the numbers. Software metrics in practice
PHP Forum Paris 2012: Magic behind the numbers. Software metrics in practicePHP Forum Paris 2012: Magic behind the numbers. Software metrics in practice
PHP Forum Paris 2012: Magic behind the numbers. Software metrics in practice
 
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
 
NDepend Public PPT (2008)
NDepend Public PPT (2008)NDepend Public PPT (2008)
NDepend Public PPT (2008)
 
Rails Conf 2014 Concerns, Decorators, Presenters, Service-objects, Helpers, H...
Rails Conf 2014 Concerns, Decorators, Presenters, Service-objects, Helpers, H...Rails Conf 2014 Concerns, Decorators, Presenters, Service-objects, Helpers, H...
Rails Conf 2014 Concerns, Decorators, Presenters, Service-objects, Helpers, H...
 
Code Metrics
Code MetricsCode Metrics
Code Metrics
 
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
 
Text-to-SQL with Data-Driven Templates
Text-to-SQL with Data-Driven TemplatesText-to-SQL with Data-Driven Templates
Text-to-SQL with Data-Driven Templates
 
Data oriented design and c++
Data oriented design and c++Data oriented design and c++
Data oriented design and c++
 
Monitoring a program that monitors computer networks
Monitoring a program that monitors computer networksMonitoring a program that monitors computer networks
Monitoring a program that monitors computer networks
 
.NET Deserialization Attacks
.NET Deserialization Attacks.NET Deserialization Attacks
.NET Deserialization Attacks
 
100 bugs in Open Source C/C++ projects
100 bugs in Open Source C/C++ projects100 bugs in Open Source C/C++ projects
100 bugs in Open Source C/C++ projects
 
Csharp
CsharpCsharp
Csharp
 
Fuzzing - Part 1
Fuzzing - Part 1Fuzzing - Part 1
Fuzzing - Part 1
 

Plus de Angela Lozano

An overview of techniques for detecting software variability concepts in sour...
An overview of techniques for detecting software variability concepts in sour...An overview of techniques for detecting software variability concepts in sour...
An overview of techniques for detecting software variability concepts in sour...Angela Lozano
 
UContracts a DSL to document and validate structural requirements of frameworks
UContracts a DSL to document and validate structural requirements of frameworksUContracts a DSL to document and validate structural requirements of frameworks
UContracts a DSL to document and validate structural requirements of frameworksAngela Lozano
 
Analyzing Code Evolution to Uncover Relations between Bad Smells
Analyzing Code Evolution to Uncover Relations between Bad SmellsAnalyzing Code Evolution to Uncover Relations between Bad Smells
Analyzing Code Evolution to Uncover Relations between Bad SmellsAngela Lozano
 
Matraca industrial evaluation (Cha-Q tool demo event Dec 2016)
Matraca industrial evaluation (Cha-Q tool demo event Dec 2016)Matraca industrial evaluation (Cha-Q tool demo event Dec 2016)
Matraca industrial evaluation (Cha-Q tool demo event Dec 2016)Angela Lozano
 
Clones & Macro-Co-Changes
Clones & Macro-Co-ChangesClones & Macro-Co-Changes
Clones & Macro-Co-ChangesAngela Lozano
 
Explaining why methods change together
Explaining why methods change togetherExplaining why methods change together
Explaining why methods change togetherAngela Lozano
 
Words Associated with Questions about Macros in Tex
Words Associated with Questions about Macros in TexWords Associated with Questions about Macros in Tex
Words Associated with Questions about Macros in TexAngela Lozano
 

Plus de Angela Lozano (7)

An overview of techniques for detecting software variability concepts in sour...
An overview of techniques for detecting software variability concepts in sour...An overview of techniques for detecting software variability concepts in sour...
An overview of techniques for detecting software variability concepts in sour...
 
UContracts a DSL to document and validate structural requirements of frameworks
UContracts a DSL to document and validate structural requirements of frameworksUContracts a DSL to document and validate structural requirements of frameworks
UContracts a DSL to document and validate structural requirements of frameworks
 
Analyzing Code Evolution to Uncover Relations between Bad Smells
Analyzing Code Evolution to Uncover Relations between Bad SmellsAnalyzing Code Evolution to Uncover Relations between Bad Smells
Analyzing Code Evolution to Uncover Relations between Bad Smells
 
Matraca industrial evaluation (Cha-Q tool demo event Dec 2016)
Matraca industrial evaluation (Cha-Q tool demo event Dec 2016)Matraca industrial evaluation (Cha-Q tool demo event Dec 2016)
Matraca industrial evaluation (Cha-Q tool demo event Dec 2016)
 
Clones & Macro-Co-Changes
Clones & Macro-Co-ChangesClones & Macro-Co-Changes
Clones & Macro-Co-Changes
 
Explaining why methods change together
Explaining why methods change togetherExplaining why methods change together
Explaining why methods change together
 
Words Associated with Questions about Macros in Tex
Words Associated with Questions about Macros in TexWords Associated with Questions about Macros in Tex
Words Associated with Questions about Macros in Tex
 

Dernier

Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 

Dernier (20)

Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 

Co occurring code critics

  • 1. Co-occurring code critics Angela Lozano, Gabriela Arevalo, Kim Mens SOFT - Vrije Universiteit Brusels * Work in progress *
  • 2. Agenda • What are code critics? • Motivation:Why are we analyzing them? • Approach: How are we analyzing them? • Results so far
  • 3. What are code critics? • Recommendation facility of the Pharo Smalltalk IDE. • Signal controversial implementation choices (such as code smells) at class- and method- level.
  • 4. Code Critics - Pharo 1.4
  • 5. Code Critics - Pharo 1.4
  • 6. Code Critics - Pharo 1.4
  • 7. Code Critics - Pharo 1.4
  • 8. Code Critics - Pharo 1.4
  • 9. Code Critics - Pharo 1.4
  • 10. GodMethod:= Long methods + Long Parameter List + Switch Statements Motivation • Current approaches to detect code smells: Lines Of Code (LOC): Number Of Parameters (NOP): Number Of Local Variables (NOLV): Maximum Number Of Branches (MNOB): number of lines of code in a method, including comments and white-lines................ number of parameters in the signature of a method................................... number of local variables are declared within a method................... number of nested branches (if-else and/or case) in a method God Method:= (LOC, TopValues(20%)) butnotin (LOC, LowerThan(70)) and ((NOP, HigherThan(4) or (NOLV, HigherThan(4))) and (MNOB, HIgherThan(4))
  • 11. Motivation • Current approaches to detect code smells:
  • 12. Motivation • Current approaches to detect code smells: • top - down = right aggregation strategy? • depend on metrics • absolute = subjective • relative = depend on application + version • not reliable = different results for different tools + might not assess what you want • use heuristics = incomplete • GOAL: go bottom-up!
  • 13. Approach • ∀ critics*, ∀ methods / classes, ∀ packages • Find pairs of critics that tend to co-occur • Filter [obvious | noisy | uninteresting] • Analyze these pairs • Classify pairs by the nature of their relation * We eliminated spelling critics (non native speakers are more likely to violate these rules = noise)
  • 14. CC09. Instc variables !read & written CC16. Sends ‘questionable’ message CC7. Excessive number of variables CC6. Excessive number of methods CC20.Variables not referenced AmbiguousSelector BlockNode Encoder LiteralVariableNode VariableNode CommentNode UndVariableReference MessageNode AssignmentNode ParseNode MethodNode Decompiler Compiler Parser BytecodeEncoder TempVariableNode distance between rules =5/6=0.83
  • 15. CC01 CC02 CC03 CC04 CC05 CC06 ... Class1 Class2 Class3 Class4 Class5 Class6 Class7 Class8 Class9 ... C1 C2 C3 C4 C5 C6 C7 C8 C9 ... r1 1 0 1 0 0 0 0 0 1 r2 0 0 0 1 1 0 0 0 0 r3 1 1 0 0 0 0 1 1 0 r4 0 1 0 0 0 1 0 0 0 r5 1 0 0 0 0 1 1 0 1 r6 0 0 1 0 0 0 0 0 1 C1 C2 C3 C4 C5 C6 C7 C8 C9 ... r1 1 0 1 0 0 0 0 0 1 r2 0 0 0 1 1 0 0 0 0 r3 1 1 0 0 0 0 1 1 0 r4 0 1 0 0 0 1 0 0 0 r5 1 0 0 0 0 1 1 0 1 r6 0 0 1 0 0 0 0 0 1 C1 C2 C3 C4 C5 C6 C7 C8 C9 ... r1 1 0 1 0 0 0 0 0 1 r2 0 0 0 1 1 0 0 0 0 r3 1 1 0 0 0 0 1 1 0 r4 0 1 0 0 0 1 0 0 0 r5 1 0 0 0 0 1 1 0 1 r6 0 0 1 0 0 0 0 0 1 C1 C2 C3 C4 C5 C6 C7 C8 C9 ... r1 1 1 1 1 0 0 0 0 0 r2 0 0 0 1 1 0 0 0 0 r3 1 1 0 0 0 0 1 1 0 r4 0 1 0 0 0 1 0 0 0 r5 1 0 0 0 0 1 1 0 1 r6 1 1 1 1 0 0 0 0 0 ... distance filtering r1 r2 r3 r4 r5 r6 r7 r8 r9 ... r1 0 r2 0 r3 0 r4 0 r5 0 r6 0 r7 0 r8 0 r9 0 ... 0 r1 r2 r3 r4 r5 r6 r7 r8 r9 ... r1 0 r2 0 r3 0 r4 0 r5 0 r6 0 r7 0 r8 0 r9 0 ... 0 r1 r2 r3 r4 r5 r6 r7 r8 r9 . r1 0 r2 0 r3 0 r4 0 r5 0 r6 0 r7 0 r8 0 r9 0 ... 0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r1 0 r2 0 r3 0 r4 0 r5 0 r6 0 r7 0 r8 0 r9 0 ... cc1 cc2 cc3 cc4 cc5 cc6 cc7 cc8 cc9 cc1 0 cc2 1 0 cc3 0.8 1 0 cc4 1 1 0.8 0 cc5 0.6 1 0.6 0.8 0 cc6 0 0.8 0.6 0.8 0.8 0 cc7 0 cc8 0 cc9 0 ... dist-P1 1stR-P1 2ndR-P1 ovlp-P1 dist-P2 1stR-P2 2ndR-P2 ovlp-P2 dist-P3 1stR-P3 2ndR-P3 ..... cc1-cc2 1 3 2 0 cc1-cc3 0.8 3 4 1 cc1-cc4 1 3 2 0 cc1-cc5 0.6 3 4 2 cc1-cc6 0 2 2 2 cc2-cc3 1 2 4 0 70+ packages
  • 16. Results Graphs of relations between critics 4Classvariablecapitalization 3Classvariablenames 16Variablereferencedinonlyonemethodandalwaysassignedfirst 4Excessivenumberofvariables 1AmetamodelclassisnotproperlyFame-describedbya<MSEClass:super:>pragma 1Ametamodelclassoverrideamethodthatitshouldnotoverride 27Ametamodelclassdoesnotoverrideamethodthatitshouldoverride 42Referstoclassnameinsteadofselfclass 51Sendsquestionablemessage 76Methodprotocols 22Excessivenumberofmethods 12Methoddefinedinallsubclasses,butnotinsuperclass 5Subclassofcollectionthathasinstancevariablebutdoesn''tdefinecopyEmpty 5Instancevariablesdefinedinallsubclasses 12Referencesanabstractclass 6Subclassresponsibilitynotdefined 26Instancevariablenames 6Variableisonlyassignedasingleliteralvalue 57InstancevariablesnotreadANDwritten 41Variablesnotreferenced 53Hasclassinstancevariablesbutnoinitializemethod 158Classnotreferenced 127Classcomments 5Defines=butnothash 166Classnames 560Noclasscomment 418Classcategories 0.30.40.50.60.70.80.91.0 Desktop/colabArgentina/AllMooseClasses.txt hclust (*, "complete") distance
  • 17. Results Graphs of relations between critics • Nodes • color: current category of the critic • shape: type of rule (box = transformation) • thickness: number of relations • Edges: • color: frequency of the relation (in terms of packages where it occurs) • Frequent | Rare • thickness: distance between the rules (ratio of coincidence in the same SCEs) • Similar (d-->0) | Different (d-->1) Bug Pot. Bug Des. Flaw Optimization Idiom Style Unclassified
  • 18. 1 2 7 9 11 16 20 3 4 56 8 10 14 15 17 19 18 12 13 1 A metamodel class does not override a method that 2 Class not referenced 3 Class variable capitalization 4 Defines = but not hash 5 Excessive inheritance depth 6 Excessive number of methods 7 Excessive number of variables 8 Instance variables defined in all subclasses 9 Instance variables not read AND written 10 Method defined in all subclasses, but not in supercl 11 No class comment 12 Number of addDependent: messages > removeDep 13 Overrides a 'special' message 14 References an abstract class 15 Refers to class name instead of 'self class' 16 Sends 'questionable' message 17 Subclass responsibility not defined 18Variable is only assigned a single literal value 19Variable referenced in only one method and always 20Variables not referenced 1 2 3 4 5 6 7 8 9 10 11 Results Co-occurring Class Critics
  • 19. Results Co-occurring Method Critics 2 = nil -> isNil AND ~= nil -> notNil 4 add translations to strings in menus 6 Debugging code left in methods 8 Eliminate guarding clauses 10 Excessive number of arguments 11 Guarding clauses 12 ifTrue:/ifFalse: returns instead of and:/or:'s 13 Inconsistent method classification 14 Inspect instances of A + B * C might be A + (B * C) 16 Law of demeter 19 Long methods 20 Menus missing translations 21 Messages sent but not implemented 22 Method has no timeStamp 24 Methods implemented but not sent 25 Move assignment out of unwind blocks 26 Move variable assignment outside of single statement ifTrue:ifFalse: blocks 27 Possible missing ; yourself 30 Rewrite ifTrue:ifFalse: using min:/max: 34 Sends unknown message to global 35 String concatenation instead of streams 36 Temporaries read before written 38 Temporary variables not read AND writte 39 Unclassified methods 42 Unnecessary assignment or return in bloc 43 Use cascaded nextPutAll:'s instead of #, in 44 Uses (a and: [b]) and: [c] instead of a and: [ 48 Uses do: instead of collect: or select:'s 50 Uses size = 0, = nil, or at: 1 instead of isEm 55 Utility methods 1 47 2 12 16 19 26 30 50 3 4 5 6 21 36 43 78 11 9 10 27 13 22 39 14 15 2435 44 55 17 40 2038 48 34 25 42 5 7 9 13 15 17 40 18 23 28 49 29 31 33 32 37 41 45 46 51 52 53 54
  • 20. Results Refactorings suggested for code critics • CIC-1: Misleading name ! • CIC-2:Too general ! • CIC-3:Too tolerant ! • CIC-4:Too restrictive ! • CIC-5:Too many results ! • CIC-6: Missing critics ! • CIC-7: Good critics References an abstract class Instance variables not read AND written Overrides a ‘special’ message Sends questionable messages Refers to classname instead of self anObject isKindOf: X X allSubclasses X new self class == X Excessive inheritance Depth Excessive inheritance Depth Inheritance Smells Not overridden self superMessage super superMessage Defines = but not hash Method defined in all subclasses, but not in superclasses
  • 21. Due to evolution: deprecated or refactoring critics Results PCC-1 Redundant critics 1 47 2 16 19 26 30 3 5 6 36 8 11 10 14 35 44 38 25 #detect:ifNone: -> anySatisfy: Uses detect:ifNone: instead of contains: 19 3 5 21 7 9 10 27 13 22 39 15 24 55 17 40 18 2038 8 34 23 28 49 29 Uses do: instead of contains: or detect:'s Replace with #allSatisfy:, #anySatisfy: or #noneSatisfy: 28 49 29 31 33 32 37 41 45 46 51 52 53 54Rewrite super messages to self messages when both refer to same method Sends different super message
  • 22. Critics positively contribute to another one, without being an implication Results PCC-2 Accidental correlation 1 2 7 9 11 16 20 3 4 56 8 10 14 15 17 19 18 12 131 2 7 9 11 16 20 3 4 56 8 10 14 15 17 19 18 12 13 Excessive number of variables Excessive number of methods Sends questionable message No common root cause Kind-of-correlation but no causal link Solving one does not fix the other Trial-and-error code
  • 23. Part of Critic1 = Part of Critic 2 Both rules need refactoring Results PCC-3: Requires splitting 7 9 11 16 20 8 19 18 Variables not referenced Instance variables not read AND written Instc. var notReferenced Class var notReferenced Instc. var only read Instc. var only written Instc. var notReferenced
  • 24. Rule1 + Rule2 are more useful (as it is more specific) Results PCC-4: Requires merging 21 27 13 22 39 40 20 34 49 33Inconsistent method classification Unclassified methods Inconsistently unclassified methods
  • 25. Correlation due to specific kind of source entity targeted Results PCC-5: Same niche 1 7 9 11 16 20 6 8 10 14 15 17 19 18 Subclass responsibility not defined References an abstract class
  • 26. In practice, the majority of results for one are also results for the other Results PCC-6:Almost subset 2 7 9 11 16 20 3 4 5 8 10 19 18 12 13 Variable referenced in only one method and always assigned first Instance variables not read AND written results CC19 results CC09 Restructure CC09
  • 27. If the ill-defined critic were fixed, the correlation would probably disappear Results PCC-7: Ill defined Restructure CC15 7 9 11 16 20 8 10 14 15 17 19 18 Refers to classname instead of self class Sends questionable message anObject isKindOf: X X allSubclasses X new self class == X
  • 28. One of the pair generates many results Results PCC-8: Noisy correlation 1 2 7 9 11 16 20 3 4 56 8 10 14 15 17 19 18 Excessive number of methods
  • 29. Meaningful correlations Results PCC-9: High level critic 16 19 50 4 6 21 36 43 11 10 27 13 22 14 24 44 55 2038 48 34 25 42 Law of Demeter Utility methods Methods implemented but not sent
  • 30. Future work • Analyze other low-level controversial implementation choices: FindBugs, PMD, CheckStyle • Check if the same critiques apply. • Repeat the analysis iteratively • Propose high-level groupings for the controversial implementation choices