cUnit temp = (cUnit) clone(); temp.setUnits(this.getUnits() / units); return temp;
cUnit temp = (cUnit) clone(); temp.setPoints(this.getPoints() - units.getPoints()); return temp;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/print/cUnit.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/print/cUnit.java
Method name: cUnit div(double) Method name: cUnit sub(cUnit)
Number of AST nodes: 3 Number of AST nodes: 3
1
cUnit temp = (cUnit) clone();
1
cUnit temp = (cUnit) clone();
2
		temp.setUnits(this.getUnits() / units);
2
		temp.setPoints(this.getPoints() - units.getPoints());
3
		return temp;
3
		return temp;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    cUnit temp = (cUnit)clone();
    1
    cUnit temp = (cUnit)clone();
    2
    temp.setUnits(this.getUnits() / units);
    2
    temp.setUnits(this.getUnits() / units);
    2
    temp.setPoints(this.getPoints() - units.getPoints());
    Differences
    Expression1Expression2Difference
    getUnitsgetPointsMETHOD_INVOCATION_NAME_MISMATCH
    unitsunits.getPoints()TYPE_COMPATIBLE_REPLACEMENT
    /-OPERATOR_MISMATCH
    setUnitssetPointsMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression temp.setUnits(this.getUnits() / units) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression temp.setPoints(this.getPoints() - units.getPoints()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression temp.setUnits(this.getUnits() / units) is a void method call, and thus it cannot be parameterized
    Expression temp.setPoints(this.getPoints() - units.getPoints()) is a void method call, and thus it cannot be parameterized
    2
    temp.setPoints(this.getPoints() - units.getPoints());
    3
    return temp;
    3
    return temp;
    Precondition Violations (4)
    Row Violation
    1Expression temp.setUnits(this.getUnits() / units) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression temp.setPoints(this.getPoints() - units.getPoints()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression temp.setUnits(this.getUnits() / units) is a void method call, and thus it cannot be parameterized
    4Expression temp.setPoints(this.getPoints() - units.getPoints()) is a void method call, and thus it cannot be parameterized