Program: 28136
Project: 28136
Buggy source:
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class),@HandlerInput(name="String_Node_Str",type=String.class),@HandlerInput(name="String_Node_Str",type=Map.class),@HandlerInput(name="String_Node_Str",type=Boolean.class,required=true),@HandlerInput(name="String_Node_Str",type=String.class,required=false),@HandlerInput(name="String_Node_Str",type=List.class)},output={@HandlerOutput(name="String_Node_Str",type=List.class)}) public static void saveRealm(HandlerContext handlerCtx){
  String option=(String)handlerCtx.getInputValue("String_Node_Str");
  List<Map<String,String>> propListOrig=(List)handlerCtx.getInputValue("String_Node_Str");
  List<Map<String,String>> propList=new ArrayList(propListOrig);
  Map<String,String> attrMap=(Map)handlerCtx.getInputValue("String_Node_Str");
  Boolean edit=(Boolean)handlerCtx.getInputValue("String_Node_Str");
  if (attrMap == null) {
    attrMap=new HashMap();
  }
  String classname="String_Node_Str";
  try {
    if (option.equals("String_Node_Str")) {
      classname=attrMap.get("String_Node_Str");
      if (classname.indexOf("String_Node_Str") != -1) {
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
      }
 else       if (classname.indexOf("String_Node_Str") != -1) {
        if (!edit) {
          attrMap.put("String_Node_Str","String_Node_Str" + attrMap.get("String_Node_Str") + "String_Node_Str");
          attrMap.put("String_Node_Str","String_Node_Str" + attrMap.get("String_Node_Str") + "String_Node_Str");
          for (          Map<String,String> m : propList) {
            m.put("String_Node_Str","String_Node_Str" + m.get("String_Node_Str") + "String_Node_Str");
          }
        }
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
      }
 else       if (classname.indexOf("String_Node_Str") != -1) {
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
      }
 else       if (classname.indexOf("String_Node_Str") != -1) {
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
      }
 else       if (classname.indexOf("String_Node_Str") != -1) {
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
      }
 else {
        if (classname.indexOf("String_Node_Str") != -1) {
          putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        }
      }
    }
 else {
      classname=attrMap.get("String_Node_Str");
    }
    String endpoint=(String)handlerCtx.getInputValue("String_Node_Str");
    if (edit) {
      handlerCtx.setOutputValue("String_Node_Str",propList);
      return;
    }
    Map<String,Object> cMap=new HashMap();
    cMap.put("String_Node_Str",attrMap.get("String_Node_Str"));
    cMap.put("String_Node_Str",classname);
    StringBuilder sb=new StringBuilder();
    for (    Map oneProp : propList) {
      if (GuiUtil.isEmpty((String)oneProp.get("String_Node_Str")) || GuiUtil.isEmpty((String)oneProp.get("String_Node_Str"))) {
        continue;
      }
      sb.append(oneProp.get("String_Node_Str")).append("String_Node_Str");
      String value=((String)oneProp.get("String_Node_Str")).replaceAll("String_Node_Str","String_Node_Str");
      value=UtilHandlers.escapePropertyValue(value);
      sb.append(value).append("String_Node_Str");
    }
    endpoint=endpoint + "String_Node_Str";
    cMap.put("String_Node_Str",attrMap.get("String_Node_Str"));
    cMap.put("String_Node_Str",sb.toString());
    RestUtil.restRequest(endpoint,cMap,"String_Node_Str",handlerCtx,false);
  }
 catch (  Exception ex) {
    GuiUtil.handleException(handlerCtx,ex);
  }
}

Fixed version (ground truth):
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class),@HandlerInput(name="String_Node_Str",type=String.class),@HandlerInput(name="String_Node_Str",type=Map.class),@HandlerInput(name="String_Node_Str",type=Boolean.class,required=true),@HandlerInput(name="String_Node_Str",type=String.class,required=false),@HandlerInput(name="String_Node_Str",type=List.class)},output={@HandlerOutput(name="String_Node_Str",type=List.class)}) public static void saveRealm(HandlerContext handlerCtx){
  String option=(String)handlerCtx.getInputValue("String_Node_Str");
  List<Map<String,String>> propListOrig=(List)handlerCtx.getInputValue("String_Node_Str");
  List<Map<String,String>> propList=new ArrayList(propListOrig);
  Map<String,String> attrMap=(Map)handlerCtx.getInputValue("String_Node_Str");
  Boolean edit=(Boolean)handlerCtx.getInputValue("String_Node_Str");
  if (attrMap == null) {
    attrMap=new HashMap();
  }
  String classname;
  try {
    if (option.equals("String_Node_Str")) {
      classname=attrMap.get("String_Node_Str");
      if (classname.indexOf("String_Node_Str") != -1) {
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
      }
 else       if (classname.indexOf("String_Node_Str") != -1) {
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
      }
 else       if (classname.indexOf("String_Node_Str") != -1) {
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
      }
 else       if (classname.indexOf("String_Node_Str") != -1) {
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
      }
 else       if (classname.indexOf("String_Node_Str") != -1) {
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
      }
 else {
        if (classname.indexOf("String_Node_Str") != -1) {
          putOptional(attrMap,propList,"String_Node_Str","String_Node_Str");
        }
      }
    }
 else {
      classname=attrMap.get("String_Node_Str");
    }
    String endpoint=(String)handlerCtx.getInputValue("String_Node_Str");
    if (edit) {
      handlerCtx.setOutputValue("String_Node_Str",propList);
      return;
    }
    Map<String,Object> cMap=new HashMap();
    cMap.put("String_Node_Str",attrMap.get("String_Node_Str"));
    cMap.put("String_Node_Str",classname);
    StringBuilder sb=new StringBuilder();
    for (    Map oneProp : propList) {
      if (GuiUtil.isEmpty((String)oneProp.get("String_Node_Str")) || GuiUtil.isEmpty((String)oneProp.get("String_Node_Str"))) {
        continue;
      }
      sb.append(oneProp.get("String_Node_Str")).append("String_Node_Str");
      String value=((String)oneProp.get("String_Node_Str")).replaceAll("String_Node_Str","String_Node_Str");
      value=UtilHandlers.escapePropertyValue(value);
      sb.append(value).append("String_Node_Str");
    }
    endpoint=endpoint + "String_Node_Str";
    cMap.put("String_Node_Str",attrMap.get("String_Node_Str"));
    cMap.put("String_Node_Str",sb.toString());
    RestUtil.restRequest(endpoint,cMap,"String_Node_Str",handlerCtx,false);
  }
 catch (  Exception ex) {
    GuiUtil.handleException(handlerCtx,ex);
  }
}