Program: 146039
Project: 146039
Buggy source:
@Override public void validate(ValidationHandler handler){
  TypeMetadata validationType;
  if (containingType != null) {
    validationType=containingType;
  }
 else {
    int errorCount=handler.getErrorCount();
    containingField.validate(handler);
    if (handler.getErrorCount() > errorCount) {
      return;
    }
    validationType=containingField.getType();
  }
  Integer lineNumberObject=(Integer)additionalData.get(MetadataRepository.XSD_LINE_NUMBER);
  Integer columnNumberObject=(Integer)additionalData.get(MetadataRepository.XSD_COLUMN_NUMBER);
  if (lineNumberObject == null) {
    lineNumberObject=validationType.<Integer>getData(MetadataRepository.XSD_LINE_NUMBER);
  }
  if (columnNumberObject == null) {
    columnNumberObject=validationType.<Integer>getData(MetadataRepository.XSD_COLUMN_NUMBER);
  }
  if (lineNumberObject == null) {
    lineNumberObject=-1;
  }
  if (columnNumberObject == null) {
    columnNumberObject=-1;
  }
  TypeMetadata type=repository.getComplexType(validationType.getName());
  if (type == null) {
    type=repository.getNonInstantiableType(validationType.getNamespace(),validationType.getName());
  }
  if (type == null) {
    handler.error(this,"String_Node_Str" + validationType.getName() + "String_Node_Str",lineNumberObject,columnNumberObject,ValidationError.TYPE_DOES_NOT_EXIST);
    return;
  }
  if (fieldName != null) {
    ComplexTypeMetadata complexTypeMetadata=(ComplexTypeMetadata)validationType;
    if (!complexTypeMetadata.hasField(fieldName)) {
      handler.error(this,"String_Node_Str" + validationType.getName() + "String_Node_Str"+ fieldName+ "String_Node_Str",lineNumberObject,columnNumberObject,ValidationError.TYPE_DOES_NOT_OWN_FIELD);
    }
  }
}

Fixed version (ground truth):
@Override public void validate(ValidationHandler handler){
  TypeMetadata validationType;
  if (containingType != null) {
    validationType=containingType;
  }
 else {
    int errorCount=handler.getErrorCount();
    containingField.validate(handler);
    if (handler.getErrorCount() > errorCount) {
      return;
    }
    validationType=containingField.getType();
  }
  Integer lineNumberObject=(Integer)additionalData.get(MetadataRepository.XSD_LINE_NUMBER);
  Integer columnNumberObject=(Integer)additionalData.get(MetadataRepository.XSD_COLUMN_NUMBER);
  if (lineNumberObject == null) {
    lineNumberObject=validationType.<Integer>getData(MetadataRepository.XSD_LINE_NUMBER);
  }
  if (columnNumberObject == null) {
    columnNumberObject=validationType.<Integer>getData(MetadataRepository.XSD_COLUMN_NUMBER);
  }
  if (lineNumberObject == null) {
    lineNumberObject=-1;
  }
  if (columnNumberObject == null) {
    columnNumberObject=-1;
  }
  TypeMetadata type=repository.getComplexType(validationType.getName());
  if (type == null) {
    type=repository.getNonInstantiableType(validationType.getNamespace(),validationType.getName());
  }
  if (type == null) {
    handler.error(this,"String_Node_Str" + validationType.getName() + "String_Node_Str",(Element)additionalData.get(MetadataRepository.XSD_DOM_ELEMENT),lineNumberObject,columnNumberObject,ValidationError.TYPE_DOES_NOT_EXIST);
    return;
  }
  if (fieldName != null) {
    ComplexTypeMetadata complexTypeMetadata=(ComplexTypeMetadata)validationType;
    if (!complexTypeMetadata.hasField(fieldName)) {
      handler.error(this,"String_Node_Str" + validationType.getName() + "String_Node_Str"+ fieldName+ "String_Node_Str",(Element)additionalData.get(MetadataRepository.XSD_DOM_ELEMENT),lineNumberObject,columnNumberObject,ValidationError.TYPE_DOES_NOT_OWN_FIELD);
    }
  }
}