File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BarRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYBarRenderer.java | |||
Method name: void drawItemLabel(Graphics2D, CategoryDataset, int, int, CategoryPlot, CategoryItemLabelGenerator, Rectangle2D, boolean)
|
Method name: void drawItemLabel(Graphics2D, XYDataset, int, int, XYPlot, XYItemLabelGenerator, Rectangle2D, boolean)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (!negative) {↵ | 1 | if (!negative) {↵ | |
2 | position = getPositiveItemLabelPositionFallback();↵ | 2 | position = getPositiveItemLabelPositionFallback();↵ | |
3 | }↵ | 3 | }↵ | |
4 | else {↵ | 4 | else {↵ | |
5 | position = getNegativeItemLabelPositionFallback();↵ | 5 | position = getNegativeItemLabelPositionFallback();↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (position != null) {↵ | 7 | if (position != null) {↵ | |
8 | anchorPoint = calculateLabelAnchorPoint(↵ | 8 | anchorPoint = calculateLabelAnchorPoint(↵ | |
9 | position.getItemLabelAnchor(), bar,↵ | 9 | position.getItemLabelAnchor(), bar, ↵ | |
10 | plot.getOrientation());↵ | 10 | plot.getOrientation());↵ | |
11 | } | 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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 16 |
Number of mapped statements | 5 |
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) | 6.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17 | if (!negative) | 19 | if (!negative) | ||||||||||||
18 | position = getPositiveItemLabelPositionFallback(); | 20 | position = getPositiveItemLabelPositionFallback(); | ||||||||||||
else | else | ||||||||||||||
19 | position = getNegativeItemLabelPositionFallback(); | 21 | position = getNegativeItemLabelPositionFallback(); | ||||||||||||
20 | if (position != null) | 22 | if (position != null) | ||||||||||||
21 | anchorPoint = calculateLabelAnchorPoint(position.getItemLabelAnchor(), bar, plot.getOrientation()); |
| 23 | anchorPoint = calculateLabelAnchorPoint(position.getItemLabelAnchor(), bar, plot.getOrientation()); |
Row | Violation |
---|---|
1 | Expression plot cannot be unified with expression plot , because common superclass org.jfree.chart.plot.Plot does not declare member(s) public org.jfree.chart.plot.PlotOrientation getOrientation() |
2 | Clone fragment #1 returns variables position, anchorPoint , while Clone fragment #2 returns variables position, anchorPoint |