CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_SHAPE, defaultShape); Color michaelColor = new Color(255, 235, 100); Color michaelOutlineColor = GfxUtil.tintColor(michaelColor, -0.4f); CategoryDepository.setOverride(michaelID, "bg", AShape.A_PAINT, michaelColor); CategoryDepository.setOverride(michaelID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(michaelColor, 145)); CategoryDepository.setOverride(michaelID, "outline", AShape.A_PAINT, michaelOutlineColor); CategoryDepository.setOverride(michaelID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(michaelColor, 0.2f, 115, false)); CategoryDepository.setOverride(michaelID, "treeCheckBoxOutline", AShape.A_PAINT, michaelOutlineColor); CategoryDepository.setOverride(michaelID, "titleText", AShape.A_PAINT, michaelOutlineColor); CategoryDepository.setOverride(michaelID, "mainText", AShape.A_PAINT, michaelOutlineColor); CategoryDepository.setOverride(michaelID, "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);
CategoryDepository.setOverride(markID, "treeCheckBoxOutline", AShape.A_SHAPE, defaultShape); 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 michaelColor = new Color(255, 235, 100); Color michaelOutlineColor = GfxUtil.tintColor(michaelColor, -0.4f); CategoryDepository.setOverride(michaelID, "bg", AShape.A_PAINT, michaelColor); CategoryDepository.setOverride(michaelID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(michaelColor, 145)); CategoryDepository.setOverride(michaelID, "outline", AShape.A_PAINT, michaelOutlineColor); CategoryDepository.setOverride(michaelID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(michaelColor, 0.2f, 115, false)); CategoryDepository.setOverride(michaelID, "treeCheckBoxOutline", AShape.A_PAINT, michaelOutlineColor); CategoryDepository.setOverride(michaelID, "titleText", AShape.A_PAINT, michaelOutlineColor); CategoryDepository.setOverride(michaelID, "mainText", AShape.A_PAINT, michaelOutlineColor); CategoryDepository.setOverride(michaelID, "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: 21 Number of AST nodes: 21
1
CategoryDepository.setOverride(markID, "treeCheckBoxOutline",
2
				AShape.A_SHAPE, defaultShape);
3
		Color susanColor = new Color(200, 200, 255);
4
		Color susanOutlineColor = GfxUtil.tintColor(susanColor, -0.4f);
5
		CategoryDepository.setOverride(susanID, "bg", AShape.A_PAINT,
6
				susanColor);
7
		CategoryDepository.setOverride(susanID, "bgTrans", AShape.A_PAINT,
8
				GfxUtil.alphaColor(susanColor, 145));
9
		CategoryDepository.setOverride(susanID, "outline", AShape.A_PAINT,
10
				susanOutlineColor);
11
		CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_PAINT,
12
				new ShapeGradientPaint(susanColor, 0.2f, 115, false));
13
		CategoryDepository.setOverride(susanID, "treeCheckBoxOutline",
14
				AShape.A_PAINT, susanOutlineColor);
15
		CategoryDepository.setOverride(susanID, "titleText", AShape.A_PAINT,
16
				susanOutlineColor);
17
		CategoryDepository.setOverride(susanID, "mainText", AShape.A_PAINT,
18
				susanOutlineColor);
1
CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_SHAPE,
19
		CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_SHAPE,
2
				defaultShape);
20
				defaultShape);
3
		Color michaelColor = new Color(255, 235, 100);
21
		Color michaelColor = new Color(255, 235, 100);
4
		Color michaelOutlineColor = GfxUtil.tintColor(michaelColor, -0.4f);
22
		Color michaelOutlineColor = GfxUtil.tintColor(michaelColor, -0.4f);
5
		CategoryDepository.setOverride(michaelID, "bg", AShape.A_PAINT,
23
		CategoryDepository.setOverride(michaelID, "bg", AShape.A_PAINT,
6
				michaelColor);
24
				michaelColor);
