Program: 9973
Project: 9973
Buggy source:
private void renderPlus(int w){
  if (eval != null) {
    coveredIndividualSize=((EvaluatedDescriptionClass)eval).getCoveredInstances().size();
    double newConcepts=((EvaluatedDescriptionClass)eval).getAddition();
    double oldConcepts=((EvaluatedDescriptionClass)eval).getCoverage();
    shiftNewConcept=0;
    shiftOldConcept=0;
    shiftNewConceptX=0;
    shiftCovered=0;
    if (coveredIndividualSize == 0) {
      shiftNewConcept=(int)Math.round(((WIDTH + w) / 2.0) * newConcepts);
    }
 else     if (additionalIndividualSize != coveredIndividualSize) {
      shiftNewConcept=(int)Math.round(((WIDTH + w) / 2.0) * (1.0 + (1.0 - oldConcepts)));
      shiftOldConcept=(int)Math.round(((WIDTH + w) / 2.0) * oldConcepts);
      shiftCovered=(int)Math.round(((WIDTH + w) / 2.0) * (1 - oldConcepts));
    }
    if (((EvaluatedDescriptionClass)eval).getAddition() != 1.0 && ((EvaluatedDescriptionClass)eval).getCoverage() == 1.0) {
      shiftCovered=(int)Math.round(((WIDTH + w) / 2.0) * 0.625);
      shiftNewConceptX=shiftCovered;
      shiftNewConcept=2 * shiftNewConceptX;
    }
  }
  int i=conceptNew.length();
  while (i > 0) {
    int sub=conceptNew.indexOf("String_Node_Str");
    String subString=conceptNew.substring(0,sub) + "String_Node_Str";
    conceptNew=conceptNew.replace(conceptNew.substring(0,sub + 1),"String_Node_Str");
    while (sub < SUBSTRING_SIZE) {
      if (conceptNew.length() > 0 && conceptNew.contains("String_Node_Str")) {
        sub=conceptNew.indexOf("String_Node_Str");
        if (subString.length() + sub < SUBSTRING_SIZE) {
          subString=subString + conceptNew.substring(0,sub) + "String_Node_Str";
          conceptNew=conceptNew.replace(conceptNew.substring(0,sub + 1),"String_Node_Str");
          sub=subString.length();
        }
 else {
          break;
        }
      }
 else {
        if (subString.length() + conceptNew.length() > SUBSTRING_SIZE + SPACE_SIZE) {
          conceptVector.add(subString);
          subString=conceptNew;
          conceptNew="String_Node_Str";
          break;
        }
 else {
          subString=subString + conceptNew;
          conceptNew="String_Node_Str";
          break;
        }
      }
    }
    conceptVector.add(subString);
    i=conceptNew.length();
  }
}

Fixed version (ground truth):
private void renderPlus(int w){
  if (eval != null) {
    coveredIndividualSize=((EvaluatedDescriptionClass)eval).getCoveredInstances().size();
    double newConcepts=((EvaluatedDescriptionClass)eval).getAddition();
    double oldConcepts=((EvaluatedDescriptionClass)eval).getCoverage();
    shiftNewConcept=0;
    shiftOldConcept=0;
    shiftNewConceptX=0;
    shiftCovered=0;
    if (coveredIndividualSize == 0) {
      shiftNewConcept=(int)Math.round(((WIDTH + w) / 2.0) * newConcepts);
    }
 else     if (additionalIndividualSize != coveredIndividualSize) {
      shiftNewConcept=(int)Math.round(((WIDTH + w) / 2.0) * (1.0 + (1.0 - oldConcepts)));
      shiftOldConcept=(int)Math.round(((WIDTH + w) / 2.0) * oldConcepts);
      shiftCovered=(int)Math.round(((WIDTH + w) / 2.0) * (1 - oldConcepts));
    }
    if (((EvaluatedDescriptionClass)eval).getAddition() != 1.0 && ((EvaluatedDescriptionClass)eval).getCoverage() == 1.0) {
      shiftCovered=(int)Math.round(((WIDTH + w) / 2.0) * 0.625);
      shiftNewConceptX=shiftCovered;
      shiftNewConcept=2 * shiftNewConceptX;
    }
  }
  int i=conceptNew.length();
  while (i > 0) {
    int sub=0;
    String subString="String_Node_Str";
    if (conceptNew.contains("String_Node_Str")) {
      sub=conceptNew.indexOf("String_Node_Str");
      subString=conceptNew.substring(0,sub) + "String_Node_Str";
      conceptNew=conceptNew.replace(conceptNew.substring(0,sub + 1),"String_Node_Str");
    }
 else {
      subString=conceptNew;
      conceptNew="String_Node_Str";
    }
    while (sub < SUBSTRING_SIZE) {
      if (conceptNew.length() > 0 && conceptNew.contains("String_Node_Str")) {
        sub=conceptNew.indexOf("String_Node_Str");
        if (subString.length() + sub < SUBSTRING_SIZE) {
          subString=subString + conceptNew.substring(0,sub) + "String_Node_Str";
          conceptNew=conceptNew.replace(conceptNew.substring(0,sub + 1),"String_Node_Str");
          sub=subString.length();
        }
 else {
          break;
        }
      }
 else {
        if (subString.length() + conceptNew.length() > SUBSTRING_SIZE + SPACE_SIZE) {
          conceptVector.add(subString);
          subString=conceptNew;
          conceptNew="String_Node_Str";
          break;
        }
 else {
          subString=subString + conceptNew;
          conceptNew="String_Node_Str";
          break;
        }
      }
    }
    conceptVector.add(subString);
    i=conceptNew.length();
  }
}