File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/AjpSampler.java | |||
Method name: void threadFinished()
|
Method name: void threadFinished()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (connection != null) {↵ | 1 | if(channel != null) {↵ | |
2 | try {↵ | |||
3 | connection.close();↵ | |||
4 | ↵ | 2 | try {↵ | |
3 | channel.close();↵ | |||
5 | } catch (JMSException e) {↵ | 4 | } catch(IOException iex) {↵ | |
6 | LOGGER.info(e.getLocalizedMessage());↵ | |||
7 | }↵ | |||
8 | ↵ | 5 | log.debug("Error closing channel",iex);↵ | |
6 | }↵ | |||
9 | } | 7 | } | |
See real code fragment | See real code fragment |
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 5 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | if (connection != null) |
| 1 | if (channel != null) | |||||||||||||||||||||||||||||
6 | try |
| 2 | try | |||||||||||||||||||||||||||||
7 | connection.close(); |
| 3 | channel.close(); |
Row | Violation |
---|---|
1 | Type javax.jms.QueueConnection of variable connection does not match with type java.net.Socket of variable channel |
2 | Expression LOGGER.info(e.getLocalizedMessage()) is a void method call, and thus it cannot be parameterized |
3 | Expression log.debug("Error closing channel",iex) is a void method call, and thus it cannot be parameterized |
4 | Expression LOGGER.info(e.getLocalizedMessage()) is a void method call, and thus it cannot be parameterized |
5 | Expression log.debug("Error closing channel",iex) is a void method call, and thus it cannot be parameterized |
6 | Type javax.jms.QueueConnection of variable connection does not match with type java.net.Socket of variable channel |