Program: 28286
Project: 28286
Buggy source:
public static Map<String,Object> parseResponse(RestResponse response,HandlerContext handlerCtx,String endpoint,Object attrs,boolean quiet,boolean throwException){
  String message="String_Node_Str";
  ExitCode exitCode=ExitCode.FAILURE;
  Object maskedAttr=attrs;
  if ((attrs != null) && (attrs instanceof Map)) {
    maskedAttr=maskOffPassword((Map<String,Object>)attrs);
  }
  if (response != null) {
    try {
      Map responseMap=response.getResponse();
      if (responseMap.get("String_Node_Str") != null) {
        String exitCodeStr=(String)((Map)responseMap.get("String_Node_Str")).get("String_Node_Str");
        exitCode=(exitCodeStr != null) ? ExitCode.valueOf(exitCodeStr) : ExitCode.SUCCESS;
      }
      if (exitCode != ExitCode.SUCCESS) {
        Map dataMap=(Map)responseMap.get("String_Node_Str");
        if (dataMap != null) {
          message=getMessage(dataMap);
          List<Map> subReports=(List<Map>)dataMap.get("String_Node_Str");
          if (subReports != null) {
            StringBuilder sb=new StringBuilder("String_Node_Str");
            for (            Map oneSubReport : subReports) {
              sb.append("String_Node_Str").append(getMessage(oneSubReport));
            }
            message=message + sb.toString();
          }
        }
 else {
          Object msgs=responseMap.get("String_Node_Str");
          if (msgs == null) {
            message="String_Node_Str";
          }
 else           if (msgs instanceof List) {
            StringBuilder builder=new StringBuilder("String_Node_Str");
            for (            Object obj : ((List<Object>)msgs)) {
              if ((obj instanceof Map) && ((Map<String,Object>)obj).containsKey("String_Node_Str")) {
                obj=((Map<String,Object>)obj).get("String_Node_Str");
              }
              builder.append(obj.toString());
            }
            message=builder.toString();
          }
 else           if (msgs instanceof Map) {
            message=((Map<String,Object>)msgs).get("String_Node_Str").toString();
          }
 else {
            throw new RuntimeException("String_Node_Str");
          }
        }
      }
switch (exitCode) {
case FAILURE:
{
          if (throwException) {
            if (handlerCtx != null) {
              GuiUtil.handleError(handlerCtx,message);
              if (!quiet) {
                Logger logger=GuiUtil.getLogger();
                logger.severe(GuiUtil.getCommonMessage("String_Node_Str",new Object[]{exitCode,endpoint,maskedAttr}));
                if (logger.isLoggable(Level.FINEST)) {
                  logger.finest("String_Node_Str" + response.getResponseBody());
                }
              }
              return new HashMap();
            }
 else {
              throw new RuntimeException(message);
            }
          }
 else {
            if (!quiet) {
              Logger logger=GuiUtil.getLogger();
              logger.severe(GuiUtil.getCommonMessage("String_Node_Str",new Object[]{exitCode,endpoint,maskedAttr}));
              if (logger.isLoggable(Level.FINEST)) {
                logger.finest("String_Node_Str" + response.getResponseBody());
              }
            }
            return responseMap;
          }
        }
case WARNING:
{
        GuiUtil.prepareAlert("String_Node_Str",GuiUtil.getCommonMessage("String_Node_Str"),message);
        GuiUtil.getLogger().warning(GuiUtil.getCommonMessage("String_Node_Str",new Object[]{exitCode,endpoint,maskedAttr}));
        return responseMap;
      }
case SUCCESS:
{
      return responseMap;
    }
}
}
 catch (Exception ex) {
if (!quiet) {
  Logger logger=GuiUtil.getLogger();
  logger.severe(GuiUtil.getCommonMessage("String_Node_Str",new Object[]{exitCode,endpoint,maskedAttr}));
  if (logger.isLoggable(Level.FINEST)) {
    logger.finest("String_Node_Str" + response.getResponseBody());
  }
}
if (handlerCtx != null) {
  if (throwException) {
    if ("String_Node_Str".equals(message) || message == null) {
      GuiUtil.handleException(handlerCtx,ex);
    }
 else {
      GuiUtil.handleError(handlerCtx,message);
    }
  }
}
 else {
  if ("String_Node_Str".equals(message) || message == null) {
    throw new RuntimeException(ex);
  }
 else {
    throw new RuntimeException(message,ex);
  }
}
}
}
return null;
}

