Lecture 3 Guiding Software Development Where do you go next? - - PowerPoint PPT Presentation
Lecture 3 Guiding Software Development Where do you go next? - - PowerPoint PPT Presentation
Lecture 3 Guiding Software Development Where do you go next? Mentoring! Evolutionay Coupling Research Hypothesis Evolutionay Coupling eROSE Reengineering of Software Evolution Tom Zimmermann Saarland University Peter Weigerber
Where do you go next?
Mentoring!
Research Hypothesis Evolutionay Coupling
Evolutionay Coupling
eROSE
Tom Zimmermann • Saarland University Peter Weißgerber • University of Trier Stephan Diehl • University of Trier Andreas Zeller • Saarland University
Reengineering of Software Evolution
Developers who changed this function also changed...
eROSE: Guiding Developers
Purchase History
Customers who bought this item also bought...
Version Archive
Developers who changed this function also changed...
What Can eROSE do?
Suggest and predict likely changes
What Can eROSE do?
Prevent errors due to incomplete changes.
What Can eROSE do?
Detect coupling undetectable by program analysis.
Evolutionary Coupling in GNU DDD
ddd directory Icons Libraries Patches Tests
Evolutionary Coupling in GNU DDD
Evolutionary Coupling
What can eROSE do?
User inserts a new preference into the field fkeys[].
User inserts a new preference into the field fkeys[].
User inserts a new preference into the field fkeys[]. User inserts a new preference into the field fkeys[].
eROSE suggests further locations.
http://www.st.cs.uni-sb.de/softevo/erose/
eROSE prevents incomplete changes.
eROSE Architecture
- 1. Preprocess CVS Archive.
- 2. Mine association rules between entities.
Processing CVS data
Processing CVS data
Processing CVS data
- 1. Comparing files
- 2. Building transactions
Mapping Changes to Entities
r1 r2
Mapping Changes to Entities
A() C() E() D() B()
r1 r2
Parse r1 for entities
Mapping Changes to Entities
A() C() E() D() B() A() B() E() F() D()
r1 r2
Parse r1 for entities Parse r2 for entities
Mapping Changes to Entities
A() C() E() D() B() A() B() E() F() D()
r1 r2
Parse r1 for entities Parse r2 for entities diff diff diff diff gone new
CVS Transactions
New Developer
CVS Transactions
New Developer
user changes files
CVS Transactions
Project Files (changed)
New Developer
user changes files local copy changed
CVS Transactions
Project Files (changed)
New Developer
user changes files local copy changed
CVS Server
Project Files (changed)
local copy changed
CVS Transactions
Project Files (changed)
New Developer
user changes files local copy changed
CVS Server
Project Files (changed)
local copy changed
T r a n s a c t i
- n
Infer Transactions: Time Windows
All changes by the same developer, with the same message, made at the same time belong to one transaction.
A:1.3 B:1.2 C:1.4 D:1.3 E:1.5 same author + same log message
Fixed Time Window ∀δi : ∀δj : | time (δi) − time (δj) | ≤ T
A:1.3 B:1.2 C:1.4 D:1.3 E:1.5 same author + same log message
Sliding Time Window ∀δi : ∃δj : | time (δi) − time (δj) | ≤ T
200 seconds 200 seconds
Infer Transactions: Time Windows
All changes by the same developer, with the same message, made at the same time belong to one transaction.
A:1.3 B:1.2 C:1.4 D:1.3 E:1.5 same author + same log message
Fixed Time Window ∀δi : ∀δj : | time (δi) − time (δj) | ≤ T
A:1.3 B:1.2 C:1.4 D:1.3 E:1.5 same author + same log message
Sliding Time Window ∀δi : ∃δj : | time (δi) − time (δj) | ≤ T
200 seconds 200 seconds
Building Transactions
CVS
150,000
Building Transactions
CVS
150,000
createGeneralPage() createT extComparePage() fKeys[] initDefaults() buildnotes_compare.html PatchMessages.properties plugin.properties
2003-02-19 (aweinand): fixed #13332
Building Transactions
CVS
150,000
createGeneralPage() createT extComparePage() fKeys[] initDefaults() buildnotes_compare.html PatchMessages.properties plugin.properties
2003-02-19 (aweinand): fixed #13332
same author + message + time
From Transactions to Rules
{alter(field, fkeys[],...)} ⇒ {
}
alter(method, initDefaults(),...), alter(file, plug.properties,...),
Example Rule association rule r is a pair (x1, x2) where x1 is the antecedent and x2 is the consequent
Entities
An entity is a triple (c, i, p) where c is the syntactic category, i is the identifier p is the parent entity
Entities
An entity is a triple (c, i, p) where c is the syntactic category, i is the identifier p is the parent entity Example (method, initDefaults(), (class, Comp, (file, Comp.java, ...))) c i p
Types of Operations
Types of Operations
alter(e)
Types of Operations
alter(e) add_to(e)
Types of Operations
alter(e) add_to(e) del_from(e)
Mining Associations
Mining Associations
EROSE finds past transactions
Mining Associations
fKeys[] initDefaults() ... plugin.properties
#104223
fKeys[] initDefaults() ... plugin.properties
#756
fKeys[] initDefaults() ... plugin.properties
#6721
fKeys[] initDefaults() ... plugin.properties
#21078
fKeys[] initDefaults() ... plugin.properties
#42432
fKeys[] initDefaults() ... plugin.properties
#51345
fKeys[] initDefaults() ... plugin.properties
#59998
fKeys[] initDefaults() ... plugin.properties
#71003
fKeys[] initDefaults() ...
#87264
fKeys[] initDefaults() ... plugin.properties
#91220
fKeys[] initDefaults() ... plugin.properties
#101823
EROSE finds past transactions
Support & Confidence
Support & Confidence
Support & Confidence
transactions where fkeys[] was altered
Support & Confidence
transactions where fkeys[] was altered transactions where initDefaults() and plug.properties were altered
Support & Confidence
Support = 11 Confidence = 10/11 = 0.909
transactions where fkeys[] was altered transactions where initDefaults() and plug.properties were altered
Applying Rules
Situation ∑ = {alter(field, fkeys[],...)} apply (∑)
R (∑⇒x2) ∈ R
= ∪ x2
i.e., the set of suggestions for a situation ∑ and rules R is defined as the union of the consequents of all matching rules.
{
}
alter(method, initDefaults(),...), alter(file, plug.properties,...),
apply (∑) =
R
Applying Rules
{
}
alter(field, keys[],...), alter(method, init.Defaults(),...)
∑ =
{
}
alter(file, plug.properties(),...), alter(file, build.html,...),
apply (∑) =
R
Applying Rules
{
}
alter(field, keys[],...), alter(method, init.Defaults(),...)
∑ =
{
}
alter(file, plug.properties(),...), alter(file, build.html,...),
apply (∑) =
R
eRose can build rules on the fly.
Computing Association Rules
eROSE uses the Apriori Algorithm to compute rules. Takes several days to generate rule set, but eROSE has
- ptimisations built it.
- 1. Constrained Antecedents (builds rules on the fly)
- 2. Single Consequents (∑⇒{e})
Some Rule Examples
Coupling in GCC Compiler {alter(type, processor_cost (file, i386.h,...))} ⇒ {alter(var, i386_cost, (file, i386.c,...))} {alter(var, i486_cost, (file, i386.c,...))} {alter(var, k6_cost, (file, i386.c,...))} {alter(var, pentium_cost, (file, i386.c,...))} {alter(var, pentiumpro_cost, (file, i386.c,...))} ∑ =
Some Rule Examples
PostGRES Documentation {alter(file, createuser.sgml, ...)), ⇒ ∑ = {alter(file, dropuser.sgml, ...)), {alter(file, createdb.sgml, ...)), {alter(file, dropdb.sgml, ...)),
PostgreSQL
Evaluation
jEdit KOffice GIMP
PostgreSQL
Evaluation
jEdit KOffice GIMP EROSE predicts 33% of all changed entities. (files: 44%)
PostgreSQL
Evaluation
jEdit KOffice GIMP EROSE predicts 33% of all changed entities. (files: 44%) In 70% of all transactions, EROSE’s topmost three suggestions contain a changed entity.
PostgreSQL
Evaluation
jEdit KOffice GIMP EROSE predicts 33% of all changed entities. (files: 44%) In 70% of all transactions, EROSE’s topmost three suggestions contain a changed entity. EROSE learns quickly (within 30 days).
History Required
Software Development Artefacts
Software Development Artefacts
Source Code
Software Development Artefacts
Email Source Code
Software Development Artefacts
Bug Database Email Requirements CVS Archive Discussion Forums Test Suites Source Code
Software Development Artefacts
Bug Database Email Requirements CVS Archive Discussion Forums Test Suites Source Code
Artefact Types
Source File Versions Change Tasks Messages Other Documents
Relationship Types
File Versions Change Tasks
Messages
Documents
similar to documents check-in package reply to similar to writes writes posts works on implements about
Relationship Types
File Versions Change Tasks
Messages
Documents
similar to documents check-in package reply to similar to writes writes posts works on implements about
Relationship Types
File Versions Change Tasks
Messages
Documents
similar to documents check-in package reply to similar to writes writes posts works on implements about
Relationship Types
File Versions Change Tasks
Messages
Documents
similar to documents check-in package reply to similar to writes writes posts works on implements about
Hipikat infers links by combining information contained within project artefacts and metainformation about artefacts from different information sources.
Relationship Types
File Versions Change Tasks
Messages
Documents
similar to documents check-in package reply to similar to writes writes posts works on implements about
Hipikat infers links by combining information contained within project artefacts and metainformation about artefacts from different information sources.
Hipikat Client-Server Protocol
Hipikat Client-Server Protocol
Artefact Database
Hipikat Client-Server Protocol
Artefact Database
web
Mail/News
CVS
Hipikat Client-Server Protocol
Artefact Database
web
Mail/News
CVS
Update
Hipikat Client-Server Protocol
Artefact Database
web
Mail/News
CVS
Update
monitors
Hipikat Client-Server Protocol
Artefact Database
web
Mail/News
CVS
Update Insert artefact
monitors
Hipikat Client-Server Protocol
Artefact Database
web
Mail/News
CVS
Identification Update Insert artefact
monitors
Hipikat Client-Server Protocol
Artefact Database
web
Mail/News
CVS
Identification Listen for new artefacts Update Insert artefact
monitors
Hipikat Client-Server Protocol
Artefact Database
web
Mail/News
CVS
Identification Listen for new artefacts Update Inserts links Insert artefact
monitors
Hipikat Client-Server Protocol
Artefact Database
web
Mail/News
CVS
Identification Listen for new artefacts Update Inserts links Insert artefact
monitors
Hipikat Client-Server Protocol
Artefact Database
web
Mail/News
CVS
Identification Listen for new artefacts Update Inserts links Insert artefact
Query monitors
Hipikat Client-Server Protocol
Artefact Database
web
Mail/News
CVS
Identification Listen for new artefacts Selection Update Inserts links Insert artefact
Query monitors
Hipikat Client-Server Protocol
Artefact Database
web
Mail/News
CVS
Identification Listen for new artefacts Selection Follows links Update Inserts links Insert artefact
Query monitors
Hipikat Client-Server Protocol
Artefact Database
web
Mail/News
CVS
Identification Listen for new artefacts Selection Follows links Update Inserts links Insert artefact
Query
Related artefacts
monitors
Update
Update
- has a separate sub-modules to handle different
types of data, e.g. CVS and Bugzilla.
- New and changed artefacts are inserted into
Artefact database.
- Change listeners are notified.
Identification
Identification
Identification
Identification Log Matcher
Identification
Identification Activity Matcher Log Matcher
Identification
Identification Activity Matcher Text Similarity Matcher Log Matcher
Identification
Identification Activity Matcher Text Similarity Matcher Log Matcher CVS Check-in Package Matcher
Identification
Identification Activity Matcher Text Similarity Matcher Log Matcher CVS Check-in Package Matcher
Thread Matcher
Selection
Selection
Hipikat Client (Eclipse Plug-in)
Evaluation
The Eclipse Newcomer Study
Newcomers
- Is the tool helpful to them?
- When and from which artefacts will they query?
- How to they evaluate and utilise recommendations?
Evaluation
The Eclipse Newcomer Study
Newcomers
- Is the tool helpful to them?
- When and from which artefacts will they query?
- How to they evaluate and utilise recommendations?
Experienced
Summary
eROSE: Guiding Developers
Purchase History
Customers who bought this item also bought...
Version Archive
Developers who changed this function also changed...
Hipikat Client-Server Protocol
Artefact Database
web Mail/NewsCVS
Identification Listen for new artefacts Selection Follows links Update Inserts links Insert artefact Query Related artefacts monitorsA Recommender System A Recommender System?