Color susanColor = new Color(200, 200, 255); Color susanOutlineColor = GfxUtil.tintColor(susanColor, -0.4f); CategoryDepository.setOverride(susanID, "bg", AShape.A_PAINT, susanColor); CategoryDepository.setOverride(susanID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(susanColor, 145)); CategoryDepository.setOverride(susanID, "outline", AShape.A_PAINT, susanOutlineColor); CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(susanColor, 0.2f, 115, false)); CategoryDepository.setOverride(susanID, "treeCheckBoxOutline", AShape.A_PAINT, susanOutlineColor); CategoryDepository.setOverride(susanID, "titleText", AShape.A_PAINT, susanOutlineColor); CategoryDepository.setOverride(susanID, "mainText", AShape.A_PAINT, susanOutlineColor); CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
Color gregColor = new Color(180, 245, 180); Color gregOutlineColor = GfxUtil.tintColor(gregColor, -0.4f); CategoryDepository.setOverride(gregID, "bg", AShape.A_PAINT, gregColor); CategoryDepository.setOverride(gregID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(gregColor, 145)); CategoryDepository.setOverride(gregID, "outline", AShape.A_PAINT, gregOutlineColor); CategoryDepository.setOverride(gregID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(gregColor, 0.2f, 115, false)); CategoryDepository.setOverride(gregID, "treeCheckBoxOutline", AShape.A_PAINT, gregOutlineColor); CategoryDepository.setOverride(gregID, "titleText", AShape.A_PAINT, gregOutlineColor); CategoryDepository.setOverride(gregID, "mainText", AShape.A_PAINT, gregOutlineColor); CategoryDepository.setOverride(gregID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/frame/TestDataGenerator.java File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/frame/TestDataGenerator.java
Method name: void generateTestData() Method name: void generateTestData()
Number of AST nodes: 10 Number of AST nodes: 10
1
Color susanColor = new Color(200, 200, 255);
1
Color gregColor = new Color(180, 245, 180);
2
		Color susanOutlineColor = GfxUtil.tintColor(susanColor, -0.4f);
2
		Color gregOutlineColor = GfxUtil.tintColor(gregColor, -0.4f);
3
		CategoryDepository.setOverride(susanID, "bg", AShape.A_PAINT,
3
		CategoryDepository.setOverride(gregID, "bg", AShape.A_PAINT,
4
				susanColor);
4
 gregColor);
5
		CategoryDepository.setOverride(susanID, "bgTrans", AShape.A_PAINT,
5
		CategoryDepository.setOverride(gregID, "bgTrans", AShape.A_PAINT,
6
				GfxUtil.alphaColor(susanColor, 145));
6
				GfxUtil.alphaColor(gregColor, 145));
7
		CategoryDepository.setOverride(susanID, "outline", AShape.A_PAINT,
7
		CategoryDepository.setOverride(gregID, "outline", AShape.A_PAINT,
8
				susanOutlineColor);
8
				gregOutlineColor);
9
		CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_PAINT,
9
		CategoryDepository.setOverride(gregID, "treeCheckBox", AShape.A_PAINT,
10
				new ShapeGradientPaint(susanColor, 0.2f, 115, false));
10
				new ShapeGradientPaint(gregColor, 0.2f, 115, false));
11
		CategoryDepository.setOverride(susanID, "treeCheckBoxOutline",
11
		CategoryDepository.setOverride(gregID, "treeCheckBoxOutline",
12
				AShape.A_PAINT, susanOutlineColor);
12
				AShape.A_PAINT, gregOutlineColor);
13
		CategoryDepository.setOverride(susanID, "titleText", AShape.A_PAINT,
13
		CategoryDepository.setOverride(gregID, "titleText", AShape.A_PAINT,
14
				susanOutlineColor);
14
				gregOutlineColor);
15
		CategoryDepository.setOverride(susanID, "mainText", AShape.A_PAINT,
15
		CategoryDepository.setOverride(gregID, "mainText", AShape.A_PAINT,
16
				susanOutlineColor);
16
				gregOutlineColor);
17
		CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_SHAPE,
17
		CategoryDepository.setOverride(gregID, "treeCheckBox", AShape.A_SHAPE,
18
				defaultShape);
18
				defaultShape);
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.0
Clones locationClones are in the same method
Number of node comparisons82
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements10
    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
    26
    Color susanColor = new Color(200, 200, 255);
    26
    Color susanColor = new Color(200, 200, 255);
    46
    Color gregColor = new Color(180, 245, 180);
    Differences
    Expression1Expression2Difference
    susanColorgregColorVARIABLE_NAME_MISMATCH
    200180LITERAL_VALUE_MISMATCH
    200245LITERAL_VALUE_MISMATCH
    255180LITERAL_VALUE_MISMATCH
    46
    Color gregColor = new Color(180, 245, 180);
    27
    Color susanOutlineColor = GfxUtil.tintColor(susanColor, -0.4f);
    27
    Color susanOutlineColor = GfxUtil.tintColor(susanColor, -0.4f);
    47
    Color gregOutlineColor = GfxUtil.tintColor(gregColor, -0.4f);
    Differences
    Expression1Expression2Difference
    susanOutlineColorgregOutlineColorVARIABLE_NAME_MISMATCH
    susanColorgregColorVARIABLE_NAME_MISMATCH
    47
    Color gregOutlineColor = GfxUtil.tintColor(gregColor, -0.4f);
    28
    CategoryDepository.setOverride(susanID, "bg", AShape.A_PAINT, susanColor);
    28
    CategoryDepository.setOverride(susanID, "bg", AShape.A_PAINT, susanColor);
    48
    CategoryDepository.setOverride(gregID, "bg", AShape.A_PAINT, gregColor);
    Differences
    Expression1Expression2Difference
    susanIDgregIDVARIABLE_NAME_MISMATCH
    susanColorgregColorVARIABLE_NAME_MISMATCH
    48
    CategoryDepository.setOverride(gregID, "bg", AShape.A_PAINT, gregColor);
    29
    CategoryDepository.setOverride(susanID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(susanColor, 145));
    29
    CategoryDepository.setOverride(susanID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(susanColor, 145));
    49
    CategoryDepository.setOverride(gregID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(gregColor, 145));
    Differences
    Expression1Expression2Difference
    susanIDgregIDVARIABLE_NAME_MISMATCH
    susanColorgregColorVARIABLE_NAME_MISMATCH
    49
    CategoryDepository.setOverride(gregID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(gregColor, 145));
    30
    CategoryDepository.setOverride(susanID, "outline", AShape.A_PAINT, susanOutlineColor);
    30
    CategoryDepository.setOverride(susanID, "outline", AShape.A_PAINT, susanOutlineColor);
    50
    CategoryDepository.setOverride(gregID, "outline", AShape.A_PAINT, gregOutlineColor);
    Differences
    Expression1Expression2Difference
    susanIDgregIDVARIABLE_NAME_MISMATCH
    susanOutlineColorgregOutlineColorVARIABLE_NAME_MISMATCH
    50
    CategoryDepository.setOverride(gregID, "outline", AShape.A_PAINT, gregOutlineColor);
    31
    CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(susanColor, 0.2f, 115, false));
    31
    CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(susanColor, 0.2f, 115, false));
    51
    CategoryDepository.setOverride(gregID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(gregColor, 0.2f, 115, false));
    Differences
    Expression1Expression2Difference
    susanIDgregIDVARIABLE_NAME_MISMATCH
    susanColorgregColorVARIABLE_NAME_MISMATCH
    51
    CategoryDepository.setOverride(gregID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(gregColor, 0.2f, 115, false));
    32
    CategoryDepository.setOverride(susanID, "treeCheckBoxOutline", AShape.A_PAINT, susanOutlineColor);
    32
    CategoryDepository.setOverride(susanID, "treeCheckBoxOutline", AShape.A_PAINT, susanOutlineColor);
    52
    CategoryDepository.setOverride(gregID, "treeCheckBoxOutline", AShape.A_PAINT, gregOutlineColor);
    Differences
    Expression1Expression2Difference
    susanIDgregIDVARIABLE_NAME_MISMATCH
    susanOutlineColorgregOutlineColorVARIABLE_NAME_MISMATCH
    52
    CategoryDepository.setOverride(gregID, "treeCheckBoxOutline", AShape.A_PAINT, gregOutlineColor);
    33
    CategoryDepository.setOverride(susanID, "titleText", AShape.A_PAINT, susanOutlineColor);
    33
    CategoryDepository.setOverride(susanID, "titleText", AShape.A_PAINT, susanOutlineColor);
    53
    CategoryDepository.setOverride(gregID, "titleText", AShape.A_PAINT, gregOutlineColor);
    Differences
    Expression1Expression2Difference
    susanIDgregIDVARIABLE_NAME_MISMATCH
    susanOutlineColorgregOutlineColorVARIABLE_NAME_MISMATCH
    53
    CategoryDepository.setOverride(gregID, "titleText", AShape.A_PAINT, gregOutlineColor);
    34
    CategoryDepository.setOverride(susanID, "mainText", AShape.A_PAINT, susanOutlineColor);
    34
    CategoryDepository.setOverride(susanID, "mainText", AShape.A_PAINT, susanOutlineColor);
    54
    CategoryDepository.setOverride(gregID, "mainText", AShape.A_PAINT, gregOutlineColor);
    Differences
    Expression1Expression2Difference
    susanIDgregIDVARIABLE_NAME_MISMATCH
    susanOutlineColorgregOutlineColorVARIABLE_NAME_MISMATCH
    54
    CategoryDepository.setOverride(gregID, "mainText", AShape.A_PAINT, gregOutlineColor);
    35
    CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
    35
    CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
    55
    CategoryDepository.setOverride(gregID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
    Differences
    Expression1Expression2Difference
    susanIDgregIDVARIABLE_NAME_MISMATCH
    55
    CategoryDepository.setOverride(gregID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
    Precondition Violations (0)
    Row Violation