File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/CandlestickRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/title/TextTitle.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 26 | Number of AST nodes: 24 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof CandlestickRenderer)) {↵ | 4 | if (!(obj instanceof TextTitle)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | CandlestickRenderer that = (CandlestickRenderer) obj;↵ | 7 | ↵ | |
8 | if (this.candleWidth != that.candleWidth↵ | 8 | TextTitle that = (TextTitle) obj;↵ | |
9 | ) {↵ | 9 | if (!ObjectUtilities.equal(this.text, that.text)) {↵ | |
10 | return false;↵ | 10 | return false;↵ | |
11 | }↵ | 11 | }↵ | |
12 | if (!PaintUtilities.equal(this.upPaint, that.upPaint)) {↵ | 12 | if (!ObjectUtilities.equal(this.font, that.font)) {↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (!PaintUtilities.equal(this.downPaint, that.downPaint)) {↵ | 15 | if (!PaintUtilities.equal(this.paint, that.paint)) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (this.drawVolume != that.drawVolume) {↵ | 18 | if (this.textAlignment != that.textAlignment) {↵ | |
19 | return false;↵ | 19 | return false;↵ | |
20 | }↵ | 20 | }↵ | |
21 | if (this.maxCandleWidthInMilliseconds↵ | 21 | if (↵ | |
22 | != that.maxCandleWidthInMilliseconds) {↵ | 22 | !PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) {↵ | |
23 | return false;↵ | 23 | return false;↵ | |
24 | }↵ | 24 | }↵ | |
25 | if (this.autoWidthMethod != that.autoWidthMethod) {↵ | 25 | if (this.maximumLinesToDisplay != that.maximumLinesToDisplay) {↵ | |
26 | return false;↵ | 26 | return false;↵ | |
27 | }↵ | 27 | }↵ | |
28 | if (this.autoWidthFactor != that.autoWidthFactor) {↵ | 28 | if (this.expandToFitSpace != that.expandToFitSpace) {↵ | |
29 | return false;↵ | 29 | return false;↵ | |
30 | }↵ | 30 | }↵ | |
31 | if (this.autoWidthGap != that.autoWidthGap) {↵ | 31 | if (↵ | |
32 | return false;↵ | |||
33 | }↵ | |||
34 | if (this.useOutlinePaint != that.useOutlinePaint) {↵ | 32 | !ObjectUtilities.equal(this.toolTipText, that.toolTipText)) {↵ | |
35 | return false;↵ | 33 | return false;↵ | |
36 | }↵ | 34 | }↵ | |
37 | if (!PaintUtilities.equal(this.volumePaint, that.volumePaint)) {↵ | 35 | if (!ObjectUtilities.equal(this.urlText, that.urlText)) {↵ | |
38 | return false;↵ | 36 | return false;↵ | |
39 | }↵ | 37 | }↵ | |
40 | return super.equals(obj); | 38 |
| |
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) | 15.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 196 |
Number of mapped statements | 17 |
Number of unmapped statements in the first code fragment | 8 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 12.3 |
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 CandlestickRenderer)) |
| 3 | if (!(obj instanceof TextTitle)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
5 | CandlestickRenderer that = (CandlestickRenderer)obj; |
| 5 | TextTitle that = (TextTitle)obj; | ||||||||||||||||||||||||||||||
|
| 6 | if (!ObjectUtilities.equal(this.text, that.text)) | |||||||||||||||||||||||||||||||
|
| 7 | return false; | |||||||||||||||||||||||||||||||
6 | if (this.candleWidth != that.candleWidth) |
| 12 | if (this.textAlignment != that.textAlignment) | ||||||||||||||||||||||||||||||
7 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
8 | if (!PaintUtilities.equal(this.upPaint, that.upPaint)) |
| 10 | if (!PaintUtilities.equal(this.paint, that.paint)) | ||||||||||||||||||||||||||||||
9 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
10 | if (!PaintUtilities.equal(this.downPaint, that.downPaint)) |
| 14 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) | ||||||||||||||||||||||||||||||
11 | return false; | 15 | return false; | |||||||||||||||||||||||||||||||
12 | if (this.drawVolume != that.drawVolume) |
| 18 | if (this.expandToFitSpace != that.expandToFitSpace) | ||||||||||||||||||||||||||||||
13 | return false; | 19 | return false; | |||||||||||||||||||||||||||||||
14 | if (this.maxCandleWidthInMilliseconds != that.maxCandleWidthInMilliseconds) |
| 16 | if (this.maximumLinesToDisplay != that.maximumLinesToDisplay) | ||||||||||||||||||||||||||||||
15 | return false; | 17 | return false; | |||||||||||||||||||||||||||||||
16 | if (this.autoWidthMethod != that.autoWidthMethod) |
| | |||||||||||||||||||||||||||||||
17 | return false; |
| | |||||||||||||||||||||||||||||||
18 | if (this.autoWidthFactor != that.autoWidthFactor) |
| | |||||||||||||||||||||||||||||||
19 | return false; |
| | |||||||||||||||||||||||||||||||
20 | if (this.autoWidthGap != that.autoWidthGap) |
| | |||||||||||||||||||||||||||||||
21 | return false; |
| | |||||||||||||||||||||||||||||||
22 | if (this.useOutlinePaint != that.useOutlinePaint) |
| | |||||||||||||||||||||||||||||||
23 | return false; |
| | |||||||||||||||||||||||||||||||
24 | if (!PaintUtilities.equal(this.volumePaint, that.volumePaint)) |
| 8 | if (!ObjectUtilities.equal(this.font, that.font)) | ||||||||||||||||||||||||||||||
25 | return false; | 9 | return false; |
Row | Violation |
---|---|
1 | Unmatched statement if(!ObjectUtilities.equal(this.text,that.text)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched return false; |
3 | Type double of variable this.candleWidth does not match with type org.jfree.ui.HorizontalAlignment of variable this.textAlignment |
4 | Expression that.candleWidth cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.textAlignment cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type double of variable that.candleWidth does not match with type org.jfree.ui.HorizontalAlignment of variable that.textAlignment |
7 | Expression that.upPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.paint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.downPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression that.backgroundPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.drawVolume cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression that.expandToFitSpace cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Type double of variable this.maxCandleWidthInMilliseconds does not match with type int of variable this.maximumLinesToDisplay |
14 | Expression that.maxCandleWidthInMilliseconds cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression that.maximumLinesToDisplay cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Type double of variable that.maxCandleWidthInMilliseconds does not match with type int of variable that.maximumLinesToDisplay |
17 | Unmatched statement if(this.autoWidthMethod != that.autoWidthMethod) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
18 | Unmatched return false; |
19 | Unmatched statement if(this.autoWidthFactor != that.autoWidthFactor) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
20 | Unmatched return false; |
21 | Unmatched statement if(this.autoWidthGap != that.autoWidthGap) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
22 | Unmatched return false; |
23 | Unmatched statement if(this.useOutlinePaint != that.useOutlinePaint) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
24 | Unmatched return false; |
25 | Type java.awt.Paint of variable this.volumePaint does not match with type java.awt.Font of variable this.font |
26 | Expression that.volumePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
27 | Expression that.font cannot be parameterized, because it has dependencies to/from statements that will be extracted |
28 | Type java.awt.Paint of variable that.volumePaint does not match with type java.awt.Font of variable that.font |
29 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ObjectUtilities |
30 | Clone fragment #1 returns variable that with type org.jfree.chart.renderer.xy.CandlestickRenderer , while Clone fragment #2 returns variable that with type org.jfree.chart.title.TextTitle |
31 | Not all possible execution flows end in a return statement |
32 | The refactoring of the clones is infeasible, because classes org.jfree.chart.renderer.xy.CandlestickRenderer and org.jfree.chart.title.TextTitle do not have a common superclass |