際際滷

際際滷Share a Scribd company logo
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
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
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, 2008
to 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, 2008
to 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, 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'
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
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
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'
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
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
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
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
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
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
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
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

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