File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/WaterfallBarRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/HighLowRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 18 | |||
1 | if (obj == this) {↵ | 1 | if (this == obj) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!super.equals(obj)) {↵ | 4 | if (!(obj instanceof HighLowRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!(obj instanceof WaterfallBarRenderer)) {↵ | 7 | ↵ | |
8 | return false;↵ | |||
9 | }↵ | |||
10 | WaterfallBarRenderer that = (WaterfallBarRenderer) obj;↵ | 8 | HighLowRenderer that = (HighLowRenderer) obj;↵ | |
9 | if (this.drawOpenTicks != that.drawOpenTicks) {↵ | |||
10 | return false;↵ | |||
11 | }↵ | |||
12 | if (this.drawCloseTicks != that.drawCloseTicks) {↵ | |||
13 | return false;↵ | |||
14 | }↵ | |||
11 | if (!PaintUtilities.equal(this.firstBarPaint, that.firstBarPaint)) {↵ | 15 | if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) {↵ | |
12 | return false;↵ | 16 | return false;↵ | |
13 | }↵ | 17 | }↵ | |
14 | if (!PaintUtilities.equal(this.lastBarPaint, that.lastBarPaint)) {↵ | 18 | if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) {↵ | |
15 | return false;↵ | 19 | return false;↵ | |
16 | }↵ | 20 | }↵ | |
17 | if (!PaintUtilities.equal(this.positiveBarPaint,↵ | 21 | if (↵ | |
18 | that.positiveBarPaint)) {↵ | 22 | this.tickLength != that.tickLength) {↵ | |
19 | return false;↵ | 23 | return false;↵ | |
20 | }↵ | 24 | }↵ | |
21 | if (!PaintUtilities.equal(this.negativeBarPaint,↵ | 25 | if (!↵ | |
22 | that.negativeBarPaint)) {↵ | 26 | super.equals(obj)) {↵ | |
23 | return false;↵ | 27 | return false;↵ | |
24 | }↵ | 28 | }↵ | |
25 | return true; | 29 |
| |
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) | 5.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 87 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 6 |
Time elapsed for statement mapping (ms) | 6.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (!super.equals(obj)) |
| 16 | if (!super.equals(obj)) | ||||||||||||||||||
4 | return false; | 17 | return false; | |||||||||||||||||||
5 | if (!(obj instanceof WaterfallBarRenderer)) |
| 3 | if (!(obj instanceof HighLowRenderer)) | ||||||||||||||||||
6 | return false; | 4 | return false; | |||||||||||||||||||
7 | WaterfallBarRenderer that = (WaterfallBarRenderer)obj; |
| 5 | HighLowRenderer that = (HighLowRenderer)obj; | ||||||||||||||||||
|
| 6 | if (this.drawOpenTicks != that.drawOpenTicks) | |||||||||||||||||||
|
| 7 | return false; | |||||||||||||||||||
|
| 8 | if (this.drawCloseTicks != that.drawCloseTicks) | |||||||||||||||||||
|
| 9 | return false; | |||||||||||||||||||
8 | if (!PaintUtilities.equal(this.firstBarPaint, that.firstBarPaint)) |
| 10 | if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) | ||||||||||||||||||
9 | return false; | 11 | return false; | |||||||||||||||||||
10 | if (!PaintUtilities.equal(this.lastBarPaint, that.lastBarPaint)) |
| 12 | if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) | ||||||||||||||||||
11 | return false; | 13 | return false; | |||||||||||||||||||
|
| 14 | if (this.tickLength != that.tickLength) | |||||||||||||||||||
|
| 15 | return false; |
Row | Violation |
---|---|
1 | Super method call if(!super.equals(obj)) cannot be extracted from method |
2 | Super method call if(!super.equals(obj)) cannot be extracted from method |
3 | Unmatched statement if(this.drawOpenTicks != that.drawOpenTicks) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched return false; |
5 | Unmatched statement if(this.drawCloseTicks != that.drawCloseTicks) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched return false; |
7 | Expression that.firstBarPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.openTickPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.lastBarPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression that.closeTickPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Unmatched statement if(this.tickLength != that.tickLength) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
12 | Unmatched return false; |
13 | Clone fragment #1 returns variable that with type org.jfree.chart.renderer.category.WaterfallBarRenderer , while Clone fragment #2 returns variable that with type org.jfree.chart.renderer.xy.HighLowRenderer |
14 | Not all possible execution flows end in a return statement |