CPD Results

The following document contains the results of PMD's CPD 5.0.5.

Duplications

File Line
net/kozelka/args/ArgsUtils.java 83
net/kozelka/args/ArgsUtils.java 101
        } catch (NoSuchMethodException e) {
            // no string constructor
        } catch (InvocationTargetException e) {
            final Throwable cause = e.getCause();
            throw new ParseException(cause.getClass().getName() + ": " + cause.getMessage(), 0);
        } catch (IllegalAccessException e) {
            throw new IllegalStateException(e);
        } catch (InstantiationException e) {
File Line
net/sourceforge/xmlfacade/XmlFacade.java 51
net/sourceforge/xmlfacade/XmlFacade.java 70
  public static Element createElement(Document d, QName name, Object... contents) {
    String qualifiedName;
    if (name.getPrefix().equals(XMLConstants.DEFAULT_NS_PREFIX)) {
      qualifiedName = name.getLocalPart();
    } else {
      qualifiedName = name.getPrefix() + ":" + name.getLocalPart();
    }
File Line
net/kozelka/args/model/CommandlineDeclaration.java 39
net/kozelka/args/model/CommandlineDeclaration.java 52
            final OptionDeclaration oldDecl = optionsByLongName.get(shortName);
            final Method method = optionDeclaration.getOptionMethod();
            if (oldDecl != null) {
                if (!oldDecl.getOptionMethod().equals(method)) {
                    throw new ParseException(String.format("%s: short option name declared twice - first in %s and also in %s",
File Line
net/sourceforge/xmlfacade/XmlFacade.java 90
net/sourceforge/xmlfacade/XmlFacade.java 96
          if (parent.hasAttribute(attr.getName())) {
            throw new XmlRuntimeException(String.format("Element %s already contains attribute %s.", getName(parent), getName(attr)));
          } else {
            parent.setAttributeNode(attr);
File Line
net/kozelka/args/DefaultHelpCommand.java 75
net/kozelka/args/DefaultHelpCommand.java 142
                    return o1.toString().compareTo(o2.toString());
                }
            });
            final Map<String, String> optMap = new LinkedHashMap<String, String>();
            int max = 0;
            // gather option table, and find longest declaration
            for (OptionDeclaration optionDeclaration : sortedOptions) {