final String msg = "Unknown timestamp format"; log.warn(msg); throw new JMeterError(msg);
if (!(obj instanceof QueueConnectionFactory)) { String msg = "QueueConnectionFactory expected, but got " + obj.getClass().getName(); LOGGER.fatalError(msg); throw new IllegalStateException(msg); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/save/CSVSaveService.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java
Method name: SampleEvent makeResultFromDelimitedString(String[], SampleSaveConfiguration, long) Method name: void threadStarted()
Number of AST nodes: 3 Number of AST nodes: 4
1
final String msg = "Unknown timestamp format";
2
					log.warn
1
if (!(obj instanceof QueueConnectionFactory)) {
2
				String msg = "QueueConnectionFactory expected, but got " + obj.getClass().getName();
3
(msg);
3
				LOGGER.fatalError(msg);
4
					throw new JMeterError(msg);
4
				throw new IllegalStateException(msg);
5
			}
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.0
Clones locationClones are in different classes
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                                                                                              
    7
    String msg = "QueueConnectionFactory expected, but got " + obj.getClass().getName();
    18
    final String msg = "Unknown timestamp format";
                                                                                                    
    19
    log.warn(msg);
    19
    log.warn(msg);
    8
    LOGGER.fatalError(msg);
    Differences
    Expression1Expression2Difference
    warnfatalErrorMETHOD_INVOCATION_NAME_MISMATCH
    logLOGGERVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression log.warn(msg) is a void method call, and thus it cannot be parameterized
    Expression LOGGER.fatalError(msg) is a void method call, and thus it cannot be parameterized
    8
    LOGGER.fatalError(msg);
    20
    throw new JMeterError(msg);
    20
    throw new JMeterError(msg);
    9
    throw new IllegalStateException(msg);
    Differences
    Expression1Expression2Difference
    org.apache.jorphan.util.JMeterErrorjava.lang.IllegalStateExceptionSUBCLASS_TYPE_MISMATCH
    9
    throw new IllegalStateException(msg);
    Precondition Violations (2)
    Row Violation
    1Expression log.warn(msg) is a void method call, and thus it cannot be parameterized
    2Expression LOGGER.fatalError(msg) is a void method call, and thus it cannot be parameterized