what do practitioners ask about code clone? a preliminary investigation of stack overflow
TRANSCRIPT
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, Japan2Graduate School of Information Science,
Nagoya University, Japan
1
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
2
Very little is known about practitioner’s needs on the detection and analysis of code clones.
Motivation of This Study
researcher
practitioners
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Stack Overflow (SO)
3
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
The Data That We Analyzed
4
from July 31, 2008to July 31, 2012
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
The Data That We Analyzed
5
from July 31, 2008to July 31, 2012
Choose keywords related code clones
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
The Data That We Analyzed
6
from July 31, 2008to 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'
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
The Data That We Analyzed
7
from July 31, 2008to 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
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
The Data That We Analyzed
8
from July 31, 2008to 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
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
The Data That We Analyzed
9
from July 31, 2008to 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'
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
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Methodology
11
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 ?
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Methodology
13
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 ?
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
python
ruby-on-rails
.net
javascript
php
jquery
asp.net
c++
java
c#
0 20 40 60 80 100 120 140 160 180 200
Finding (1/2)
Tags related to programming language
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
mvc
architecture
unit-testing
generics
dry
design
templates
inheritance
design-patterns
refactoring
0 20 40 60 80
Finding (2/2)
Tags related to development techniques
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
mvc
architecture
unit-testing
generics
dry
design
templates
inheritance
design-patterns
refactoring
0 20 40 60 80
Finding (2/2)
The most frequently appeared tags in the questionsare about object-oriented programming
languages and web programming languages.
Moreover, tags about clone management also frequently appear
Tags related to development techniques
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
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Methodology
19
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Finding
20
Reputations(Clone) Reputations(General)0
500
1,000
1,500
2,000
2,500
3,000
AskedAnswered
The average reputations of practitioners who asked and answered questions on clones, and other questions
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Finding
21
Reputations(Clone) Reputations(General)0
500
1,000
1,500
2,000
2,500
3,000
AskedAnswered
Practitioners who asked about clonesare trusted by the others in SO.
The average reputations of practitioners who asked and answered questions on clones, and other questions
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Discussion
22
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
23
Discussion
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
24
Discussion
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
25
Discussion
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Summary
26