public Context initJNDI(boolean useProps, String jndi, String url, String useAuth, String user, String pwd) {
if (useProps) {
try {
return new InitialContext();
} catch (NamingException e) {
log.error(e.getMessage());
return null;
}
} else {
return InitialContextFactory.lookupContext(jndi, url, useAuth, user, pwd);
public Context initJNDI(boolean useProps, String jndi, String url, String useAuth, String user, String pwd) {
if (useProps) {
try {
return new InitialContext();
} catch (NamingException e) {
log.error(e.getMessage());
return null;
}
} else {
return InitialContextFactory.lookupContext(jndi, url, useAuth, user, pwd);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/jms/client/OnMessageSubscriber.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/jms/client/ReceiveSubscriber.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | public Context initJNDI(boolean useProps, String jndi, String url, String useAuth, String user, String pwd) {↵ | | 1 | public Context initJNDI(boolean useProps, String jndi, String url, String useAuth, String user, String pwd) {↵
|
2 | if (useProps) {↵ | | 2 | if (useProps) {↵
|
3 | try {↵ | | 3 | try {↵
|
4 | return new InitialContext();↵ | | 4 | return new InitialContext();↵
|
5 | } catch (NamingException e) {↵ | | 5 | } catch (NamingException e) {↵
|
6 | log.error(e.getMessage());↵ | | 6 | log.error(e.getMessage());↵
|
7 | return null;↵ | | 7 | return null;↵
|
8 | }↵ | | 8 | }↵
|
9 | } else {↵ | | 9 | } else {↵
|
10 | return InitialContextFactory.lookupContext(jndi, url, useAuth, user, pwd);↵ | | 10 | return InitialContextFactory.lookupContext(jndi, url, useAuth, user, pwd);↵
|
11 | | | 11 |
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | |
Number of node comparisons | 0 |