monthlyDateAreaBean.getDateArea() .addDecorator( new AbstractGridDecorator(monthlyDateAreaBean .getDateArea(), 20) { public void doPaint(Graphics2D g2, Rectangle bounds) { 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]); } public void gridChanged(PropertyChangeEvent e) { } public void dispose() { } });
monthlyDateAreaBean.getDateArea() .addDecorator( new AbstractGridDecorator(monthlyDateAreaBean .getDateArea(), 20) { public void doPaint(Graphics2D g2, Rectangle bounds) { 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]); } public void gridChanged(PropertyChangeEvent e) { } public void dispose() { } });
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: DateAreaBean initMonthlyDateArea() Method name: DateAreaBean initDateArea()
Number of AST nodes: 1 Number of AST nodes: 1
1
monthlyDateAreaBean.getDateArea()
1
monthlyDateAreaBean.getDateArea()
2
				.addDecorator(
2
				.addDecorator(
3
						new AbstractGridDecorator(monthlyDateAreaBean
3
						new AbstractGridDecorator(monthlyDateAreaBean
4
								.getDateArea(), 20) {
4
								.getDateArea(), 20) {
5
							public void doPaint(Graphics2D g2, Rectangle bounds) {
5
							public void doPaint(Graphics2D g2, Rectangle bounds) {
6
								DateGrid dateGrid = (DateGrid) getGrid();
6
								DateGrid dateGrid = (DateGrid) getGrid();
7
								DateRangeI dr = new DateRange(System
7
								DateRangeI dr = new DateRange(System
8
										.currentTimeMillis(),
8
										.currentTimeMillis(),
9
										DateRangeI.RANGE_TYPE_DAY, 1, null,
9
										DateRangeI.RANGE_TYPE_DAY, 1, null,
10
										null);
10
										null);
11
								Rectangle[] rects = dateGrid
11
								Rectangle[] rects = dateGrid
12
										.getBoundsForDateRange(dr,
12
										.getBoundsForDateRange(dr,
13
												Grid.SIZE_MODE_INSIDE);
13
												Grid.SIZE_MODE_INSIDE);
14
								g2.setColor(new Color(250, 250, 250));
14
								g2.setColor(new Color(250, 250, 250));
15
								for (int i = 0; i < rects.length; i++)
15
								for (int i = 0; i < rects.length; i++)
16
									g2.fill(rects[i]);
16
									g2.fill(rects[i]);
17
							}
17
							}
18
							public void gridChanged(PropertyChangeEvent e) {
18
							public void gridChanged(PropertyChangeEvent e) {
19
							}
19
							}
20
							public void dispose() {
20
							public void dispose() {
21
							}
21
							}
22
						});
22
						});
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 different classes
Number of node comparisons1
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements1
    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 1
    Mapped Statements
    ID Statement ID Statement
    27
    monthlyDateAreaBean.getDateArea().addDecorator(new AbstractGridDecorator(monthlyDateAreaBean.getDateArea(), 20) {...});
    33
    monthlyDateAreaBean.getDateArea().addDecorator(new AbstractGridDecorator(monthlyDateAreaBean.getDateArea(), 20) {...});
    Precondition Violations (0)
    Row Violation