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: 6 | Number of AST nodes: 6 | |||
1 | ValueTick tick = (ValueTick) iterator.next();↵ | 1 | ValueTick tick = (ValueTick) iterator.next();↵ | |
2 | double current = tick.getValue();↵ | 2 | double current = tick.getValue();↵ | |
3 | if (fillBand) {↵ | 3 | if (fillBand) {↵ | |
4 | getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,↵ | 4 | getRenderer().fillRangeGridBand(g2, this, axis, dataArea,↵ | |
5 | previous, current);↵ | 5 | previous, current);↵ | |
6 | }↵ | 6 | }↵ | |
7 | previous = current;↵ | 7 | previous = current;↵ | |
8 | fillBand = !fillBand; | 8 |
| |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 21 |
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) | 4.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |