if (obj == Primitive.VOID)
return null;
// unwrap primitives
if (obj instanceof Primitive)
return((Primitive)obj).getValue();
else
return obj;
NameSpace parent = super.getParent();
if ( parent instanceof BlockNameSpace )
return ((BlockNameSpace)parent).getNonBlockParent();
else
return parent;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/bsh/Primitive.java
|
|
File path: /jEdit-4.2/src/bsh/BlockNameSpace.java
|
Method name: Object unwrap(Object)
|
|
Method name: NameSpace getNonBlockParent()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 4
|
|
1 | if (obj == Primitive.VOID)↵ | | |
|
2 | return null;↵ | | |
|
|
3 | // unwrap primitives↵ | | |
|
4 | if (obj instanceof Primitive)↵ | | |
|
5 | ↵ | | 1 | NameSpace parent = super.getParent();↵
|
| | | 2 | if ( parent instanceof BlockNameSpace )↵
|
6 | return((Primitive)obj).getValue();↵ | | 3 | return ((↵
|
7 | else↵ | | |
|
8 | ↵ | | 4 | BlockNameSpace)parent).getNonBlockParent();↵
|
| | | 5 | else↵
|
9 | return obj; | | 6 | return parent;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 2 |