Program: 62644
Project: 62644
Buggy source:
/** 
 * Send a command string to Cube
 * @param commandString
 */
private boolean sendCubeCommand(String commandString){
  boolean sendSuccess=false;
synchronized (MaxCubeBridgeHandler.class) {
    if (commandString != null) {
      try {
        if (socket == null) {
          this.socketConnect();
        }
        writer.write(commandString);
        writer.flush();
        String raw=reader.readLine();
        if (raw != null) {
          Message message=processRawMessage(raw);
          if (message != null)           processMessage(message);
        }
        try {
          this.messageProcessor.addReceivedLine(raw);
          while (!this.messageProcessor.isMessageAvailable()) {
            raw=reader.readLine();
            this.messageProcessor.addReceivedLine(raw);
          }
          Message message=this.messageProcessor.pull();
          message.debug(logger);
          processMessage(message);
        }
 catch (        Exception e) {
          logger.info("String_Node_Str");
          logger.debug(Utils.getStackTrace(e));
          this.messageProcessor.reset();
        }
        if (!exclusive) {
          socketClose();
        }
        sendSuccess=true;
      }
 catch (      UnknownHostException e) {
        logger.warn("String_Node_Str",ipAddress);
        logger.debug(Utils.getStackTrace(e));
        socketClose();
      }
catch (      IOException e) {
        logger.warn("String_Node_Str",ipAddress);
        logger.debug(Utils.getStackTrace(e));
        socketClose();
      }
      logger.trace("String_Node_Str",commandString);
    }
 else {
      logger.debug("String_Node_Str",ipAddress);
    }
  }
  return sendSuccess;
}

Fixed version (ground truth):
/** 
 * Send a command string to Cube
 * @param commandString
 */
private boolean sendCubeCommand(String commandString){
  boolean sendSuccess=false;
synchronized (MaxCubeBridgeHandler.class) {
    if (commandString != null) {
      try {
        if (socket == null) {
          this.socketConnect();
        }
        writer.write(commandString);
        writer.flush();
        String raw=reader.readLine();
        if (raw != null) {
          try {
            this.messageProcessor.addReceivedLine(raw);
            while (!this.messageProcessor.isMessageAvailable()) {
              raw=reader.readLine();
              this.messageProcessor.addReceivedLine(raw);
            }
            Message message=this.messageProcessor.pull();
            message.debug(logger);
            processMessage(message);
          }
 catch (          Exception e) {
            logger.info("String_Node_Str");
            logger.debug(Utils.getStackTrace(e));
            this.messageProcessor.reset();
          }
        }
        if (!exclusive) {
          socketClose();
        }
        sendSuccess=true;
      }
 catch (      UnknownHostException e) {
        logger.warn("String_Node_Str",ipAddress);
        logger.debug(Utils.getStackTrace(e));
        socketClose();
      }
catch (      IOException e) {
        logger.warn("String_Node_Str",ipAddress);
        logger.debug(Utils.getStackTrace(e));
        socketClose();
      }
      logger.trace("String_Node_Str",commandString);
    }
 else {
      logger.debug("String_Node_Str",ipAddress);
    }
  }
  return sendSuccess;
}