Program: 186427
Project: 186427
Buggy source:
/** 
 * Parse a single field from   {@code tokenizer} and merge it into {@code builder}. If a ',' is detected after the field ends, the next field will be parsed automatically
 */
protected static void mergeField(Tokenizer tokenizer,ExtensionRegistry extensionRegistry,Message.Builder builder) throws ParseException {
  FieldDescriptor field;
  Descriptor type=builder.getDescriptorForType();
  ExtensionRegistry.ExtensionInfo extension=null;
  boolean unknown=false;
  if (tokenizer.tryConsume("String_Node_Str")) {
    StringBuilder name=new StringBuilder(tokenizer.consumeIdentifier());
    while (tokenizer.tryConsume("String_Node_Str")) {
      name.append("String_Node_Str");
      name.append(tokenizer.consumeIdentifier());
    }
    extension=extensionRegistry.findExtensionByName(name.toString());
    if (extension == null) {
      throw tokenizer.parseExceptionPreviousToken("String_Node_Str" + name + "String_Node_Str");
    }
 else     if (extension.descriptor.getContainingType() != type) {
      throw tokenizer.parseExceptionPreviousToken("String_Node_Str" + name + "String_Node_Str"+ type.getFullName()+ "String_Node_Str");
    }
    tokenizer.consume("String_Node_Str");
    field=extension.descriptor;
  }
 else {
    String name=tokenizer.consumeIdentifier();
    field=type.findFieldByName(name);
    if (field == null) {
      String lowerName=name.toLowerCase(Locale.US);
      field=type.findFieldByName(lowerName);
      if ((field != null) && (field.getType() != FieldDescriptor.Type.GROUP)) {
        field=null;
      }
    }
    if ((field != null) && (field.getType() == FieldDescriptor.Type.GROUP) && !field.getMessageType().getName().equals(name)) {
      field=null;
    }
    if (field == null && DIGITS.matcher(name).matches()) {
      field=type.findFieldByNumber(Integer.parseInt(name));
      unknown=true;
    }
    if (field == null) {
      handleMissingField(tokenizer,extensionRegistry,builder);
    }
  }
  if (field != null) {
    tokenizer.consume("String_Node_Str");
    boolean array=tokenizer.tryConsume("String_Node_Str");
    if (array) {
      while (!tokenizer.tryConsume("String_Node_Str")) {
        handleValue(tokenizer,extensionRegistry,builder,field,extension,unknown);
        tokenizer.tryConsume("String_Node_Str");
      }
    }
 else {
      handleValue(tokenizer,extensionRegistry,builder,field,extension,unknown);
    }
  }
  if (tokenizer.tryConsume("String_Node_Str")) {
    mergeField(tokenizer,extensionRegistry,builder);
  }
}

Fixed version (ground truth):
/** 
 * Parse a single field from   {@code tokenizer} and merge it into {@code builder}. If a ',' is detected after the field ends, the next field will be parsed automatically
 */
protected static void mergeField(Tokenizer tokenizer,ExtensionRegistry extensionRegistry,Message.Builder builder) throws ParseException {
  FieldDescriptor field;
  Descriptor type=builder.getDescriptorForType();
  ExtensionRegistry.ExtensionInfo extension=null;
  boolean unknown=false;
  String name=tokenizer.consumeIdentifier();
  field=type.findFieldByName(name);
  if (field == null) {
    String lowerName=name.toLowerCase(Locale.US);
    field=type.findFieldByName(lowerName);
    if ((field != null) && (field.getType() != FieldDescriptor.Type.GROUP)) {
      field=null;
    }
  }
  if ((field != null) && (field.getType() == FieldDescriptor.Type.GROUP) && !field.getMessageType().getName().equals(name)) {
    field=null;
  }
  if (field == null && DIGITS.matcher(name).matches()) {
    field=type.findFieldByNumber(Integer.parseInt(name));
    unknown=true;
  }
  extension=extensionRegistry.findExtensionByName(name);
  if (extension != null) {
    if (extension.descriptor.getContainingType() != type) {
      throw tokenizer.parseExceptionPreviousToken("String_Node_Str" + name + "String_Node_Str"+ type.getFullName()+ "String_Node_Str");
    }
    field=extension.descriptor;
  }
  if (field == null) {
    handleMissingField(tokenizer,extensionRegistry,builder);
  }
  if (field != null) {
    tokenizer.consume("String_Node_Str");
    boolean array=tokenizer.tryConsume("String_Node_Str");
    if (array) {
      while (!tokenizer.tryConsume("String_Node_Str")) {
        handleValue(tokenizer,extensionRegistry,builder,field,extension,unknown);
        tokenizer.tryConsume("String_Node_Str");
      }
    }
 else {
      handleValue(tokenizer,extensionRegistry,builder,field,extension,unknown);
    }
  }
  if (tokenizer.tryConsume("String_Node_Str")) {
    mergeField(tokenizer,extensionRegistry,builder);
  }
}