7
		CategoryDepository.setOverride(michaelID, "bgTrans", AShape.A_PAINT,
25
		CategoryDepository.setOverride(michaelID, "bgTrans", AShape.A_PAINT,
8
				GfxUtil.alphaColor(michaelColor, 145));
26
				GfxUtil.alphaColor(michaelColor, 145));
9
		CategoryDepository.setOverride(michaelID, "outline", AShape.A_PAINT,
27
		CategoryDepository.setOverride(michaelID, "outline", AShape.A_PAINT,
10
				michaelOutlineColor);
28
				michaelOutlineColor);
11
		CategoryDepository.setOverride(michaelID, "treeCheckBox",
29
		CategoryDepository.setOverride(michaelID, "treeCheckBox",
12
				AShape.A_PAINT, new ShapeGradientPaint(michaelColor, 0.2f, 115,
30
				AShape.A_PAINT, new ShapeGradientPaint(michaelColor, 0.2f, 115,
13
						false));
31
						false));
14
		CategoryDepository.setOverride(michaelID, "treeCheckBoxOutline",
32
		CategoryDepository.setOverride(michaelID, "treeCheckBoxOutline",
15
				AShape.A_PAINT, michaelOutlineColor);
33
				AShape.A_PAINT, michaelOutlineColor);
16
		CategoryDepository.setOverride(michaelID, "titleText", AShape.A_PAINT,
34
		CategoryDepository.setOverride(michaelID, "titleText", AShape.A_PAINT,
17
				michaelOutlineColor);
35
				michaelOutlineColor);
18
		CategoryDepository.setOverride(michaelID, "mainText", AShape.A_PAINT,
36
		CategoryDepository.setOverride(michaelID, "mainText", AShape.A_PAINT,
19
				michaelOutlineColor);
37
				michaelOutlineColor);
20
		CategoryDepository.setOverride(michaelID, "treeCheckBox",
38
		CategoryDepository.setOverride(michaelID, "treeCheckBox",
21
				AShape.A_SHAPE, defaultShape);
39
				AShape.A_SHAPE, defaultShape);
22
		Color gregColor = new Color(180, 245, 180);
23
		Color gregOutlineColor = GfxUtil.tintColor(gregColor, -0.4f);
24
		CategoryDepository.setOverride(gregID, "bg", AShape.A_PAINT, gregColor);
25
		CategoryDepository.setOverride(gregID, "bgTrans", AShape.A_PAINT,
26
				GfxUtil.alphaColor(gregColor, 145));
27
		CategoryDepository.setOverride(gregID, "outline", AShape.A_PAINT,
28
				gregOutlineColor);
29
		CategoryDepository.setOverride(gregID, "treeCheckBox", AShape.A_PAINT,
30
				new ShapeGradientPaint(gregColor, 0.2f, 115, false));
31
		CategoryDepository.setOverride(gregID, "treeCheckBoxOutline",
32
				AShape.A_PAINT, gregOutlineColor);
33
		CategoryDepository.setOverride(gregID, "titleText", AShape.A_PAINT,
34
				gregOutlineColor);
35
		CategoryDepository.setOverride(gregID, "mainText", AShape.A_PAINT,
36
				gregOutlineColor);
