Abstract: Due to the increasing of software requirements and software features,
modern software systems continue to grow in size and complexity. Locating
source code entities that required to implement a feature in millions lines of code
is labor and cost intensive for developers. To this end, several studies have proposed
the use of Information Retrieval (IR) to rank source code entities based on
their textual similarity to an issue report. The ranked source code entities could be
at a class or function granularity level. Source code entities at the class-level are
usually large in size and might contain a lot of functions that are not implemented
for the feature. Hence, we conjecture that the class-level feature location technique
requires more effort than function-level feature location technique. In this
paper, we investigate the impact of granularity levels on a feature location technique.
We also presented a new evaluation method using effort-based evaluation.
The results indicated that function-level feature location technique outperforms
class-level feature location technique. Moreover, function-level feature location
technique also required 7 times less effort than class-level feature location technique
to localize the first relevant source code entity. Therefore, we conclude that
feature location technique at the function-level of program elements is effective
in practice.
Reference:
Chakkrit Tantithamthavorn, Akinori Ihara, Hideaki Hata and Kenichi Matsumoto, Impact Analysis of Granularity Levels on Feature Location Technique, In Proceedings of The First Asia Pacific Requirements Engineering Symposium (APRES’14), pp. 135 - 149, Aukland, New Zealand, April 28-29, 2014.
08448380779 Call Girls In Friends Colony Women Seeking Men
Impact Analysis of Granularity Levels on Feature Location Technique
1. Impact Analysis of Granularity Levels
on Feature Location Technique
Chakkrit Tantithamthavorn (Ph.D. Student)
and Akinori Ihara, Hideaki Hata, Ken-ichi Matsumoto
!
Software Engineering Laboratory
Graduate School of Information Science
Nara Institute of Science and Technology
2. Outline
✤ Introduction
✤ Motivation
✤ Study Design
✤ Results
✤ Conclusion
2
Impact Analysis of Granularity Levels on Feature Location Technique (APRES’2014), Auckland, New Zealand.
3. Introduction > Motivation > Study Design > Result > Conclusion
Growing complexity makes software difficult to maintain.
Within 12 years, the product size has grown more than 10 folds.
The evolution of the software size of Eclipse Platform Project.
3
Millions lines
of code!!!!!
Impact Analysis of Granularity Levels on Feature Location Technique (APRES’2014), Auckland, New Zealand.
4. Introduction > Motivation > Study Design > Result > Conclusion
WHERE is a bug?
4
Identifying WHERE a feature is implemented in the source code
based on a given requirement is painstaking and time-consuming.
Implement
new features
Enhance
existing feature Fix bugs
Impact Analysis of Granularity Levels on Feature Location Technique (APRES’2014), Auckland, New Zealand.
5. Introduction > Motivation > Study Design > Result > Conclusion
IR-based feature localization helps get it done.
Current research adopts Information Retrieval
(IR) models to find source code entities that
are textually similar to a given issue report.
5
New Bug Report
Retrieving Searching
and
Ranking
Rank Method Score
1 foo() 0.98
2 bar() 0.854
3 foobar() 0.321
Top N search results
Source Code
Entities
Overview of Information Retrieval based feature localization
Class-Level
[Rao et al,. 2011]
Query
Document Corpus Source code{
entities
Function-Level
[Lukins et al,. 2010]
An Open Issue:
How does the granularity levels
impact to the performance and effort
of IR-based feature localization,
however, it’s not known.
Impact Analysis of Granularity Levels on Feature Location Technique (APRES’2014), Auckland, New Zealand.
6. 14 functions in a class{ Only 1 function is buggy.
1.) Class-level feature localization
might not be practical in reality.
6
A Motivating Example:
2.) Class-level feature localization
requires a huge amount of extra
effort to locate bugs.
Only 1 line is needed to be fixed.
~ 500 lines of code
Bug Report
Source Code
7. Introduction > Motivation > Study Design > Result > Conclusion
Study Design: Overview
7
Research Hypothesis: Function-level feature localization is
more practical than class-level feature localization.
!
To validate this hypothesis, we aim to explore two research
questions by comparing the performance and effort of IR-based
feature localization at the class and feature levels.
Research Questions
RQ1: Does function-level
feature localization
outperform class-level feature
localization?
RQ2: How much effort does
function-level feature
localization save over class-level
feature localization?
Impact Analysis of Granularity Levels on Feature Location Technique (APRES’2014), Auckland, New Zealand.
8. Introduction > Motivation > Study Design > Result > Conclusion
Study Design: Studied Projects
8
Reasons:
1.) These projects are large, active and real-world systems.
2.) Each software project carefully maintains bug tracking system and
source code version control repositories.
Impact Analysis of Granularity Levels on Feature Location Technique (APRES’2014), Auckland, New Zealand.
9. Introduction > Motivation > Study Design > Result > Conclusion
Study Design: IR-based Feature Localization
9
Source code
files or methods
Impact Analysis of Granularity Levels on Feature Location Technique (APRES’2014), Auckland, New Zealand.
10. Introduction > Motivation > Study Design > Result > Conclusion
Study Design: Effort-Based Evaluation
Ranked results for
an issue report at
the class level
Function A
Function D
Class 3
Function C
Function F ...
Rank3
Ranked results for
an issue report at
the function level
Function E
Function F ...
Rank5
Rank6
0 LOC }
LOC required
to review
suspicious
entities
Related
Non-Related
Function A
Function B
Function C
Function D
Class 1
Class 2
Function B
Function E
Rank1
Rank2
Rank3
Rank4
Rank1
Rank2
LOC threshold
10
We used lines of code as a proxy to measure effort required to find the first
relevant source code entity.
Impact Analysis of Granularity Levels on Feature Location Technique (APRES’2014), Auckland, New Zealand.
11. Introduction > Motivation > Study Design > Result > Conclusion
RQ1: Does function-level feature localization outperform class-level
feature localization?
LOC-based Performance: The percentage of successfully localized bug reports at the LOC threshold.
Eclipse Platform
● Method
File
80
70
60
50
40
30
20
10
Eclipse PDE
● Method
File
80
70
60
50
40
30
20
10
Eclipse JDT
● Method
File
When inspecting 1,000 LOC, function-level feature localization
can localize 50% of issue reports, while class-level feature
localization can localize 40% of issue reports.
11
●
●
●
●
●
●
●
●
● ● ●
LOC
LOC−based Performnace (%)
80
70
60
50
40
30
20
10
0
0
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
●
●
●
●
●
●
●
●
●
● ●
LOC
LOC−based Performnace (%)
0
0
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
●
●
●
●
●
● ●
●
● ● ●
LOC
LOC−based Performnace (%)
0
0
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
Feature
Class
Feature
Class
Feature
Class
Impact Analysis of Granularity Levels on Feature Location Technique (APRES’2014), Auckland, New Zealand.
12. Introduction > Motivation > Study Design > Result > Conclusion
RQ2: How much effort does function-level feature localization
save over class-level feature localization?
12
●
●
●
●
●
● ●●
●
●● ●
●
●
●
Effort required to find the
●
●
●
●
●
●
●
first buggy location
●
●
●
●
●
●
●● ●
●
●
●
●
● ●
●
●
●
Function Method Class File
Function Class Function Class Function Class Function Class Function Class
0 1000 2000 3000 4000 5000
Eclipse Platform
LOC
●
●
●
● ●
●●
●
●
● ●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●● ●
●
●
Method File
0 1000 2000 3000 4000 5000
Eclipse PDE
LOC
●
●
Method File
0 1000 2000 3000 4000 5000
Eclipse JDT
LOC
●
●
●
●
●
●
●●
● ●
●
●
●
Effort required to find
80% ●
●
●
of buggy locations
●
●
●
●
●
●
●
● ● ●
●
●
●
●
●
●
●
●
●
●
●●
●
●
● ●
●
●
●
●
●
●
●
●●
●
Method File
0 5000 10000 15000 20000 25000 30000
Eclipse Platform
LOC
●
●
●
●●
●
●
●●
●
● ●
●
●●
●
●
●●
●
●
●
●
●
Method File
0 5000 10000 15000 20000 25000 30000
Eclipse PDE
LOC
Method File
0 10000 20000 30000 40000 50000 60000
Eclipse JDT
LOC
Function-level feature localization requires
113 LOC, while class-level feature
localization requires 906 LOC to locate the
first relevant source code entity.
Function-level bug localization requires
1,309 LOC, while class-level feature
localization requires 2,744 LOC to locate
80% of relevant source code entities.
saves 7 times saves 4.4 times
Impact Analysis of Granularity Levels on Feature Location Technique (APRES’2014), Auckland, New Zealand.
13. Introduction > Motivation > Study Design > Result > Conclusion
Summary
Goal: To investigate the impact of granularity levels on the performance and
effort of IR-based feature localization
Main findings:
!
- For the same amount of inspection effort, function-level feature localization
outperforms class-level feature localization.
!
- Function-level feature localization saves 7 times of inspection effort to find
the first relevant bug location and 4.4 times to find 80% of bug locations.
13
Approach:
We used the Vector Space Model (VSM) to localize bugs at method and file
granularity levels. We evaluated on 1,968 bug reports with 10,959 files and
82,946 methods.
Impact Analysis of Granularity Levels on Feature Location Technique (APRES’2014), Auckland, New Zealand.