20
Leveraging Historical Co-change Information For Requirements Traceability Nasir Ali and Ahmed E. Hassan Fehmi Jaafar 1

Leveraging Historical Co-change Information for Requirements Traceability

  • Upload
    sailqu

  • View
    62

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Leveraging Historical Co-change Information for Requirements Traceability

Leveraging Historical Co-change Information

For Requirements Traceability

Nasir Ali and Ahmed E. Hassan

Fehmi Jaafar

1

Page 2: Leveraging Historical Co-change Information for Requirements Traceability

Requirements Traceability

F1

F2

F3

F4

Requirement

Maintenance ActivitiesProgram comprehension

2

Page 3: Leveraging Historical Co-change Information for Requirements Traceability

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

Page 4: Leveraging Historical Co-change Information for Requirements Traceability

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

Page 5: Leveraging Historical Co-change Information for Requirements Traceability

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

Page 6: Leveraging Historical Co-change Information for Requirements Traceability

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

Page 7: Leveraging Historical Co-change Information for Requirements Traceability

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

Page 8: Leveraging Historical Co-change Information for Requirements Traceability

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

Page 9: Leveraging Historical Co-change Information for Requirements Traceability

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

Page 10: Leveraging Historical Co-change Information for Requirements Traceability

Datasets

Dataset Requirements SC Files History

iTrust 35 210 3 yrs

Pooka 90 298 10 yrs

SIP 82 1,771 7 yrs

10

Page 11: Leveraging Historical Co-change Information for Requirements Traceability

CoCHaIR vs. IR Techniques

JSM

VSMCoChaIR

11

Page 12: Leveraging Historical Co-change Information for Requirements Traceability

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

Page 13: Leveraging Historical Co-change Information for Requirements Traceability

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.

Page 14: Leveraging Historical Co-change Information for Requirements Traceability

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.

Page 15: Leveraging Historical Co-change Information for Requirements Traceability

CoChair Decreases Rank by up to 48%

iTrus

t

iTrus

t

15

Cla

ss R

ank

Cla

ss R

ank

Traceability Approach Traceability Approach

Page 16: Leveraging Historical Co-change Information for Requirements Traceability

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

Page 17: Leveraging Historical Co-change Information for Requirements Traceability

Y axis shows effort saved by removing

false positive and X axis shows the datasets

CoChair removes by up to 44% falsepositive links

17

Page 18: Leveraging Historical Co-change Information for Requirements Traceability

18

Page 19: Leveraging Historical Co-change Information for Requirements Traceability

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

Page 20: Leveraging Historical Co-change Information for Requirements Traceability

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