if (engine != null) { try { engine.runTest(); } catch (JMeterEngineException e) { JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")); // $NON-NLS-1$ } }
try { sync.wait(); } catch (InterruptedException e) { log.warn(e.getLocalizedMessage()); }
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/timers/SyncTimer.java
Method name: void doRemoteStart(String) Method name: long delay()
Number of AST nodes: 3 Number of AST nodes: 2
1
if (engine != null) {
2
			try {
3
				engine.runTes
1
try {
4
t();
2
					sync.wait();
5
			} catch (JMeterEngineException e) {
3
				} catch (InterruptedException e) {
6
				JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")); // $NON-NLS-1$
4
				
7
			}
5
	log.warn(e.getLocalizedMessage());
8
		}
6
				}
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.3
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.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    try
    3
    try
    7
    try
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.engine.JMeterEngineExceptionjava.lang.InterruptedExceptionSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.engine.JMeterEngineExceptionjava.lang.InterruptedExceptionSUBCLASS_TYPE_MISMATCH
    reportErrorToUserwarnMETHOD_INVOCATION_NAME_MISMATCH
    org.apache.jmeter.util.JMeterUtilsorg.apache.log.LoggerVARIABLE_TYPE_MISMATCH
    JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting"))log.warn(e.getLocalizedMessage())TYPE_COMPATIBLE_REPLACEMENT
    JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting"))log.warn(e.getLocalizedMessage())ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    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.warn(e.getLocalizedMessage()) 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.warn(e.getLocalizedMessage()) 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.warn(e.getLocalizedMessage()) 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.warn(e.getLocalizedMessage()) is a void method call, and thus it cannot be parameterized
    7
    try
    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
                                            
                                  
    8
    sync.wait();
    Preondition Violations
    Unmatched statement sync.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
    8
    sync.wait();
    Precondition Violations (13)
    Row Violation
    1Expression JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression log.warn(e.getLocalizedMessage()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")) is a void method call, and thus it cannot be parameterized
    4Expression log.warn(e.getLocalizedMessage()) is a void method call, and thus it cannot be parameterized
    5Type org.apache.jmeter.util.JMeterUtils of variable JMeterUtils does not match with type org.apache.log.Logger of variable log
    6Expression JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression log.warn(e.getLocalizedMessage()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression JMeterUtils.reportErrorToUser(e.getMessage(),JMeterUtils.getResString("remote_error_starting")) is a void method call, and thus it cannot be parameterized
    9Expression log.warn(e.getLocalizedMessage()) is a void method call, and thus it cannot be parameterized
    10Unmatched statement engine.runTest(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    11Unmatched 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
    12Unmatched statement sync.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
    13The refactoring of the clones is infeasible, because classes org.apache.jmeter.gui.action.RemoteStart and org.apache.jmeter.timers.SyncTimer do not have a common superclass