Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.5555/3049877.3049886dlproceedingsArticle/Chapter ViewAbstractPublication PagescasconConference Proceedingsconference-collections
research-article

An exploratory study on change suggestions for methods using clone detection

Published: 31 October 2016 Publication History

Abstract

A number of studies investigated providing change suggestions to programmers on the basis of the evolution history of a software system. While existing studies provide change suggestions considering code fragment level or even line level granularities, we investigate providing change suggestions at the method level. Providing a suggestion to change the entire method at one time is intuitively more time saving for developers compared to providing suggestions separately for different fragments of a method. In this research we empirically investigate whether we can infer change suggestions at the method level by analyzing the past evolution history of a software system through detection of method clones, and if so, then how we can rank the method level change suggestions.
According to our investigation on thousands of commits of seven diverse subject systems, we can provide change suggestions at the method level with up to 83% precision and 13.49% recall. Moreover, for up to 34% of the commits we can provide correct method level change suggestions. Compared to the existing fragment level change suggestion techniques, our method level change suggestion technique has promising precision and recall. We investigate the ranking of method level change suggestions and find that recency ranking (i.e., ranking on the basis of how recently the change suggestions appeared in the past) is a better choice than frequency ranking (ranking considering how frequently the suggestions appeared). We believe that while a method level change suggestion technique can never be a replacement for the existing fine grained change suggestion techniques, it can complement these existing ones.

References

