SlideShare una empresa de Scribd logo
A New Family of Software Anti-Patterns:
Linguistic Anti-Patterns
Venera Arnaoudova1, Massimiliano Di Penta2, Giuliano
Antoniol1,Yann-Gaël Guéhéneuc1
1 École

Polytechnique de Montréal, Canada
2 University of Sannio, Benevento, Italy

1
Families of
Patterns/Anti-Patterns
• Patterns, e.g., Design
• Anti-Patterns, e.g., Software Development

2
Source code lexicon
i.e. vocabulary of your code

• What do we know?
• We should strive for good quality lexicon
• How is quality of the lexicon measured?
• English words, domain terms
• Abbreviations, acronyms
[Takang et al., ’96], [Deissenbock and Pizka, ’05], [Lawrie et al., ’07], [Abebe et al., ’09]
3
What does it do?

4
What does it do?
• Consider method:
public ??? setBreadth(Dimension target, int source){ ??? }

4
What does it do?
• Consider method:
public ??? setBreadth(Dimension target, int source){ ??? }

• What is it’s return type?

4
What does it do?
• Consider method:
public ??? setBreadth(Dimension target, int source){ ??? }

• What is it’s return type?
• What is it’s implementation?

4
What does it do?
• Consider method:
public ??? setBreadth(Dimension target, int source){ ??? }

• What is it’s return type?
• What is it’s implementation?
Expecting:

public void setBreadth(Dimension target, int source){
target.setBreadth(source);
}

4
What does it do?
• Consider method:
public ??? setBreadth(Dimension target, int source){ ??? }

• What is it’s return type?
• What is it’s implementation?
Expecting:
Receiving:

public void setBreadth(Dimension target, int source){
target.setBreadth(source);
}
public Dimension setBreadth(Dimension target, int source) {
if (orientation == VERTICAL)
return new Dimension(source, (int)target.getHeight());
else return new Dimension((int)target.getWidth(), source);
}
4
Does more than it says
• Consider method:
public ??? setBreadth(Dimension target, int source){ ??? }

• What is it’s return type?
• What is it’s implementation?
Expecting:
Receiving:

public void setBreadth(Dimension target, int source){
target.setBreadth(source);
}
public Dimension setBreadth(Dimension target, int source) {
if (orientation == VERTICAL)
return new Dimension(source, (int)target.getHeight());
else return new Dimension((int)target.getWidth(), source);
}
4
What does it do?

5
What does it do?
Consider method:

5
What does it do?
Consider method:
public ??? isClassPathCorrect(wellKnownType, compUnitDecl){ ??? }

5
What does it do?
Consider method:
public ??? isClassPathCorrect(wellKnownType, compUnitDecl){ ??? }

• What is it’s return type?

5
What does it do?
Consider method:
public ??? isClassPathCorrect(wellKnownType, compUnitDecl){ ??? }

• What is it’s return type?
• What is it’s implementation?

5
What does it do?
Consider method:
public ??? isClassPathCorrect(wellKnownType, compUnitDecl){ ??? }

• What is it’s return type?
• What is it’s implementation?
Expecting:

