CPD Results

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

Duplications

FileLine
uk/ac/ebi/intenz/tools/release/helper/EnzymeClassHelper.java50
uk/ac/ebi/intenz/tools/release/helper/EnzymeSubSubclassHelper.java51
uk/ac/ebi/intenz/tools/release/helper/EnzymeSubclassHelper.java51
      xmlStringBuffer.append(encoding.xml2Display(removeFormatting(enzymeClass.getDescription()), EncodingType.SWISSPROT_CODE));
      xmlStringBuffer.append("</description>");
    }

    xmlStringBuffer.append("<reactions>");
    xmlStringBuffer.append("</reactions>");

    xmlStringBuffer.append("<syst_name>");
    xmlStringBuffer.append("</syst_name>");

    xmlStringBuffer.append("<synonyms>");
    xmlStringBuffer.append("</synonyms>");

    xmlStringBuffer.append("<comments>");
    xmlStringBuffer.append("</comments>");

    xmlStringBuffer.append("<links>");
    xmlStringBuffer.append("</links>");

    xmlStringBuffer.append("<references>");
    xmlStringBuffer.append("<reference>");
    xmlStringBuffer.append("<reference>");
    xmlStringBuffer.append("<number>");
    xmlStringBuffer.append("</number>");
    xmlStringBuffer.append("<authors>");
    xmlStringBuffer.append("</auhors>");
    xmlStringBuffer.append("<title>");
    xmlStringBuffer.append("</title>");
    xmlStringBuffer.append("<year>");
    xmlStringBuffer.append("</year>");
    xmlStringBuffer.append("<issue>");
    xmlStringBuffer.append("</issue>");
    xmlStringBuffer.append("<patent_no>");
    xmlStringBuffer.append("</patent_no>");
    xmlStringBuffer.append("<first_page>");
    xmlStringBuffer.append("</first_page>");
    xmlStringBuffer.append("<last_page>");
    xmlStringBuffer.append("</last_page>");
    xmlStringBuffer.append("<edition>");
    xmlStringBuffer.append("</edition>");
    xmlStringBuffer.append("<editor>");
    xmlStringBuffer.append("</editor>");
    xmlStringBuffer.append("<volume>");
    xmlStringBuffer.append("</volume>");
    xmlStringBuffer.append("<pub_place>");
    xmlStringBuffer.append("</pub_place>");
    xmlStringBuffer.append("<pub_company>");
    xmlStringBuffer.append("</pub_company>");
    xmlStringBuffer.append("<pub_med>");
    xmlStringBuffer.append("</pub_med>");
    xmlStringBuffer.append("<medline>");
    xmlStringBuffer.append("</medline>");
    xmlStringBuffer.append("</reference>");
    xmlStringBuffer.append("</reference>");
    xmlStringBuffer.append("</references>");

    xmlStringBuffer.append("<history>");
    xmlStringBuffer.append("</history>");

    xmlStringBuffer.append("</enzyme>");

    return xmlStringBuffer.toString();
  }

  private static String removeFormatting(String text) {
    text = text.replaceAll("\\<small\\>", "");
    text = text.replaceAll("\\<\\/small\\>", "");
    text = text.replaceAll("\\<b\\>", "");
    text = text.replaceAll("\\<\\/b\\>", "");
    text = text.replaceAll("\\<i\\>", "");
    text = text.replaceAll("\\<\\/i\\>", "");
    return text;
  }
}
FileLine
uk/ac/ebi/intenz/tools/release/helper/EnzymeEntryHelper.java103
uk/ac/ebi/intenz/tools/release/helper/EnzymeEntryHelper.java323
      xmlStringBuffer.append("<reference>");
      xmlStringBuffer.append("<number>");
      xmlStringBuffer.append("</number>");
      xmlStringBuffer.append("<authors>");
      xmlStringBuffer.append("</authors>");
      xmlStringBuffer.append("<title>");
      xmlStringBuffer.append("</title>");
      xmlStringBuffer.append("<year>");
      xmlStringBuffer.append("</year>");
      xmlStringBuffer.append("<issue>");
      xmlStringBuffer.append("</issue>");
      xmlStringBuffer.append("<patent_no>");
      xmlStringBuffer.append("</patent_no>");
      xmlStringBuffer.append("<first_page>");
      xmlStringBuffer.append("</first_page>");
      xmlStringBuffer.append("<last_page>");
      xmlStringBuffer.append("</last_page>");
      xmlStringBuffer.append("<edition>");
      xmlStringBuffer.append("</edition>");
      xmlStringBuffer.append("<editor>");
      xmlStringBuffer.append("</editor>");
      xmlStringBuffer.append("<volume>");
      xmlStringBuffer.append("</volume>");
      xmlStringBuffer.append("<pub_place>");
      xmlStringBuffer.append("</pub_place>");
      xmlStringBuffer.append("<pub_company>");
      xmlStringBuffer.append("</pub_company>");
      xmlStringBuffer.append("<pub_med>");
      xmlStringBuffer.append("</pub_med>");
      xmlStringBuffer.append("<medline>");
      xmlStringBuffer.append("</medline>");
      xmlStringBuffer.append("</reference>");
FileLine
uk/ac/ebi/intenz/tools/release/helper/EnzymeClassHelper.java75
uk/ac/ebi/intenz/tools/release/helper/EnzymeEntryHelper.java107
uk/ac/ebi/intenz/tools/release/helper/EnzymeSubSubclassHelper.java76
uk/ac/ebi/intenz/tools/release/helper/EnzymeSubclassHelper.java76
    xmlStringBuffer.append("</auhors>");
    xmlStringBuffer.append("<title>");
    xmlStringBuffer.append("</title>");
    xmlStringBuffer.append("<year>");
    xmlStringBuffer.append("</year>");
    xmlStringBuffer.append("<issue>");
    xmlStringBuffer.append("</issue>");
    xmlStringBuffer.append("<patent_no>");
    xmlStringBuffer.append("</patent_no>");
    xmlStringBuffer.append("<first_page>");
    xmlStringBuffer.append("</first_page>");
    xmlStringBuffer.append("<last_page>");
    xmlStringBuffer.append("</last_page>");
    xmlStringBuffer.append("<edition>");
    xmlStringBuffer.append("</edition>");
    xmlStringBuffer.append("<editor>");
    xmlStringBuffer.append("</editor>");
    xmlStringBuffer.append("<volume>");
    xmlStringBuffer.append("</volume>");
    xmlStringBuffer.append("<pub_place>");
    xmlStringBuffer.append("</pub_place>");
    xmlStringBuffer.append("<pub_company>");
    xmlStringBuffer.append("</pub_company>");
    xmlStringBuffer.append("<pub_med>");
    xmlStringBuffer.append("</pub_med>");
    xmlStringBuffer.append("<medline>");
    xmlStringBuffer.append("</medline>");
    xmlStringBuffer.append("</reference>");
    xmlStringBuffer.append("</reference>");
FileLine
uk/ac/ebi/intenz/tools/release/helper/EnzymeClassHelper.java75
uk/ac/ebi/intenz/tools/release/helper/EnzymeEntryHelper.java327
uk/ac/ebi/intenz/tools/release/helper/EnzymeSubSubclassHelper.java76
uk/ac/ebi/intenz/tools/release/helper/EnzymeSubclassHelper.java76
    xmlStringBuffer.append("</auhors>");
    xmlStringBuffer.append("<title>");
    xmlStringBuffer.append("</title>");
    xmlStringBuffer.append("<year>");
    xmlStringBuffer.append("</year>");
    xmlStringBuffer.append("<issue>");
    xmlStringBuffer.append("</issue>");
    xmlStringBuffer.append("<patent_no>");
    xmlStringBuffer.append("</patent_no>");
    xmlStringBuffer.append("<first_page>");
    xmlStringBuffer.append("</first_page>");
    xmlStringBuffer.append("<last_page>");
    xmlStringBuffer.append("</last_page>");
    xmlStringBuffer.append("<edition>");
    xmlStringBuffer.append("</edition>");
    xmlStringBuffer.append("<editor>");
    xmlStringBuffer.append("</editor>");
    xmlStringBuffer.append("<volume>");
    xmlStringBuffer.append("</volume>");
    xmlStringBuffer.append("<pub_place>");
    xmlStringBuffer.append("</pub_place>");
    xmlStringBuffer.append("<pub_company>");
    xmlStringBuffer.append("</pub_company>");
    xmlStringBuffer.append("<pub_med>");
    xmlStringBuffer.append("</pub_med>");
    xmlStringBuffer.append("<medline>");
    xmlStringBuffer.append("</medline>");
    xmlStringBuffer.append("</reference>");
FileLine
uk/ac/ebi/intenz/tools/release/helper/EnzymeClassHelper.java82
uk/ac/ebi/intenz/tools/release/helper/EnzymeEntryHelper.java114
uk/ac/ebi/intenz/tools/release/helper/EnzymeEntryHelper.java334
uk/ac/ebi/intenz/tools/release/helper/EnzymeReferenceHelper.java189
uk/ac/ebi/intenz/tools/release/helper/EnzymeSubSubclassHelper.java83
uk/ac/ebi/intenz/tools/release/helper/EnzymeSubclassHelper.java83
    xmlStringBuffer.append("<patent_no>");
    xmlStringBuffer.append("</patent_no>");
    xmlStringBuffer.append("<first_page>");
    xmlStringBuffer.append("</first_page>");
    xmlStringBuffer.append("<last_page>");
    xmlStringBuffer.append("</last_page>");
    xmlStringBuffer.append("<edition>");
    xmlStringBuffer.append("</edition>");
    xmlStringBuffer.append("<editor>");
    xmlStringBuffer.append("</editor>");
    xmlStringBuffer.append("<volume>");
    xmlStringBuffer.append("</volume>");
    xmlStringBuffer.append("<pub_place>");
    xmlStringBuffer.append("</pub_place>");
    xmlStringBuffer.append("<pub_company>");
    xmlStringBuffer.append("</pub_company>");
    xmlStringBuffer.append("<pub_med>");
    xmlStringBuffer.append("</pub_med>");
    xmlStringBuffer.append("<medline>");
    xmlStringBuffer.append("</medline>");
FileLine
uk/ac/ebi/intenz/tools/release/helper/EnzymeEntryHelper.java69
uk/ac/ebi/intenz/tools/release/helper/EnzymeEntryHelper.java166
      String commonName = enzymeEntry.getCommonName(EnzymeViewConstant.INTENZ).getName();
      if ( commonName == null ) commonName = enzymeEntry.getCommonName(EnzymeViewConstant.IUBMB).getName();
      xmlStringBuffer.append("<common_name>");
      xmlStringBuffer.append(removeFormatting(encoding.xml2Display(commonName)));
      xmlStringBuffer.append("</common_name>");
      xmlStringBuffer.append("<common_name>");
      xmlStringBuffer.append(removeFormatting(encoding.xml2Display(commonName, EncodingType.SWISSPROT_CODE)));
      xmlStringBuffer.append("</common_name>");
      xmlStringBuffer.append("</common_names>");

      // All other fields are empty.
      xmlStringBuffer.append("<description>");
      xmlStringBuffer.append("</description>");
      xmlStringBuffer.append("<reactions>");