CPD Results

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

Duplications

FileLine
uk/ac/ebi/intenz/tools/sib/helper/EnzymeHelper.java125
uk/ac/ebi/intenz/tools/sib/helper/SibEntryHelper.java136
      StringBuffer commentString = new StringBuffer();
      for (int iii = 0; iii < comments.size(); iii++) {
        EnzymeComment comment = (EnzymeComment) comments.get(iii);
        if (EnzymeViewConstant.isInSIBView(comment.getView().toString())) {
          commentString.append(encoding.xml2Display(translator.toASCII(comment.getCommentText().trim(), false, false), encodingType));
          commentString.append(" ");
        }
      }
      sibEnzymeEntry.setComment(commentString.toString().trim());

      // MIM/PROSITE/UNIPROT xrefs.
      Set xrefs = enzymeEntry.getLinks();
      for (Iterator it = xrefs.iterator(); it.hasNext();) {
        EnzymeLink enzymeLink = (EnzymeLink) it.next();
        if (enzymeLink.getXrefDatabaseConstant() == XrefDatabaseConstant.MIM &&
            EnzymeViewConstant.isInSIBView(enzymeLink.getView().toString())) {
          SPTRCrossReference DICrossReference = getDICrossReference(enzymeLink);
          sibEnzymeEntry.addCrossReference(DICrossReference);
        }
        if (enzymeLink.getXrefDatabaseConstant() == XrefDatabaseConstant.PROSITE &&
            EnzymeViewConstant.isInSIBView(enzymeLink.getView().toString())) {
          SPTRCrossReference PRCrossReference = getPRCrossReference(enzymeLink);
          sibEnzymeEntry.addCrossReference(PRCrossReference);
        }
        if (enzymeLink.getXrefDatabaseConstant() == XrefDatabaseConstant.SWISSPROT &&
            EnzymeViewConstant.isInSIBView(enzymeLink.getView().toString())) {
          SPTRCrossReference DRCrossReference = getDRCrossReference(enzymeLink);
          sibEnzymeEntry.addCrossReference(DRCrossReference);
        }
      }
    } catch (SPTRException e) {
      throw new EnzymeFlatFileWriteException(e);
    }

    return sibEnzymeEntry;
  }

  

   private static EnzymeEntryImpl getDeletedTransferredSibEntry(EnzymeEntry enzymeEntry) throws SPTRException {