Upload
sailqu
View
62
Download
1
Embed Size (px)
Citation preview
Leveraging Historical Co-change Information
For Requirements Traceability
Nasir Ali and Ahmed E. Hassan
Fehmi Jaafar
1
Requirements Traceability
F1
F2
F3
F4
Requirement
Maintenance ActivitiesProgram comprehension
2
Information Retrieval (IR)-based Requirements Traceability
Source Code
Files
Requirement
s
IR
Technique
s
F1
F2
F3
F4
Requirement1
70%
50%
40%
30%
F1
F2
F3
F4
3
Problem with IR-based Requirements Traceability
//send an email ………………
Public void sendEmail(){}
System shall be able
to send an email
…………… //check email format before
//storing it in an addressbook
Public void AddressBook(){}
4
Problem with IR-based Requirements Traceability
//send an email ………………
Public void sendEmail(){}
System shall be able
to send an email
…………… //check email format before
//storing it in an addressbook
Public void AddressBook(){}
5
Problem with IR-based Requirements Traceability
//send an email ………………
Public void sendEmail(){}
System shall be able
to send an email
…………… //check email format before
//storing it in an addressbook
Public void AddressBook(){}
6
Conjecture: Files Related to Same Concept Tend to Co-change Together
SMTP.java
SendEmail.java Pop3.java
SMTP.java
SendEmail.javaAddressBook.jav
a
SMTP.java
SendEmail.java Calendar.java
System shall be able to
send an email
……………
SMTP.java and SendEmail.java
Co-changed together in three versions
V1
V2
V3
7
CoCHaIR – Combining IR and CoChange Information of Files
F1
F2
F3
F4
Requirement
70%
50%
40%
30%
Create Baseline
Links
Analyze Co-changing
Files
Filter Baseline
Links
Re-rank Links
3
1
2
8
Research Questions (RQs)
RQ01: Does CoChaIR lead to better accuracy than IR techniques alone?
RQ02: Does CoChaIR provide better ranking than IR techniques alone?
9
Datasets
Dataset Requirements SC Files History
iTrust 35 210 3 yrs
Pooka 90 298 10 yrs
SIP 82 1,771 7 yrs
10
CoCHaIR vs. IR Techniques
JSM
VSMCoChaIR
11
CoChair Improves Precision and Recall on Average by up to 12.38% and 5.67% respectively
iTrus
t
iTrus
t
12
Recall Recall
Pre
cis
ion
Pre
cis
ion
Research Questions (RQs)
RQ01: Does CoChaIR lead to better accuracy than IR techniques alone?
RQ02: Does CoChaIR provide better rankingthan IR techniques alone?
13
Up to 12.38% and
5.67% respectively.
Research Questions (RQs)
RQ01: Does CoChaIR lead to better accuracy than IR techniques alone?
RQ02: Does CoChaIR provide better ranking than IR techniques alone?
14
Up to 12.38% and
5.67% respectively.
CoChair Decreases Rank by up to 48%
iTrus
t
iTrus
t
15
Cla
ss R
ank
Cla
ss R
ank
Traceability Approach Traceability Approach
Research Questions (RQs)RQ01: Does CoChaIR lead to better accuracy
than IR techniques alone?
RQ02: Does CoChaIR provide better ranking than IR techniques alone?
16
Up to 12.38% and
5.67% respectively.
CoChaIR tries to put true positive
links top in the ranked list
Y axis shows effort saved by removing
false positive and X axis shows the datasets
CoChair removes by up to 44% falsepositive links
17
18
xyz.java
Protocol.javaSMTP.jav
a
SMTP.jav
a
Protocol.javaSMTP.jav
a
xyz.java abc.java
Protocol.javaSMTP.jav
a
X
Mining software repositories
for traceability links
H. Kagdi et al. (ICPC 2007)
Trustrace: Mining software
repositories to improve the
accuracy of requirement
traceability links
N. Ali et al. (TSE 2012)
Related
Work
Tried to solve the
textual similarity
problem by introducing
another textual noise
19
Conjecture: Files Related to Same Concept Tend to Co-change
SMTP.java and SendEmail.java
Co-changed together in last three years
abc.java
SendEmail.java
SMTP.java
SVN
xyz.java
SendEmail.java
SMTP.java
SVN
pop3.java
SendEmail.java
SMTP.java
SVN
20
08
20
09
20
10
System shall be able to
send an email
……………
SMTP.java
SendEmail.java
Commit
Implements a new requirement
IR
Technique
s20