File path: /jakarta-jmeter-2.3.2/src/org/apache/commons/jexl/bsf/JexlEngine.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/commons/jexl/bsf/JexlEngine.java | |||
Method name: Object eval(String, int, int, Object)
|
Method name: void exec(String, int, int, Object)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | try {↵ | 1 | try {↵ | |
2 | Script jExpr = null;↵ | 2 | Script jExpr = null;↵ | |
3 | if (expr instanceof File) {↵ | 3 | if (script instanceof File) {↵ | |
4 | jExpr = ScriptFactory.createScript((File) expr);↵ | 4 | jExpr = ScriptFactory.createScript((File) script);↵ | |
5 | } else if (expr instanceof URL) {↵ | 5 | } else if (script instanceof URL) {↵ | |
6 | jExpr = ScriptFactory.createScript((URL) expr);↵ | 6 | jExpr = ScriptFactory.createScript((URL) script);↵ | |
7 | } else {↵ | 7 | } else {↵ | |
8 | jExpr = ScriptFactory.createScript((String) expr);↵ | 8 | jExpr = ScriptFactory.createScript((String) script);↵ | |
9 | }↵ | 9 | }↵ | |
10 | return jExpr.execute(jc);↵ | 10 | jExpr.execute(jc);↵ | |
11 | } catch (Exception e) {↵ | 11 | } catch (Exception e) {↵ | |
12 | // TODO Better messages↵ | |||
13 | throw new BSFException(e.getMessage());↵ | 12 | throw new BSFException(e.getMessage());↵ | |
14 | } | 13 |
| |
See real code fragment | See real code fragment |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 29 |
Number of mapped statements | 7 |
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) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | try | 3 | try | |||||||||||
4 | Script jExpr = null; | 4 | Script jExpr = null; | |||||||||||
5 | if (expr instanceof File) |
| 5 | if (script instanceof File) | ||||||||||
6 | jExpr = ScriptFactory.createScript((File)expr); |
| 6 | jExpr = ScriptFactory.createScript((File)script); | ||||||||||
7 | else if (expr instanceof URL) |
| 7 | else if (script instanceof URL) | ||||||||||
8 | jExpr = ScriptFactory.createScript((URL)expr); |
| 8 | jExpr = ScriptFactory.createScript((URL)script); | ||||||||||
else | else | |||||||||||||
9 | jExpr = ScriptFactory.createScript((String)expr); |
| 9 | jExpr = ScriptFactory.createScript((String)script); | ||||||||||
|
| 10 | jExpr.execute(jc); | |||||||||||
10 | return jExpr.execute(jc); |
| |
Row | Violation |
---|---|
1 | Unmatched statement jExpr.execute(jc); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
2 | Unmatched statement return jExpr.execute(jc); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |