File path: /jruby-1.4.0/src/org/jruby/compiler/impl/MethodBodyCompiler.java | File path: /jruby-1.4.0/src/org/jruby/compiler/impl/RootScopedBodyCompiler.java | |||
Method name: void beginMethod(CompilerCallback, StaticScope)
|
Method name: void beginMethod(CompilerCallback, StaticScope)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | method.start();↵ | 1 | method.start();↵ | |
2 | // set up a local IRuby variable↵ | 2 | // set up a local Ruby variable↵ | |
3 | method.aload(StandardASMCompiler.THREADCONTEXT_INDEX);↵ | 3 | method.aload(StandardASMCompiler.THREADCONTEXT_INDEX);↵ | |
4 | invokeThreadContext("getRuntime", sig(Ruby.class));↵ | 4 | invokeThreadContext("getRuntime", sig(Ruby.class));↵ | |
5 | method.astore(getRuntimeIndex());↵ | 5 | method.astore(getRuntimeIndex());↵ | |
6 | // grab nil for local variables↵ | 6 | // grab nil for local variables↵ | |
7 | method.aload(getRuntimeIndex());↵ | 7 | method.aload(getRuntimeIndex());↵ | |
8 | invokeRuby("getNil", sig(IRubyObject.class));↵ | 8 | invokeRuby("getNil", sig(IRubyObject.class));↵ | |
9 | method.astore(getNilIndex());↵ | 9 | method.astore(getNilIndex());↵ | |
10 | variableCompiler.beginMethod(args, scope);↵ | 10 | variableCompiler.beginMethod(args, scope);↵ | |
11 | // visit a label to start scoping for local vars in this method↵ | 11 | // visit a label to start scoping for local vars in this method↵ | |
12 | method.label(scopeStart); | 12 |
| |
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 81 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | method.start(); | 1 | method.start(); | |
2 | method.aload(StandardASMCompiler.THREADCONTEXT_INDEX); | 2 | method.aload(StandardASMCompiler.THREADCONTEXT_INDEX); | |
3 | invokeThreadContext("getRuntime", sig(Ruby.class)); | 3 | invokeThreadContext("getRuntime", sig(Ruby.class)); | |
4 | method.astore(getRuntimeIndex()); | 4 | method.astore(getRuntimeIndex()); | |
5 | method.aload(getRuntimeIndex()); | 5 | method.aload(getRuntimeIndex()); | |
6 | invokeRuby("getNil", sig(IRubyObject.class)); | 6 | invokeRuby("getNil", sig(IRubyObject.class)); | |
7 | method.astore(getNilIndex()); | 7 | method.astore(getNilIndex()); | |
8 | variableCompiler.beginMethod(args, scope); | 8 | variableCompiler.beginMethod(args, scope); | |
9 | method.label(scopeStart); | 9 | method.label(scopeStart); |
Row | Violation |
---|