File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/IntervalBarRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/WaterfallBarRenderer.java | |||
Method name: void drawInterval(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, IntervalCategoryDataset, int, int)
|
Method name: void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (orientation == PlotOrientation.VERTICAL) {↵ | 1 | if (orientation == PlotOrientation.VERTICAL) {↵ | |
2 | // BAR X↵ | 2 | // BAR X↵ | |
3 | rectX = domainAxis.getCategoryStart(column, getColumnCount(),↵ | 3 | rectX = domainAxis.getCategoryStart(column, getColumnCount(),↵ | |
4 | dataArea, domainAxisLocation);↵ | 4 | dataArea, domainAxisLocation);↵ | |
5 | if (seriesCount > 1) {↵ | 5 | if (seriesCount > 1) {↵ | |
6 | double seriesGap = dataArea.getWidth() * getItemMargin()↵ | 6 | double seriesGap = dataArea.getWidth() * getItemMargin()↵ | |
7 | / (categoryCount * (seriesCount - 1));↵ | 7 | / (categoryCount * (seriesCount - 1));↵ | |
8 | rectX = rectX + row * (state.getBarWidth() + seriesGap);↵ | 8 | rectX = rectX + row * (state.getBarWidth() + seriesGap);↵ | |
9 | }↵ | 9 | }↵ | |
10 | else {↵ | 10 | else {↵ | |
11 | rectX = rectX + row * state.getBarWidth();↵ | 11 | rectX = rectX + row * state.getBarWidth();↵ | |
12 | }↵ | 12 | }↵ | |
13 | rectY = java2dValue0;↵ | 13 | rectY = j↵ | |
14 | 2dy0;↵ | |||
14 | } | 15 |
| |
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 25 |
Number of mapped statements | 7 |
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) | 2.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
34 | else if (orientation == PlotOrientation.VERTICAL) | 34 | else if (orientation == PlotOrientation.VERTICAL) | |||||||||||
35 | rectX = domainAxis.getCategoryStart(column, getColumnCount(), dataArea, domainAxisLocation); | 35 | rectX = domainAxis.getCategoryStart(column, getColumnCount(), dataArea, domainAxisLocation); | |||||||||||
36 | if (seriesCount > 1) | 36 | if (seriesCount > 1) | |||||||||||
37 | double seriesGap = dataArea.getWidth() * getItemMargin() / (categoryCount * (seriesCount - 1)); | 37 | double seriesGap = dataArea.getWidth() * getItemMargin() / (categoryCount * (seriesCount - 1)); | |||||||||||
38 | rectX = rectX + row * (state.getBarWidth() + seriesGap); | 38 | rectX = rectX + row * (state.getBarWidth() + seriesGap); | |||||||||||
else | else | |||||||||||||
39 | rectX = rectX + row * state.getBarWidth(); | 39 | rectX = rectX + row * state.getBarWidth(); | |||||||||||
40 | rectY = java2dValue0; |
| 40 | rectY = j2dy0; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables rectX, rectY , while Clone fragment #2 returns variables rectX, rectY |