37
		CategoryDepository.setOverride(gregID, "treeCheckBox", AShape.A_SHAPE,
38
				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 comparisons364
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements21
    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
    35
    CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
    35
    CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
    36
    Color michaelColor = new Color(255, 235, 100);
    36
    Color michaelColor = new Color(255, 235, 100);
    37
    Color michaelOutlineColor = GfxUtil.tintColor(michaelColor, -0.4f);
    37
    Color michaelOutlineColor = GfxUtil.tintColor(michaelColor, -0.4f);
    38
    CategoryDepository.setOverride(michaelID, "bg", AShape.A_PAINT, michaelColor);
    38
    CategoryDepository.setOverride(michaelID, "bg", AShape.A_PAINT, michaelColor);
    39
    CategoryDepository.setOverride(michaelID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(michaelColor, 145));
    39
    CategoryDepository.setOverride(michaelID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(michaelColor, 145));
    40
    CategoryDepository.setOverride(michaelID, "outline", AShape.A_PAINT, michaelOutlineColor);
    40
    CategoryDepository.setOverride(michaelID, "outline", AShape.A_PAINT, michaelOutlineColor);
    41
    CategoryDepository.setOverride(michaelID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(michaelColor, 0.2f, 115, false));
    41
    CategoryDepository.setOverride(michaelID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(michaelColor, 0.2f, 115, false));
    42
    CategoryDepository.setOverride(michaelID, "treeCheckBoxOutline", AShape.A_PAINT, michaelOutlineColor);
    42
    CategoryDepository.setOverride(michaelID, "treeCheckBoxOutline", AShape.A_PAINT, michaelOutlineColor);
    43
    CategoryDepository.setOverride(michaelID, "titleText", AShape.A_PAINT, michaelOutlineColor);
    43
    CategoryDepository.setOverride(michaelID, "titleText", AShape.A_PAINT, michaelOutlineColor);
    44
    CategoryDepository.setOverride(michaelID, "mainText", AShape.A_PAINT, michaelOutlineColor);
    44
    CategoryDepository.setOverride(michaelID, "mainText", AShape.A_PAINT, michaelOutlineColor);
    45
    CategoryDepository.setOverride(michaelID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
    45
    CategoryDepository.setOverride(michaelID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
    46
    Color gregColor = new Color(180, 245, 180);
    46
    Color gregColor = new Color(180, 245, 180);
    26
    Color susanColor = new Color(200, 200, 255);
    Differences
    Expression1Expression2Difference
    gregColorsusanColorVARIABLE_NAME_MISMATCH
    180200LITERAL_VALUE_MISMATCH
    245200LITERAL_VALUE_MISMATCH
    180255LITERAL_VALUE_MISMATCH
    26
    Color susanColor = new Color(200, 200, 255);
    47
    Color gregOutlineColor = GfxUtil.tintColor(gregColor, -0.4f);
    47
    Color gregOutlineColor = GfxUtil.tintColor(gregColor, -0.4f);
    27
    Color susanOutlineColor = GfxUtil.tintColor(susanColor, -0.4f);
    Differences
    Expression1Expression2Difference
    gregOutlineColorsusanOutlineColorVARIABLE_NAME_MISMATCH
    gregColorsusanColorVARIABLE_NAME_MISMATCH
    27
    Color susanOutlineColor = GfxUtil.tintColor(susanColor, -0.4f);
    48
    CategoryDepository.setOverride(gregID, "bg", AShape.A_PAINT, gregColor);
    48
    CategoryDepository.setOverride(gregID, "bg", AShape.A_PAINT, gregColor);
    28
    CategoryDepository.setOverride(susanID, "bg", AShape.A_PAINT, susanColor);
    Differences
    Expression1Expression2Difference
    gregIDsusanIDVARIABLE_NAME_MISMATCH
    gregColorsusanColorVARIABLE_NAME_MISMATCH
    28
    CategoryDepository.setOverride(susanID, "bg", AShape.A_PAINT, susanColor);
    49
    CategoryDepository.setOverride(gregID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(gregColor, 145));
    49
    CategoryDepository.setOverride(gregID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(gregColor, 145));
    29
    CategoryDepository.setOverride(susanID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(susanColor, 145));
    Differences
    Expression1Expression2Difference
    gregIDsusanIDVARIABLE_NAME_MISMATCH
    gregColorsusanColorVARIABLE_NAME_MISMATCH
    29
    CategoryDepository.setOverride(susanID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(susanColor, 145));
    50
    CategoryDepository.setOverride(gregID, "outline", AShape.A_PAINT, gregOutlineColor);
    50
    CategoryDepository.setOverride(gregID, "outline", AShape.A_PAINT, gregOutlineColor);
    30
    CategoryDepository.setOverride(susanID, "outline", AShape.A_PAINT, susanOutlineColor);
    Differences
    Expression1Expression2Difference
    gregIDsusanIDVARIABLE_NAME_MISMATCH
    gregOutlineColorsusanOutlineColorVARIABLE_NAME_MISMATCH
    30
    CategoryDepository.setOverride(susanID, "outline", AShape.A_PAINT, susanOutlineColor);
    51
    CategoryDepository.setOverride(gregID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(gregColor, 0.2f, 115, false));
    51
    CategoryDepository.setOverride(gregID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(gregColor, 0.2f, 115, false));
    31
    CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(susanColor, 0.2f, 115, false));
    Differences
    Expression1Expression2Difference
    gregIDsusanIDVARIABLE_NAME_MISMATCH
    gregColorsusanColorVARIABLE_NAME_MISMATCH
    31
    CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(susanColor, 0.2f, 115, false));
    52
    CategoryDepository.setOverride(gregID, "treeCheckBoxOutline", AShape.A_PAINT, gregOutlineColor);
    52
    CategoryDepository.setOverride(gregID, "treeCheckBoxOutline", AShape.A_PAINT, gregOutlineColor);
    32
    CategoryDepository.setOverride(susanID, "treeCheckBoxOutline", AShape.A_PAINT, susanOutlineColor);
    Differences
    Expression1Expression2Difference
    gregIDsusanIDVARIABLE_NAME_MISMATCH
    gregOutlineColorsusanOutlineColorVARIABLE_NAME_MISMATCH
    32
    CategoryDepository.setOverride(susanID, "treeCheckBoxOutline", AShape.A_PAINT, susanOutlineColor);
    53
    CategoryDepository.setOverride(gregID, "titleText", AShape.A_PAINT, gregOutlineColor);
    53
    CategoryDepository.setOverride(gregID, "titleText", AShape.A_PAINT, gregOutlineColor);
    33
    CategoryDepository.setOverride(susanID, "titleText", AShape.A_PAINT, susanOutlineColor);
    Differences
    Expression1Expression2Difference
    gregIDsusanIDVARIABLE_NAME_MISMATCH
    gregOutlineColorsusanOutlineColorVARIABLE_NAME_MISMATCH
    33
    CategoryDepository.setOverride(susanID, "titleText", AShape.A_PAINT, susanOutlineColor);
    54
    CategoryDepository.setOverride(gregID, "mainText", AShape.A_PAINT, gregOutlineColor);
    54
    CategoryDepository.setOverride(gregID, "mainText", AShape.A_PAINT, gregOutlineColor);
    34
    CategoryDepository.setOverride(susanID, "mainText", AShape.A_PAINT, susanOutlineColor);
    Differences
    Expression1Expression2Difference
    gregIDsusanIDVARIABLE_NAME_MISMATCH
    gregOutlineColorsusanOutlineColorVARIABLE_NAME_MISMATCH
    34
    CategoryDepository.setOverride(susanID, "mainText", AShape.A_PAINT, susanOutlineColor);
    55
    CategoryDepository.setOverride(gregID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
    55
    CategoryDepository.setOverride(gregID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
    25
    CategoryDepository.setOverride(markID, "treeCheckBoxOutline", AShape.A_SHAPE, defaultShape);
    Differences
    Expression1Expression2Difference
    gregIDmarkIDVARIABLE_NAME_MISMATCH
    "treeCheckBox""treeCheckBoxOutline"LITERAL_VALUE_MISMATCH
    25
    CategoryDepository.setOverride(markID, "treeCheckBoxOutline", AShape.A_SHAPE, defaultShape);
    Precondition Violations (0)
    Row Violation