File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedDomainXYPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedRangeCategoryPlot.java | |||
Method name: AxisSpace calculateAxisSpace(Graphics2D, Rectangle2D)
|
Method name: AxisSpace calculateAxisSpace(Graphics2D, Rectangle2D)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | if (fixed != null) {↵ | 1 | if (fixed != null) {↵ | |
2 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | 2 | if (orientation == PlotOrientation.VERTICAL) {↵ | |
3 | space.setLeft(fixed.getLeft());↵ | 3 | space.setLeft(fixed.getLeft());↵ | |
4 | space.setRight(fixed.getRight());↵ | 4 | space.setRight(fixed.getRight());↵ | |
5 | }↵ | 5 | }↵ | |
6 | else if (orientation == PlotOrientation.VERTICAL) {↵ | 6 | else if (orientation == PlotOrientation.HORIZONTAL) {↵ | |
7 | space.setTop(fixed.getTop());↵ | 7 | space.setTop(fixed.getTop());↵ | |
8 | space.setBottom(fixed.getBottom());↵ | 8 | space.setBottom(fixed.getBottom()); ↵ | |
9 | }↵ | 9 | }↵ | |
10 | }↵ | 10 | }↵ | |
11 | else {↵ | 11 | else {↵ | |
12 | ValueAxis xAxis = getDomainAxis();↵ | 12 | ValueAxis valueAxis = getRangeAxis();↵ | |
13 | RectangleEdge xEdge = Plot.resolveDomainAxisLocation(↵ | 13 | RectangleEdge valueEdge = Plot.resolveRangeAxisLocation(↵ | |
14 | getDomainAxisLocation(), orientation);↵ | 14 | getRangeAxisLocation(), orientation);↵ | |
15 | if (xAxis != null) {↵ | 15 | if (valueAxis != null) {↵ | |
16 | space = xAxis.reserveSpace(g2, this, plotArea, xEdge,↵ | 16 | space = valueAxis.reserveSpace(g2, this, plotArea, valueEdge, ↵ | |
17 | space);↵ | 17 | space);↵ | |
18 | }↵ | 18 | }↵ | |
19 | } | 19 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.8 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 50 |
Number of mapped statements | 11 |
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) | 3.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | if (fixed != null) | 4 | if (fixed != null) | |||||||||||||||||
5 | if (orientation == PlotOrientation.HORIZONTAL) |
| 5 | if (orientation == PlotOrientation.VERTICAL) | ||||||||||||||||
6 | space.setLeft(fixed.getLeft()); | 6 | space.setLeft(fixed.getLeft()); | |||||||||||||||||
7 | space.setRight(fixed.getRight()); | 7 | space.setRight(fixed.getRight()); | |||||||||||||||||
8 | else if (orientation == PlotOrientation.VERTICAL) |
| 8 | else if (orientation == PlotOrientation.HORIZONTAL) | ||||||||||||||||
9 | space.setTop(fixed.getTop()); | 9 | space.setTop(fixed.getTop()); | |||||||||||||||||
10 | space.setBottom(fixed.getBottom()); | 10 | space.setBottom(fixed.getBottom()); | |||||||||||||||||
else | else | |||||||||||||||||||
11 | ValueAxis xAxis = getDomainAxis(); |
| 11 | ValueAxis valueAxis = getRangeAxis(); | ||||||||||||||||
12 | RectangleEdge xEdge = Plot.resolveDomainAxisLocation(getDomainAxisLocation(), orientation); |
| 12 | RectangleEdge valueEdge = Plot.resolveRangeAxisLocation(getRangeAxisLocation(), orientation); | ||||||||||||||||
13 | if (xAxis != null) |
| 13 | if (valueAxis != null) | ||||||||||||||||
14 | space = xAxis.reserveSpace(g2, this, plotArea, xEdge, space); |
| 14 | space = valueAxis.reserveSpace(g2, this, plotArea, valueEdge, space); |
Row | Violation |
---|