super();
Context ctx = initJNDI(useProps, jndi, url, useAuth, user, pwd);
if (ctx != null) {
initConnection(ctx, connfactory, topic);
} else {
log.error("Could not initialize JNDI Initial Context Factory");
}
Context ctx = initJNDI(useProps, jndi, url, useAuth, user, pwd);
if (ctx != null) {
initConnection(ctx, connfactory, topic);
} else {
log.error("Could not initialize JNDI Initial Context Factory");
}
Clone fragments detected by clone detection tool
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 Publisher(boolean, String, String, String, String, String, String, String)
|
|
Method name: void ReceiveSubscriber(boolean, String, String, String, String, String, String, String)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 4
|
|
1 | super();↵ | | |
|
2 | Context ctx = initJNDI(useProps, jndi, url, useAuth, user, pwd);↵ | | 1 | Context ctx = initJNDI(useProps, jndi, url, useAuth, user, pwd);↵
|
3 | if (ctx != null) {↵ | | 2 | if (ctx != null) {↵
|
4 | initConnection(ctx, connfactory, topic);↵ | | 3 | initConnection(ctx, connfactory, topic);↵
|
5 | } else {↵ | | 4 | } else {↵
|
6 | log.error("Could not initialize JNDI Initial Context Factory");↵ | | 5 | log.error("Could not initialize JNDI Initial Context Factory");↵
|
7 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 11 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | super(); | | | |
2 | Context ctx = initJNDI(useProps, jndi, url, useAuth, user, pwd); | | 1 | Context ctx = initJNDI(useProps, jndi, url, useAuth, user, pwd); |
3 | if (ctx != null) | | 2 | if (ctx != null) |
4 | initConnection(ctx, connfactory, topic); | | 3 | initConnection(ctx, connfactory, topic); |
| | | | |
5 | log.error("Could not initialize JNDI Initial Context Factory"); | | 4 | log.error("Could not initialize JNDI Initial Context Factory"); |
Precondition Violations (0)
Row |
Violation |