Program: 37431
Project: 37431
Buggy source:
Responses.ResponseBody setVariable(Requests.SetVariableArguments arguments){
  Map<String,Object> options=variableFormatter.getDefaultOptions();
  boolean showStaticVariables=true;
  boolean showFullyQualifiedNames=true;
  if (arguments.format != null && arguments.format.hex) {
    options.put(NumericFormatter.NUMERIC_FORMAT_OPTION,NumericFormatEnum.HEX);
  }
  if (showFullyQualifiedNames) {
    options.put(SimpleTypeFormatter.QUALIFIED_CLASS_NAME_OPTION,showFullyQualifiedNames);
  }
  Object obj=this.objectPool.getObjectById(arguments.variablesReference);
  ThreadReference thread;
  String name=arguments.name;
  Value newValue;
  String belongToClass=null;
  if (arguments.name.contains("String_Node_Str")) {
    name=arguments.name.replaceFirst(PATTERN,"String_Node_Str");
    belongToClass=arguments.name.replaceFirst(PATTERN,"String_Node_Str");
  }
  try {
    if (obj instanceof StackFrameScope) {
      StackFrameScope frameScope=(StackFrameScope)obj;
      thread=frameScope.getStackFrame().thread();
      newValue=handleSetValueForStackFrame(name,belongToClass,arguments.value,showStaticVariables,frameScope.getStackFrame(),options);
    }
 else     if (obj instanceof ThreadObjectReference) {
      ObjectReference currentObj=((ThreadObjectReference)obj).getObject();
      thread=((ThreadObjectReference)obj).getThread();
      newValue=handleSetValueForObject(name,belongToClass,arguments.value,currentObj,options);
    }
 else {
      throw new IllegalArgumentException(String.format("String_Node_Str",arguments.variablesReference));
    }
  }
 catch (  IllegalArgumentException|AbsentInformationException|InvalidTypeException|UnsupportedOperationException|ClassNotLoadedException e) {
    return new Responses.ErrorResponseBody(convertDebuggerMessageToClient(e.getMessage()));
  }
  int referenceId=getReferenceId(thread,newValue,showStaticVariables);
  int indexedVariables=0;
  if (newValue instanceof ArrayReference) {
    indexedVariables=((ArrayReference)newValue).length();
  }
  return new Responses.SetVariablesResponseBody(this.variableFormatter.typeToString(newValue == null ? null : newValue.type(),options),this.variableFormatter.valueToString(newValue,options),referenceId,indexedVariables);
}

Fixed version (ground truth):
Responses.ResponseBody setVariable(Requests.SetVariableArguments arguments){
  Map<String,Object> options=variableFormatter.getDefaultOptions();
  boolean showStaticVariables=true;
  boolean showFullyQualifiedNames=true;
  if (arguments.format != null && arguments.format.hex) {
    options.put(NumericFormatter.NUMERIC_FORMAT_OPTION,NumericFormatEnum.HEX);
  }
  if (showFullyQualifiedNames) {
    options.put(SimpleTypeFormatter.QUALIFIED_CLASS_NAME_OPTION,showFullyQualifiedNames);
  }
  Object obj=this.objectPool.getObjectById(arguments.variablesReference);
  if (obj == null) {
    return new Responses.ErrorResponseBody(convertDebuggerMessageToClient("String_Node_Str"));
  }
  ThreadReference thread;
  String name=arguments.name;
  Value newValue;
  String belongToClass=null;
  if (arguments.name.contains("String_Node_Str")) {
    name=arguments.name.replaceFirst(PATTERN,"String_Node_Str");
    belongToClass=arguments.name.replaceFirst(PATTERN,"String_Node_Str");
  }
  try {
    if (obj instanceof StackFrameScope) {
      StackFrameScope frameScope=(StackFrameScope)obj;
      thread=frameScope.getStackFrame().thread();
      newValue=handleSetValueForStackFrame(name,belongToClass,arguments.value,showStaticVariables,frameScope.getStackFrame(),options);
    }
 else     if (obj instanceof ThreadObjectReference) {
      ObjectReference currentObj=((ThreadObjectReference)obj).getObject();
      thread=((ThreadObjectReference)obj).getThread();
      newValue=handleSetValueForObject(name,belongToClass,arguments.value,currentObj,options);
    }
 else {
      throw new IllegalArgumentException(String.format("String_Node_Str",arguments.variablesReference));
    }
  }
 catch (  IllegalArgumentException|AbsentInformationException|InvalidTypeException|UnsupportedOperationException|ClassNotLoadedException e) {
    return new Responses.ErrorResponseBody(convertDebuggerMessageToClient(e.getMessage()));
  }
  int referenceId=getReferenceId(thread,newValue,showStaticVariables);
  int indexedVariables=0;
  if (newValue instanceof ArrayReference) {
    indexedVariables=((ArrayReference)newValue).length();
  }
  return new Responses.SetVariablesResponseBody(this.variableFormatter.typeToString(newValue == null ? null : newValue.type(),options),this.variableFormatter.valueToString(newValue,options),referenceId,indexedVariables);
}