Program: 189054
Project: 189054
Buggy source:
@Override public void run(){
  FeatureSet fSet=SWQEFactory.getQueryInterface().getAtomBySGID(FeatureSet.class,this.featureSetID);
  this.modelManager=SWQEFactory.getModelManager();
  modelManager.persist(fSet);
  if (this.getTagSetIDs() != null) {
    for (    SGID tagSetID : this.getTagSetIDs()) {
      this.potentialTagSets.add(SWQEFactory.getQueryInterface().getLatestAtomBySGID(tagSetID,TagSet.class));
    }
  }
  this.adHocSet=SWQEFactory.getQueryInterface().getLatestAtomBySGID(this.getAdhoctagset(),TagSet.class);
  modelManager.persist(adHocSet);
  BufferedReader inputStream=null;
  try {
    pmi.getLock();
    if (compressed) {
      if (input.endsWith("String_Node_Str") || input.endsWith("String_Node_Str")) {
        inputStream=new BufferedReader(new InputStreamReader(new CompressorStreamFactory().createCompressorInputStream("String_Node_Str",new BufferedInputStream(new FileInputStream(input)))));
      }
 else       if (input.endsWith("String_Node_Str") || input.endsWith("String_Node_Str")) {
        inputStream=new BufferedReader(new InputStreamReader(new CompressorStreamFactory().createCompressorInputStream("String_Node_Str",new BufferedInputStream(new FileInputStream(input)))));
      }
 else {
        throw new Exception("String_Node_Str" + input + "String_Node_Str");
      }
    }
 else {
      inputStream=new BufferedReader(new FileReader(input));
    }
    String l;
    Feature.Builder fBuilder=modelManager.buildFeature();
    int count=0;
    while ((l=inputStream.readLine()) != null) {
      count++;
      if (count % this.getBatch_size() == 0) {
        modelManager.flush();
        modelManager.clear();
        modelManager.persist(adHocSet);
        modelManager.persist(fSet);
      }
      if (!l.startsWith("String_Node_Str")) {
        String[] t=l.split("String_Node_Str");
        fBuilder.setSeqid(t[0]);
        Set<Tag> tagSet=new HashSet<Tag>();
        tagSet.add(getTagSpec(t[0]));
        tagSet.add(getTagSpec(ImportConstants.VCF_REFERENCE_BASE).toBuilder().setValue(t[3].toUpperCase()).build());
        tagSet.add(getTagSpec(ImportConstants.VCF_CONSENSUS_BASE).toBuilder().setValue(t[4].toUpperCase()).build());
        Tag calledTag=getTagSpec(ImportConstants.VCF_CALLED_BASE).toBuilder().setValue(t[4].toUpperCase()).build();
        tagSet.add(calledTag);
        if (!"String_Node_Str".equals(t[5])) {
          fBuilder.setScore(Double.parseDouble(t[5]));
        }
        if (!"String_Node_Str".equals(t[2])) {
          tagSet.add(getTagSpec(ImportConstants.VCF_SECOND_ID).toBuilder().setValue(t[2]).build());
        }
        String calledBase=t[4].toUpperCase();
        if (t[4].toUpperCase().length() > 1 && t[4].toUpperCase().contains("String_Node_Str")) {
          tagSet.remove(calledTag);
          if ("String_Node_Str".equals(calledBase) || "String_Node_Str".equals(calledBase)) {
            calledBase="String_Node_Str";
          }
 else           if ("String_Node_Str".equals(calledBase) || "String_Node_Str".equals(calledBase)) {
            calledBase="String_Node_Str";
          }
 else           if ("String_Node_Str".equals(calledBase) || "String_Node_Str".equals(calledBase)) {
            calledBase="String_Node_Str";
          }
 else           if ("String_Node_Str".equals(calledBase) || "String_Node_Str".equals(calledBase)) {
            calledBase="String_Node_Str";
          }
 else           if ("String_Node_Str".equals(calledBase) || "String_Node_Str".equals(calledBase)) {
            calledBase="String_Node_Str";
          }
 else           if ("String_Node_Str".equals(calledBase) || "String_Node_Str".equals(calledBase)) {
            calledBase="String_Node_Str";
          }
 else {
          }
          calledTag=getTagSpec(ImportConstants.VCF_CALLED_BASE).toBuilder().setValue(calledBase).build();
          tagSet.add(calledTag);
        }
        fBuilder.setType(ImportConstants.VCF_SNV);
        tagSet.add(getTagSpec(ImportConstants.VCF_SNV).toBuilder().build());
        if (!"String_Node_Str".equals(t[1])) {
          Integer pos=Integer.parseInt(t[1]);
          fBuilder.setStart(pos - 1);
          fBuilder.setStop(pos);
        }
        tagSet.add(getTagSpec(ImportConstants.VCF_FILTER).toBuilder().setValue(t[6]).build());
        tagSet.add(getTagSpec(ImportConstants.VCF_INFO).toBuilder().setValue(t[7]).build());
        boolean af1LtHalf=false;
        boolean fqLt0=false;
        String[] tags=t[7].split("String_Node_Str");
        for (        String tag : tags) {
          if (tag.contains("String_Node_Str")) {
            String[] kv=tag.split("String_Node_Str");
            tagSet.add(getTagSpec(kv[0]).toBuilder().setValue(kv[1]).build());
            if ("String_Node_Str".equals(kv[0])) {
              tagSet.add(getTagSpec(ImportConstants.VCF_READ_COUNTS).toBuilder().setValue(kv[1]).build());
            }
            if ("String_Node_Str".equals(kv[0])) {
              float fq=Float.parseFloat(kv[1]);
              if (fq < 0) {
                tagSet.add(getTagSpec(ImportConstants.VCF_HOMOZYGOUS).toBuilder().build());
                fqLt0=true;
              }
 else {
                tagSet.add(getTagSpec(ImportConstants.VCF_HETEROZYGOUS).toBuilder().build());
              }
            }
            if ("String_Node_Str".equals(kv[0])) {
              float af1=Float.parseFloat(kv[1]);
              if (af1 < 0.5) {
                af1LtHalf=true;
              }
            }
          }
 else {
            tagSet.add(getTagSpec(tag).toBuilder().build());
          }
        }
        if (t.length > 9 && t[8].contains("String_Node_Str") && t[9].contains("String_Node_Str")) {
          tagSet.add(getTagSpec(ImportConstants.VCF_HETEROZYGOUS).toBuilder().build());
        }
 else         if (t.length > 9 && t[8].contains("String_Node_Str") && t[9].contains("String_Node_Str")) {
          tagSet.add(getTagSpec(ImportConstants.VCF_HOMOZYGOUS).toBuilder().build());
        }
        if (af1LtHalf && fqLt0) {
          System.out.println("String_Node_Str");
        }
 else {
          Feature build=fBuilder.build();
          for (          Tag tag : tagSet) {
            build.associateTag(tag);
          }
          fSet.add(build);
          if (count % this.getBatch_size() == 0) {
            System.out.println(new Date().toString() + workerName + "String_Node_Str"+ build.getSeqid()+ "String_Node_Str"+ build.getStart()+ "String_Node_Str"+ build.getStop()+ "String_Node_Str"+ build.getSeqid()+ "String_Node_Str"+ count);
          }
        }
        fBuilder=modelManager.buildFeature();
      }
    }
    inputStream.close();
  }
 catch (  Exception e) {
    Logger.getLogger(VCFVariantImportWorker.class.getName()).fatal("String_Node_Str" + input,e);
    throw new RuntimeException("String_Node_Str");
  }
 finally {
    modelManager.close();
    pmi.releaseLock();
  }
}

