if (engine != null) { try { engine.runTest(); } catch (JMeterEngineException e) { JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")); // $NON-NLS-1$ } }
try { this.wait(); } catch (Exception ex) { log.error("", ex); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/RemoteStart.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/threads/ThreadGroup.java
Method name: void doRemoteStart(String) Method name: void waitForSamples()
Number of AST nodes: 3 Number of AST nodes: 2
1
if (engine != null) {
2
			try {
3
				engine.runTes
1
try {
4
t();
2
				this.wait();
5
			} catch (JMeterEngineException e) {
3
			} catch (Exception ex) {
6
				JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")); // $NON-NLS-1$
4
				log.error("", ex);
7
			}
5
			}
8
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)33.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    try
    3
    try
    1
    try
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.engine.JMeterEngineExceptionjava.lang.ExceptionSUBCLASS_TYPE_MISMATCH
    eexVARIABLE_NAME_MISMATCH
    org.apache.jmeter.engine.JMeterEngineExceptionjava.lang.ExceptionSUBCLASS_TYPE_MISMATCH
    e.getMessage()""TYPE_COMPATIBLE_REPLACEMENT
    JMeterUtils.getResString("remote_error_starting")exAST_TYPE_MISMATCH
    reportErrorToUsererrorMETHOD_INVOCATION_NAME_MISMATCH
    org.apache.jmeter.util.JMeterUtilsorg.apache.log.LoggerVARIABLE_TYPE_MISMATCH
    JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting"))log.error("",ex)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression e.getMessage() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ex cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression log.error("",ex) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")) is a void method call, and thus it cannot be parameterized
    Expression log.error("",ex) is a void method call, and thus it cannot be parameterized
    Type org.apache.jmeter.util.JMeterUtils of variable JMeterUtils does not match with type org.apache.log.Logger of variable log
    • Make classes org.apache.jmeter.util.JMeterUtils and org.apache.log.Logger extend a common superclass
    Expression JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression log.error("",ex) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")) is a void method call, and thus it cannot be parameterized
    Expression log.error("",ex) is a void method call, and thus it cannot be parameterized
    1
    try
                                  
    2
    this.wait();
    Preondition Violations
    Unmatched statement this.wait(); 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
    this.wait();
    4
    engine.runTest();
    4
    engine.runTest();
    Preondition Violations
    Unmatched statement engine.runTest(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched statement engine.runTest(); 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
                                            
    Precondition Violations (15)
    Row Violation
    1Expression e.getMessage() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression ex cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression log.error("",ex) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")) is a void method call, and thus it cannot be parameterized
    6Expression log.error("",ex) is a void method call, and thus it cannot be parameterized
    7Type org.apache.jmeter.util.JMeterUtils of variable JMeterUtils does not match with type org.apache.log.Logger of variable log
    8Expression JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression log.error("",ex) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")) is a void method call, and thus it cannot be parameterized
    11Expression log.error("",ex) is a void method call, and thus it cannot be parameterized
    12Unmatched statement this.wait(); 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
    13Unmatched statement engine.runTest(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    14Unmatched statement engine.runTest(); 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
    15The refactoring of the clones is infeasible, because classes org.apache.jmeter.gui.action.RemoteStart and org.apache.jmeter.threads.ThreadGroup.SampleQueue do not have a common superclass