File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CategoryLabelPositions.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedRangeXYPlot.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | if (this == obj) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof CategoryLabelPositions)) {↵ | 4 | if (!(obj instanceof CombinedRangeXYPlot)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | CategoryLabelPositions that = (CategoryLabelPositions) obj;↵ | |||
8 | if (!this.positionForAxisAtTop.equals(that.positionForAxisAtTop)) {↵ | |||
9 | return false;↵ | |||
10 | }↵ | |||
11 | if (!this.positionForAxisAtBottom.equals(↵ | |||
12 | that.positionForAxisAtBottom↵ | 7 | if (!super.equals(obj)) {↵ | |
8 | return false;↵ | |||
9 | }↵ | |||
10 | CombinedRangeXYPlot that = (CombinedRangeXYPlot) obj;↵ | |||
13 | )) {↵ | 11 | if (!ObjectUtilities.equal(this.subplots, that.subplots)) {↵ | |
14 | return false;↵ | 12 | return false;↵ | |
15 | }↵ | 13 | }↵ | |
16 | if (!this.positionForAxisAtLeft.equals(that.positionForAxisAtLeft)) {↵ | 14 | if (this.totalWeight != that.totalWeight) {↵ | |
17 | return false;↵ | 15 | return false;↵ | |
18 | }↵ | 16 | }↵ | |
19 | if (!this.positionForAxisAtRight.equals(that.positionForAxisAtRight)) {↵ | 17 | if (this.gap != that.gap) {↵ | |
20 | return false;↵ | 18 | return false;↵ | |
21 | }↵ | 19 | }↵ | |
22 | ↵ | |||
23 | return true; | 20 |
| |
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) | 1.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 55 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 6.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (!(obj instanceof CategoryLabelPositions)) |
| 3 | if (!(obj instanceof CombinedRangeXYPlot)) | ||||||||||||
4 | return false; | 4 | return false; | |||||||||||||
5 | CategoryLabelPositions that = (CategoryLabelPositions)obj; | | ||||||||||||||
6 | if (!this.positionForAxisAtTop.equals(that.positionForAxisAtTop)) |
| 5 | if (!super.equals(obj)) | ||||||||||||
7 | return false; | 6 | return false; | |||||||||||||
| 7 | CombinedRangeXYPlot that = (CombinedRangeXYPlot)obj; | ||||||||||||||
8 | if (!this.positionForAxisAtBottom.equals(that.positionForAxisAtBottom)) |
| 8 | if (!ObjectUtilities.equal(this.subplots, that.subplots)) | ||||||||||||
9 | return false; | 9 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.axis.CategoryLabelPositions does not match with type org.jfree.chart.plot.CombinedRangeXYPlot |
2 | Expression this.positionForAxisAtTop.equals(that.positionForAxisAtTop) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Super method call if(!super.equals(obj)) cannot be extracted from method |
4 | Expression this.positionForAxisAtBottom.equals(that.positionForAxisAtBottom) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression ObjectUtilities.equal(this.subplots,that.subplots) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Not all possible execution flows end in a return statement |