building an eclipse plugin to recommend changes to developers

12
Building an Eclipse plugin to recommend changes to developers Master thesis defense – June 2013 Snaps François – Université catholique de Louvain – EPL Advisor & Guidance – Prof. Kim Mens & Dr. Angela Lozano Slide 1 / 13 Master thesis defense

Upload: kimmens

Post on 30-Nov-2014

198 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Building an Eclipse plugin to recommend changes to developers

Building an Eclipse plugin to recommend changes to developers

Master thesis defense – June 2013 Snaps François – Université catholique de Louvain – EPL

Advisor & Guidance – Prof. Kim Mens & Dr. Angela Lozano

Slide 1 / 13 Master thesis defense

Page 2: Building an Eclipse plugin to recommend changes to developers

Context !  Maintenance and extension of existing systems

!  Frequent and complex operations !  Difficulty: developers need to interact with unfamiliar code

!  Before becoming productive, a developer needs to know: !  The limits and bounds of the existing system !  Where and how to integrate his modifications in the system !  The conventions, coding idioms, etc…

Slide 2 / 13 Master thesis defense

Page 3: Building an Eclipse plugin to recommend changes to developers

Solution !  Build a tool to facilitate this interaction between the

developer and the existing system

!  Mendel’s approach: !  Extract regularities from an existing system !  Recommend implementation hints

as changes to the developer

Slide 3 / 13 Master thesis defense

Page 4: Building an Eclipse plugin to recommend changes to developers

Mendel: a Genetic Metaphor !  “Tell me who your family is, I will tell you what you should

look like” !  Select an entity

!  Find its family members according to a family definition

!  Family definition (in this example): all apples belonging to the previous picture

!  Extract dominant and recessive traits of the family !  Dominant trait: “color: green” is shared by all other family members

!  Recommend family trait not implemented by the selected entity !  Recommendation: the selected apple should also have the color green

Slide 4 / 13 Master thesis defense

Page 5: Building an Eclipse plugin to recommend changes to developers

Family Definition: a Key Factor !  What if, instead of the previous definition, we now use

this definition: !  All apples belonging to the same tree as the selected apple

!  Objective: supporting multiple family definitions !  Study the impact of the family definition on:

!  The quality of the recommendations produced !  The type of the recommendations produced

Ø No more “color: green” trait recommended

Ø Possible other family traits (taste, form,…)

Slide 5 / 13 Master thesis defense

Page 6: Building an Eclipse plugin to recommend changes to developers

Predefined families

!  Default family (Mendel definition) !  For classes & interfaces : all siblings and nephews of the

selected class or interface !  + distinction between abstract and concrete classes.

!  For methods : all methods with the same name as the selected method within the siblings and nephews of the selected method’s class.

Slide 6 / 13 Master thesis defense

Page 7: Building an Eclipse plugin to recommend changes to developers

!  Identifiers Family !  Relation: part of the entity’s

name !  Parameterized family

!  Implements Family

!  Relation: implements and extends links

!  Specialized family: classes and interfaces

!  Callers Family

!  Relation: method called !  Parameterized family !  Specialized family: methods

and constructors

Slide 7 / 13 Master thesis defence

Predefined families

Page 8: Building an Eclipse plugin to recommend changes to developers

Validation

!  Hypothesis : a “relevant” recommendation is one that has actually been implemented by developers

!  Technique : analyzing multiple versions of a same project !  Produce recommendations for each version !  Verify if these recommendations are implemented in a later

version

Slide 8 / 13 Master thesis defense

Page 9: Building an Eclipse plugin to recommend changes to developers

Validation: implementation

Slide 9 / 13

!  Multiple parsing issue !  Particularity of Mendel’s approach

!  Solution used: database !  Extractor tool

!  Parses the entire source code of the version and stores it into the database

!  Validation on the database

Master thesis defense

Page 10: Building an Eclipse plugin to recommend changes to developers

Results

!  Some family definitions are more suited for some recommendations types than others !  “Method implemented” type

!  Implements family ¨  23 of 1505 recommendations are actually implemented ¨  41 of 50 recommendations are rated as relevant

!  Identifiers family (M2) ¨  0 of 828 recommendations are actually implemented ¨  22 of 50 recommendations are rated as relevant

Slide 10 / 13 Master thesis defense

Page 11: Building an Eclipse plugin to recommend changes to developers

Future Work

Master thesis defense Slide 11 / 13

!  Improve the validation filters !  Restrict the number of entities analyzed !  Restrict the number of irrelevant recommendations produced

!  Better family thresholds !  Better family definitions

!  Example: “extends” type and our Default family

!  Validation with real users

Page 12: Building an Eclipse plugin to recommend changes to developers

Conclusion

!  Supporting multiple family definitions !  Allows to select the most appropriate family for a type of

recommendation !  Avoids the case where a family definition struggles to produce

some recommendation types !  Allows to compare recommendations from a different point of

view (different family definitions)

Slide 12 / 13 Master thesis defense