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 drawDomainGridlines(Graphics2D, Rectangle2D)
|
Method name: void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | int columnCount = data.getColumnCount();↵ | |||
2 | for (int c = 0; c < columnCount; c++) {↵ | 1 | for (int i = 0; i < rendererCount; i++) {↵ | |
3 | double xx = axis.getCategoryJava2DCoordinate(↵ | 2 | ↵ | |
4 | anchor, c, columnCount, dataArea,↵ | |||
5 | domainAxisEdge);↵ | |||
6 | CategoryItemRenderer renderer1 = getRenderer();↵ | |||
7 | if (renderer1 != null) {↵ | |||
8 | renderer1.drawDomainGridline(g2, this,↵ | |||
9 | dataArea, xx);↵ | |||
10 | }↵ | |||
11 | ↵ | 3 | XYItemRenderer r = getRenderer(i);↵ | |
4 | if (r != null) {↵ | |||
5 | ValueAxis domainAxis = getDomainAxisForDataset(i);↵ | |||
6 | ValueAxis rangeAxis = getRangeAxisForDataset(i);↵ | |||
7 | r.drawAnnotations(g2, dataArea, domainAxis, rangeAxis,↵ | |||
8 | Layer.BACKGROUND, info);↵ | |||
9 | }↵ | |||
12 | } | 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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 15 |
Number of mapped statements | 4 |
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) | 78.5 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11 | int columnCount = data.getColumnCount(); | | ||||||||||||||||||||||||||||||
12 | for (int c = 0; c < columnCount; c++) |
| 71 | for (int i = 0; i < rendererCount; i++) | ||||||||||||||||||||||||||||
13 | double xx = axis.getCategoryJava2DCoordinate(anchor, c, columnCount, dataArea, domainAxisEdge); |
| | |||||||||||||||||||||||||||||
14 | CategoryItemRenderer renderer1 = getRenderer(); |
| 72 | XYItemRenderer r = getRenderer(i); | ||||||||||||||||||||||||||||
15 | if (renderer1 != null) |
| 73 | if (r != null) | ||||||||||||||||||||||||||||
|
| 74 | ValueAxis domainAxis = getDomainAxisForDataset(i); | |||||||||||||||||||||||||||||
|
| 75 | ValueAxis rangeAxis = getRangeAxisForDataset(i); | |||||||||||||||||||||||||||||
16 | renderer1.drawDomainGridline(g2, this, dataArea, xx); |
| 76 | r.drawAnnotations(g2, dataArea, domainAxis, rangeAxis, Layer.BACKGROUND, info); |
Row | Violation |
---|---|
1 | Unmatched statement double xx=axis.getCategoryJava2DCoordinate(anchor,c,columnCount,dataArea,domainAxisEdge); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression getRenderer(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement ValueAxis domainAxis=getDomainAxisForDataset(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement ValueAxis domainAxis=getDomainAxisForDataset(i); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
5 | Unmatched statement ValueAxis rangeAxis=getRangeAxisForDataset(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement ValueAxis rangeAxis=getRangeAxisForDataset(i); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
7 | Expression renderer1.drawDomainGridline(g2,this,dataArea,xx) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression r.drawAnnotations(g2,dataArea,domainAxis,rangeAxis,Layer.BACKGROUND,info) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression renderer1.drawDomainGridline(g2,this,dataArea,xx) is a void method call, and thus it cannot be parameterized |
10 | Expression r.drawAnnotations(g2,dataArea,domainAxis,rangeAxis,Layer.BACKGROUND,info) is a void method call, and thus it cannot be parameterized |
11 | Expression renderer1 cannot be unified with expression r , because common superclass org.jfree.chart.LegendItemSource does not declare member(s) public abstract void drawDomainGridline(java.awt.Graphics2D, org.jfree.chart.plot.CategoryPlot, java.awt.geom.Rectangle2D, double) , public abstract void drawAnnotations(java.awt.Graphics2D, java.awt.geom.Rectangle2D, org.jfree.chart.axis.ValueAxis, org.jfree.chart.axis.ValueAxis, org.jfree.ui.Layer, org.jfree.chart.plot.PlotRenderingInfo) |
12 | Expression renderer1.drawDomainGridline(g2,this,dataArea,xx) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression r.drawAnnotations(g2,dataArea,domainAxis,rangeAxis,Layer.BACKGROUND,info) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression renderer1.drawDomainGridline(g2,this,dataArea,xx) is a void method call, and thus it cannot be parameterized |
15 | Expression r.drawAnnotations(g2,dataArea,domainAxis,rangeAxis,Layer.BACKGROUND,info) is a void method call, and thus it cannot be parameterized |