File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/jms/client/Publisher.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/jms/client/ReceiveSubscriber.java | |||
Method name: void initConnection(Context, String, String)
|
Method name: void initConnection(Context, String, String)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | try {↵ | 1 | try {↵ | |
2 | ConnectionFactory.getTopicConnectionFactory(ctx,connfactory);↵ | 2 | ConnectionFactory.getTopicConnectionFactory(ctx,connfactory);↵ | |
3 | this.CONN = ConnectionFactory.getTopicConnection();↵ | 3 | this.CONN = ConnectionFactory.getTopicConnection();↵ | |
4 | this.TOPIC = InitialContextFactory.lookupTopic(ctx, topic);↵ | 4 | this.TOPIC = InitialContextFactory.lookupTopic(ctx, topic);↵ | |
5 | this.SESSION = this.CONN.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);↵ | 5 | this.SESSION = this.CONN.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);↵ | |
6 | this.PUBLISHER = this.SESSION.createPublisher(this.TOPIC);↵ | 6 | this.SUBSCRIBER = this.SESSION.createSubscriber(this.TOPIC);↵ | |
7 | log.info("created the topic connection successfully");↵ | 7 | log.info("created the topic connection successfully");↵ | |
8 | } catch (JMSException e) {↵ | 8 | } catch (JMSException e) {↵ | |
9 | log.error("Connection error: " + e.getMessage());↵ | 9 | log.error("Connection error: " + e.getMessage());↵ | |
10 | } | 10 |
| |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 49 |
Number of mapped statements | 6 |
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) | 3.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
1 | try | 1 | try | ||||
2 | ConnectionFactory.getTopicConnectionFactory(ctx, connfactory); | 2 | ConnectionFactory.getTopicConnectionFactory(ctx, connfactory); | ||||
3 | this.CONN = ConnectionFactory.getTopicConnection(); | 3 | this.CONN = ConnectionFactory.getTopicConnection(); | ||||
4 | this.TOPIC = InitialContextFactory.lookupTopic(ctx, topic); | 4 | this.TOPIC = InitialContextFactory.lookupTopic(ctx, topic); | ||||
5 | this.SESSION = this.CONN.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE); | 5 | this.SESSION = this.CONN.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE); | ||||
|
| 6 | this.SUBSCRIBER = this.SESSION.createSubscriber(this.TOPIC); | ||||
6 | this.PUBLISHER = this.SESSION.createPublisher(this.TOPIC); |
| | ||||
7 | log.info("created the topic connection successfully"); | 7 | log.info("created the topic connection successfully"); |
Row | Violation |
---|---|
1 | Unmatched statement this.SUBSCRIBER=this.SESSION.createSubscriber(this.TOPIC); 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 | Unmatched statement this.PUBLISHER=this.SESSION.createPublisher(this.TOPIC); 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 |