Using Slicing to Identify Duplication in Source Code.pdf

所需积分/C币:10 2009-03-03 23:45:30 157KB APPLICATION/PDF
12
收藏 收藏
举报

一个论文,关于代码重构的--使用切片识别源代码中的重复部分。 采用了PDG(程序依赖图)和一个叫Codesurfer的软件。 可以识别交织的重复代码,生成新的函数。 本文具有很好的启发价值。 Programs often have a lot of duplicated code, which makes both understanding and maintenance more dicult. This problem can be alleviated by detecting duplicated code, extracting it into a separate new procedure, and replacing all the clones (the instances of the duplicated code) by calls to the new procedure. This paper describes the design and initial implementation of a tool that nds clones and displays them to the programmer. The novel aspect of our approach is the use of program dependence graphs (PDGs) and program slicing to nd isomorphic PDG subgraphs that represent clones. The key bene ts of this approach are that our tool can nd non-contiguous clones (clones whose components do not occur as contiguous text in the program), clones in which match- ing statements have been reordered, and clones that are intertwined with each other. Furthermore, the clones that are found are likely to be mean- ingful computations, and thus good candidates for extraction.

...展开详情
试读 18P Using Slicing to Identify Duplication in Source Code.pdf
立即下载 身份认证后 购VIP低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
关注 私信
上传资源赚钱or赚积分
最新推荐
Using Slicing to Identify Duplication in Source Code.pdf 10积分/C币 立即下载
1/18
Using Slicing to Identify Duplication in Source Code.pdf第1页
Using Slicing to Identify Duplication in Source Code.pdf第2页
Using Slicing to Identify Duplication in Source Code.pdf第3页
Using Slicing to Identify Duplication in Source Code.pdf第4页

试读结束, 可继续读2页

10积分/C币 立即下载