Skip to main content
Back to USENIX
  • Conferences
  • Students
Sign in

USENIX Conference Policies

  • Event Code of Conduct
  • Conference Network Policy
  • Statement on Environmental Responsibility Policy

CP-Miner: A Tool for Finding Copy-paste and Related Bugs in Operating System Code

Copy-pasted code is very common in large software because programmers prefer reusing code via copy-paste in order to reduce programming effort. Recent studies show that copy-paste is prone to introducing bugs and a significant portion of operating system bugs concentrate in copy-pasted code. Unfortunately, it is challenging to efficiently identify copy-pasted code in large software. Existing copy-paste detection tools are either not scalable to large software, or cannot handle small modifications in copy-pasted code. Furthermore, few tools are available to detect copy-paste related bugs.

In this paper we propose a tool, CP-Miner, that uses data mining techniques to efficiently identify copy-pasted code in large software including operating systems, and detects copy-paste related bugs. Specifically, it takes less than 20 minutes for CP-Miner to identify 190,000 copy-pasted segments in Linux and 150,000 in FreeBSD. Moreover, CP-Miner has detected 28 copy-paste related bugs in the latest version of Linux and 23 in FreeBSD. In addition, we analyze some interesting characteristics of copy-paste in Linux and FreeBSD, including the distribution of copy-pasted code across different length, granularity, modules, degrees of modification, and various software versions.

Zhenmin Li, University of Illinois at Urbana-Champaign

Shan Lu, University of Illinois at Urbana-Champaign

Suvda Myagmar, University of Illinois at Urbana-Champaign

Yuanyuan Zhou, University of Illinois at Urbana-Champaign

BibTeX
@inproceedings {269481,
author = {Zhenmin Li and Shan Lu and Suvda Myagmar and Yuanyuan Zhou},
title = {{CP-Miner}: A Tool for Finding Copy-paste and Related Bugs in Operating System Code},
booktitle = {6th Symposium on Operating Systems Design \& Implementation (OSDI 04)},
year = {2004},
address = {San Francisco, CA},
url = {https://www.usenix.org/conference/osdi-04/cp-miner-tool-finding-copy-paste-and-related-bugs-operating-system-code},
publisher = {USENIX Association},
month = dec
}
Download

Links

Paper: 
http://usenix.org/publications/library/proceedings/osdi04/tech/full_papers/li_z/li_z.pdf
Paper (HTML): 
http://usenix.org/publications/library/proceedings/osdi04/tech/full_papers/li_z/li_z_html/index.html
  • Log in or register to post comments

© USENIX
EIN 13-3055038

  • Privacy Policy
  • Contact Us