for (Iterator it = vars.entrySet().iterator(); it.hasNext();)
{
Map.Entry entry = (Map.Entry) it.next();
jython.set(entry.getKey().toString(), entry.getValue());
}
jython.execfile(script.getPath());
for (Iterator it = vars.entrySet().iterator(); it.hasNext();)
{
Map.Entry entry = (Map.Entry) it.next();
bsh.set(entry.getKey().toString(), entry.getValue());
}
bsh.source(script.getPath());
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/scripting/interpreter/JythonInterpreter.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/scripting/interpreter/BshInterpreter.java
|
Method name: void execute(ColumbaScript, Map)
|
|
Method name: void execute(ColumbaScript, Map)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | for (Iterator it = vars.entrySet().iterator(); it.hasNext();)↵ | | 1 | for (Iterator it = vars.entrySet().iterator(); it.hasNext();)↵
|
2 | {↵ | | 2 | ↵
|
| | | 3 | {↵
|
3 | Map.Entry entry = (Map.Entry) it.next();↵ | | 4 | Map.Entry entry = (Map.Entry) it.next();↵
|
4 | jython.set(entry.getKey().toString(), entry.getValue());↵ | | 5 | bsh.set(entry.getKey().toString(), entry.getValue());↵
|
5 | }↵ | | 6 | }↵
|
|
6 | jython.execfile(script.getPath()); | | 7 | bsh.source(script.getPath());
|
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 26.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | for (Iterator it = vars.entrySet().iterator(); it.hasNext(); ) | | 5 | for (Iterator it = vars.entrySet().iterator(); it.hasNext(); ) |
4 | Map.Entry entry = (Map.Entry)it.next(); | | 6 | Map.Entry entry = (Map.Entry)it.next(); |
5 | jython.set(entry.getKey().toString(), entry.getValue()); | | 7 | bsh.set(entry.getKey().toString(), entry.getValue()); |
6 | jython.execfile(script.getPath()); | | | |
| | | 8 | bsh.source(script.getPath()); |
Precondition Violations (1)
Row |
Violation |
1 | Type org.python.util.PythonInterpreter of variable jython does not match with type bsh.Interpreter of variable bsh |