DateGrid dateGrid = (DateGrid) getGrid();
DateRangeI dr = new DateRange(System
.currentTimeMillis(),
DateRangeI.RANGE_TYPE_DAY, 1, null,
null);
Rectangle[] rects = dateGrid
.getBoundsForDateRange(dr,
Grid.SIZE_MODE_INSIDE);
g2.setColor(new Color(250, 250, 250));
for (int i = 0; i < rects.length; i++)
g2.fill(rects[i]);
DateGrid dateGrid = (DateGrid) getGrid();
DateRangeI dr = new DateRange(System
.currentTimeMillis(),
DateRangeI.RANGE_TYPE_DAY, 1, null,
null);
Rectangle[] rects = dateGrid
.getBoundsForDateRange(dr,
Grid.SIZE_MODE_INSIDE);
g2.setColor(new Color(250, 250, 250));
for (int i = 0; i < rects.length; i++)
g2.fill(rects[i]);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/calendar/DateAreaBeanFactory.java
|
|
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/navigation/DateAreaBeanFactory.java
|
Method name: void doPaint(Graphics2D, Rectangle)
|
|
Method name: void doPaint(Graphics2D, Rectangle)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | DateGrid dateGrid = (DateGrid) getGrid();↵ | | 1 | DateGrid dateGrid = (DateGrid) getGrid();↵
|
|
2 | DateRangeI dr = new DateRange(System↵ | | 2 | DateRangeI dr = new DateRange(System↵
|
3 | .currentTimeMillis(),↵ | | 3 | .currentTimeMillis(),↵
|
4 | DateRangeI.RANGE_TYPE_DAY, 1, null,↵ | | 4 | DateRangeI.RANGE_TYPE_DAY, 1, null,↵
|
5 | null);↵ | | 5 | null);↵
|
6 | Rectangle[] rects = dateGrid↵ | | 6 | Rectangle[] rects = dateGrid↵
|
7 | .getBoundsForDateRange(dr,↵ | | 7 | .getBoundsForDateRange(dr,↵
|
8 | Grid.SIZE_MODE_INSIDE);↵ | | 8 | Grid.SIZE_MODE_INSIDE);↵
|
|
9 | g2.setColor(new Color(250, 250, 250));↵ | | 9 | g2.setColor(new Color(250, 250, 250));↵
|
10 | for (int i = 0; i < rects.length; i++)↵ | | 10 | for (int i = 0; i < rects.length; i++)↵
|
11 | g2.fill(rects[i]); | | 11 | g2.fill(rects[i]);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 20 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.3 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | DateGrid dateGrid = (DateGrid)getGrid(); | | 1 | DateGrid dateGrid = (DateGrid)getGrid(); |
2 | DateRangeI dr = new DateRange(System.currentTimeMillis(), DateRangeI.RANGE_TYPE_DAY, 1, null, null); | | 2 | DateRangeI dr = new DateRange(System.currentTimeMillis(), DateRangeI.RANGE_TYPE_DAY, 1, null, null); |
3 | Rectangle[] rects = dateGrid.getBoundsForDateRange(dr, Grid.SIZE_MODE_INSIDE); | | 3 | Rectangle[] rects = dateGrid.getBoundsForDateRange(dr, Grid.SIZE_MODE_INSIDE); |
4 | g2.setColor(new Color(250, 250, 250)); | | 4 | g2.setColor(new Color(250, 250, 250)); |
5 | for (int i = 0; i < rects.length; i++) | | 5 | for (int i = 0; i < rects.length; i++) |
6 | | | 6 | |
Precondition Violations (0)
Row |
Violation |