This study analyzed the time dependence of code changes in software projects over their lifetime. The researchers detected foundational periods by establishing time dependence relations between changes. They analyzed how time dependence varied over time in two open source projects, finding that one progressively built on older periods while the other cycled between new and old. Both took over a year to begin strongly relying on past changes. By plotting heatmaps of dependencies between periods, they identified the most foundational periods, which introduced large amounts of code or invasive changes.
Measuring Program Comprehension: A Large-Scale Field Study with Professionals
Wcre2009 alam
1. A Study of the Time Dependence of Code
Changes
Omar Alam, Bram Adams and Ahmed E. Hassan
Software Analysis and Intelligence Lab (SAIL), Queen’s University, Canada
1
2. Foundational Periods of Software
Development
2
• Software Development consists of building on old
changes.
• Older periods provide structure for future changes.
• Important periods for future changes are considered
foundational
3. Why Study Foundational Periods?
3
Extra testing Re-document Staff are around
Managers Need to Know about
Foundational Periods
4. How to Detect Foundational Periods?
By Establishing Time Dependence Relations.
function f1()
{
Call f2()
Call f3()
}
5. How to Detect Foundational Periods?
By Establishing Time Dependence Relations.
function f1()
{
Call f2()
Call f3()
}
function f1()
{
Call f2()
Call f4()
}
Delete f3()
Add f4()
6. How to Detect Foundational Periods?
By Establishing Time Dependence Relations.
function f1()
{
Call f2()
Call f3()
}
function f1()
{
Call f2()
Call f4()
}
Add
f4()
Modify
f1()
Modify
f3()
Add
f1()
Add
f2()
Add
f3()
Period 1 Period 2 Period 3
add
7. How to Detect Foundational Periods?
By Establishing Time Dependence Relations.
function f1()
{
Call f2()
Call f3()
}
function f1()
{
Call f2()
Call f4()
}
Add
f4()
Modify
f1()
Modify
f3()
Add
f1()
Add
f2()
Add
f3()
Period 1 Period 2 Period 3
add
remove
8. How to Detect Foundational Periods?
By Establishing Time Dependence Relations.
function f1()
{
Call f2()
Call f3()
}
function f1()
{
Call f2()
Call f4()
}
Add
f4()
Modify
f1()
Modify
f3()
Add
f1()
Add
f2()
Add
f3()
Period 1 Period 2 Period 3
add
remove
9. How to Detect Foundational Periods?
Age of Time Dependence Relations
Add
f4()
Modify
f1()
Modify
f3()
Add
f1()
Add
f2()
Add
f3()
Period 1 Period 2 Period 3
add
remove
0 period1 period2 periods
10. How to Detect Foundational Periods?
Backward and Forward Time Dependence
Add
f4()
Modify
f1()
Modify
f3()
Add
f1()
Add
f2()
Add
f3()
Period 1 Period 2 Period 3
add
remove
4 Backward Time
Dependence
11. How to Detect Foundational Periods?
Backward and Forward Time Dependence
Add
f4()
Modify
f1()
Modify
f3()
Add
f1()
Add
f2()
Add
f3()
Period 1 Period 2 Period 3
add
remove
4 Backward Time
Dependence
1 Forward Time
Dependence
13. RQ1: How Does the Time Dependence Vary
Over Time?
FreeBSDPostgreSQL
14. RQ1: How Does the Time Dependence Vary
Over Time?
FreeBSDPostgreSQL
The age of quarter 0 is not included!
15. RQ1: How Does the Time Dependence Vary
Over Time?
48% of changes build on their
same quarters
16. RQ1: How Does the Time Dependence Vary
Over Time?
FreeBSDPostgreSQL
Do Quarters with many changes build on
more changes ?
17. RQ1: How Does the Time Dependence Vary
Over Time?
Correlation between #changes and
#Backward time dependence of a quarter:
0.51 in PostgreSQL
0.87 in FreeBSD
18. RQ1: How Does the Time Dependence Vary
Over Time?
48% of changes build on their same
quarters
Quarters with many changes DO NOT
always indicate building on old quarters
19. RQ2: As Projects Age, Do They Build More on
Old Periods?
FreeBSDPostgreSQL
20. RQ2: As Projects Age, Do They Build More on
Old Periods?
FreeBSDPostgreSQL
Progressively Build on
Old Periods
Cycles Between
building on New and
Old Periods
21. RQ2: As Projects Age, Do They Build More on
Old Periods?
FreeBSDPostgreSQL
Build More on Recent
changes
22. RQ2: As Projects Age, Do They Build More on
Old Periods?
FreeBSDPostgreSQL
1.5 years before building
on Old changes
23. RQ2: As Projects Age, Do They Build More on
Old Periods?
PostgreSQL:
Progressively
Build on Old
FreeBSD:
Cycles between
Building on Old and
New
Took 1.5 years to
stabilize
24. RQ3: What are the Foundational Periods in a
Lifetime of a Project?
FreeBSDPostgreSQL
Plot the Diagonals of the Heatmaps
25. RQ3: What are the Foundational Periods in a
Lifetime of a Project?
FreeBSDPostgreSQL
26. RQ3: What are the Foundational Periods in a
Lifetime of a Project?
FreeBSDPostgreSQL
The First Foundational Period is the
Most Foundational
27. RQ3: What are the Foundational Periods in a
Lifetime of a Project?
FreeBSDPostgreSQL
Foundational Quarters Import Large
Code or Have Invasive Changes