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);
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);
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: 8 Number of AST nodes: 8
1
CategoryDepository.setOverride(michaelID, "bg", AShape.A_PAINT,
1
CategoryDepository.setOverride(susanID, "bg", AShape.A_PAINT,
2
				michaelColor);
2
				susanColor);
3
		CategoryDepository.setOverride(michaelID, "bgTrans", AShape.A_PAINT,
3
		CategoryDepository.setOverride(susanID, "bgTrans", AShape.A_PAINT,
4
				GfxUtil.alphaColor(michaelColor, 145));
4
				GfxUtil.alphaColor(susanColor, 145));
5
		CategoryDepository.setOverride(michaelID, "outline", AShape.A_PAINT,
5
		CategoryDepository.setOverride(susanID, "outline", AShape.A_PAINT,
6
				michaelOutlineColor);
6
				susanOutlineColor);
7
		CategoryDepository.setOverride(michaelID, "treeCheckBox",
7
		CategoryDepository.setOverride(susanID, "treeCheckBox",
8
				AShape.A_PAINT, 
8
 AShape.A_PAINT,
9
new ShapeGradientPaint(michaelColor, 0.2f, 115,
9
				new ShapeGradientPaint(susanColor, 0.2f, 115,
10
						false));
10
 false));
11
		CategoryDepository.setOverride(michaelID, "treeCheckBoxOutline",
11
		CategoryDepository.setOverride(susanID, "treeCheckBoxOutline",
12
				AShape.A_PAINT, michaelOutlineColor);
12
				AShape.A_PAINT, susanOutlineColor);
13
		CategoryDepository.setOverride(michaelID, "titleText", AShape.A_PAINT,
13
		CategoryDepository.setOverride(susanID, "titleText", AShape.A_PAINT,
14
				michaelOutlineColor);
14
				susanOutlineColor);
15
		CategoryDepository.setOverride(michaelID, "mainText", AShape.A_PAINT,
15
		CategoryDepository.setOverride(susanID, "mainText", AShape.A_PAINT,
16
				michaelOutlineColor);
16
				susanOutlineColor);
17
		CategoryDepository.setOverride(michaelID, "treeCheckBox",
17
		CategoryDepository.setOverride(susanID, "treeCheckBox",
18
				AShape.A_SHAPE, 
18
 AShape.A_SHAPE,
19
defaultShape);
19
				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 comparisons64
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements8
    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
    38
    CategoryDepository.setOverride(michaelID, "bg", AShape.A_PAINT, michaelColor);
    38
    CategoryDepository.setOverride(michaelID, "bg", AShape.A_PAINT, michaelColor);
    28
    CategoryDepository.setOverride(susanID, "bg", AShape.A_PAINT, susanColor);
    Differences
    Expression1Expression2Difference
    michaelIDsusanIDVARIABLE_NAME_MISMATCH
    michaelColorsusanColorVARIABLE_NAME_MISMATCH
    28
    CategoryDepository.setOverride(susanID, "bg", AShape.A_PAINT, susanColor);
    39
    CategoryDepository.setOverride(michaelID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(michaelColor, 145));
    39
    CategoryDepository.setOverride(michaelID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(michaelColor, 145));
    29
    CategoryDepository.setOverride(susanID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(susanColor, 145));
    Differences
    Expression1Expression2Difference
    michaelIDsusanIDVARIABLE_NAME_MISMATCH
    michaelColorsusanColorVARIABLE_NAME_MISMATCH
    29
    CategoryDepository.setOverride(susanID, "bgTrans", AShape.A_PAINT, GfxUtil.alphaColor(susanColor, 145));
    40
    CategoryDepository.setOverride(michaelID, "outline", AShape.A_PAINT, michaelOutlineColor);
    40
    CategoryDepository.setOverride(michaelID, "outline", AShape.A_PAINT, michaelOutlineColor);
    30
    CategoryDepository.setOverride(susanID, "outline", AShape.A_PAINT, susanOutlineColor);
    Differences
    Expression1Expression2Difference
    michaelIDsusanIDVARIABLE_NAME_MISMATCH
    michaelOutlineColorsusanOutlineColorVARIABLE_NAME_MISMATCH
    30
    CategoryDepository.setOverride(susanID, "outline", AShape.A_PAINT, susanOutlineColor);
    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));
    31
    CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(susanColor, 0.2f, 115, false));
    Differences
    Expression1Expression2Difference
    michaelIDsusanIDVARIABLE_NAME_MISMATCH
    michaelColorsusanColorVARIABLE_NAME_MISMATCH
    31
    CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_PAINT, new ShapeGradientPaint(susanColor, 0.2f, 115, false));
    42
    CategoryDepository.setOverride(michaelID, "treeCheckBoxOutline", AShape.A_PAINT, michaelOutlineColor);
    42
    CategoryDepository.setOverride(michaelID, "treeCheckBoxOutline", AShape.A_PAINT, michaelOutlineColor);
    32
    CategoryDepository.setOverride(susanID, "treeCheckBoxOutline", AShape.A_PAINT, susanOutlineColor);
    Differences
    Expression1Expression2Difference
    michaelIDsusanIDVARIABLE_NAME_MISMATCH
    michaelOutlineColorsusanOutlineColorVARIABLE_NAME_MISMATCH
    32
    CategoryDepository.setOverride(susanID, "treeCheckBoxOutline", AShape.A_PAINT, susanOutlineColor);
    43
    CategoryDepository.setOverride(michaelID, "titleText", AShape.A_PAINT, michaelOutlineColor);
    43
    CategoryDepository.setOverride(michaelID, "titleText", AShape.A_PAINT, michaelOutlineColor);
    33
    CategoryDepository.setOverride(susanID, "titleText", AShape.A_PAINT, susanOutlineColor);
    Differences
    Expression1Expression2Difference
    michaelIDsusanIDVARIABLE_NAME_MISMATCH
    michaelOutlineColorsusanOutlineColorVARIABLE_NAME_MISMATCH
    33
    CategoryDepository.setOverride(susanID, "titleText", AShape.A_PAINT, susanOutlineColor);
    44
    CategoryDepository.setOverride(michaelID, "mainText", AShape.A_PAINT, michaelOutlineColor);
    44
    CategoryDepository.setOverride(michaelID, "mainText", AShape.A_PAINT, michaelOutlineColor);
    34
    CategoryDepository.setOverride(susanID, "mainText", AShape.A_PAINT, susanOutlineColor);
    Differences
    Expression1Expression2Difference
    michaelIDsusanIDVARIABLE_NAME_MISMATCH
    michaelOutlineColorsusanOutlineColorVARIABLE_NAME_MISMATCH
    34
    CategoryDepository.setOverride(susanID, "mainText", AShape.A_PAINT, susanOutlineColor);
    45
    CategoryDepository.setOverride(michaelID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
    45
    CategoryDepository.setOverride(michaelID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
    35
    CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
    Differences
    Expression1Expression2Difference
    michaelIDsusanIDVARIABLE_NAME_MISMATCH
    35
    CategoryDepository.setOverride(susanID, "treeCheckBox", AShape.A_SHAPE, defaultShape);
    Precondition Violations (0)
    Row Violation