DocumentCode
2443199
Title
CBCD: Cloned buggy code detector
Author
Li, Jingyue ; Ernst, Michael D.
Author_Institution
DNV Res. & Innovation Hovik, Høvik, Norway
fYear
2012
fDate
2-9 June 2012
Firstpage
310
Lastpage
320
Abstract
Developers often copy, or clone, code in order to reuse or modify functionality. When they do so, they also clone any bugs in the original code. Or, different developers may independently make the same mistake. As one example of a bug, multiple products in a product line may use a component in a similar wrong way. This paper makes two contributions. First, it presents an empirical study of cloned buggy code. In a large industrial product line, about 4% of the bugs are duplicated across more than one product or file. In three open source projects (the Linux kernel, the Git version control system, and the PostgreSQL database) we found 282, 33, and 33 duplicated bugs, respectively. Second, this paper presents a tool, CBCD, that searches for code that is semantically identical to given buggy code. CBCD tests graph isomorphism over the Program Dependency Graph (PDG) representation and uses four optimizations. We evaluated CBCD by searching for known clones of buggy code segments in the three projects and compared the results with text-based, token-based, and AST-based code clone detectors, namely Simian, CCFinder, Deckard, and CloneDR. The evaluation shows that CBCD is fast when searching for possible clones of the buggy code in a large system, and it is more precise for this purpose than the other code clone detectors.
Keywords
Linux; SQL; configuration management; graph theory; operating system kernels; program debugging; public domain software; AST-based code clone detectors; CBCD; CBCD tests graph isomorphism; CCFinder; CloneDR; Deckard; Git version control system; Linux kernel; PDG; PostgreSQL database; Simian; buggy code segments; cloned buggy code detector; industrial product line; open source projects; program dependency graph representation; text-based code clone detectors; token-based code clone detectors; Cloning; Complexity theory; Computer bugs; Detectors; Kernel; Linux; Optimization; Debugging aids; Validation;
fLanguage
English
Publisher
ieee
Conference_Titel
Software Engineering (ICSE), 2012 34th International Conference on
Conference_Location
Zurich
ISSN
0270-5257
Print_ISBN
978-1-4673-1066-6
Electronic_ISBN
0270-5257
Type
conf
DOI
10.1109/ICSE.2012.6227183
Filename
6227183
Link To Document