The document analyzes questions asked on Stack Overflow related to code clones to understand practitioner needs. The researchers collected over 1,650 questions using keywords like "code clone" and "duplicate code", manually validating 925 questions. Most questions involved popular programming languages like Python, Ruby, and Java. Tags also involved techniques like inheritance and design patterns. Practitioners who asked about code clones had high reputation scores, indicating they were trusted members of the Stack Overflow community. The study provided insights into what practitioners ask regarding code clone detection and analysis in practice.
1 of 26
Download to read offline
More Related Content
What do practitioners ask about code clone? A preliminary investigation of Stack Overflow
1. Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
What Do Practitioners Ask about Code Clone?
A Preliminary Investigation of Stack Overflow
Eunjong Choi1, Raula Gaikovina Kula2,
Norihiro Yoshida2, Katsuro Inoue1
1Graduate School of Information Science and Technology,
Osaka University, Japan
2Graduate School of Information Science,
Nagoya University, Japan
1
2. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
2
Very little is known about practitioners
needs on the detection and analysis of code clones.
Motivation of This Study
researcher
practitioners
3. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Stack Overflow (SO)
3
4. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
The Data That We Analyzed
4
from July 31, 2008
to July 31, 2012
5. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
The Data That We Analyzed
5
from July 31, 2008
to July 31, 2012
Choose keywords
related code clones
6. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
The Data That We Analyzed
6
from July 31, 2008
to July 31, 2012
Choose keywords
related code clones
Select questions based
on the chosen keywords
'code clone'
'code cloning'
'code redundancy'
'code duplicate'
'code duplication'
'duplicate code'
'duplicated code'
7. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
The Data That We Analyzed
7
from July 31, 2008
to July 31, 2012
Choose keywords
related code clones
Select questions based
on the chosen keywords
Manually
validate
'code clone'
'code cloning'
'code redundancy'
'code duplicate'
'code duplication'
'duplicate code'
'duplicated code'
1,654
questions
8. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
The Data That We Analyzed
8
from July 31, 2008
to July 31, 2012
925 questions
Choose keywords
related code clones
Select questions based
on the chosen keywords
Manually
validate
'code clone'
'code cloning'
'code redundancy'
'code duplicate'
'code duplication'
'duplicate code'
'duplicated code'
1,654
questions
9. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
The Data That We Analyzed
9
from July 31, 2008
to July 31, 2012:
925 questions
Choose keywords
related code clones
Select questions based
on the chosen keywords
Manually
validate
'code clone'
'code cloning'
'code redundancy'
'code duplicate'
'code duplication'
'duplicate code'
'duplicated code'
10. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Research Question 1
RQ1: What Kinds of Programming
Languages/Techniques were Appeared
in Questions on Clones?
10
11. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Methodology
11
12. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Methodology
12
Tags related to
development
techniques?
Tags related to
programming
language ?
13. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Methodology
13
14. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Methodology
14
Tags related to
development
techniques?
Tags related to
programming
language ?
15. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
0 50 100 150 200
python
ruby-on-rails
.net
javascript
php
jquery
asp.net
c++
java
c#
Finding (1/2)
Tags related to programming language
16. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
0 20 40 60 80
mvc
architecture
unit-testing
generics
dry
design
templates
inheritance
design-patterns
refactoring
Finding (2/2)
Tags related to development techniques
17. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
0 20 40 60 80
mvc
architecture
unit-testing
generics
dry
design
templates
inheritance
design-patterns
refactoring
Finding (2/2)
The most frequently appeared tags in the questions
are about object-oriented programming
languages and web programming languages.
Moreover, tags about clone management also
frequently appear
Tags related to development techniques
18. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Research Question 2
RQ2: Were Questions on Clones Asked by
Trusted Practitioners?
18
Novice? Expert?
Practitioners that are interested in
handling code clones
19. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Methodology
19
20. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Finding
20
0
500
1,000
1,500
2,000
2,500
3,000
Reputations(Clone) Reputations(General)
Asked
Answered
The average reputations of practitioners who asked and
answered questions on clones, and other questions
21. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Finding
21
0
500
1,000
1,500
2,000
2,500
3,000
Reputations(Clone) Reputations(General)
Asked
Answered
Practitioners who asked about clones
are trusted by the others in SO.
The average reputations of practitioners who asked and
answered questions on clones, and other questions
22. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Discussion
22
23. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
23
Discussion
24. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
24
Discussion
25. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
25
Discussion
26. Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Summary
26