File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java | |||
Method name: AxisSpace calculateRangeAxisSpace(Graphics2D, Rectangle2D, AxisSpace)
|
Method name: AxisSpace calculateDomainAxisSpace(Graphics2D, Rectangle2D, AxisSpace)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | if (this.fixedRangeAxisSpace != null) {↵ | 1 | if (this.fixedDomainAxisSpace != null) {↵ | |
2 | if (this.orientation == PlotOrientation.HORIZONTAL) {↵ | 2 | if (this.orientation == PlotOrientation.HORIZONTAL) {↵ | |
3 | space.ensureAtLeast(this.fixedRangeAxisSpace.getTop(),↵ | 3 | space.ensureAtLeast(this.fixedDomainAxisSpace.getLeft(),↵ | |
4 | RectangleEdge.TOP);↵ | 4 | RectangleEdge.LEFT);↵ | |
5 | space.ensureAtLeast(this.fixedRangeAxisSpace.getBottom(),↵ | 5 | space.ensureAtLeast(this.fixedDomainAxisSpace.getRight(),↵ | |
6 | RectangleEdge.BOTTOM);↵ | 6 | RectangleEdge.RIGHT);↵ | |
7 | }↵ | 7 | }↵ | |
8 | else if (this.orientation == PlotOrientation.VERTICAL) {↵ | 8 | else if (this.orientation == PlotOrientation.VERTICAL) {↵ | |
9 | space.ensureAtLeast(this.fixedRangeAxisSpace.getLeft(),↵ | 9 | space.ensureAtLeast(this.fixedDomainAxisSpace.getTop(),↵ | |
10 | RectangleEdge.LEFT);↵ | 10 | RectangleEdge.TOP);↵ | |
11 | space.ensureAtLeast(this.fixedRangeAxisSpace.getRight(),↵ | 11 | space.ensureAtLeast(this.fixedDomainAxisSpace.getBottom(),↵ | |
12 | RectangleEdge.RIGHT);↵ | 12 | RectangleEdge.BOTTOM);↵ | |
13 | }↵ | 13 | }↵ | |
14 | }↵ | 14 | }↵ | |
15 | else {↵ | 15 | else {↵ | |
16 | // reserve space for the range axes (if any)...↵ | 16 | // reserve space for the domain axes...↵ | |
17 | for (int i = 0; i < this.rangeAxes.size(); i++) {↵ | 17 | for (int i = 0; i < this.domainAxes.size(); i++) {↵ | |
18 | Axis yAxis = (Axis) this.rangeAxes.get(i);↵ | 18 | Axis axis = (Axis) this.domainAxes.get(i);↵ | |
19 | if (yAxis != null) {↵ | 19 | if (axis != null) {↵ | |
20 | RectangleEdge edge = getRangeAxisEdge(i);↵ | 20 | RectangleEdge edge = getDomainAxisEdge(i);↵ | |
21 | space = yAxis.reserveSpace(g2, this, plotArea, edge, space);↵ | 21 | space = axis.reserveSpace(g2, this, plotArea, edge, space);↵ | |
22 | }↵ | 22 | }↵ | |
23 | }↵ | 23 | }↵ | |
24 | } | 24 |
| |
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) | 3.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 46 |
Number of mapped statements | 12 |
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) | 29.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (this.fixedRangeAxisSpace != null) |
| 3 | if (this.fixedDomainAxisSpace != null) | |||||||||||||
4 | if (this.orientation == PlotOrientation.HORIZONTAL) |
| 7 | if (this.orientation == PlotOrientation.VERTICAL) | |||||||||||||
5 | space.ensureAtLeast(this.fixedRangeAxisSpace.getTop(), RectangleEdge.TOP); |
| 8 | space.ensureAtLeast(this.fixedDomainAxisSpace.getTop(), RectangleEdge.TOP); | |||||||||||||
6 | space.ensureAtLeast(this.fixedRangeAxisSpace.getBottom(), RectangleEdge.BOTTOM); |
| 9 | space.ensureAtLeast(this.fixedDomainAxisSpace.getBottom(), RectangleEdge.BOTTOM); | |||||||||||||
7 | else if (this.orientation == PlotOrientation.VERTICAL) |
| 4 | else if (this.orientation == PlotOrientation.HORIZONTAL) | |||||||||||||
8 | space.ensureAtLeast(this.fixedRangeAxisSpace.getLeft(), RectangleEdge.LEFT); |
| 5 | space.ensureAtLeast(this.fixedDomainAxisSpace.getLeft(), RectangleEdge.LEFT); | |||||||||||||
9 | space.ensureAtLeast(this.fixedRangeAxisSpace.getRight(), RectangleEdge.RIGHT); |
| 6 | space.ensureAtLeast(this.fixedDomainAxisSpace.getRight(), RectangleEdge.RIGHT); | |||||||||||||
else | else | ||||||||||||||||
10 | for (int i = 0; i < this.rangeAxes.size(); i++) |
| 10 | for (int i = 0; i < this.domainAxes.size(); i++) | |||||||||||||
11 | Axis yAxis = (Axis)this.rangeAxes.get(i); |
| 11 | Axis axis = (Axis)this.domainAxes.get(i); | |||||||||||||
12 | if (yAxis != null) |
| 12 | if (axis != null) | |||||||||||||
13 | RectangleEdge edge = getRangeAxisEdge(i); |
| 13 | RectangleEdge edge = getDomainAxisEdge(i); | |||||||||||||
14 | space = yAxis.reserveSpace(g2, this, plotArea, edge, space); |
| 14 | space = axis.reserveSpace(g2, this, plotArea, edge, space); |
Row | Violation |
---|---|
1 | Expression getRangeAxisEdge(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression getDomainAxisEdge(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted |