File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java | |||
Method name: void drawAnnotations(Graphics2D, Rectangle2D)
|
Method name: void drawDomainGridlines(Graphics2D, Rectangle2D, List)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | Iterator iterator = getAnnotations().iterator();↵ | 1 | Iterator iterator = ticks.iterator();↵ | |
2 | while (iterator.hasNext()) {↵ | 2 | while (iterator.hasNext()) {↵ | |
3 | CategoryAnnotation annotation↵ | 3 | ↵ | |
4 | = (CategoryAnnotation) iterator.next();↵ | |||
5 | annotation.draw(g2, this, dataArea↵ | 4 | ValueTick tick = (ValueTick) iterator.next();↵ | |
6 | , getDomainAxis(),↵ | 5 | getRenderer().drawDomainGridLine(g2, this, getDomainAxis(),↵ | |
7 | getRangeAxis());↵ | 6 | dataArea, tick.getValue());↵ | |
8 | } | 7 | } | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
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 | 11 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 4.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | Iterator iterator = getAnnotations().iterator(); |
| 7 | Iterator iterator = ticks.iterator(); | ||||||||||
3 | while (iterator.hasNext()) | 8 | while (iterator.hasNext()) | |||||||||||
4 | CategoryAnnotation annotation = (CategoryAnnotation)iterator.next(); |
| | |||||||||||
5 | annotation.draw(g2, this, dataArea, getDomainAxis(), getRangeAxis()); | | ||||||||||||
|
| 9 | ValueTick tick = (ValueTick)iterator.next(); | |||||||||||
| 10 | getRenderer().drawDomainGridLine(g2, this, getDomainAxis(), dataArea, tick.getValue()); |
Row | Violation |
---|---|
1 | Unmatched statement CategoryAnnotation annotation=(CategoryAnnotation)iterator.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement ValueTick tick=(ValueTick)iterator.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |