File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/modifiers/BeanShellPreProcessor.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/BeanShellListener.java | |||
Method name: void process()
|
Method name: void sampleOccurred(SampleEvent)
|
|||
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("sampler", sam);//$NON-NLS-1$↵ | 5 | bshInterpreter.set("sampleEvent", se);//$NON-NLS-1$↵ | |
6 | bshInterpreter.set("prev", prev);//$NON-NLS-1$↵ | 6 | bshInterpreter.set("sampleResult", samp);//$NON-NLS-1$↵ | |
7 | ↵ | |||
8 | processFileOrScript(bshInterpreter);↵ | 7 | processFileOrScript(bshInterpreter);↵ | |
9 | } catch (JMeterException e) {↵ | 8 | } catch (JMeterException e) {↵ | |
10 | log.warn("Problem in BeanShell script "+e);↵ | 9 | log.warn("Problem in BeanShell script "+e);↵ | |
11 | } | 10 |
| |
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 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9 | try | 8 | try | ||||||||||||||
10 | bshInterpreter.set("ctx", jmctx); | 9 | bshInterpreter.set("ctx", jmctx); | ||||||||||||||
11 | bshInterpreter.set("vars", vars); | 10 | bshInterpreter.set("vars", vars); | ||||||||||||||
|
| 11 | bshInterpreter.set("sampleEvent", se); | ||||||||||||||
12 | bshInterpreter.set("sampler", sam); |
| | ||||||||||||||
13 | bshInterpreter.set("prev", prev); |
| 12 | bshInterpreter.set("sampleResult", samp); | |||||||||||||
14 | processFileOrScript(bshInterpreter); | 13 | processFileOrScript(bshInterpreter); |
Row | Violation |
---|---|
1 | Unmatched statement bshInterpreter.set("sampleEvent",se); 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("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 |