The document describes MEntoR, a tool that mines source code to detect design regularities and rules. MEntoR analyzes how properties of entities in the source code relate to each other, and can provide suggestions to developers based on satisfied, erroneous, and partially-matched rules. The usefulness of rules detected by MEntoR depends on the specific entity being analyzed in the source code.
Automating Google Workspace (GWS) & more with Apps Script
Mining Entities to Rules with MEntoR
1. Mining Entities to Rules
MEntoR
Angela Lozano,
Andy Kellens,
Kim Mens,
Gabriela Arevalo
Thursday 16 December 2010
2. source code regularities
• Implementation standards
e.g. idioms, naming conventions, design patterns....
• Encode design decisions
• Facilitate comprehension, maintenance, & evolution
• Are implicit = often not fully respected
2/9
Thursday 16 December 2010
3. source code regularities
• Implementation standards
e.g. idioms, naming conventions, design patterns....
• Encode design decisions
• Facilitate comprehension, maintenance, & evolution
• Are implicit = often not fully respected
We can mine for regularities BUT
their usefulness might be ‘entity-dependent’
2/9
Thursday 16 December 2010
10. Motivation
3/9
Source code is reliable
It condenses design knowledge
which other methods
should I add?
Thursday 16 December 2010
11. Motivation
3/9
Source code is reliable
It condenses design knowledge
which other methods
should I add?
are all actions implemented
using the command pattern?
Thursday 16 December 2010
12. Motivation
3/9
Source code is reliable
It condenses design knowledge
which other methods
should I add?
are all methods related to
actions documented?
Thursday 16 December 2010
13. Motivation
3/9
Source code is reliable
It condenses design knowledge
All developers need such knowledge to keep consistency
which other methods
should I add?
are all methods related to
actions documented?
Thursday 16 December 2010
14. Motivation
3/9
Source code is reliable
It condenses design knowledge
All developers need such knowledge to keep consistency
which other methods
should I add?
are all methods related to
actions documented?
Thursday 16 December 2010
15. Motivation
3/9
Source code is reliable
It condenses design knowledge
All developers need such knowledge to keep consistency
We need automatic support to detect design knowledge in the code
which other methods
should I add?
are all methods related to
actions documented?
Thursday 16 December 2010
30. 7/9
. . .
. . .
MEntoR
. . . . . .
. . . . .
. . . . . .
. . . . .
If the entity in focus is
here
The usefulness of a rule might be ‘entity-dependent’
MEntoR is based on the entity in focus
Condition properties → Conclusion properties
Thursday 16 December 2010
31. 7/9
. . .
. . .
MEntoR
. . . . . .
. . . . .
. . . . . .
. . . . .
If the entity in focus is
here
The usefulness of a rule might be ‘entity-dependent’
MEntoR is based on the entity in focus
Condition properties → Conclusion properties
Thursday 16 December 2010
32. 7/9
. . .
. . .
MEntoR
. . . . . .
. . . . .
. . . . . .
. . . . .
If the entity in focus is
here
the entity is classified as
The usefulness of a rule might be ‘entity-dependent’
MEntoR is based on the entity in focus
Condition properties → Conclusion properties
Thursday 16 December 2010
33. 7/9
. . .
. . .
MEntoR
. . . . . .
. . . . .
. . . . . .
. . . . .
If the entity in focus is
here
an error
the entity is classified as
The usefulness of a rule might be ‘entity-dependent’
MEntoR is based on the entity in focus
Condition properties → Conclusion properties
of the rule
Thursday 16 December 2010
34. 7/9
. . .
. . .
MEntoR
. . . . . .
. . . . .
. . . . . .
. . . . .
If the entity in focus is
here
an error
the entity is classified as
The usefulness of a rule might be ‘entity-dependent’
MEntoR is based on the entity in focus
Condition properties → Conclusion properties
of the rule
Thursday 16 December 2010
35. 7/9
. . .
. . .
MEntoR
. . . . . .
. . . . .
. . . . . .
. . . . .
If the entity in focus is
here
an error
the entity is classified as
satisfied example
The usefulness of a rule might be ‘entity-dependent’
MEntoR is based on the entity in focus
Condition properties → Conclusion properties
of the rule
Thursday 16 December 2010
36. 7/9
. . .
. . .
MEntoR
. . . . . .
. . . . .
. . . . . .
. . . . .
If the entity in focus is
here
an error
the entity is classified as
satisfied example
The usefulness of a rule might be ‘entity-dependent’
MEntoR is based on the entity in focus
Condition properties → Conclusion properties
of the rule
Thursday 16 December 2010
37. 7/9
. . .
. . .
MEntoR
. . . . . .
. . . . .
. . . . . .
. . . . .
If the entity in focus is
here
an error
the entity is classified as
satisfied example a suggestion
The usefulness of a rule might be ‘entity-dependent’
MEntoR is based on the entity in focus
Condition properties → Conclusion properties
of the rule
Thursday 16 December 2010
50. Rules in which the entity complies with the condition
and with the conclusion (satisfied)
MEntoR
Satisfied rulesEntity in focus
8/9
Thursday 16 December 2010
53. Rules in which the entity complies partially with the
conclusion but not with the condition (suggestions)
Suggestions
MEntoR
Entity in focus
8/9
Thursday 16 December 2010