File path: /jruby-1.4.0/src/org/jruby/javasupport/util/RuntimeHelpers.java | File path: /jruby-1.4.0/src/org/jruby/javasupport/util/RuntimeHelpers.java | |||
Method name: BlockBody createCompiledBlockBody19(ThreadContext, Object, String, int, String[], boolean, int, boolean)
|
Method name: BlockBody createCompiledBlockBody(ThreadContext, Object, String, int, String[], boolean, int, boolean)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | StaticScope staticScope =↵ | 1 | StaticScope staticScope = ↵ | |
2 | new BlockStaticScope(context.getCurrentScope().getStaticScope(), staticScopeNames);↵ | 2 | new BlockStaticScope(context.getCurrentScope().getStaticScope(), staticScopeNames);↵ | |
3 | staticScope.determineModule();↵ | 3 | staticScope.determineModule();↵ | |
4 | ↵ | |||
4 | if (light) {↵ | 5 | if (light) {↵ | |
5 | return CompiledBlockLight19.newCompiledBlockLight(↵ | 6 | return CompiledBlockLight.newCompiledBlockLight(↵ | |
6 | Arity.createArity(arity), staticScope,↵ | 7 | Arity.createArity(arity), staticScope,↵ | |
7 | createBlockCallback19(context.getRuntime(), scriptObject, closureMethod),↵ | 8 | createBlockCallback(context.getRuntime(), scriptObject, closureMethod),↵ | |
8 | hasMultipleArgsHead, argsNodeType);↵ | 9 | hasMultipleArgsHead, argsNodeType);↵ | |
9 | } else {↵ | 10 | } else {↵ | |
10 | return CompiledBlock19.newCompiledBlock(↵ | 11 | return CompiledBlock.newCompiledBlock(↵ | |
11 | Arity.createArity(arity), staticScope,↵ | 12 | Arity.createArity(arity), staticScope,↵ | |
12 | createBlockCallback19(context.getRuntime(), scriptObject, closureMethod),↵ | 13 | createBlockCallback(context.getRuntime(), scriptObject, closureMethod),↵ | |
13 | hasMultipleArgsHead, argsNodeType);↵ | 14 | hasMultipleArgsHead, argsNodeType);↵ | |
14 | } | 15 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 3 |
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) | 3.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | StaticScope staticScope = new BlockStaticScope(context.getCurrentScope().getStaticScope(), staticScopeNames); | 1 | StaticScope staticScope = new BlockStaticScope(context.getCurrentScope().getStaticScope(), staticScopeNames); | |
2 | staticScope.determineModule(); | 2 | staticScope.determineModule(); | |
3 | if (light) | 3 | if (light) | |
| 4 | return CompiledBlockLight.newCompiledBlockLight(Arity.createArity(arity), staticScope, createBlockCallback(context.getRuntime(), scriptObject, closureMethod), hasMultipleArgsHead, argsNodeType); | ||
4 | return CompiledBlockLight19.newCompiledBlockLight(Arity.createArity(arity), staticScope, createBlockCallback19(context.getRuntime(), scriptObject, closureMethod), hasMultipleArgsHead, argsNodeType); | | ||
else | | |||
| 5 | return CompiledBlock.newCompiledBlock(Arity.createArity(arity), staticScope, createBlockCallback(context.getRuntime(), scriptObject, closureMethod), hasMultipleArgsHead, argsNodeType); | ||
5 | return CompiledBlock19.newCompiledBlock(Arity.createArity(arity), staticScope, createBlockCallback19(context.getRuntime(), scriptObject, closureMethod), hasMultipleArgsHead, argsNodeType); | |
Row | Violation |
---|