Program: 32104
Project: 32104
Buggy source:
/** 
 * The event failed to be sent and cannot be resent. It triggers the error callbacks.
 * @param eventDescription the event description
 * @param error the retrofit error
 * @param callback the callback.
 */
public static void triggerErrorCallback(MXDataHandler dataHandler,String eventDescription,RetrofitError error,ApiCallback callback){
  if (null != error) {
    Log.e(LOG_TAG,error.getLocalizedMessage());
  }
  if (null == error) {
    try {
      if (null != eventDescription) {
        Log.e(LOG_TAG,"String_Node_Str" + eventDescription);
      }
      if (null != callback) {
        callback.onUnexpectedError(error);
      }
    }
 catch (    Exception e) {
      Log.e(LOG_TAG,"String_Node_Str" + e.getLocalizedMessage());
    }
  }
 else   if (error.isNetworkError()) {
    try {
      if (null != eventDescription) {
        Log.e(LOG_TAG,"String_Node_Str" + eventDescription);
      }
      if (null != callback) {
        callback.onNetworkError(error);
      }
    }
 catch (    Exception e) {
      Log.e(LOG_TAG,"String_Node_Str" + e.getLocalizedMessage());
    }
  }
 else {
    MatrixError mxError;
    try {
      mxError=(MatrixError)error.getBodyAs(MatrixError.class);
    }
 catch (    Exception e) {
      mxError=null;
    }
    if (mxError != null) {
      try {
        if (null != eventDescription) {
          Log.e(LOG_TAG,"String_Node_Str" + mxError + "String_Node_Str"+ eventDescription);
        }
        if (TextUtils.equals(MatrixError.UNKNOWN_TOKEN,mxError.errcode)) {
          dataHandler.onInvalidToken();
        }
 else         if (null != callback) {
          callback.onMatrixError(mxError);
        }
      }
 catch (      Exception e) {
        Log.e(LOG_TAG,"String_Node_Str" + e.getLocalizedMessage());
      }
    }
 else {
      try {
        if (null != eventDescription) {
          Log.e(LOG_TAG,"String_Node_Str" + eventDescription);
        }
        if (null != callback) {
          callback.onUnexpectedError(error);
        }
      }
 catch (      Exception e) {
        Log.e(LOG_TAG,"String_Node_Str" + e.getLocalizedMessage());
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * The event failed to be sent and cannot be resent. It triggers the error callbacks.
 * @param eventDescription the event description
 * @param error the retrofit error
 * @param callback the callback.
 */
public static void triggerErrorCallback(MXDataHandler dataHandler,String eventDescription,RetrofitError error,ApiCallback callback){
  if ((null != error) && !TextUtils.isEmpty(error.getMessage())) {
    Log.e(LOG_TAG,error.getLocalizedMessage());
  }
  if (null == error) {
    try {
      if (null != eventDescription) {
        Log.e(LOG_TAG,"String_Node_Str" + eventDescription);
      }
      if (null != callback) {
        callback.onUnexpectedError(error);
      }
    }
 catch (    Exception e) {
      Log.e(LOG_TAG,"String_Node_Str" + e.getLocalizedMessage());
    }
  }
 else   if (error.isNetworkError()) {
    try {
      if (null != eventDescription) {
        Log.e(LOG_TAG,"String_Node_Str" + eventDescription);
      }
      if (null != callback) {
        callback.onNetworkError(error);
      }
    }
 catch (    Exception e) {
      Log.e(LOG_TAG,"String_Node_Str" + e.getLocalizedMessage());
    }
  }
 else {
    MatrixError mxError;
    try {
      mxError=(MatrixError)error.getBodyAs(MatrixError.class);
    }
 catch (    Exception e) {
      mxError=null;
    }
    if (mxError != null) {
      try {
        if (null != eventDescription) {
          Log.e(LOG_TAG,"String_Node_Str" + mxError + "String_Node_Str"+ eventDescription);
        }
        if (TextUtils.equals(MatrixError.UNKNOWN_TOKEN,mxError.errcode)) {
          dataHandler.onInvalidToken();
        }
 else         if (null != callback) {
          callback.onMatrixError(mxError);
        }
      }
 catch (      Exception e) {
        Log.e(LOG_TAG,"String_Node_Str" + e.getLocalizedMessage());
      }
    }
 else {
      try {
        if (null != eventDescription) {
          Log.e(LOG_TAG,"String_Node_Str" + eventDescription);
        }
        if (null != callback) {
          callback.onUnexpectedError(error);
        }
      }
 catch (      Exception e) {
        Log.e(LOG_TAG,"String_Node_Str" + e.getLocalizedMessage());
      }
    }
  }
}