File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedDomainXYPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedRangeXYPlot.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 | );↵ | 15 | );↵ | |
16 | if (xAxis != null) {↵ | 16 | if (valueAxis != null) {↵ | |
17 | space = xAxis.reserveSpace(g2, this, plotArea, xEdge,↵ | 17 | space = valueAxis.reserveSpace(g2, this, plotArea, valueEdge,↵ | |
18 | space);↵ | 18 | space);↵ | |
19 | }↵ | 19 | }↵ | |
20 | } | 20 |
| |
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.9 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 45 |
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) | 80.1 |
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 |
---|---|
1 | Expression Plot.resolveDomainAxisLocation(getDomainAxisLocation(),orientation) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
2 | Expression Plot.resolveRangeAxisLocation(getRangeAxisLocation(),orientation) is a method call throwing exception(s) that should be caught by a try block that will be extracted |