runtime.getPosix().seteuid(uid);
runtime.getPosix().setuid(euid);
return RubyFixnum.zero(runtime);
runtime.getPosix().seteuid(uid);
runtime.getPosix().setuid(euid);
return block.yield(context, runtime.getNil());
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/RubyProcess.java
|
|
File path: /jruby-1.4.0/src/org/jruby/RubyProcess.java
|
Method name: IRubyObject switch_rb(ThreadContext, IRubyObject, Block)
|
|
Method name: IRubyObject switch_rb(ThreadContext, IRubyObject, Block)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | runtime.getPosix().seteuid(uid);↵ | | 1 | runtime.getPosix().seteuid(uid);↵
|
2 | runtime.getPosix().setuid(euid);↵ | | 2 | runtime.getPosix().setuid(euid);↵
|
3 | ↵ | | 3 | ↵
|
| | | 4 | ↵
|
4 | return RubyFixnum.zero(runtime); | | 5 | return block.yield(context, runtime.getNil());
|
See real code fragment |
|
See real code fragment |
Summary
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.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
9 | runtime.getPosix().seteuid(uid); | | 6 | runtime.getPosix().seteuid(uid); |
10 | runtime.getPosix().setuid(euid); | | 7 | runtime.getPosix().setuid(euid); |
11 | return RubyFixnum.zero(runtime); | | | |
Precondition Violations (1)
Row |
Violation |
1 | Unmatched return RubyFixnum.zero(runtime); |