Program: 59070
Project: 59070
Buggy source:
/** 
 * Reacts on the elements of the entry tag. An example entry tag looks like this: <entry id="1" name="ec:1.8.4.1" type="enzyme" reaction="rn:R01292" link="http://www.genome.jp/dbget-bin/www_bget?enzyme+1.8.4.1">
 */
protected void handleEntryTag(){
  int iEntryId=0;
  String sName="String_Node_Str";
  String sType="String_Node_Str";
  String sExternalLink="String_Node_Str";
  String sReactionId="String_Node_Str";
  for (int iAttributeIndex=0; iAttributeIndex < attributes.getLength(); iAttributeIndex++) {
    sAttributeName=attributes.getLocalName(iAttributeIndex);
    if ("String_Node_Str".equals(sAttributeName)) {
      sAttributeName=attributes.getQName(iAttributeIndex);
    }
    if (sAttributeName.equals("String_Node_Str")) {
      iEntryId=new Integer(attributes.getValue(iAttributeIndex));
    }
 else     if (sAttributeName.equals("String_Node_Str")) {
      sName=attributes.getValue(iAttributeIndex);
    }
 else     if (sAttributeName.equals("String_Node_Str")) {
      sType=attributes.getValue(iAttributeIndex);
    }
 else     if (sAttributeName.equals("String_Node_Str")) {
      sExternalLink=attributes.getValue(iAttributeIndex);
    }
 else     if (sAttributeName.equals("String_Node_Str")) {
      sReactionId=attributes.getValue(iAttributeIndex);
    }
  }
  iCurrentEntryId=iEntryId;
  alCurrentVertex.clear();
  if (sType.equals("String_Node_Str")) {
    StringTokenizer sTokenText=new StringTokenizer(sName,"String_Node_Str");
    int iDavidId=-1;
    String sTmpVertexName="String_Node_Str";
    while (sTokenText.hasMoreTokens()) {
      sTmpVertexName=sTokenText.nextToken();
      iDavidId=generalManager.getGenomeIdManager().getIdIntFromIntByMapping(StringConversionTool.convertStringToInt(sTmpVertexName.substring(4),-1),EMappingType.ENTREZ_GENE_ID_2_DAVID);
      if (iDavidId == -1) {
        generalManager.getLogger().log(Level.WARNING,"String_Node_Str" + sTmpVertexName + "String_Node_Str");
        continue;
      }
      currentVertex=generalManager.getPathwayItemManager().createVertexGene(sTmpVertexName,sType,sExternalLink,sReactionId,iDavidId);
      alCurrentVertex.add(currentVertex);
    }
  }
 else {
    currentVertex=generalManager.getPathwayItemManager().createVertex(sName,sType,sExternalLink,sReactionId);
    alCurrentVertex.add(currentVertex);
  }
}

Fixed version (ground truth):
/** 
 * Reacts on the elements of the entry tag. An example entry tag looks like this: <entry id="1" name="ec:1.8.4.1" type="enzyme" reaction="rn:R01292" link="http://www.genome.jp/dbget-bin/www_bget?enzyme+1.8.4.1">
 */
protected void handleEntryTag(){
  int iEntryId=0;
  String sName="String_Node_Str";
  String sType="String_Node_Str";
  String sExternalLink="String_Node_Str";
  String sReactionId="String_Node_Str";
  for (int iAttributeIndex=0; iAttributeIndex < attributes.getLength(); iAttributeIndex++) {
    sAttributeName=attributes.getLocalName(iAttributeIndex);
    if ("String_Node_Str".equals(sAttributeName)) {
      sAttributeName=attributes.getQName(iAttributeIndex);
    }
    if (sAttributeName.equals("String_Node_Str")) {
      iEntryId=new Integer(attributes.getValue(iAttributeIndex));
    }
 else     if (sAttributeName.equals("String_Node_Str")) {
      sName=attributes.getValue(iAttributeIndex);
    }
 else     if (sAttributeName.equals("String_Node_Str")) {
      sType=attributes.getValue(iAttributeIndex);
    }
 else     if (sAttributeName.equals("String_Node_Str")) {
      sExternalLink=attributes.getValue(iAttributeIndex);
    }
 else     if (sAttributeName.equals("String_Node_Str")) {
      sReactionId=attributes.getValue(iAttributeIndex);
    }
  }
  iCurrentEntryId=iEntryId;
  alCurrentVertex.clear();
  if (sType.equals("String_Node_Str")) {
    StringTokenizer sTokenText=new StringTokenizer(sName,"String_Node_Str");
    int iDavidId=-1;
    String sTmpVertexName="String_Node_Str";
    while (sTokenText.hasMoreTokens()) {
      sTmpVertexName=sTokenText.nextToken();
      iDavidId=generalManager.getGenomeIdManager().getIdIntFromIntByMapping(StringConversionTool.convertStringToInt(sTmpVertexName.substring(4),-1),EMappingType.ENTREZ_GENE_ID_2_DAVID);
      if (iDavidId == -1) {
        generalManager.getLogger().log(Level.FINE,"String_Node_Str" + sTmpVertexName + "String_Node_Str");
        continue;
      }
      currentVertex=generalManager.getPathwayItemManager().createVertexGene(sTmpVertexName,sType,sExternalLink,sReactionId,iDavidId);
      alCurrentVertex.add(currentVertex);
    }
  }
 else {
    currentVertex=generalManager.getPathwayItemManager().createVertex(sName,sType,sExternalLink,sReactionId);
    alCurrentVertex.add(currentVertex);
  }
}