Program: 146883
Project: 146883
Buggy source:
private void processCase(TreeElement caseElement) throws MalformedCaseModelException {
  TreeElement caseIdAttribute=caseElement.getAttribute(null,"String_Node_Str");
  if (caseIdAttribute == null) {
    throw new MalformedCaseModelException("String_Node_Str" + caseElement.getRef().toString(true),"String_Node_Str");
  }
  if (caseIdAttribute.getValue() == null) {
    throw new MalformedCaseModelException("String_Node_Str" + caseElement.getRef().toString(true),"String_Node_Str");
  }
  String caseId=caseIdAttribute.getValue().uncast().getString();
  TreeElement dateModified=caseElement.getAttribute(null,"String_Node_Str");
  if (dateModified == null) {
    throw new MalformedCaseModelException("String_Node_Str" + caseElement.getRef().toString(true),"String_Node_Str");
  }
  if (dateModified.getValue() == null) {
    throw new MalformedCaseModelException("String_Node_Str" + caseElement.getRef().toString(true),"String_Node_Str");
  }
  Date date=(Date)(new DateTimeData().cast(dateModified.getValue().uncast())).getValue();
  for (int i=0; i < caseElement.getNumChildren(); ++i) {
    TreeElement kid=caseElement.getChildAt(i);
    if (!caseElement.isRelevant()) {
      continue;
    }
    if (kid.getName().equals("String_Node_Str")) {
      if (kid.isRelevant()) {
        c=processCaseCreate(kid,caseId,date);
      }
    }
 else     if (kid.getName().equals("String_Node_Str")) {
      if (c == null) {
        c=getCase(caseId);
      }
      if (kid.isRelevant()) {
        processCaseMutate(kid,c,date);
      }
    }
 else     if (kid.getName().equals("String_Node_Str")) {
      if (c == null) {
        c=getCase(caseId);
      }
      if (kid.isRelevant()) {
        processCaseClose(kid,c,date);
      }
    }
 else     if (kid.getName().equals("String_Node_Str")) {
      if (c == null) {
        c=getCase(caseId);
      }
      if (kid.isRelevant()) {
        processCaseIndex(kid,c);
      }
    }
  }
}

Fixed version (ground truth):
private void processCase(TreeElement caseElement) throws MalformedCaseModelException {
  c=null;
  TreeElement caseIdAttribute=caseElement.getAttribute(null,"String_Node_Str");
  if (caseIdAttribute == null) {
    throw new MalformedCaseModelException("String_Node_Str" + caseElement.getRef().toString(true),"String_Node_Str");
  }
  if (caseIdAttribute.getValue() == null) {
    throw new MalformedCaseModelException("String_Node_Str" + caseElement.getRef().toString(true),"String_Node_Str");
  }
  String caseId=caseIdAttribute.getValue().uncast().getString();
  TreeElement dateModified=caseElement.getAttribute(null,"String_Node_Str");
  if (dateModified == null) {
    throw new MalformedCaseModelException("String_Node_Str" + caseElement.getRef().toString(true),"String_Node_Str");
  }
  if (dateModified.getValue() == null) {
    throw new MalformedCaseModelException("String_Node_Str" + caseElement.getRef().toString(true),"String_Node_Str");
  }
  Date date=(Date)(new DateTimeData().cast(dateModified.getValue().uncast())).getValue();
  for (int i=0; i < caseElement.getNumChildren(); ++i) {
    TreeElement kid=caseElement.getChildAt(i);
    if (!caseElement.isRelevant()) {
      continue;
    }
    if (kid.getName().equals("String_Node_Str")) {
      if (kid.isRelevant()) {
        c=processCaseCreate(kid,caseId,date);
      }
    }
 else     if (kid.getName().equals("String_Node_Str")) {
      if (c == null) {
        c=getCase(caseId);
      }
      if (kid.isRelevant()) {
        processCaseMutate(kid,c,date);
      }
    }
 else     if (kid.getName().equals("String_Node_Str")) {
      if (c == null) {
        c=getCase(caseId);
      }
      if (kid.isRelevant()) {
        processCaseClose(kid,c,date);
      }
    }
 else     if (kid.getName().equals("String_Node_Str")) {
      if (c == null) {
        c=getCase(caseId);
      }
      if (kid.isRelevant()) {
        processCaseIndex(kid,c);
      }
    }
  }
}