if (child instanceof ThreadGroup) { addReportPage((ThreadGroup) child); }
if (parm1 instanceof ConfigTestElement) { mergeIn(parm1); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/ReportPlan.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/config/ConfigTestElement.java
Method name: void addJMeterComponent(TestElement) Method name: void addTestElement(TestElement)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (child instanceof ThreadGroup) {
1
if (parm1 instanceof 
2
			addReportPage((ThreadGroup) child
2
ConfigTestElement) {
3
);
3
			mergeIn(parm1);
4
		}
4
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes having the same super class
Number of node comparisons4
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3423.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (child instanceof ThreadGroup)
    1
    if (child instanceof ThreadGroup)
    1
    if (parm1 instanceof ConfigTestElement)
    Differences
    Expression1Expression2Difference
    childparm1VARIABLE_NAME_MISMATCH
    org.apache.jmeter.threads.ThreadGrouporg.apache.jmeter.config.ConfigTestElementSUBCLASS_TYPE_MISMATCH
    1
    if (parm1 instanceof ConfigTestElement)
    2
    addReportPage((ThreadGroup)child);
    2
    addReportPage((ThreadGroup)child);
    2
    mergeIn(parm1);
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.threads.ThreadGrouporg.apache.jmeter.testelement.TestElementSUBCLASS_TYPE_MISMATCH
    (ThreadGroup)childparm1TYPE_COMPATIBLE_REPLACEMENT
    addReportPagemergeInMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression (ThreadGroup)child cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addReportPage((ThreadGroup)child) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression mergeIn(parm1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addReportPage((ThreadGroup)child) is a void method call, and thus it cannot be parameterized
    Expression mergeIn(parm1) is a void method call, and thus it cannot be parameterized
    2
    mergeIn(parm1);
    Precondition Violations (5)
    Row Violation
    1Expression (ThreadGroup)child cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression addReportPage((ThreadGroup)child) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression mergeIn(parm1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression addReportPage((ThreadGroup)child) is a void method call, and thus it cannot be parameterized
    5Expression mergeIn(parm1) is a void method call, and thus it cannot be parameterized