Program: 25749
Project: 25749
Buggy source:
/** 
 * <p> Validates the given object as a valid UploadSchema instance. This will flag errors in the following conditions: <ul> <li>value is null or not an UploadSchema</li> <li>fieldDefinitions is null or empty</li> <li>fieldDefinitions contains null or invalid entries</li> <li>name is null or empty</li> <li>revision is negative</li> <li>schemaId is null or empty</li> <li>schemaType is null</li> </ul> </p>
 * @see org.springframework.validation.Validator#validate
 */
@Override public void validate(Object target,Errors errors){
  if (target == null) {
    errors.rejectValue("String_Node_Str","String_Node_Str");
  }
 else   if (!(target instanceof UploadSchema)) {
    errors.rejectValue("String_Node_Str","String_Node_Str");
  }
 else {
    UploadSchema uploadSchema=(UploadSchema)target;
    if (Strings.isNullOrEmpty(uploadSchema.getName())) {
      errors.rejectValue("String_Node_Str","String_Node_Str");
    }
    if (uploadSchema.getRevision() < 0) {
      errors.rejectValue("String_Node_Str","String_Node_Str");
    }
    if (Strings.isNullOrEmpty(uploadSchema.getSchemaId())) {
      errors.rejectValue("String_Node_Str","String_Node_Str");
    }
    if (uploadSchema.getSchemaType() == null) {
      errors.rejectValue("String_Node_Str","String_Node_Str");
    }
    List<UploadFieldDefinition> fieldDefList=uploadSchema.getFieldDefinitions();
    if (fieldDefList == null || fieldDefList.isEmpty()) {
      errors.rejectValue("String_Node_Str","String_Node_Str");
    }
 else {
      Set<String> fieldNameSet=new HashSet<>();
      for (int i=0; i < fieldDefList.size(); i++) {
        UploadFieldDefinition fieldDef=fieldDefList.get(i);
        if (fieldDef == null) {
          errors.rejectValue("String_Node_Str" + i,"String_Node_Str");
        }
 else {
          errors.pushNestedPath("String_Node_Str" + i);
          String fieldName=fieldDef.getName();
          if (Strings.isNullOrEmpty(fieldName)) {
            errors.rejectValue("String_Node_Str","String_Node_Str");
          }
 else {
            if (fieldNameSet.contains(fieldName)) {
              errors.rejectValue("String_Node_Str","String_Node_Str" + fieldName + "String_Node_Str");
            }
            fieldNameSet.add(fieldName);
          }
          if (fieldDef.getType() == null) {
            errors.rejectValue("String_Node_Str","String_Node_Str");
          }
          errors.popNestedPath();
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * <p> Validates the given object as a valid UploadSchema instance. This will flag errors in the following conditions: <ul> <li>value is null or not an UploadSchema</li> <li>fieldDefinitions is null or empty</li> <li>fieldDefinitions contains null or invalid entries</li> <li>name is null or empty</li> <li>revision is negative</li> <li>schemaId is null or empty</li> <li>schemaType is null</li> </ul> </p>
 * @see org.springframework.validation.Validator#validate
 */
@Override public void validate(Object target,Errors errors){
  if (target == null) {
    errors.rejectValue("String_Node_Str","String_Node_Str");
  }
 else   if (!(target instanceof UploadSchema)) {
    errors.rejectValue("String_Node_Str","String_Node_Str");
  }
 else {
    UploadSchema uploadSchema=(UploadSchema)target;
    if (Strings.isNullOrEmpty(uploadSchema.getName())) {
      errors.rejectValue("String_Node_Str","String_Node_Str");
    }
    if (uploadSchema.getRevision() < 0) {
      errors.rejectValue("String_Node_Str","String_Node_Str");
    }
    if (Strings.isNullOrEmpty(uploadSchema.getSchemaId())) {
      errors.rejectValue("String_Node_Str","String_Node_Str");
    }
    if (uploadSchema.getSchemaType() == null) {
      errors.rejectValue("String_Node_Str","String_Node_Str");
    }
    List<UploadFieldDefinition> fieldDefList=uploadSchema.getFieldDefinitions();
    if (fieldDefList == null || fieldDefList.isEmpty()) {
      errors.rejectValue("String_Node_Str","String_Node_Str");
    }
 else {
      Set<String> fieldNameSet=new HashSet<>();
      for (int i=0; i < fieldDefList.size(); i++) {
        UploadFieldDefinition fieldDef=fieldDefList.get(i);
        String fieldDefinitionKey="String_Node_Str" + i + "String_Node_Str";
        if (fieldDef == null) {
          errors.rejectValue(fieldDefinitionKey,"String_Node_Str");
        }
 else {
          errors.pushNestedPath(fieldDefinitionKey);
          String fieldName=fieldDef.getName();
          if (Strings.isNullOrEmpty(fieldName)) {
            errors.rejectValue("String_Node_Str","String_Node_Str");
          }
 else {
            if (fieldNameSet.contains(fieldName)) {
              errors.rejectValue("String_Node_Str","String_Node_Str" + fieldName + "String_Node_Str");
            }
            fieldNameSet.add(fieldName);
          }
          if (fieldDef.getType() == null) {
            errors.rejectValue("String_Node_Str","String_Node_Str");
          }
          errors.popNestedPath();
        }
      }
    }
  }
}