[1]
A. Alali, B. Bartman, C. D. Newman, J. I. Maletic, "A Preliminary Investigation of Using Age and Distance Measures in the Detection of Evolutionary Couplings", Proc. MSR, 2013, pp. 169 -- 172.
[2]
M. Asaduzzaman, C. K. Roy, K. Schneider, D. Hou, "CSCC: Simple, Efficient, Context Sensitive Code Completion", Proc. ICSME, 2014, pp. 71 -- 80.
[3]
M. Asaduzzaman, C. K. Roy, K. Schneider, M. Di Penta, "LHDiff: A Language-Independent Hybrid Approach for Tracking Source Code Lines", Proc. ICSM, 2013, pp. 230 -- 239.
[4]
M. Bruch, M. Monperrus, M. Mezini, "Learning from examples to improve code completion systems", Proc. FSE, 2009, pp. 213 -- 222.
[5]
J. R. Cordy, C. K. Roy, "The NiCad Clone Detector", Proc. ICPC Tool Demo, 2011, pp. 219 -- 220.
[6]
Y. Dang, D. Zhang, S. Ge, C. Chu, Y. Qiu, T. Xie, "XIAO: Tuning Code Clones at Hands of Engineers in Practice", Proc. ACSAC, 2012, pp. 369 -- 378.
[7]
B. Dagenais, M. P. Robillard, "Recommending adaptive changes for framework evolution", Proc. ICSE, 2008, pp. 481 -- 490.
[8]
E. Duala-Ekoko, M. P. Robillard, "Tracking Code Clones in Evolving Software", Proc. ICSE, 2007, pp. 158 -- 167.
[9]
E. Duala-Ekoko, M. P. Robillard, "CloneTracker: Tool Support for Code Clone Management", Proc. ICSE, 2008, pp. 843 -- 846.
[10]
M. Gabel, Z. Su, "A study of the uniqueness of source code", Proc. FSE, 2010, pp. 147 -- 156.
[11]
C. L. Goues, T. Nguyen, S. Forrest, W. Weimer, "Genprog: A generic method for automatic software repair", IEEE Trans. Software Eng., 2012, 38(1): 54 -- 72.
[12]
R. Hill, J. Rideout, "Automatic method completion", Proc. ASE, 2004, pp. 228 -- 235.
[13]
A. Hindle, E. T. Barr, Z. Su, M. Gabel, P. T. Devanbu, "On the naturalness of software", Proc. ICSE, 2012, pp. 837 -- 847.
[14]
D. Hou, D. M. Pletcher, "An evaluation of the strategies of sorting, filtering, and grouping API methods for Code Completion", Proc. ICSM, 2011, pp. 233 -- 242.
[15]
H. Kagdi, M. Gethers, D. Poshyvanyk, M. L. Collard, "Blending Conceptual and Evolutionary Couplings to Support Change Impact Analysis in Source Code", Proc. WCRE, 2010, pp. 119 -- 128.
[16]
M. Kim, D. Notkin, "Discovering and Representing Systematic Code Changes", Proc. ICSE, 2009, pp. 309 -- 319.
[17]
D. Kim, J. Nam, J. Song, S. Kim, "Automatic patch generation learned from human-written patches", Proc. ICSE, 2013, pp. 802 -- 811.
[18]
A. Lozano, M. Wermilenger, "Assessing the effect of clones on changeability", Proc. ICSM, 2008, pp. 227 -- 236.
[19]
M. Mondal, C. K. Roy, K. A. Schneider, "A Fine-Grained Analysis on the Evolutionary Coupling of Cloned Code", Proc. ICSME, 2014, pp. 51 -- 60.
[20]
M. Mondal, C. K. Roy, K. A. Schneider. "Prediction and Ranking of Co-change Candidates for Clones", Proc. MSR 2014, pp. 32 -- 41.
[21]
M. Mondal, C. K. Roy, K. A. Schneider, "Automatic Identification of Important Clones for Refactoring and Tracking", Proc. SCAM, 2014, pp. 11 -- 20.
[22]
A. T. Nguyen, T. T. Nguyen, H. A. Nguyen, A. Tamrawi, H. V. Nguyen, J. Al-Kofahi, T. N. Nguyen, "Graph-based pattern-oriented, context sensitive source code completion", Proc. ICSE, 2012, pp. 69 -- 79.
[23]
H. A. Nguyen, T. T. Nguyen, G. Wilson Jr, A. T. Nguyen, M. Kim, T. N. Nguyen, "A graph-based approach to API usage adaptation", ACM Sigplan Notices, 45(10): 302 -- 321.
[24]
T. T. Nguyen, H. A. Nguyen, N. H. Pham, J. Al-Kofahi, T. N. Nguyen, "Recurring bug fixes in object-oriented programs", Proc. ICSE, 2010, pp. 315 -- 324.
[25]
H. A. Nguyen, A. T. Nguyen, T. T. Nguyen, T. N. Nguyen, H. Rajan, "A Study of Repetitiveness of Code Changes in Software Evolution", Proc. ASE, 2013, pp. 180 -- 190.
[26]
T. Omori, H. Kuwabara, K. Maruyama, "A study on repetitiveness of code completion operations", Proc. ICSM, 2012, pp. 584 -- 587.
[27]
D. M. Pletcher, D. Hou, "BCC: Enhancing code completion for better API usability", Proc. ICSM, 2009, pp. 393 -- 394.
[28]
D. Rattan, R. Bhatia, M. Singh, "Software Clone Detection: A Systematic Review", Information and Software Technology, 2013, 55(7): 1165 -- 1199.
[29]
B. Ray, M. Nagappan, C. Bird, N. Nagappan, T. Zimmermann, "The Uniqueness of Changes: Characteristics and Applications", Microsoft Research Technical Report, 2014, pp. 1 -- 10.
[30]
C. K. Roy, J. R. Cordy, "NICAD: Accurate Detection of Near-Miss Intentional Clones Using Flexible Pretty-Printing and Code Normalization", Proc. ICPC, 2008, pp. 172 -- 181.
[31]
C. K. Roy, J. R. Cordy, R. Koschke, "Comparison and Evaluation of Code Clone Detection Techniques and Tools: A Qualitative Approach", Science of Computer Programming, 2009, 74 (2009): 470 -- 495.
[32]
C. K. Roy, J. R. Cordy, "A Mutation / Injection-based Automatic Framework for Evaluating Code Clone Detection Tools", Proc. Mutation, 2009, pp. 157 -- 166.
[33]
C. K. Roy, J. R. Cordy, "Scenario-based Comparison of Clone Detection Techniques", Proc. ICPC, 2008, pp. 153 -- 162.
[34]
R. Robbes, M. Lanza, "How Program History Can Improve Code Completion", Proc. ASE, 2008, pp. 317 -- 326.
[35]
J. Svajlenko, and C. K. Roy, "Evaluating Modern Clone Detection Tools", Proc. ICSME, 2014, pp. 321 -- 330.
[36]
W. Takuya, H. Masuhara, "A Spontaneous Code Recommendation Tool Based on Associative Search", Proc. SUITE, 2011, pp. 17 -- 20.
[37]
M. Toomim, A. Begel, S. L. Graham, "Managing Duplicated Code with Linked Editing", Proc. VL/HCC, 2004, pp. 173 -- 180.
[38]
T. Wang, M. Harman, Y. Jia, J. Krinke, "Searching for better configurations: a rigorous approach to clone evaluation", Proc. ESEC/FSE, 2013, pp. 455 -- 465.
[39]
C. Zhang, J. Yang, Y. Zhang, J. Fan, X. Zhang, J. Zhao, P. Ou, "Automatic parameter recommendation for practical API usage", Proc. ICSE, 2012, pp. 826 -- 836.
[40]
T. Zimmermann, P. Weisgerber, S. Diehl, A. Zeller, "Mining version histories to guide software changes", Proc. ICSE, 2004, pp. 563 -- 572.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image DL Hosted proceedings
CASCON '16: Proceedings of the 26th Annual International Conference on Computer Science and Software Engineering
October 2016
355 pages

Publisher

IBM Corp.

United States

Publication History

Published: 31 October 2016

Qualifiers

  • Research-article

Acceptance Rates

Overall Acceptance Rate 24 of 90 submissions, 27%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 29
    Total Downloads
  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 09 Nov 2024

Other Metrics

Citations

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media