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: 14 | Number of AST nodes: 14 | |||
1 | boolean fillBand = false;↵ | 1 | boolean fillBand = false;↵ | |
2 | ValueAxis xAxis = getDomainAxis();↵ | 2 | ValueAxis axis = getRangeAxis();↵ | |
3 | double previous = xAxis.getLowerBound();↵ | 3 | double previous = axis.getLowerBound();↵ | |
4 | Iterator iterator = ticks.iterator();↵ | 4 | Iterator iterator = ticks.iterator();↵ | |
5 | while (iterator.hasNext()) {↵ | 5 | while (iterator.hasNext()) {↵ | |
6 | ValueTick tick = (ValueTick) iterator.next();↵ | 6 | ValueTick tick = (ValueTick) iterator.next();↵ | |
7 | double current = tick.getValue();↵ | 7 | double current = tick.getValue();↵ | |
8 | if (fillBand) {↵ | 8 | if (fillBand) {↵ | |
9 | getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,↵ | 9 | getRenderer().fillRangeGridBand(g2, this, axis, dataArea,↵ | |
10 | previous, current);↵ | 10 | previous, current);↵ | |
11 | }↵ | 11 | }↵ | |
12 | previous = current;↵ | 12 | previous = current;↵ | |
13 | fillBand = !fillBand;↵ | 13 | fillBand = !fillBand;↵ | |
14 | }↵ | 14 | }↵ | |
15 | double end = xAxis.getUpperBound();↵ | 15 | double end = axis.getUpperBound();↵ | |
16 | if (fillBand) {↵ | 16 | if (fillBand) {↵ | |
17 | getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,↵ | 17 | getRenderer().fillRangeGridBand(g2, this, axis, dataArea,↵ | |
18 | previous, end);↵ | 18 | previous, end);↵ | |
19 | } | 19 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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 | 59 |
Number of mapped statements | 14 |
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) | 28.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | boolean fillBand = false; | 3 | boolean fillBand = false; | ||||||||||||||||||
4 | ValueAxis xAxis = getDomainAxis(); |
| 4 | ValueAxis axis = getRangeAxis(); | |||||||||||||||||
5 | double previous = xAxis.getLowerBound(); |
| 5 | double previous = axis.getLowerBound(); | |||||||||||||||||
6 | Iterator iterator = ticks.iterator(); | 6 | Iterator iterator = ticks.iterator(); | ||||||||||||||||||
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; | ||||||||||||||||||
14 | double end = xAxis.getUpperBound(); |
| 14 | double end = axis.getUpperBound(); | |||||||||||||||||
15 | if (fillBand) | 15 | if (fillBand) | ||||||||||||||||||
16 | getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea, previous, end); |
| 16 | getRenderer().fillRangeGridBand(g2, this, axis, dataArea, previous, end); |
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 | Expression getRenderer().fillDomainGridBand(g2,this,xAxis,dataArea,previous,end) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression getRenderer().fillRangeGridBand(g2,this,axis,dataArea,previous,end) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression getRenderer().fillDomainGridBand(g2,this,xAxis,dataArea,previous,end) is a void method call, and thus it cannot be parameterized |
8 | Expression getRenderer().fillRangeGridBand(g2,this,axis,dataArea,previous,end) is a void method call, and thus it cannot be parameterized |