Program: 160506
Project: 160506
Buggy source:
public void onText(Reader reader){
  JsonReader jsonreader=new JsonReader(reader);
  JsonParser parser=new JsonParser();
  JsonObject request=(JsonObject)parser.parse(jsonreader);
  if (request.has("String_Node_Str")) {
  }
 else   if (request.has("String_Node_Str")) {
    if (request.get("String_Node_Str").getAsString().equals("String_Node_Str")) {
      String token=request.get("String_Node_Str").getAsString();
      final int topicId=request.get("String_Node_Str").getAsInt();
      try {
        final ServiceMap serviceMap=bimServer.getServiceFactory().get(token,AccessMethod.INTERNAL);
        final long downloadId=request.get("String_Node_Str").getAsLong();
        new Thread(){
          @Override public void run(){
            try {
              final ProgressTopic progressTopic=bimServer.getNotificationsManager().getProgressTopic(topicId);
              LongDownloadOrCheckoutAction longAction=(LongDownloadOrCheckoutAction)bimServer.getLongActionManager().getLongAction(downloadId);
              MessagingSerializer messagingSerializer=longAction.getMessagingSerializer();
              long s=System.nanoTime();
              int messages=0;
              boolean writeMessage=true;
              do {
                ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();
                DataOutputStream dataOutputStream=new DataOutputStream(byteArrayOutputStream);
                dataOutputStream.writeInt(topicId);
                writeMessage=messagingSerializer.writeMessage(byteArrayOutputStream,null);
                if (byteArrayOutputStream.size() > 4) {
                  messages++;
                  streamingSocketInterface.send(byteArrayOutputStream.toByteArray(),0,byteArrayOutputStream.size());
                }
              }
 while (writeMessage);
              long e=System.nanoTime();
              System.out.println(((e - s) / 1000000) + "String_Node_Str" + messages);
            }
 catch (            IOException e) {
              LOGGER.error("String_Node_Str",e);
            }
          }
        }
.start();
      }
 catch (      UserException e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
 else   if (request.has("String_Node_Str")) {
    String token=request.get("String_Node_Str").getAsString();
    try {
      ServiceMap serviceMap=bimServer.getServiceFactory().get(token,AccessMethod.JSON);
      uoid=serviceMap.getBimServerAuthInterface().getLoggedInUser().getOid();
      this.endpointid=bimServer.getEndPointManager().register(this);
      JsonObject enpointMessage=new JsonObject();
      enpointMessage.add("String_Node_Str",new JsonPrimitive(endpointid));
      streamingSocketInterface.send(enpointMessage);
    }
 catch (    UserException e) {
      LOGGER.error("String_Node_Str",e);
    }
catch (    ServerException e) {
      LOGGER.error("String_Node_Str",e);
    }
  }
 else {
    bimServer.getJsonHandler().execute(request,null,new NullWriter());
  }
}

Fixed version (ground truth):
public void onText(Reader reader){
  JsonReader jsonreader=new JsonReader(reader);
  JsonParser parser=new JsonParser();
  JsonObject request=(JsonObject)parser.parse(jsonreader);
  if (request.has("String_Node_Str")) {
  }
 else   if (request.has("String_Node_Str")) {
    if (request.get("String_Node_Str").getAsString().equals("String_Node_Str")) {
      String token=request.get("String_Node_Str").getAsString();
      final int topicId=request.get("String_Node_Str").getAsInt();
      try {
        final ServiceMap serviceMap=bimServer.getServiceFactory().get(token,AccessMethod.INTERNAL);
        final long downloadId=request.get("String_Node_Str").getAsLong();
        new Thread(){
          @Override public void run(){
            try {
              final ProgressTopic progressTopic=bimServer.getNotificationsManager().getProgressTopic(topicId);
              LongDownloadOrCheckoutAction longAction=(LongDownloadOrCheckoutAction)bimServer.getLongActionManager().getLongAction(downloadId);
              MessagingSerializer messagingSerializer=longAction.getMessagingSerializer();
              boolean writeMessage=true;
              do {
                ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();
                DataOutputStream dataOutputStream=new DataOutputStream(byteArrayOutputStream);
                dataOutputStream.writeInt(topicId);
                dataOutputStream.writeInt(0);
                writeMessage=messagingSerializer.writeMessage(byteArrayOutputStream,null);
                int messages=1;
                while (byteArrayOutputStream.size() < BUFFER_SIZE && writeMessage) {
                  messages++;
                  writeMessage=messagingSerializer.writeMessage(byteArrayOutputStream,null);
                }
                byte[] byteArray=byteArrayOutputStream.toByteArray();
                ByteBuffer byteBuffer=ByteBuffer.wrap(byteArray);
                byteBuffer.order(ByteOrder.LITTLE_ENDIAN);
                byteBuffer.putInt(4,messages);
                if (byteArrayOutputStream.size() > 8) {
                  streamingSocketInterface.sendBlocking(byteArray,0,byteArray.length);
                }
              }
 while (writeMessage);
            }
 catch (            IOException e) {
              LOGGER.error("String_Node_Str",e);
            }
          }
        }
.start();
      }
 catch (      UserException e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
 else   if (request.has("String_Node_Str")) {
    String token=request.get("String_Node_Str").getAsString();
    try {
      ServiceMap serviceMap=bimServer.getServiceFactory().get(token,AccessMethod.JSON);
      uoid=serviceMap.getBimServerAuthInterface().getLoggedInUser().getOid();
      this.endpointid=bimServer.getEndPointManager().register(this);
      JsonObject enpointMessage=new JsonObject();
      enpointMessage.add("String_Node_Str",new JsonPrimitive(endpointid));
      streamingSocketInterface.send(enpointMessage);
    }
 catch (    UserException e) {
      LOGGER.error("String_Node_Str",e);
    }
catch (    ServerException e) {
      LOGGER.error("String_Node_Str",e);
    }
  }
 else {
    bimServer.getJsonHandler().execute(request,null,new NullWriter());
  }
}