File path: /jruby-1.4.0/src/org/jruby/runtime/Block.java | File path: /jruby-1.4.0/src/org/jruby/runtime/Binding.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if(this == other) {↵ | 1 | if(this == other) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if(!(other instanceof Block)) {↵ | 4 | if(!(other instanceof Binding)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | Block bOther = (Block)other;↵ | 7 | Binding bOther = (Binding)other;↵ | |
8 | return this.binding.equals(bOther.binding) &&↵ | 8 | return this.self == bOther.self &&↵ | |
9 | this.body == bOther.body; | 9 | this.dynamicScope == bOther.dynamicScope; | |
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) | 0.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 17 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (this == other) | 1 | if (this == other) | ||||||||||||
2 | return true; | 2 | return true; | ||||||||||||
3 | if (!(other instanceof Block)) |
| 3 | if (!(other instanceof Binding)) | |||||||||||
4 | return false; | 4 | return false; | ||||||||||||
| 5 | Binding bOther = (Binding)other; | |||||||||||||
5 | Block bOther = (Block)other; | | |||||||||||||
|
| 6 | return this.self == bOther.self && this.dynamicScope == bOther.dynamicScope; | ||||||||||||
6 | return this.binding.equals(bOther.binding) && this.body == bOther.body; |
| |
Row | Violation |
---|---|
1 | Type boolean of variable other instanceof Block does not match with type boolean of variable other instanceof Binding |
2 | Unmatched return this.self == bOther.self && this.dynamicScope == bOther.dynamicScope; |
3 | Unmatched return this.binding.equals(bOther.binding) && this.body == bOther.body; |