Fixed version (ground truth):
public static Map<String,Object> parseResponse(RestResponse response,HandlerContext handlerCtx,String endpoint,Object attrs,boolean quiet,boolean throwException){
  String message="String_Node_Str";
  ExitCode exitCode=ExitCode.FAILURE;
  Object maskedAttr=attrs;
  if ((attrs != null) && (attrs instanceof Map)) {
    maskedAttr=maskOffPassword((Map<String,Object>)attrs);
  }
  if (response != null) {
    try {
      Map responseMap=response.getResponse();
      if (responseMap.get("String_Node_Str") != null) {
        String exitCodeStr=(String)((Map)responseMap.get("String_Node_Str")).get("String_Node_Str");
        exitCode=(exitCodeStr != null) ? ExitCode.valueOf(exitCodeStr) : ExitCode.SUCCESS;
      }
      if (exitCode != ExitCode.SUCCESS) {
        Map dataMap=(Map)responseMap.get("String_Node_Str");
        if (dataMap != null) {
          message=getMessage(dataMap);
          List<Map> subReports=(List<Map>)dataMap.get("String_Node_Str");
          if (subReports != null) {
            StringBuilder sb=new StringBuilder("String_Node_Str");
            for (            Map oneSubReport : subReports) {
              sb.append("String_Node_Str").append(getMessage(oneSubReport));
            }
            message=message + sb.toString();
          }
        }
 else {
          Object msgs=responseMap.get("String_Node_Str");
          if (msgs == null) {
            message="String_Node_Str";
          }
 else           if (msgs instanceof List) {
            StringBuilder builder=new StringBuilder("String_Node_Str");
            for (            Object obj : ((List<Object>)msgs)) {
              if ((obj instanceof Map) && ((Map<String,Object>)obj).containsKey("String_Node_Str")) {
                obj=((Map<String,Object>)obj).get("String_Node_Str");
              }
              builder.append(obj.toString());
            }
            message=builder.toString();
          }
 else           if (msgs instanceof Map) {
            message=((Map<String,Object>)msgs).get("String_Node_Str").toString();
          }
 else {
            throw new RuntimeException("String_Node_Str");
          }
        }
      }
switch (exitCode) {
case FAILURE:
{
          if (throwException) {
            if (handlerCtx != null) {
              GuiUtil.handleError(handlerCtx,message);
              if (!quiet) {
                Logger logger=GuiUtil.getLogger();
                logger.severe(GuiUtil.getCommonMessage("String_Node_Str",new Object[]{exitCode,endpoint,maskedAttr}));
                if (logger.isLoggable(Level.FINEST)) {
                  logger.finest("String_Node_Str" + response.getResponseBody());
                }
              }
              return new HashMap();
            }
 else {
              throw new RuntimeException(message);
            }
          }
 else {
            if (!quiet) {
              Logger logger=GuiUtil.getLogger();
              logger.severe(GuiUtil.getCommonMessage("String_Node_Str",new Object[]{exitCode,endpoint,maskedAttr}));
              if (logger.isLoggable(Level.FINEST)) {
                logger.finest("String_Node_Str" + response.getResponseBody());
              }
            }
            return responseMap;
          }
        }
case WARNING:
{
        GuiUtil.prepareAlert("String_Node_Str",GuiUtil.getCommonMessage("String_Node_Str"),message);
        GuiUtil.getLogger().warning(GuiUtil.getCommonMessage("String_Node_Str",new Object[]{exitCode,endpoint,maskedAttr}));
        return responseMap;
      }
case SUCCESS:
{
      return responseMap;
    }
}
}
 catch (Exception ex) {
if (!quiet) {
  Logger logger=GuiUtil.getLogger();
  logger.severe(GuiUtil.getCommonMessage("String_Node_Str",new Object[]{exitCode,endpoint,maskedAttr}));
  if (logger.isLoggable(Level.FINEST)) {
    logger.finest("String_Node_Str" + response.getResponseBody());
  }
}
if (handlerCtx != null) {
  if (throwException) {
    if ("String_Node_Str".equals(message)) {
      GuiUtil.handleException(handlerCtx,ex);
    }
 else {
      GuiUtil.handleError(handlerCtx,message);
    }
  }
}
 else {
  if ("String_Node_Str".equals(message)) {
    throw new RuntimeException(ex);
  }
 else {
    throw new RuntimeException(message,ex);
  }
}
}
}
return null;
}