File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/ValueAxis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYAreaRenderer.java | |||
Method name: AxisState drawTickMarksAndLabels(Graphics2D, double, Rectangle2D, Rectangle2D, RectangleEdge)
|
Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (edge == RectangleEdge.TOP) {↵ | 1 | shape = ↵ | |
2 | used = findMaximumTickLabelHeight(ticks, g2, plotArea,↵ | |||
3 | isVerticalTickLabels());↵ | |||
4 | state.cursorUp(used);↵ | |||
5 | }↵ | |||
6 | else if (edge == RectangleEdge.BOTTOM) {↵ | |||
7 | used = findMaximumTickLabelHeight(ticks, g2, plotArea,↵ | |||
8 | isVerticalTickLabels());↵ | |||
9 | state.cursorDown(used);↵ | |||
10 | } | 2 | getItemShape(series, item);↵ | |
3 | if (orientation == PlotOrientation.VERTICAL) {↵ | |||
4 | shape = ShapeUtilities.createTranslatedShape(shape, transX1, ↵ | |||
5 | transY1);↵ | |||
6 | }↵ | |||
7 | else if (orientation == PlotOrientation.HORIZONTAL) {↵ | |||
8 | shape = ShapeUtilities.createTranslatedShape(shape, transY1, ↵ | |||
9 | transX1);↵ | |||
10 | }↵ | |||
11 |
| |||
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.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 20 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 5.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 56 | shape = getItemShape(series, item); | ||||||||||||||||||||||||||
38 | if (edge == RectangleEdge.TOP) |
| 57 | if (orientation == PlotOrientation.VERTICAL) | |||||||||||||||||||||||||
39 | used = findMaximumTickLabelHeight(ticks, g2, plotArea, isVerticalTickLabels()); |
| | ||||||||||||||||||||||||||
40 | state.cursorUp(used); |
| | ||||||||||||||||||||||||||
|
| 58 | shape = ShapeUtilities.createTranslatedShape(shape, transX1, transY1); | ||||||||||||||||||||||||||
41 | else if (edge == RectangleEdge.BOTTOM) |
| 59 | else if (orientation == PlotOrientation.HORIZONTAL) | |||||||||||||||||||||||||
42 | used = findMaximumTickLabelHeight(ticks, g2, plotArea, isVerticalTickLabels()); |
| | ||||||||||||||||||||||||||
43 | state.cursorDown(used); |
| | ||||||||||||||||||||||||||
|
| 60 | shape = ShapeUtilities.createTranslatedShape(shape, transY1, transX1); | ||||||||||||||||||||||||||
| 61 | g2.draw(shape); |
Row | Violation |
---|---|
1 | Unmatched statement shape=getItemShape(series,item); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Type org.jfree.ui.RectangleEdge of variable edge does not match with type org.jfree.chart.plot.PlotOrientation of variable orientation |
3 | Type org.jfree.ui.RectangleEdge does not match with type org.jfree.chart.plot.PlotOrientation |
4 | Type org.jfree.ui.RectangleEdge of variable RectangleEdge.TOP does not match with type org.jfree.chart.plot.PlotOrientation of variable PlotOrientation.VERTICAL |
5 | Unmatched statement state.cursorUp(used); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Type org.jfree.ui.RectangleEdge of variable edge does not match with type org.jfree.chart.plot.PlotOrientation of variable orientation |
7 | Type org.jfree.ui.RectangleEdge does not match with type org.jfree.chart.plot.PlotOrientation |
8 | Type org.jfree.ui.RectangleEdge of variable RectangleEdge.BOTTOM does not match with type org.jfree.chart.plot.PlotOrientation of variable PlotOrientation.HORIZONTAL |
9 | Unmatched statement state.cursorDown(used); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
10 | Unmatched statement used=findMaximumTickLabelHeight(ticks,g2,plotArea,isVerticalTickLabels()); cannot be moved, because it updates a variable modified in other unmapped statements |
11 | Unmatched statement used=findMaximumTickLabelHeight(ticks,g2,plotArea,isVerticalTickLabels()); cannot be moved, because it updates a variable modified in other unmapped statements |
12 | Unmatched statement shape=ShapeUtilities.createTranslatedShape(shape,transX1,transY1); cannot be moved, because it updates a variable modified in other unmapped statements |
13 | Unmatched statement shape=ShapeUtilities.createTranslatedShape(shape,transY1,transX1); cannot be moved, because it updates a variable modified in other unmapped statements |