Rectangle r = dateGrid.getBoundsOfCell( i, j, Grid.SIZE_MODE_INSIDE, true); DateRangeI range = dateGrid .getDateRangeForCell(i, j); int day = range.getStart().get( Calendar.DAY_OF_MONTH); int weekday = range.getStart().get( Calendar.DAY_OF_WEEK); if (weekday == Calendar.SUNDAY) g2 .setColor(new Color(255, 102, 102)); else g2.setColor(darkDarkGrayColor);
Rectangle r = dateGrid.getBoundsOfCell( i, j, Grid.SIZE_MODE_INSIDE, true); DateRangeI range = dateGrid .getDateRangeForCell(i, j); int day = range.getStart().get( Calendar.DAY_OF_MONTH); int weekday = range.getStart().get( Calendar.DAY_OF_WEEK); if (weekday == Calendar.SUNDAY) g2 .setColor(new Color(255, 102, 102)); else g2.setColor(darkDarkGrayColor);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/navigation/DateAreaBeanFactory.java File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/calendar/DateAreaBeanFactory.java
Method name: void doPaint(Graphics2D, Rectangle) Method name: void doPaint(Graphics2D, Rectangle)
Number of AST nodes: 7 Number of AST nodes: 7
1
Rectangle r = dateGrid.getBoundsOfCell(
1
Rectangle r = dateGrid.getBoundsOfCell(
2
												i, j, Grid.SIZE_MODE_INSIDE,
2
												i, j, Grid.SIZE_MODE_INSIDE,
3
												true);
3
												true);
4
										DateRangeI range = dateGrid
4
										DateRangeI range = dateGrid
5
												.getDateRangeForCell(i, j);
5
												.getDateRangeForCell(i, j);
6
										int day = range.getStart().get(
6
										int day = range.getStart().get(
7
												Calendar.DAY_OF_MONTH);
7
												Calendar.DAY_OF_MONTH);
8
										int weekday = range.getStart().get(
8
										int weekday = range.getStart().get(
9
												Calendar.DAY_OF_WEEK);
9
												Calendar.DAY_OF_WEEK);
10
										if (weekday == Calendar.SUNDAY)
10
										if (weekday == Calendar.SUNDAY)
11
											g2
11
											g2
12
													.setColor(new Color(255,
12
													.setColor(new Color(255,
13
															102, 102));
13
															102, 102));
14
										else
14
										else
15
											g2.setColor(darkDarkGrayColor);
15
											g2.setColor(darkDarkGrayColor);
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.7
Clones locationClones are in different classes having the same super class
Number of node comparisons27
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.2
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    7
    Rectangle r = dateGrid.getBoundsOfCell(i, j, Grid.SIZE_MODE_INSIDE, true);
    7
    Rectangle r = dateGrid.getBoundsOfCell(i, j, Grid.SIZE_MODE_INSIDE, true);
    8
    DateRangeI range = dateGrid.getDateRangeForCell(i, j);
    8
    DateRangeI range = dateGrid.getDateRangeForCell(i, j);
    9
    int day = range.getStart().get(Calendar.DAY_OF_MONTH);
    9
    int day = range.getStart().get(Calendar.DAY_OF_MONTH);
    10
    int weekday = range.getStart().get(Calendar.DAY_OF_WEEK);
    10
    int weekday = range.getStart().get(Calendar.DAY_OF_WEEK);
    11
    if (weekday == Calendar.SUNDAY)
    11
    if (weekday == Calendar.SUNDAY)
    12
    g2.setColor(new Color(255, 102, 102));
    12
    g2.setColor(new Color(255, 102, 102));
    else
    else
    13
    g2.setColor(darkDarkGrayColor);
    13
    g2.setColor(darkDarkGrayColor);
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables day, r , while Clone fragment #2 returns variables day, range, r