File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/extractor/BeanShellPostProcessor.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/modifiers/BeanShellPreProcessor.java | |||
Method name: void process()
|
Method name: void process()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | try {↵ | 1 | try {↵ | |
2 | // Add variables for access to context and variables↵ | 2 | // Add variables for access to context and variables↵ | |
3 | bshInterpreter.set("ctx", jmctx);//$NON-NLS-1$↵ | 3 | bshInterpreter.set("ctx", jmctx);//$NON-NLS-1$↵ | |
4 | bshInterpreter.set("vars", vars);//$NON-NLS-1$↵ | 4 | bshInterpreter.set("vars", vars);//$NON-NLS-1$↵ | |
5 | bshInterpreter.set("prev", prev);//$NON-NLS-1$↵ | 5 | bshInterpreter.set("sampler", sam);//$NON-NLS-1$↵ | |
6 | bshInterpreter.set("data", prev.getResponseData());//$NON-NLS-1$↵ | 6 | bshInterpreter.set("prev", prev);//$NON-NLS-1$↵ | |
7 | ↵ | |||
7 | processFileOrScript(bshInterpreter);↵ | 8 | processFileOrScript(bshInterpreter);↵ | |
8 | } catch (JMeterException e) {↵ | 9 | } catch (JMeterException e) {↵ | |
9 | log.warn("Problem in BeanShell script "+e);↵ | 10 | log.warn("Problem in BeanShell script "+e);↵ | |
10 | } | 11 |
| |
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 36 |
Number of mapped statements | 5 |
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) | 2.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
8 | try | 9 | try | ||||
9 | bshInterpreter.set("ctx", jmctx); | 10 | bshInterpreter.set("ctx", jmctx); | ||||
10 | bshInterpreter.set("vars", vars); | 11 | bshInterpreter.set("vars", vars); | ||||
|
| 12 | bshInterpreter.set("sampler", sam); | ||||
11 | bshInterpreter.set("prev", prev); | 13 | bshInterpreter.set("prev", prev); | ||||
12 | bshInterpreter.set("data", prev.getResponseData()); |
| | ||||
13 | processFileOrScript(bshInterpreter); | 14 | processFileOrScript(bshInterpreter); |
Row | Violation |
---|---|
1 | Unmatched statement bshInterpreter.set("sampler",sam); 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 bshInterpreter.set("data",prev.getResponseData()); 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 |