if (bshInterpreter == null || !hasInitFile) { return; } 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$ }
if (bshInterpreter == null || !hasInitFile) { return; } 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$ }
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 testStarted(String) Method name: void testEnded(String)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (bshInterpreter == null || !hasInitFile) {
1
if (bshInterpreter == null || !hasInitFile) {
2
            return;
2
            return;
3
        }
3
        }
4
		try {
4
		try {
5
			bshInterpreter.eval((new StringBuffer("testStarted(")) // $NON-NLS-1$
5
			bshInterpreter.eval((new StringBuffer("testEnded(")) // $NON-NLS-1$
6
					.append(host)
6
					.append(host)
7
					.append(")") // $NON-NLS-1$
7
					.append(")") // $NON-NLS-1$
8
					.toString()); // $NON-NLS-1$
8
					.toString()); // $NON-NLS-1$
9
		} catch (JMeterException ignored) {
9
		} catch (JMeterException ignored) {
10
            log.debug(getClass().getName() + " : " + ignored.getLocalizedMessage()); // $NON-NLS-1$
10
            log.debug(getClass().getName() + " : " + ignored.getLocalizedMessage()); // $NON-NLS-1$
11
		}
11
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.7
Clones locationClones are declared in the same class
Number of node comparisons10
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (bshInterpreter == null || !hasInitFile)
    1
    if (bshInterpreter == null || !hasInitFile)
    2
    return;
    2
    return;
    3
    try
    3
    try
    4
    bshInterpreter.eval((new StringBuffer("testStarted(")).append(host).append(")").toString());
    4
    bshInterpreter.eval((new StringBuffer("testStarted(")).append(host).append(")").toString());
    4
    bshInterpreter.eval((new StringBuffer("testEnded(")).append(host).append(")").toString());
    Differences
    Expression1Expression2Difference
    "testStarted(""testEnded("LITERAL_VALUE_MISMATCH
    4
    bshInterpreter.eval((new StringBuffer("testEnded(")).append(host).append(")").toString());
    Precondition Violations (0)
    Row Violation