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 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 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); | | 8 | LOGGER.fatalError(msg); |
20 | throw new JMeterError(msg); | | 9 | throw new IllegalStateException(msg); |
Precondition Violations (2)
Row |
Violation |
1 | Expression log.warn(msg) is a void method call, and thus it cannot be parameterized |
2 | Expression LOGGER.fatalError(msg) is a void method call, and thus it cannot be parameterized |