CPD Results
The following document contains the results of PMD's CPD
Duplications
File | Line |
---|
org\tmforum\mtosi\simulator\client\MtosiClient.java | 116 |
org\tmforum\mtosi\simulator\server\MtosiServer.java | 90 |
}
public void setOption(String name, String value) {
options.put(name, value);
}
public String getOption(String name) {
return (String) options.get(name);
}
public boolean getAsBool(String name, boolean defaultValue) {
String stringValue = getOption(name);
if (stringValue == null) {
return defaultValue;
}
try {
return Boolean.getBoolean(stringValue);
} catch (Throwable t) {
log.warn(msgs.get(MessageConstants.UNABLE_TO_CONVERT, new Object[] {
name, stringValue, "int", new Boolean(defaultValue) }));
return defaultValue;
}
}
public int getAsInt(String name, int defaultValue) {
String stringValue = getOption(name);
if (stringValue == null) {
return defaultValue;
}
try {
return Integer.parseInt(stringValue);
} catch (Throwable t) {
log.warn(msgs.get(MessageConstants.UNABLE_TO_CONVERT, new Object[] {
name, stringValue, "int", new Integer(defaultValue) }));
return defaultValue;
}
}
public String getAsString(String name, String defaultValue) {
String stringValue = getOption(name);
if (stringValue == null) {
return defaultValue;
}
return stringValue;
}
} |
File | Line |
---|
org\tmforum\mtosi\simulator\util\jaxrpc\axis13\MtosiMessageParserImpl.java | 84 |
org\tmforum\mtosi\simulator\util\jaxrpc\axis13\MtosiMessageParserImpl.java | 126 |
try {
classDef = Class.forName(className);
Method method = classDef.getDeclaredMethod("getTypeDesc", null);
typeDesc = (TypeDesc) method.invoke(null, null);
} catch (ClassNotFoundException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_DATABINDING_CLASS, className),
e);
} catch (SecurityException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
} catch (NoSuchMethodException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
} catch (IllegalArgumentException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
} catch (IllegalAccessException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
} catch (InvocationTargetException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
} |
File | Line |
---|
org\tmforum\mtosi\simulator\util\jaxrpc\axis13\MtosiMessageParserImpl.java | 91 |
org\tmforum\mtosi\simulator\util\jaxrpc\axis13\MtosiMessageParserImpl.java | 179 |
typeDesc = (TypeDesc) method.invoke(null, null);
} catch (SecurityException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
} catch (NoSuchMethodException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
} catch (IllegalArgumentException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
} catch (IllegalAccessException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
} catch (InvocationTargetException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
}
QName qName = typeDesc.getXmlType(); |
File | Line |
---|
org\tmforum\mtosi\simulator\util\jaxrpc\axis13\MtosiMessageParserImpl.java | 133 |
org\tmforum\mtosi\simulator\util\jaxrpc\axis13\MtosiMessageParserImpl.java | 179 |
typeDesc = (TypeDesc) method.invoke(null, null);
} catch (SecurityException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
} catch (NoSuchMethodException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
} catch (IllegalArgumentException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
} catch (IllegalAccessException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
} catch (InvocationTargetException e) {
throw new SOAPException(msgs.get(
MessageConstants.CANNOT_LOAD_TYPE_DESC, className), e);
} |