if (compile) {
script = tryCompile(scriptNode);
if (forceCompile && script == null) {
return getNil();
}
}
if (compile) {
script = tryCompile(scriptNode);
if (compile && script == null) {
// terminate; tryCompile will have printed out an error and we're done
return getNil();
}
}
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/Ruby.java
|
|
File path: /jruby-1.4.0/src/org/jruby/Ruby.java
|
Method name: IRubyObject runNormally(Node)
|
|
Method name: IRubyObject runWithGetsLoop(Node, boolean, boolean, boolean)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (compile) {↵ | | 1 | if (compile) {↵
|
2 | script = tryCompile(scriptNode);↵ | | 2 | script = tryCompile(scriptNode);↵
|
3 | if (forceCompile && script == null) {↵ | | 3 | if (compile && script == null) {↵
|
| | | 4 | // terminate; tryCompile will have printed out an error and we're done↵
|
4 | return getNil();↵ | | 5 | return getNil();↵
|
5 | }↵ | | 6 | }↵
|
6 | } | | 7 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 8 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 1.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | if (compile) | | 4 | if (compile) |
5 | script = tryCompile(scriptNode); | | 5 | script = tryCompile(scriptNode); |
6 | if (forceCompile && script == null) | | 6 | if (compile && script == null) |
7 | | | 7 | |
Precondition Violations (0)
Row |
Violation |