public boolean isClassPathCorrect(..){
if(..){return true; else {return false;}
}

5
What does it do?
Consider method:
public ??? isClassPathCorrect(wellKnownType, compUnitDecl){ ??? }

• What is it’s return type?
• What is it’s implementation?
Expecting:
Receiving:

public boolean isClassPathCorrect(..){
if(..){return true; else {return false;}
}
public void isClassPathCorrect(wellKnownType, compUnitDecl) {
referenceContext = compUnitDecl;
this.handle(..);
}
5
Says more than it does
Consider method:
public ??? isClassPathCorrect(wellKnownType, compUnitDecl){ ??? }

• What is it’s return type?
• What is it’s implementation?
Expecting:
Receiving:

public boolean isClassPathCorrect(..){
if(..){return true; else {return false;}
}
public void isClassPathCorrect(wellKnownType, compUnitDecl) {
referenceContext = compUnitDecl;
this.handle(..);
}
5
What does it contain?

6
What does it contain?
• Consider attribute:
private static ??? stats

6
What does it contain?
• Consider attribute:
private static ??? stats

• What is it’s declared type?

6
What does it contain?
• Consider attribute:
private static ??? stats

• What is it’s declared type?
• What is it’s purpose?

6
What does it contain?
• Consider attribute:
private static ??? stats

• What is it’s declared type?
• What is it’s purpose?
Expecting:

private static int[] stats // some statistics..

6
What does it contain?
• Consider attribute:
private static ??? stats

• What is it’s declared type?
• What is it’s purpose?
Expecting:

private static int[] stats // some statistics..

Receiving:

private static boolean stats = true;

6
Says more than it contains
• Consider attribute:
private static ??? stats

• What is it’s declared type?
• What is it’s purpose?
Expecting:

private static int[] stats // some statistics..

Receiving:

private static boolean stats = true;

6
Linguistic Anti-Patterns
• LAs: Recurring poor practices in the

naming, documentation and choice of
identifiers in the implementation.

• Different families
• One such family is related to
inconsistencies:

7
Inconsistency LAs
• Inconsistency between a program entity’s
• documentation (i.e., comments)
• name
• behaviour (type, implementation)
8
Inconsistency LAs

Others trust what you say!

Behaviour
Does more than it says

Dimension setBreadth(..)

Says more than it does

void isClassPathCorrect(..)

Does the opposite than it says

State
Contains more than it says
Says more than it contains

boolean _stats

Contains the opposite than it says
9
Inconsistency LAs

Others trust what you say!

Behaviour
Does more than it says

Dimension setBreadth(..)

Says more than it does

void isClassPathCorrect(..)

Does the opposite than it says

ControlEnableState disable(..)

State
Contains more than it says
Says more than it contains

boolean _stats

Contains the opposite than it says
9
Inconsistency LAs

Others trust what you say!

Behaviour
Does more than it says

Dimension setBreadth(..)

Says more than it does

void isClassPathCorrect(..)

Does the opposite than it says

ControlEnableState disable(..)

State
Contains more than it says

int[] isReached

Says more than it contains

boolean _stats

Contains the opposite than it says
9
Inconsistency LAs

Others trust what you say!

Behaviour
Does more than it says

Dimension setBreadth(..)

Says more than it does

void isClassPathCorrect(..)

Does the opposite than it says

ControlEnableState disable(..)

State
Contains more than it says

int[] isReached

Says more than it contains

boolean _stats

Contains the opposite than it says
9

//.. default exclude pattern..
INCLUDE_NAME_DEFAULT
Inconsistency LAs

Others trust what you say!

Behaviour
Does more than it says

“Set” method returns
“Get” - more than an accessor
“Is” returns more than a Boolean
Expecting but not getting a single instance

Says more than it does
Does the opposite

10
Inconsistency LAs

Others trust what you say!

Behaviour
Does more than it says
Says more than it does

Not implemented condition
Validation method does not confirm
“Get” method does not return
Not answered question
Transform method does not return
Expecting but not getting a collection

Does the opposite
11
Inconsistency LAs

Others trust what you say!

Behaviour
Does more than it says

Says more than it does

Does the opposite

Method name and return type are opposite
Method signature and comment are opposite

12
Inconsistency LAs

Others trust what you say!

State
Contains more than it says

Says one but contains many
Name suggests Boolean but type does not

Says more than it contains

Says many but contains one

Contains the opposite

Attribute name and type are opposite
Attribute signature and comment are opposite

13
Study
• Prototype detector: LAPD
• RQ: To what extent LAs exist?
• Context:
System

ArgoUML
Cocoon
Eclipse

Version
0.10.1
0.34
2.2.0
1.0

14

Methods Attributes
5K
3K
11 K
6K
4K
3K
36 K
22 K
Do they exist?

Inconsistency LAs

Behaviour

Detected

wrt the
population

Does more than it says

194

0.35%

Says more than it does

1016

1.82%

Does the opposite than it says

288

0.52%

Detected

wrt the
population

Contains more than it says

438

1.3%

Says more than it contains

302

0.89%

24

0.07%

State

Contains the opposite than it says
15
Inconsistency LAs

Confidence: 95% ±10%

Behaviour

Precision

Does more than it says

88%

Says more than it does

85%

Does the opposite than it says

12%

State

Precision

Contains more than it says

57%

Says more than it contains

75%

Contains the opposite than it says
16

13%
To summarize
• Defined Inconsistency LAs
• Prototype detection tool - LAPD
• 72% precision
• Inconsistency LAs represent 5% of the
studied systems

17
Why do we care?
• What can go wrong with LAs:
• Useless time and effort spent to
understand source code

• Wrong assumptions

• Being aware they exist is the first step...
18
The next step
• Opinion of developers
• Study the impact
• Solutions

19
Inconsistency LAs

Behaviour
Does more than it says

void getMethodBodies(..)

Says more than it does

int isValid()

Does the opposite than it says

ControlEnableState disable(..)

State
Contains more than it says

int[] isReached

Says more than it contains

boolean _stats

Contains the opposite than it says
20

//.. default exclude pattern..
INCLUDE_NAME_DEFAULT
Inconsistency LAs

What do you think?

Behaviour
Does more than it says

void getMethodBodies(..)

Says more than it does

int isValid()

Does the opposite than it says

ControlEnableState disable(..)

State
Contains more than it says

int[] isReached

Says more than it contains

boolean _stats

Contains the opposite than it says
20

//.. default exclude pattern..
INCLUDE_NAME_DEFAULT

Más contenido relacionado

Destacado

130719 sebastiano panichella - who is going to mentor newcomers in open sou...
130719   sebastiano panichella - who is going to mentor newcomers in open sou...130719   sebastiano panichella - who is going to mentor newcomers in open sou...
130719 sebastiano panichella - who is going to mentor newcomers in open sou...Ptidej Team
 
2 M-CARE: Информираност за уврежданията
2 M-CARE: Информираност за уврежданията2 M-CARE: Информираност за уврежданията
2 M-CARE: Информираност за уврежданиятаKarel Van Isacker
 
Работаем в соцсетях
Работаем в соцсетяхРаботаем в соцсетях
Работаем в соцсетяхDmitry Zavyalov
 
130404 fehmi jaafar - on the relationship between program evolution and fau...
130404   fehmi jaafar - on the relationship between program evolution and fau...130404   fehmi jaafar - on the relationship between program evolution and fau...
130404 fehmi jaafar - on the relationship between program evolution and fau...Ptidej Team
 
130905 francis palma - detection of process antipatterns - a bpel perspective
130905   francis palma - detection of process antipatterns - a bpel perspective130905   francis palma - detection of process antipatterns - a bpel perspective
130905 francis palma - detection of process antipatterns - a bpel perspectivePtidej Team
 
130919 jim cordy - when is a clone not a clone
130919   jim cordy - when is a clone not a clone130919   jim cordy - when is a clone not a clone
130919 jim cordy - when is a clone not a clonePtidej Team
 
1 M-CARE: Дидактическа подкрепа за учене през мобилен телефон
1 M-CARE: Дидактическа подкрепа за учене през мобилен телефон1 M-CARE: Дидактическа подкрепа за учене през мобилен телефон
1 M-CARE: Дидактическа подкрепа за учене през мобилен телефонKarel Van Isacker
 
130705 zephyrin soh - how developers spend their effort during maintenance ...
130705   zephyrin soh - how developers spend their effort during maintenance ...130705   zephyrin soh - how developers spend their effort during maintenance ...
130705 zephyrin soh - how developers spend their effort during maintenance ...Ptidej Team
 
Creating a drug safe workplace
Creating a drug safe workplaceCreating a drug safe workplace
Creating a drug safe workplacemasterbuildersact
 
学習者の自律的な推敲を促す自動添削ツールの検討
学習者の自律的な推敲を促す自動添削ツールの検討学習者の自律的な推敲を促す自動添削ツールの検討
学習者の自律的な推敲を促す自動添削ツールの検討ozapro18
 
Ilmu bedah kolon2
Ilmu bedah kolon2Ilmu bedah kolon2
Ilmu bedah kolon2Iva Maria
 
130321 zephyrin soh - on the effect of exploration strategies on maintenanc...
130321   zephyrin soh - on the effect of exploration strategies on maintenanc...130321   zephyrin soh - on the effect of exploration strategies on maintenanc...
130321 zephyrin soh - on the effect of exploration strategies on maintenanc...Ptidej Team
 
Real talk public
Real talk publicReal talk public
Real talk publicBene Garcia
 
3 M-CARE: Комуникативни умения
3 M-CARE: Комуникативни умения3 M-CARE: Комуникативни умения
3 M-CARE: Комуникативни уменияKarel Van Isacker
 
130621 wei wu - mofae - multi-objective optimization approach to framework ...
130621   wei wu - mofae - multi-objective optimization approach to framework ...130621   wei wu - mofae - multi-objective optimization approach to framework ...
130621 wei wu - mofae - multi-objective optimization approach to framework ...Ptidej Team
 
기업 분석 과제(디지털콘텐츠학과 임승일)
기업 분석 과제(디지털콘텐츠학과 임승일)기업 분석 과제(디지털콘텐츠학과 임승일)
기업 분석 과제(디지털콘텐츠학과 임승일)SeungIl Lim
 
практика Scratch
практика Scratchпрактика Scratch
практика ScratchDmitriyMezin
 

Destacado (20)

130719 sebastiano panichella - who is going to mentor newcomers in open sou...
130719   sebastiano panichella - who is going to mentor newcomers in open sou...130719   sebastiano panichella - who is going to mentor newcomers in open sou...
130719 sebastiano panichella - who is going to mentor newcomers in open sou...
 
2 M-CARE: Информираност за уврежданията
2 M-CARE: Информираност за уврежданията2 M-CARE: Информираност за уврежданията
2 M-CARE: Информираност за уврежданията
 
Работаем в соцсетях
Работаем в соцсетяхРаботаем в соцсетях
Работаем в соцсетях
 
130404 fehmi jaafar - on the relationship between program evolution and fau...
130404   fehmi jaafar - on the relationship between program evolution and fau...130404   fehmi jaafar - on the relationship between program evolution and fau...
130404 fehmi jaafar - on the relationship between program evolution and fau...
 
130905 francis palma - detection of process antipatterns - a bpel perspective
130905   francis palma - detection of process antipatterns - a bpel perspective130905   francis palma - detection of process antipatterns - a bpel perspective
130905 francis palma - detection of process antipatterns - a bpel perspective
 
130919 jim cordy - when is a clone not a clone
130919   jim cordy - when is a clone not a clone130919   jim cordy - when is a clone not a clone
130919 jim cordy - when is a clone not a clone
 
Teletrade
TeletradeTeletrade
Teletrade
 
1 M-CARE: Дидактическа подкрепа за учене през мобилен телефон
1 M-CARE: Дидактическа подкрепа за учене през мобилен телефон1 M-CARE: Дидактическа подкрепа за учене през мобилен телефон
1 M-CARE: Дидактическа подкрепа за учене през мобилен телефон
 
Amistad
AmistadAmistad
Amistad
 
130705 zephyrin soh - how developers spend their effort during maintenance ...
130705   zephyrin soh - how developers spend their effort during maintenance ...130705   zephyrin soh - how developers spend their effort during maintenance ...
130705 zephyrin soh - how developers spend their effort during maintenance ...
 
Creating a drug safe workplace
Creating a drug safe workplaceCreating a drug safe workplace
Creating a drug safe workplace
 
学習者の自律的な推敲を促す自動添削ツールの検討
学習者の自律的な推敲を促す自動添削ツールの検討学習者の自律的な推敲を促す自動添削ツールの検討
学習者の自律的な推敲を促す自動添削ツールの検討
 
Ilmu bedah kolon2
Ilmu bedah kolon2Ilmu bedah kolon2
Ilmu bedah kolon2
 
Ecoexpo
EcoexpoEcoexpo
Ecoexpo
 
130321 zephyrin soh - on the effect of exploration strategies on maintenanc...
130321   zephyrin soh - on the effect of exploration strategies on maintenanc...130321   zephyrin soh - on the effect of exploration strategies on maintenanc...
130321 zephyrin soh - on the effect of exploration strategies on maintenanc...
 
Real talk public
Real talk publicReal talk public
Real talk public
 
3 M-CARE: Комуникативни умения
3 M-CARE: Комуникативни умения3 M-CARE: Комуникативни умения
3 M-CARE: Комуникативни умения
 
130621 wei wu - mofae - multi-objective optimization approach to framework ...
130621   wei wu - mofae - multi-objective optimization approach to framework ...130621   wei wu - mofae - multi-objective optimization approach to framework ...
130621 wei wu - mofae - multi-objective optimization approach to framework ...
 
기업 분석 과제(디지털콘텐츠학과 임승일)
기업 분석 과제(디지털콘텐츠학과 임승일)기업 분석 과제(디지털콘텐츠학과 임승일)
기업 분석 과제(디지털콘텐츠학과 임승일)
 
практика Scratch
практика Scratchпрактика Scratch
практика Scratch
 

Similar a 130102 venera arnaoudova - a new family of software anti-patterns linguistic anti-patterns

II-SDV 2016 Srinivasan Parthiban - KOL Analytics from Biomedical Literature
II-SDV 2016 Srinivasan Parthiban - KOL Analytics from Biomedical LiteratureII-SDV 2016 Srinivasan Parthiban - KOL Analytics from Biomedical Literature
II-SDV 2016 Srinivasan Parthiban - KOL Analytics from Biomedical LiteratureDr. Haxel Consult
 
How to Create a Golden Ontology
How to Create a Golden OntologyHow to Create a Golden Ontology
How to Create a Golden OntologyMike Bennett
 
Getting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataGetting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataCory Foy
 
The Secrets of High Performance: Science Edition - Nicole Forsgren - Codemoti...
The Secrets of High Performance: Science Edition - Nicole Forsgren - Codemoti...The Secrets of High Performance: Science Edition - Nicole Forsgren - Codemoti...
The Secrets of High Performance: Science Edition - Nicole Forsgren - Codemoti...Codemotion
 
Developing in R - the contextual Multi-Armed Bandit edition
Developing in R - the contextual Multi-Armed Bandit editionDeveloping in R - the contextual Multi-Armed Bandit edition
Developing in R - the contextual Multi-Armed Bandit editionRobin van Emden
 
Troubleshooting and Optimizing Named Entity Resolution Systems in the Industry
Troubleshooting and Optimizing Named Entity Resolution Systems in the IndustryTroubleshooting and Optimizing Named Entity Resolution Systems in the Industry
Troubleshooting and Optimizing Named Entity Resolution Systems in the IndustryPanos Alexopoulos
 
Introduction to AntiPatterns & CodeSmells
Introduction to AntiPatterns & CodeSmellsIntroduction to AntiPatterns & CodeSmells
Introduction to AntiPatterns & CodeSmellsClaudio Bernasconi
 
Principled And Clean Coding
Principled And Clean CodingPrincipled And Clean Coding
Principled And Clean CodingMetin Ogurlu
 
What We Learned from Four Years of Sciencing the Crap Out of DevOps - Nicole ...
What We Learned from Four Years of Sciencing the Crap Out of DevOps - Nicole ...What We Learned from Four Years of Sciencing the Crap Out of DevOps - Nicole ...
What We Learned from Four Years of Sciencing the Crap Out of DevOps - Nicole ...SeniorStoryteller
 
DOES16 San Francisco - Nicole Forsgren & Jez Humble - The Latest: What We Lea...
DOES16 San Francisco - Nicole Forsgren & Jez Humble - The Latest: What We Lea...DOES16 San Francisco - Nicole Forsgren & Jez Humble - The Latest: What We Lea...
DOES16 San Francisco - Nicole Forsgren & Jez Humble - The Latest: What We Lea...Gene Kim
 
DOES 2016 Sciencing the Crap Out of DevOps
DOES 2016 Sciencing the Crap Out of DevOpsDOES 2016 Sciencing the Crap Out of DevOps
DOES 2016 Sciencing the Crap Out of DevOpsNicole Forsgren
 
Introducing the Open-Source Library for Testing NLP Models - Healthcare NLP S...
Introducing the Open-Source Library for Testing NLP Models - Healthcare NLP S...Introducing the Open-Source Library for Testing NLP Models - Healthcare NLP S...
Introducing the Open-Source Library for Testing NLP Models - Healthcare NLP S...David Talby
 
Genome annotation with open source software: Apollo, Jbrowse and the GO in Ga...
Genome annotation with open source software: Apollo, Jbrowse and the GO in Ga...Genome annotation with open source software: Apollo, Jbrowse and the GO in Ga...
Genome annotation with open source software: Apollo, Jbrowse and the GO in Ga...Nathan Dunn
 
Business ontologies
Business ontologiesBusiness ontologies
Business ontologiesMike Bennett
 
Getting started-php unit
Getting started-php unitGetting started-php unit
Getting started-php unitmfrost503
 
Google, quality and you
Google, quality and youGoogle, quality and you
Google, quality and younelinger
 

Similar a 130102 venera arnaoudova - a new family of software anti-patterns linguistic anti-patterns (20)

Csmr13d.ppt
Csmr13d.pptCsmr13d.ppt
Csmr13d.ppt
 
CSMR13d.ppt
CSMR13d.pptCSMR13d.ppt
CSMR13d.ppt
 
II-SDV 2016 Srinivasan Parthiban - KOL Analytics from Biomedical Literature
II-SDV 2016 Srinivasan Parthiban - KOL Analytics from Biomedical LiteratureII-SDV 2016 Srinivasan Parthiban - KOL Analytics from Biomedical Literature
II-SDV 2016 Srinivasan Parthiban - KOL Analytics from Biomedical Literature
 
Simple Design
Simple DesignSimple Design
Simple Design
 
How to Create a Golden Ontology
How to Create a Golden OntologyHow to Create a Golden Ontology
How to Create a Golden Ontology
 
Getting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataGetting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and Data
 
The Secrets of High Performance: Science Edition - Nicole Forsgren - Codemoti...
The Secrets of High Performance: Science Edition - Nicole Forsgren - Codemoti...The Secrets of High Performance: Science Edition - Nicole Forsgren - Codemoti...
The Secrets of High Performance: Science Edition - Nicole Forsgren - Codemoti...
 
Developing in R - the contextual Multi-Armed Bandit edition
Developing in R - the contextual Multi-Armed Bandit editionDeveloping in R - the contextual Multi-Armed Bandit edition
Developing in R - the contextual Multi-Armed Bandit edition
 
Troubleshooting and Optimizing Named Entity Resolution Systems in the Industry
Troubleshooting and Optimizing Named Entity Resolution Systems in the IndustryTroubleshooting and Optimizing Named Entity Resolution Systems in the Industry
Troubleshooting and Optimizing Named Entity Resolution Systems in the Industry
 
Introduction to AntiPatterns & CodeSmells
Introduction to AntiPatterns & CodeSmellsIntroduction to AntiPatterns & CodeSmells
Introduction to AntiPatterns & CodeSmells
 
Principled And Clean Coding
Principled And Clean CodingPrincipled And Clean Coding
Principled And Clean Coding
 
A Primer on High-Quality Identifier Naming
A Primer on High-Quality Identifier NamingA Primer on High-Quality Identifier Naming
A Primer on High-Quality Identifier Naming
 
What We Learned from Four Years of Sciencing the Crap Out of DevOps - Nicole ...
What We Learned from Four Years of Sciencing the Crap Out of DevOps - Nicole ...What We Learned from Four Years of Sciencing the Crap Out of DevOps - Nicole ...
What We Learned from Four Years of Sciencing the Crap Out of DevOps - Nicole ...
 
DOES16 San Francisco - Nicole Forsgren & Jez Humble - The Latest: What We Lea...
DOES16 San Francisco - Nicole Forsgren & Jez Humble - The Latest: What We Lea...DOES16 San Francisco - Nicole Forsgren & Jez Humble - The Latest: What We Lea...
DOES16 San Francisco - Nicole Forsgren & Jez Humble - The Latest: What We Lea...
 
DOES 2016 Sciencing the Crap Out of DevOps
DOES 2016 Sciencing the Crap Out of DevOpsDOES 2016 Sciencing the Crap Out of DevOps
DOES 2016 Sciencing the Crap Out of DevOps
 
Introducing the Open-Source Library for Testing NLP Models - Healthcare NLP S...
Introducing the Open-Source Library for Testing NLP Models - Healthcare NLP S...Introducing the Open-Source Library for Testing NLP Models - Healthcare NLP S...
Introducing the Open-Source Library for Testing NLP Models - Healthcare NLP S...
 
Genome annotation with open source software: Apollo, Jbrowse and the GO in Ga...
Genome annotation with open source software: Apollo, Jbrowse and the GO in Ga...Genome annotation with open source software: Apollo, Jbrowse and the GO in Ga...
Genome annotation with open source software: Apollo, Jbrowse and the GO in Ga...
 
Business ontologies
Business ontologiesBusiness ontologies
Business ontologies
 
Getting started-php unit
Getting started-php unitGetting started-php unit
Getting started-php unit
 
Google, quality and you
Google, quality and youGoogle, quality and you
Google, quality and you
 

Más de Ptidej Team

From IoT to Software Miniaturisation
From IoT to Software MiniaturisationFrom IoT to Software Miniaturisation
From IoT to Software MiniaturisationPtidej Team
 
Presentation by Lionel Briand
Presentation by Lionel BriandPresentation by Lionel Briand
Presentation by Lionel BriandPtidej Team
 
Manel Abdellatif
Manel AbdellatifManel Abdellatif
Manel AbdellatifPtidej Team
 
Azadeh Kermansaravi
Azadeh KermansaraviAzadeh Kermansaravi
Azadeh KermansaraviPtidej Team
 
CSED - Manel Grichi
CSED - Manel GrichiCSED - Manel Grichi
CSED - Manel GrichiPtidej Team
 
Cristiano Politowski
Cristiano PolitowskiCristiano Politowski
Cristiano PolitowskiPtidej Team
 
Will io t trigger the next software crisis
Will io t trigger the next software crisisWill io t trigger the next software crisis
Will io t trigger the next software crisisPtidej Team
 
Thesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptThesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptPtidej Team
 
Thesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptThesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptPtidej Team
 

Más de Ptidej Team (20)

From IoT to Software Miniaturisation
From IoT to Software MiniaturisationFrom IoT to Software Miniaturisation
From IoT to Software Miniaturisation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation by Lionel Briand
Presentation by Lionel BriandPresentation by Lionel Briand
Presentation by Lionel Briand
 
Manel Abdellatif
Manel AbdellatifManel Abdellatif
Manel Abdellatif
 
Azadeh Kermansaravi
Azadeh KermansaraviAzadeh Kermansaravi
Azadeh Kermansaravi
 
Mouna Abidi
Mouna AbidiMouna Abidi
Mouna Abidi
 
CSED - Manel Grichi
CSED - Manel GrichiCSED - Manel Grichi
CSED - Manel Grichi
 
Cristiano Politowski
Cristiano PolitowskiCristiano Politowski
Cristiano Politowski
 
Will io t trigger the next software crisis
Will io t trigger the next software crisisWill io t trigger the next software crisis
Will io t trigger the next software crisis
 
MIPA
MIPAMIPA
MIPA
 
Thesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptThesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.ppt
 
Thesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptThesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.ppt
 
Medicine15.ppt
Medicine15.pptMedicine15.ppt
Medicine15.ppt
 
Qrs17b.ppt
Qrs17b.pptQrs17b.ppt
Qrs17b.ppt
 
Icpc11c.ppt
Icpc11c.pptIcpc11c.ppt
Icpc11c.ppt
 
Icsme16.ppt
Icsme16.pptIcsme16.ppt
Icsme16.ppt
 
Msr17a.ppt
Msr17a.pptMsr17a.ppt
Msr17a.ppt
 
Icsoc15.ppt
Icsoc15.pptIcsoc15.ppt
Icsoc15.ppt
 

Último

UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessUXDXConf
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyUXDXConf
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101vincent683379
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfChristopherTHyatt
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 

Último (20)

UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 

130102 venera arnaoudova - a new family of software anti-patterns linguistic anti-patterns

  • 1. A New Family of Software Anti-Patterns: Linguistic Anti-Patterns Venera Arnaoudova1, Massimiliano Di Penta2, Giuliano Antoniol1,Yann-Gaël Guéhéneuc1 1 École Polytechnique de Montréal, Canada 2 University of Sannio, Benevento, Italy 1
  • 2. Families of Patterns/Anti-Patterns • Patterns, e.g., Design • Anti-Patterns, e.g., Software Development 2
  • 3. Source code lexicon i.e. vocabulary of your code • What do we know? • We should strive for good quality lexicon • How is quality of the lexicon measured? • English words, domain terms • Abbreviations, acronyms [Takang et al., ’96], [Deissenbock and Pizka, ’05], [Lawrie et al., ’07], [Abebe et al., ’09] 3
  • 4. What does it do? 4
  • 5. What does it do? • Consider method: public ??? setBreadth(Dimension target, int source){ ??? } 4
  • 6. What does it do? • Consider method: public ??? setBreadth(Dimension target, int source){ ??? } • What is it’s return type? 4
  • 7. What does it do? • Consider method: public ??? setBreadth(Dimension target, int source){ ??? } • What is it’s return type? • What is it’s implementation? 4
  • 8. What does it do? • Consider method: public ??? setBreadth(Dimension target, int source){ ??? } • What is it’s return type? • What is it’s implementation? Expecting: public void setBreadth(Dimension target, int source){ target.setBreadth(source); } 4
  • 9. What does it do? • Consider method: public ??? setBreadth(Dimension target, int source){ ??? } • What is it’s return type? • What is it’s implementation? Expecting: Receiving: public void setBreadth(Dimension target, int source){ target.setBreadth(source); } public Dimension setBreadth(Dimension target, int source) { if (orientation == VERTICAL) return new Dimension(source, (int)target.getHeight()); else return new Dimension((int)target.getWidth(), source); } 4
  • 10. Does more than it says • Consider method: public ??? setBreadth(Dimension target, int source){ ??? } • What is it’s return type? • What is it’s implementation? Expecting: Receiving: public void setBreadth(Dimension target, int source){ target.setBreadth(source); } public Dimension setBreadth(Dimension target, int source) { if (orientation == VERTICAL) return new Dimension(source, (int)target.getHeight()); else return new Dimension((int)target.getWidth(), source); } 4
  • 11. What does it do? 5
  • 12. What does it do? Consider method: 5
  • 13. What does it do? Consider method: public ??? isClassPathCorrect(wellKnownType, compUnitDecl){ ??? } 5
  • 14. What does it do? Consider method: public ??? isClassPathCorrect(wellKnownType, compUnitDecl){ ??? } • What is it’s return type? 5
  • 15. What does it do? Consider method: public ??? isClassPathCorrect(wellKnownType, compUnitDecl){ ??? } • What is it’s return type? • What is it’s implementation? 5
  • 16. What does it do? Consider method: public ??? isClassPathCorrect(wellKnownType, compUnitDecl){ ??? } • What is it’s return type? • What is it’s implementation? Expecting: public boolean isClassPathCorrect(..){ if(..){return true; else {return false;} } 5
  • 17. What does it do? Consider method: public ??? isClassPathCorrect(wellKnownType, compUnitDecl){ ??? } • What is it’s return type? • What is it’s implementation? Expecting: Receiving: public boolean isClassPathCorrect(..){ if(..){return true; else {return false;} } public void isClassPathCorrect(wellKnownType, compUnitDecl) { referenceContext = compUnitDecl; this.handle(..); } 5
  • 18. Says more than it does Consider method: public ??? isClassPathCorrect(wellKnownType, compUnitDecl){ ??? } • What is it’s return type? • What is it’s implementation? Expecting: Receiving: public boolean isClassPathCorrect(..){ if(..){return true; else {return false;} } public void isClassPathCorrect(wellKnownType, compUnitDecl) { referenceContext = compUnitDecl; this.handle(..); } 5
  • 19. What does it contain? 6
  • 20. What does it contain? • Consider attribute: private static ??? stats 6
  • 21. What does it contain? • Consider attribute: private static ??? stats • What is it’s declared type? 6
  • 22. What does it contain? • Consider attribute: private static ??? stats • What is it’s declared type? • What is it’s purpose? 6
  • 23. What does it contain? • Consider attribute: private static ??? stats • What is it’s declared type? • What is it’s purpose? Expecting: private static int[] stats // some statistics.. 6
  • 24. What does it contain? • Consider attribute: private static ??? stats • What is it’s declared type? • What is it’s purpose? Expecting: private static int[] stats // some statistics.. Receiving: private static boolean stats = true; 6
  • 25. Says more than it contains • Consider attribute: private static ??? stats • What is it’s declared type? • What is it’s purpose? Expecting: private static int[] stats // some statistics.. Receiving: private static boolean stats = true; 6
  • 26. Linguistic Anti-Patterns • LAs: Recurring poor practices in the naming, documentation and choice of identifiers in the implementation. • Different families • One such family is related to inconsistencies: 7
  • 27. Inconsistency LAs • Inconsistency between a program entity’s • documentation (i.e., comments) • name • behaviour (type, implementation) 8
  • 28. Inconsistency LAs Others trust what you say! Behaviour Does more than it says Dimension setBreadth(..) Says more than it does void isClassPathCorrect(..) Does the opposite than it says State Contains more than it says Says more than it contains boolean _stats Contains the opposite than it says 9
  • 29. Inconsistency LAs Others trust what you say! Behaviour Does more than it says Dimension setBreadth(..) Says more than it does void isClassPathCorrect(..) Does the opposite than it says ControlEnableState disable(..) State Contains more than it says Says more than it contains boolean _stats Contains the opposite than it says 9
  • 30. Inconsistency LAs Others trust what you say! Behaviour Does more than it says Dimension setBreadth(..) Says more than it does void isClassPathCorrect(..) Does the opposite than it says ControlEnableState disable(..) State Contains more than it says int[] isReached Says more than it contains boolean _stats Contains the opposite than it says 9
  • 31. Inconsistency LAs Others trust what you say! Behaviour Does more than it says Dimension setBreadth(..) Says more than it does void isClassPathCorrect(..) Does the opposite than it says ControlEnableState disable(..) State Contains more than it says int[] isReached Says more than it contains boolean _stats Contains the opposite than it says 9 //.. default exclude pattern.. INCLUDE_NAME_DEFAULT
  • 32. Inconsistency LAs Others trust what you say! Behaviour Does more than it says “Set” method returns “Get” - more than an accessor “Is” returns more than a Boolean Expecting but not getting a single instance Says more than it does Does the opposite 10
  • 33. Inconsistency LAs Others trust what you say! Behaviour Does more than it says Says more than it does Not implemented condition Validation method does not confirm “Get” method does not return Not answered question Transform method does not return Expecting but not getting a collection Does the opposite 11
  • 34. Inconsistency LAs Others trust what you say! Behaviour Does more than it says Says more than it does Does the opposite Method name and return type are opposite Method signature and comment are opposite 12
  • 35. Inconsistency LAs Others trust what you say! State Contains more than it says Says one but contains many Name suggests Boolean but type does not Says more than it contains Says many but contains one Contains the opposite Attribute name and type are opposite Attribute signature and comment are opposite 13
  • 36. Study • Prototype detector: LAPD • RQ: To what extent LAs exist? • Context: System ArgoUML Cocoon Eclipse Version 0.10.1 0.34 2.2.0 1.0 14 Methods Attributes 5K 3K 11 K 6K 4K 3K 36 K 22 K
  • 37. Do they exist? Inconsistency LAs Behaviour Detected wrt the population Does more than it says 194 0.35% Says more than it does 1016 1.82% Does the opposite than it says 288 0.52% Detected wrt the population Contains more than it says 438 1.3% Says more than it contains 302 0.89% 24 0.07% State Contains the opposite than it says 15
  • 38. Inconsistency LAs Confidence: 95% ±10% Behaviour Precision Does more than it says 88% Says more than it does 85% Does the opposite than it says 12% State Precision Contains more than it says 57% Says more than it contains 75% Contains the opposite than it says 16 13%
  • 39. To summarize • Defined Inconsistency LAs • Prototype detection tool - LAPD • 72% precision • Inconsistency LAs represent 5% of the studied systems 17
  • 40. Why do we care? • What can go wrong with LAs: • Useless time and effort spent to understand source code • Wrong assumptions • Being aware they exist is the first step... 18
  • 41. The next step • Opinion of developers • Study the impact • Solutions 19
  • 42. Inconsistency LAs Behaviour Does more than it says void getMethodBodies(..) Says more than it does int isValid() Does the opposite than it says ControlEnableState disable(..) State Contains more than it says int[] isReached Says more than it contains boolean _stats Contains the opposite than it says 20 //.. default exclude pattern.. INCLUDE_NAME_DEFAULT
  • 43. Inconsistency LAs What do you think? Behaviour Does more than it says void getMethodBodies(..) Says more than it does int isValid() Does the opposite than it says ControlEnableState disable(..) State Contains more than it says int[] isReached Says more than it contains boolean _stats Contains the opposite than it says 20 //.. default exclude pattern.. INCLUDE_NAME_DEFAULT