Who Made This Copy? An Empirical Analysis of Code Clone Authorship

09/03/2023
by   Reishi Yokomori, et al.
0

Code clones are code snippets that are identical or similar to other snippets within the same or different files. They are often created through copy-and-paste practices during development and maintenance activities. Since code clones may require consistent updates and coherent management, they present a challenging issue in software maintenance. Therefore, many studies have been conducted to find various types of clones with accuracy, scalability, or performance. However, the exploration of the nature of code clones has been limited. Even the fundamental question of whether code snippets in the same clone set were written by the same author or different authors has not been thoroughly investigated. In this paper, we investigate the characteristics of code clones with a focus on authorship. We analyzed the authorship of code clones at the line-level granularity for Java files in 153 Apache projects stored on GitHub and addressed three research questions. Based on these research questions, we found that there are a substantial number of clone lines across all projects (an average of 18.5% for all projects). Furthermore, authors who contribute to many non-clone lines also contribute to many clone lines. Additionally, we found that one-third of clone sets are primarily contributed to by multiple leading authors. These results confirm our intuitive understanding of clone characteristics, although no previous publications have provided empirical validation data from multiple projects. As the results could assist in designing better clone management techniques, we will explore the implications of developing an effective clone management tool.

READ FULL TEXT
research
02/12/2020

A Study of Potential Code Borrowing and License Violations in Java Projects on GitHub

With an ever-increasing amount of open source software, the popularity o...
research
02/08/2018

Usage and Attribution of Stack Overflow Code Snippets in GitHub Projects

Stack Overflow (SO) is the largest Q&A website for software developers, ...
research
11/26/2020

On the diversity and frequency of code related to mathematical formulas in real-world Java projects

In this paper, the term formula code refers to fragments of source code ...
research
07/03/2022

One-off Events? An Empirical Study of Hackathon Code Creation and Reuse

Background: Hackathons have become popular events for teams to collabora...
research
03/18/2021

Tracking Hackathon Code Creation and Reuse

Background: Hackathons have become popular events for teams to collabora...
research
10/11/2019

Design Smell Analysis for Developing and Established Open Source Java Software

Software design smells are design attributes which violate the fundament...
research
06/18/2020

Learning to Format Coq Code Using Language Models

Should the final right bracket in a record declaration be on a separate ...

Please sign up or login with your details

Forgot password? Click here to reset