Code relatives: detecting similarly behaving software
Code relatives: detecting similarly behaving software
复制标题
DOI:
10.1145/2950290.2950321
复制
发表时间:
2016-11
期刊:
影响因子:
--
通讯作者:
Fang-Hsiang Su;Jonathan Bell;Kenneth Harvey;S. Sethumadhavan;G. Kaiser;Tony Jebara
中科院分区:
文献类型:
--
作者:
Fang-Hsiang Su;Jonathan Bell;Kenneth Harvey;S. Sethumadhavan;G. Kaiser;Tony Jebara
Detecting “similar code” is useful for many software engineering tasks. Current tools can help detect code with statically similar syntactic and–or semantic features (code clones) and with dynamically similar functional input/output (simions). Unfortunately, some code fragments that behave similarly at the finer granularity of their execution traces may be ignored. In this paper, we propose the term “code relatives” to refer to code with similar execution behavior. We define code relatives and then present DyCLINK, our approach to detecting code relatives within and across codebases. DyCLINK records instruction-level traces from sample executions, organizes the traces into instruction-level dynamic dependence graphs, and employs our specialized subgraph matching algorithm to efficiently compare the executions of candidate code relatives. In our experiments, DyCLINK analyzed 422+ million prospective subgraph matches in only 43 minutes. We compared DyCLINK to one static code clone detector from the community and to our implementation of a dynamic simion detector. The results show that DyCLINK effectively detects code relatives with a reasonable analysis time.