Catching code duplication with CPD.
用CPD捕捉代码重复。
Once you've run CPD, a report folder is created in your Eclipse root directory containing a file called cpd.txt, which lists all duplicate code. An example of the cpd.txt file is shown in Figure 9.
一旦运行了cpd,您的eclipse根目录下就会创建出一个report文件夹,其中包含一个叫做cpd . txt的文件,文件中列示了所有重复的代码。
PMD: Download PMD (including CPD).
PMD:下载 PMD(包括CPD)。
This duplication doesn't appear in tools like CPD because the values in each instance of the repeated infrastructure are indeed unique, but it harms your code nonetheless.
这种复制并不会出现在CPD之类的工具中,因为重复的基础设施的每个实例的值必须是惟一的。尽管如此,它仍然会损害您的代码。
For example, by setting the threshold at 100 tokens, CPD shows only instances where at least 100 tokens have been duplicated.
例如,如果将阈值设置成100个标志,CPD就会在至少重复了100个标志的时候显示一个实例。
Additionally, you can set CPD to ignore certain code options, such as identifiers and literals.
另外,可以设置CPD忽略某些代码选项,例如标识符和标量。
The CPD project is part of the PMD source-analysis tool.
CPD项目是PMD 源代码分析工具的一部分。
Finding duplicate code manually is challenging, but using a plugin like CPD, however, quickly reveals duplicated code while you are coding.
靠人工来寻找重复的代码是一项挑战,但使用像CPD这样的插件却能在编码时轻松地发现重复的代码。
CPD, which is part of the popular open source static analysis tool PMD, reports the number of duplicate lines in a code base.
CPD是流行的开源静态分析工具pmd的一部分,它报告代码基中重复行的数量。
CPD报告代码重复。
Using a tool like CPD, however, quickly reveals duplicated code, which you can then improve.
但是,使用诸如 CPD 之类的工具,就可以迅速找出重复代码,然后对此进行改进。
CPD: a freely available code duplication tool from the PMD team.
CPD:来自PMD小组的免费代码复制工具。
By using a static analysis tool such as PMD's CPD or CheckStyle, you can determine areas of high code duplication on a continual basis as part of running an automated build.
使用诸如pmd的CPD或CheckStyle这样的静态分析工具,您能够将整个分析过程作为自动构建的一部分,持续分析,确定代码重复度高的区域。
In this example, the Ant fileset type delineates which files CPD should analyze and which it should ignore.
在这个示例中,Antfileset类型指定了CPD文件应该分析哪些文件,以及应该忽略哪些文件。
PMD's CPD: Enables discovering code duplication
PMD的CPD:帮助发现代码重复
I need a nontrivial victim code base as an example, so I chose the aforementioned Struts project. Running CPD on the Struts 2 code base yields the results shown in Figure 3.
我需要一个典型的问题代码库来作为示例,因此选择了前面提到的Struts项目。
The PMD plugin for Eclipse provides a feature called CPD (or Copy Paste Detector), which finds duplicated code.
Eclipse的PMD插件提供了一项叫做CPD(或复制粘贴探测器)的功能,用于寻找重复的代码。
The photoelectric characteristics of conducting polymer MEH - PPV film were studied using contact potential difference ( CPD ) method.
用接触电位差(CPD )方法研究了导电聚合物MEH-PPV薄膜的光电特性。
In that way, the CPD Formula provides you with maximum effectiveness.
CPD公式就是以这种方式为你提供最大的效力。
We will input more effort into developing CPD program this year.
今年,我们将在开发CPD项目上投入更多的精力。
Critical point detection (CPD) of planar curves can be well applied in approaching of curves using poly lines, which has very important applications in image recognition, measurement and analysis.
平面曲线的关键点检测可用于数字曲线的直线段逼近,因此在很多图像识别、测量及分析的场合均有重要应用。
Note: (1) Please refer to Section 5 of the Guidelines for the limitations regarding the calculation of CPD points.
请注意:(1)有关持续专业进修学分计算方法的限制,请参阅“指引”第5章。
Methods We select 7 statistical indexes which can reflect the inpatient medical quality and form an evaluation system, and make a comprehensive evaluation by CPD approach.
方法选取反映住院医疗质量的7项统计指标,建立评价指标体系,用CPD评价法对住院科室进行综合评价。
Aim the effect of compound 861 (Cpd 861) on rat hepatic stellate cell (HSC) proliferation and collagen synthesis in vitro was observed.
目的观察中药复方861对体外培养肝星状细胞增殖及胶原合成的影响。
The photoelectric characteristics of conducting polymer MEH-PPV thin film were studied using contact potential difference (CPD) method.
用接触电位差(CPD)方法研究了导电聚合物meh - PPV薄膜的光电特性。
Using CPD, the PTRs of deep vein in lower limbs, femoral common vein and popliteal vein were remarkably larger than those in control group(all P< 0.001) .
观察组下肢深静脉彩色脉冲多普勒(CPD)返流持续时间(PTR)、股总静脉PTR、朋静脉PTR明显大于对照组(均P<0.001)。
The distinctive CPD bands, which could be constantly and clearly detected using the CPD staining procedure we improved, provided new landmarks for chromosome identification in tomato.
用改良的CPD染色程序清晰而稳定地显示出这些特征性的CPD带纹为番茄的染色体,特别是有丝分裂中期染色体提供了新的识别标记。
Conclusion The way combining CPD with Weighted is exact and objective at assessing death report card's quality.
结论交叉积差法与加权法结合运用是一种能准确、客观评估儿童死亡报卡质量的简便方法。
The experimental results provided the basis for sieving of CPD, whose effect is similar to HPD.
实验结果为筛选出药效相似于HPD的CPD提供了依据。
The experimental results provided the basis for sieving of CPD, whose effect is similar to HPD.
实验结果为筛选出药效相似于HPD的CPD提供了依据。
应用推荐