if ((orientation == SOUTHEAST) || (orientation == EAST) || (orientation == NORTHEAST)) { cUnit objectPosition = parentSize.getWidth().sub( this.getSize().getWidth()); drawingOrigin = new cPoint( drawingOrigin.getX().add(objectPosition), drawingOrigin .getY()); }
if ((orientation == SOUTHWEST) || (orientation == SOUTH) || (orientation == SOUTHEAST)) { cUnit objectPosition = parentSize.getHeight().sub( getSize().getHeight()); drawingOrigin = new cPoint(drawingOrigin.getX(), objectPosition .add(drawingOrigin.getY())); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/print/cPrintObject.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/print/cPrintObject.java
Method name: void computePositionAndSize() Method name: void computePositionAndSize()
Number of AST nodes: 3 Number of AST nodes: 3
1
if ((orientation == SOUTHEAST) || (orientation == EAST)
1
if ((orientation == SOUTHWEST) || (orientation == SOUTH)
2
				|| (orientation == NORTHEAST)) {
2
				|| (orientation == SOUTHEAST)) {
3
			cUnit objectPosition = parentSize.getWidth().sub(
3
			cUnit objectPosition = parentSize.getHeight().sub(
4
					this.getSize().getWidth());
4
					getSize().getHeight());
5
			drawingOrigin = new cPoint(
5
			drawingOrigin = new cPoint(
6
					drawingOrigin.getX().add(objectPosition), 
6
drawingOrigin.getX(), objectPosition
7
drawingOrigin
7
					.add(drawingOrigin
8
							.getY());
8
.getY()));
9
		}
9
		}
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 the same method
Number of node comparisons9
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    28
    if ((orientation == SOUTHEAST) || (orientation == EAST) || (orientation == NORTHEAST))
    28
    if ((orientation == SOUTHEAST) || (orientation == EAST) || (orientation == NORTHEAST))
    36
    if ((orientation == SOUTHWEST) || (orientation == SOUTH) || (orientation == SOUTHEAST))
    Differences
    Expression1Expression2Difference
    NORTHEASTSOUTHEASTVARIABLE_NAME_MISMATCH
    SOUTHEASTSOUTHWESTVARIABLE_NAME_MISMATCH
    EASTSOUTHVARIABLE_NAME_MISMATCH
    36
    if ((orientation == SOUTHWEST) || (orientation == SOUTH) || (orientation == SOUTHEAST))
    29
    cUnit objectPosition = parentSize.getWidth().sub(this.getSize().getWidth());
    29
    cUnit objectPosition = parentSize.getWidth().sub(this.getSize().getWidth());
    37
    cUnit objectPosition = parentSize.getHeight().sub(getSize().getHeight());
    Differences
    Expression1Expression2Difference
    getWidthgetHeightMETHOD_INVOCATION_NAME_MISMATCH
    thisMISSING_METHOD_INVOCATION_EXPRESSION
    getWidthgetHeightMETHOD_INVOCATION_NAME_MISMATCH
    37
    cUnit objectPosition = parentSize.getHeight().sub(getSize().getHeight());
    30
    drawingOrigin = new cPoint(drawingOrigin.getX().add(objectPosition), drawingOrigin.getY());
                                                                                                                                                                                            
                                                                                                                                                                                            
    38
    drawingOrigin = new cPoint(drawingOrigin.getX(), objectPosition.add(drawingOrigin.getY()));
    Precondition Violations (0)
    Row Violation