bgShape.setAttribute(AShape.A_REPORT_HIT_AREA, Boolean.TRUE); bgShape.setAttribute(AShape.A_MOUSE_CURSOR, Cursor .getPredefinedCursor(Cursor.HAND_CURSOR)); // root.addSubShape(shadow); root.addSubShape(bgShape); // root.addSubShape(textShape); root.addSubShape(startShape);
bgShape.setAttribute(AShape.A_REPORT_HIT_AREA, Boolean.TRUE); bgShape.setAttribute(AShape.A_MOUSE_CURSOR, Cursor .getPredefinedCursor(Cursor.HAND_CURSOR)); // root.addSubShape(shadow); root.addSubShape(bgShape); // root.addSubShape(outlineShape); root.addSubShape(textShape);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/calendar/AShapeCreator.java File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/calendar/AShapeCreator.java
Method name: RootAShape createGanttFolderShape(Paint, Font, Color, Insets) Method name: RootAShape createGanttRect(Paint, Font, Color, Insets)
Number of AST nodes: 4 Number of AST nodes: 4
1
bgShape.setAttribute(AShape.A_REPORT_HIT_AREA, Boolean.TRUE);

		bgShape.setAttribute(AShape.A_MOUSE_CURSOR, Cursor
				.getPredefinedCursor(Cursor.HAND_CURSOR));

		// root.addSubShape(shadow);

		root.addSubShape(bgShape);

		// root.addSubShape(textShape);

		root.addSubShape(startShape);
1
bgShape.setAttribute(AShape.A_REPORT_HIT_AREA, Boolean.TRUE);

		bgShape.setAttribute(AShape.A_MOUSE_CURSOR, Cursor
				.getPredefinedCursor(Cursor.HAND_CURSOR));

		// root.addSubShape(shadow);

		root.addSubShape(bgShape);

		// root.addSubShape(outlineShape);

		root.addSubShape(textShape);
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 comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    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
    11
    bgShape.setAttribute(AShape.A_REPORT_HIT_AREA, Boolean.TRUE);
    6
    bgShape.setAttribute(AShape.A_REPORT_HIT_AREA, Boolean.TRUE);
    12
    bgShape.setAttribute(AShape.A_MOUSE_CURSOR, Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    7
    bgShape.setAttribute(AShape.A_MOUSE_CURSOR, Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    13
    root.addSubShape(bgShape);
    8
    root.addSubShape(bgShape);
    14
    root.addSubShape(startShape);
    14
    root.addSubShape(startShape);
    9
    root.addSubShape(textShape);
    Differences
    Expression1Expression2Difference
    startShapetextShapeVARIABLE_NAME_MISMATCH
    com.miginfocom.ashape.shapes.FillAShapecom.miginfocom.ashape.shapes.AShapeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type com.miginfocom.ashape.shapes.FillAShape of variable startShape does not match with type com.miginfocom.ashape.shapes.AShape of variable textShape
    • Make classes com.miginfocom.ashape.shapes.FillAShape and com.miginfocom.ashape.shapes.AShape extend a common superclass
    9
    root.addSubShape(textShape);
    Precondition Violations (1)
    Row Violation
    1Type com.miginfocom.ashape.shapes.FillAShape of variable startShape does not match with type com.miginfocom.ashape.shapes.AShape of variable textShape