Program: 83952
Project: 83952
Buggy source:
public void post(HttpExchange exchange,String data,boolean internalCall,JSONObject internalResp){
  logger.info("String_Node_Str" + exchange.getRequestURI().toString());
  try {
    if (exchangeJSON.containsKey("String_Node_Str") && exchangeJSON.getString("String_Node_Str").equalsIgnoreCase("String_Node_Str") && exchange.getRequestURI().toString().contains("String_Node_Str")) {
      logger.info("String_Node_Str");
      query(exchange,data,internalCall,internalResp);
    }
 else     if (exchangeJSON.containsKey("String_Node_Str") && exchangeJSON.getString("String_Node_Str").equalsIgnoreCase("String_Node_Str")) {
      query(exchange,data,internalCall,internalResp);
    }
 else     if (exchangeJSON.containsKey("String_Node_Str") && exchangeJSON.containsKey("String_Node_Str")) {
      String setAggStr=exchangeJSON.getString("String_Node_Str");
      String unitsStr=exchangeJSON.getString("String_Node_Str");
      boolean setAggBool=false;
      if (setAggStr.equalsIgnoreCase("String_Node_Str"))       setAggBool=true;
      if (setAggBool && !unitsStr.equals("String_Node_Str")) {
        metadataGraph.setAggPoint(URI,unitsStr,true);
        logger.info("String_Node_Str" + URI + "String_Node_Str"+ setAggStr+ "String_Node_Str"+ unitsStr+ "String_Node_Str");
      }
      JSONObject currentProps=database.rrGetProperties(URI);
      boolean containsAggBufs=currentProps.containsKey("String_Node_Str");
      if (setAggBool && containsAggBufs) {
        JSONArray aggBufsArray=currentProps.getJSONArray("String_Node_Str");
        if (!aggBufsArray.contains(unitsStr)) {
          aggBufsArray.add(unitsStr);
          currentProps.put("String_Node_Str",aggBufsArray);
          database.rrPutProperties(URI,currentProps);
          updateProperties(currentProps);
        }
      }
 else       if (!setAggBool && containsAggBufs) {
        JSONArray aggBufsArray=currentProps.getJSONArray("String_Node_Str");
        if (aggBufsArray.contains(unitsStr)) {
          metadataGraph.setAggPoint(URI,unitsStr,false);
          aggBufsArray.remove(unitsStr);
          currentProps.put("String_Node_Str",aggBufsArray);
          database.rrPutProperties(URI,currentProps);
          updateProperties(currentProps);
        }
      }
 else       if (setAggBool && !containsAggBufs) {
        JSONArray aggBufsArray=new JSONArray();
        aggBufsArray.add(unitsStr);
        currentProps.put("String_Node_Str",aggBufsArray);
        database.rrPutProperties(URI,currentProps);
        updateProperties(currentProps);
      }
      sendResponse(exchange,200,null,internalCall,internalResp);
    }
 else {
      handlePropsReq(exchange,data,internalCall,internalResp);
    }
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void post(HttpExchange exchange,String data,boolean internalCall,JSONObject internalResp){
  try {
    logger.info("String_Node_Str" + exchangeJSON.getString("String_Node_Str"));
    if (exchangeJSON.containsKey("String_Node_Str") && exchangeJSON.getString("String_Node_Str").equalsIgnoreCase("String_Node_Str") && exchangeJSON.getString("String_Node_Str").contains("String_Node_Str")) {
      logger.info("String_Node_Str");
      query(exchange,data,internalCall,internalResp);
    }
 else     if (exchangeJSON.containsKey("String_Node_Str") && exchangeJSON.getString("String_Node_Str").equalsIgnoreCase("String_Node_Str")) {
      query(exchange,data,internalCall,internalResp);
    }
 else     if (exchangeJSON.containsKey("String_Node_Str") && exchangeJSON.containsKey("String_Node_Str")) {
      String setAggStr=exchangeJSON.getString("String_Node_Str");
      String unitsStr=exchangeJSON.getString("String_Node_Str");
      boolean setAggBool=false;
      if (setAggStr.equalsIgnoreCase("String_Node_Str"))       setAggBool=true;
      if (setAggBool && !unitsStr.equals("String_Node_Str")) {
        metadataGraph.setAggPoint(URI,unitsStr,true);
        logger.info("String_Node_Str" + URI + "String_Node_Str"+ setAggStr+ "String_Node_Str"+ unitsStr+ "String_Node_Str");
      }
      JSONObject currentProps=database.rrGetProperties(URI);
      boolean containsAggBufs=currentProps.containsKey("String_Node_Str");
      if (setAggBool && containsAggBufs) {
        JSONArray aggBufsArray=currentProps.getJSONArray("String_Node_Str");
        if (!aggBufsArray.contains(unitsStr)) {
          aggBufsArray.add(unitsStr);
          currentProps.put("String_Node_Str",aggBufsArray);
          database.rrPutProperties(URI,currentProps);
          updateProperties(currentProps);
        }
      }
 else       if (!setAggBool && containsAggBufs) {
        JSONArray aggBufsArray=currentProps.getJSONArray("String_Node_Str");
        if (aggBufsArray.contains(unitsStr)) {
          metadataGraph.setAggPoint(URI,unitsStr,false);
          aggBufsArray.remove(unitsStr);
          currentProps.put("String_Node_Str",aggBufsArray);
          database.rrPutProperties(URI,currentProps);
          updateProperties(currentProps);
        }
      }
 else       if (setAggBool && !containsAggBufs) {
        JSONArray aggBufsArray=new JSONArray();
        aggBufsArray.add(unitsStr);
        currentProps.put("String_Node_Str",aggBufsArray);
        database.rrPutProperties(URI,currentProps);
        updateProperties(currentProps);
      }
      sendResponse(exchange,200,null,internalCall,internalResp);
    }
 else {
      handlePropsReq(exchange,data,internalCall,internalResp);
    }
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,"String_Node_Str",e);
  }
}