File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/GanttRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/HighLowRenderer.java | |||
Method name: void drawTasks(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, GanttCategoryDataset, int, int)
|
Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (plot.getOrientation() == PlotOrientation.HORIZONTAL) {↵ | 1 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | |
2 | bar = new Rectangle2D.Double(translatedValue0, rectStart,↵ | 2 | ↵ | |
3 | rectLength, rectBreadth);↵ | |||
4 | }↵ | |||
3 | g2.draw(new Line2D.Double(yy0, xx0, yy, xx));↵ | |||
4 | }↵ | |||
5 | else if (plot.getOrientation() == PlotOrientation.VERTICAL) {↵ | 5 | else if (orientation == PlotOrientation.VERTICAL) {↵ | |
6 | bar = new Rectangle2D.Double(rectStart, translatedValue0,↵ | 6 | ↵ | |
7 | rectBreadth, rectLength);↵ | |||
7 | g2.draw(new Line2D.Double(xx0, yy0, xx, yy));↵ | |||
8 | } | 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) | 1.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 14 |
Number of mapped statements | 2 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
22 | if (plot.getOrientation() == PlotOrientation.HORIZONTAL) |
| 62 | if (orientation == PlotOrientation.HORIZONTAL) | |||||||||||
23 | bar = new Rectangle2D.Double(translatedValue0, rectStart, rectLength, rectBreadth); |
| | ||||||||||||
| 63 | g2.draw(new Line2D.Double(yy0, xx0, yy, xx)); | |||||||||||||
24 | else if (plot.getOrientation() == PlotOrientation.VERTICAL) |
| 64 | else if (orientation == PlotOrientation.VERTICAL) | |||||||||||
25 | bar = new Rectangle2D.Double(rectStart, translatedValue0, rectBreadth, rectLength); |
| | ||||||||||||
| 65 | g2.draw(new Line2D.Double(xx0, yy0, xx, yy)); |
Row | Violation |
---|---|
1 | Unmatched statement bar=new Rectangle2D.Double(translatedValue0,rectStart,rectLength,rectBreadth); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Expression plot.getOrientation() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement bar=new Rectangle2D.Double(rectStart,translatedValue0,rectBreadth,rectLength); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |