try {
bshInterpreter.eval((new StringBuffer("testEnded(")) // $NON-NLS-1$
.append(host)
.append(")") // $NON-NLS-1$
.toString()); // $NON-NLS-1$
} catch (JMeterException ignored) {
log.debug(getClass().getName() + " : " + ignored.getLocalizedMessage()); // $NON-NLS-1$
}
try {
bshInterpreter.eval((new StringBuffer("testStarted(")) // $NON-NLS-1$
.append(host)
.append(")") // $NON-NLS-1$
.toString()); // $NON-NLS-1$
} catch (JMeterException ignored) {
log.debug(getClass().getName() + " : " + ignored.getLocalizedMessage()); // $NON-NLS-1$
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/util/BeanShellTestElement.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/util/BeanShellTestElement.java
|
Method name: void testEnded(String)
|
|
Method name: void testStarted(String)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 2
|
|
1 | try {↵ | | 1 | try {↵
|
2 | bshInterpreter.eval((new StringBuffer("testEnded(")) // $NON-NLS-1$↵ | | 2 | bshInterpreter.eval((new StringBuffer("testStarted(")) // $NON-NLS-1$↵
|
3 | .append(host)↵ | | 3 | .append(host)↵
|
4 | .append(")") // $NON-NLS-1$↵ | | 4 | .append(")") // $NON-NLS-1$↵
|
5 | .toString()); // $NON-NLS-1$↵ | | 5 | .toString()); // $NON-NLS-1$↵
|
6 | } catch (JMeterException ignored) {↵ | | 6 | } catch (JMeterException ignored) {↵
|
7 | log.debug(getClass().getName() + " : " + ignored.getLocalizedMessage()); // $NON-NLS-1$↵ | | 7 | log.debug(getClass().getName() + " : " + ignored.getLocalizedMessage()); // $NON-NLS-1$↵
|
8 | } | | 8 | }
|
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 4 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
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) | 0.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | try | | 3 | try |
4 | bshInterpreter.eval((new StringBuffer("testEnded(")).append(host).append(")").toString()); | | 4 | bshInterpreter.eval((new StringBuffer("testStarted(")).append(host).append(")").toString()); |
Precondition Violations (0)
Row |
Violation |