Program: 146023
Project: 146023
Buggy source:
@Override public void validate(ValidationHandler handler){
  Integer lineNumberObject=(Integer)additionalData.get(MetadataRepository.XSD_LINE_NUMBER);
  Integer columnNumberObject=(Integer)additionalData.get(MetadataRepository.XSD_COLUMN_NUMBER);
  Element xmlElement=(Element)additionalData.get(MetadataRepository.XSD_DOM_ELEMENT);
  TypeMetadata validationType;
  if (containingType != null) {
    validationType=containingType;
  }
 else {
    int errorCount=handler.getErrorCount();
    containingField.validate(new LocationOverride(containingField,handler,xmlElement,lineNumberObject,columnNumberObject));
    if (handler.getErrorCount() > errorCount) {
      return;
    }
    validationType=containingField.getType();
  }
  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",xmlElement,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",xmlElement,lineNumberObject,columnNumberObject,ValidationError.TYPE_DOES_NOT_OWN_FIELD);
    }
  }
}

Fixed version (ground truth):
@Override public void validate(ValidationHandler handler){
  Integer lineNumberObject=(Integer)additionalData.get(MetadataRepository.XSD_LINE_NUMBER);
  Integer columnNumberObject=(Integer)additionalData.get(MetadataRepository.XSD_COLUMN_NUMBER);
  Element xmlElement=(Element)additionalData.get(MetadataRepository.XSD_DOM_ELEMENT);
  TypeMetadata validationType;
  if (containingType != null) {
    validationType=containingType;
  }
 else {
    int errorCount=handler.getErrorCount();
    containingField.validate(new LocationOverride(containingField,handler,xmlElement,lineNumberObject,columnNumberObject));
    if (handler.getErrorCount() > errorCount) {
      return;
    }
    validationType=containingField.getType();
  }
  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;
  }
  if (fieldName != null) {
    ComplexTypeMetadata complexTypeMetadata=(ComplexTypeMetadata)validationType;
    int errorCount=handler.getErrorCount();
    complexTypeMetadata.validate(handler);
    if (handler.getErrorCount() > errorCount) {
      return;
    }
    if (!complexTypeMetadata.hasField(fieldName)) {
      handler.error(this,"String_Node_Str" + validationType.getName() + "String_Node_Str"+ fieldName+ "String_Node_Str",xmlElement,lineNumberObject,columnNumberObject,ValidationError.TYPE_DOES_NOT_OWN_FIELD);
    }
  }
}