File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/SymbolAxis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/entity/PieSectionEntity.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof SymbolAxis)) {↵ | 4 | if (!(obj instanceof PieSectionEntity)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | SymbolAxis that = (SymbolAxis) obj;↵ | 7 | PieSectionEntity that = (PieSectionEntity) obj;↵ | |
8 | if (!this.symbols.equals(that.symbols)) {↵ | 8 | if (!ObjectUtilities.equal(this.dataset, that.dataset)) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (this.gridBandsVisible != that.gridBandsVisible) {↵ | 11 | if (this.pieIndex != that.pieIndex) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!PaintUtilities.equal(this.gridBandPaint, that.gridBandPaint)) {↵ | 14 | if (this.sectionIndex != that.sectionIndex) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (!PaintUtilities.equal(this.gridBandAlternatePaint, ↵ | 17 | if (!ObjectUtilities.equal(this.↵ | |
18 | that.gridBandAlternatePaint)) {↵ | 18 | sectionKey, that.sectionKey)) {↵ | |
19 | return false;↵ | 19 | return false;↵ | |
20 | }↵ | 20 | }↵ | |
21 | return super.equals(obj); | 21 |
| |
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) | 3.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 64 |
Number of mapped statements | 11 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 6.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 1 | if (obj == this) | |||||||||||||||||||||||||||||||
2 | return true; | 2 | return true; | |||||||||||||||||||||||||||||||
3 | if (!(obj instanceof SymbolAxis)) |
| 3 | if (!(obj instanceof PieSectionEntity)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
5 | SymbolAxis that = (SymbolAxis)obj; |
| 5 | PieSectionEntity that = (PieSectionEntity)obj; | ||||||||||||||||||||||||||||||
6 | if (!this.symbols.equals(that.symbols)) |
| 6 | if (!ObjectUtilities.equal(this.dataset, that.dataset)) | ||||||||||||||||||||||||||||||
7 | return false; | 7 | return false; | |||||||||||||||||||||||||||||||
8 | if (this.gridBandsVisible != that.gridBandsVisible) |
| 8 | if (this.pieIndex != that.pieIndex) | ||||||||||||||||||||||||||||||
9 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
|
| 10 | if (this.sectionIndex != that.sectionIndex) | |||||||||||||||||||||||||||||||
|
| 11 | return false; | |||||||||||||||||||||||||||||||
10 | if (!PaintUtilities.equal(this.gridBandPaint, that.gridBandPaint)) |
| 12 | if (!ObjectUtilities.equal(this.sectionKey, that.sectionKey)) | ||||||||||||||||||||||||||||||
11 | return false; | 13 | return false; |
Row | Violation |
---|---|
1 | Expression this.symbols.equals(that.symbols) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ObjectUtilities.equal(this.dataset,that.dataset) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type boolean of variable this.gridBandsVisible does not match with type int of variable this.pieIndex |
4 | Expression that.gridBandsVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.pieIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type boolean of variable that.gridBandsVisible does not match with type int of variable that.pieIndex |
7 | Unmatched statement if(this.sectionIndex != that.sectionIndex) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | Unmatched return false; |
9 | Type java.awt.Paint of variable this.gridBandPaint does not match with type java.lang.Comparable of variable this.sectionKey |
10 | Expression that.gridBandPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.sectionKey cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type java.awt.Paint of variable that.gridBandPaint does not match with type java.lang.Comparable of variable that.sectionKey |
13 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ObjectUtilities |
14 | Clone fragment #1 returns variable that with type org.jfree.chart.axis.SymbolAxis , while Clone fragment #2 returns variable that with type org.jfree.chart.entity.PieSectionEntity |
15 | Not all possible execution flows end in a return statement |
16 | The refactoring of the clones is infeasible, because classes org.jfree.chart.axis.SymbolAxis and org.jfree.chart.entity.PieSectionEntity do not have a common superclass |