Fixed version (ground truth):
@Override public void run(){
  FeatureSet fSet=SWQEFactory.getQueryInterface().getAtomBySGID(FeatureSet.class,this.featureSetID);
  this.modelManager=SWQEFactory.getModelManager();
  modelManager.persist(fSet);
  if (this.getTagSetIDs() != null) {
    for (    SGID tagSetID : this.getTagSetIDs()) {
      this.potentialTagSets.add(SWQEFactory.getQueryInterface().getLatestAtomBySGID(tagSetID,TagSet.class));
    }
  }
  this.adHocSet=SWQEFactory.getQueryInterface().getLatestAtomBySGID(this.getAdhoctagset(),TagSet.class);
  modelManager.persist(adHocSet);
  BufferedReader inputStream=null;
  try {
    pmi.getLock();
    if (compressed) {
      inputStream=handleCompressedInput(input);
    }
 else {
      inputStream=new BufferedReader(new FileReader(input));
    }
    String l;
    Feature.Builder fBuilder=modelManager.buildFeature();
    int count=0;
    while ((l=inputStream.readLine()) != null) {
      count++;
      if (count % this.getBatch_size() == 0) {
        modelManager.flush();
        modelManager.clear();
        modelManager.persist(adHocSet);
        modelManager.persist(fSet);
      }
      if (!l.startsWith("String_Node_Str")) {
        String[] t=l.split("String_Node_Str");
        fBuilder.setSeqid(t[0]);
        Set<Tag> tagSet=new HashSet<Tag>();
        tagSet.add(getTagSpec(t[0]));
        tagSet.add(getTagSpec(ImportConstants.VCF_REFERENCE_BASE).toBuilder().setValue(t[3].toUpperCase()).build());
        tagSet.add(getTagSpec(ImportConstants.VCF_CONSENSUS_BASE).toBuilder().setValue(t[4].toUpperCase()).build());
        Tag calledTag=getTagSpec(ImportConstants.VCF_CALLED_BASE).toBuilder().setValue(t[4].toUpperCase()).build();
        tagSet.add(calledTag);
        if (!"String_Node_Str".equals(t[5])) {
          fBuilder.setScore(Double.parseDouble(t[5]));
        }
        if (!"String_Node_Str".equals(t[2])) {
          tagSet.add(getTagSpec(ImportConstants.VCF_SECOND_ID).toBuilder().setValue(t[2]).build());
        }
        String calledBase=t[4].toUpperCase();
        if (t[4].toUpperCase().length() > 1 && t[4].toUpperCase().contains("String_Node_Str")) {
          tagSet.remove(calledTag);
          if ("String_Node_Str".equals(calledBase) || "String_Node_Str".equals(calledBase)) {
            calledBase="String_Node_Str";
          }
 else           if ("String_Node_Str".equals(calledBase) || "String_Node_Str".equals(calledBase)) {
            calledBase="String_Node_Str";
          }
 else           if ("String_Node_Str".equals(calledBase) || "String_Node_Str".equals(calledBase)) {
            calledBase="String_Node_Str";
          }
 else           if ("String_Node_Str".equals(calledBase) || "String_Node_Str".equals(calledBase)) {
            calledBase="String_Node_Str";
          }
 else           if ("String_Node_Str".equals(calledBase) || "String_Node_Str".equals(calledBase)) {
            calledBase="String_Node_Str";
          }
 else           if ("String_Node_Str".equals(calledBase) || "String_Node_Str".equals(calledBase)) {
            calledBase="String_Node_Str";
          }
 else {
          }
          calledTag=getTagSpec(ImportConstants.VCF_CALLED_BASE).toBuilder().setValue(calledBase).build();
          tagSet.add(calledTag);
        }
        fBuilder.setType(ImportConstants.VCF_SNV);
        tagSet.add(getTagSpec(ImportConstants.VCF_SNV).toBuilder().build());
        if (!"String_Node_Str".equals(t[1])) {
          Integer pos=Integer.parseInt(t[1]);
          fBuilder.setStart(pos - 1);
          fBuilder.setStop(pos);
        }
        tagSet.add(getTagSpec(ImportConstants.VCF_FILTER).toBuilder().setValue(t[6]).build());
        tagSet.add(getTagSpec(ImportConstants.VCF_INFO).toBuilder().setValue(t[7]).build());
        boolean af1LtHalf=false;
        boolean fqLt0=false;
        String[] tags=t[7].split("String_Node_Str");
        for (        String tag : tags) {
          if (tag.contains("String_Node_Str")) {
            String[] kv=tag.split("String_Node_Str");
            tagSet.add(getTagSpec(kv[0]).toBuilder().setValue(kv[1]).build());
            if ("String_Node_Str".equals(kv[0])) {
              tagSet.add(getTagSpec(ImportConstants.VCF_READ_COUNTS).toBuilder().setValue(kv[1]).build());
            }
            if ("String_Node_Str".equals(kv[0])) {
              float fq=Float.parseFloat(kv[1]);
              if (fq < 0) {
                tagSet.add(getTagSpec(ImportConstants.VCF_HOMOZYGOUS).toBuilder().build());
                fqLt0=true;
              }
 else {
                tagSet.add(getTagSpec(ImportConstants.VCF_HETEROZYGOUS).toBuilder().build());
              }
            }
            if ("String_Node_Str".equals(kv[0])) {
              float af1=Float.parseFloat(kv[1]);
              if (af1 < 0.5) {
                af1LtHalf=true;
              }
            }
          }
 else {
            tagSet.add(getTagSpec(tag).toBuilder().build());
          }
        }
        if (t.length > 9 && t[8].contains("String_Node_Str") && t[9].contains("String_Node_Str")) {
          tagSet.add(getTagSpec(ImportConstants.VCF_HETEROZYGOUS).toBuilder().build());
        }
 else         if (t.length > 9 && t[8].contains("String_Node_Str") && t[9].contains("String_Node_Str")) {
          tagSet.add(getTagSpec(ImportConstants.VCF_HOMOZYGOUS).toBuilder().build());
        }
        if (af1LtHalf && fqLt0) {
          System.out.println("String_Node_Str");
        }
 else {
          Feature build=fBuilder.build();
          for (          Tag tag : tagSet) {
            build.associateTag(tag);
          }
          fSet.add(build);
          if (count % this.getBatch_size() == 0) {
            System.out.println(new Date().toString() + workerName + "String_Node_Str"+ build.getSeqid()+ "String_Node_Str"+ build.getStart()+ "String_Node_Str"+ build.getStop()+ "String_Node_Str"+ build.getSeqid()+ "String_Node_Str"+ count);
          }
        }
        fBuilder=modelManager.buildFeature();
      }
    }
    inputStream.close();
  }
 catch (  Exception e) {
    Logger.getLogger(VCFVariantImportWorker.class.getName()).fatal("String_Node_Str" + input,e);
    throw new RuntimeException("String_Node_Str");
  }
 finally {
    modelManager.close();
    pmi.releaseLock();
  }
}