if (p3 != null) { parms.add(new CompoundVariable(p3)); } if (p4 != null) { parms.add(new CompoundVariable(p4)); } sff.setParameters(parms); return sff;
if (p1 != null) { parms.add(new CompoundVariable(p1)); } if (p2 != null) { parms.add(new CompoundVariable(p2)); } cr.setParameters(parms); return cr;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/functions/PackageTest.java File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/functions/PackageTest.java
Method name: StringFromFile SFFParams(String, String, String, String) Method name: CSVRead setCSVReadParams(String, String)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (p3 != null) {
1
if (p1 != null) {
2
			parms.add(new CompoundVariable(p3));
2
			parms.add(new CompoundVariable(p1));
3
		}
3
		}
4
		if (p4 != null) {
4
		if (p2 != null) {
5
			parms.add(new CompoundVariable(p4));
5
			parms.add(new CompoundVariable(p2));
6
		}
6
		}
7
		sff.setParameters(parms);
7
		cr.setParameters(parms);
8
		return sff;
8
		return cr;
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.3
Clones locationClones are declared in the same class
Number of node comparisons17
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)9.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    if (p3 != null)
    7
    if (p3 != null)
    5
    if (p2 != null)
    Differences
    Expression1Expression2Difference
    p3p2VARIABLE_NAME_MISMATCH
    5
    if (p2 != null)
    8
    parms.add(new CompoundVariable(p3));
    8
    parms.add(new CompoundVariable(p3));
    6
    parms.add(new CompoundVariable(p2));
    Differences
    Expression1Expression2Difference
    p3p2VARIABLE_NAME_MISMATCH
    6
    parms.add(new CompoundVariable(p2));
    9
    if (p4 != null)
    9
    if (p4 != null)
    3
    if (p1 != null)
    Differences
    Expression1Expression2Difference
    p4p1VARIABLE_NAME_MISMATCH
    3
    if (p1 != null)
    10
    parms.add(new CompoundVariable(p4));
    10
    parms.add(new CompoundVariable(p4));
    4
    parms.add(new CompoundVariable(p1));
    Differences
    Expression1Expression2Difference
    p4p1VARIABLE_NAME_MISMATCH
    4
    parms.add(new CompoundVariable(p1));
    11
    sff.setParameters(parms);
    11
    sff.setParameters(parms);
    7
    cr.setParameters(parms);
    Differences
    Expression1Expression2Difference
    sffcrVARIABLE_NAME_MISMATCH
    org.apache.jmeter.functions.StringFromFileorg.apache.jmeter.functions.CSVReadSUBCLASS_TYPE_MISMATCH
    7
    cr.setParameters(parms);
    12
    return sff;
    12
    return sff;
    8
    return cr;
    Differences
    Expression1Expression2Difference
    sffcrVARIABLE_NAME_MISMATCH
    org.apache.jmeter.functions.StringFromFileorg.apache.jmeter.functions.CSVReadSUBCLASS_TYPE_MISMATCH
    8
    return cr;
    Precondition Violations (0)
    Row Violation