File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java | |||
Method name: void drawDomainTickBands(Graphics2D, Rectangle2D, List)
|
Method name: void drawRangeTickBands(Graphics2D, Rectangle2D, List)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | while (iterator.hasNext()) {↵ | 1 | while (iterator.hasNext()) {↵ | |
2 | ValueTick tick = (ValueTick) iterator.next();↵ | 2 | ValueTick tick = (ValueTick) iterator.next();↵ | |
3 | double current = tick.getValue();↵ | 3 | double current = tick.getValue();↵ | |
4 | if (fillBand) {↵ | 4 | if (fillBand) {↵ | |
5 | getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,↵ | 5 | getRenderer().fillRangeGridBand(g2, this, axis, dataArea,↵ | |
6 | previous, current);↵ | 6 | previous, current);↵ | |
7 | }↵ | 7 | }↵ | |
8 | previous = current;↵ | 8 | previous = current;↵ | |
9 | fillBand = !fillBand;↵ | 9 | fillBand = !fillBand;↵ | |
10 | } | 10 |
| |
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 declared in the same class |
Number of node comparisons | 30 |
Number of mapped statements | 7 |
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) | 25.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | while (iterator.hasNext()) | 7 | while (iterator.hasNext()) | ||||||||||||||||||
8 | ValueTick tick = (ValueTick)iterator.next(); | 8 | ValueTick tick = (ValueTick)iterator.next(); | ||||||||||||||||||
9 | double current = tick.getValue(); | 9 | double current = tick.getValue(); | ||||||||||||||||||
10 | if (fillBand) | 10 | if (fillBand) | ||||||||||||||||||
11 | getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea, previous, current); |
| 11 | getRenderer().fillRangeGridBand(g2, this, axis, dataArea, previous, current); | |||||||||||||||||
12 | previous = current; | 12 | previous = current; | ||||||||||||||||||
13 | fillBand = !fillBand; | 13 | fillBand = !fillBand; |
Row | Violation |
---|---|
1 | Expression getRenderer().fillDomainGridBand(g2,this,xAxis,dataArea,previous,current) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression getRenderer().fillRangeGridBand(g2,this,axis,dataArea,previous,current) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression getRenderer().fillDomainGridBand(g2,this,xAxis,dataArea,previous,current) is a void method call, and thus it cannot be parameterized |
4 | Expression getRenderer().fillRangeGridBand(g2,this,axis,dataArea,previous,current) is a void method call, and thus it cannot be parameterized |
5 | Clone fragment #1 returns variables fillBand, previous , while Clone fragment #2 returns variables fillBand, previous |