Program: 114794
Project: 114794
Buggy source:
/** 
 * Generate Swagger v2 paths object from swagger v1.2 document See <a href="https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#paths-object">Swagger v2 paths object</a>
 * @param apiDefinitionPaths API definition paths
 * @return swagger v2 paths object
 * @throws ParseException
 */
private static JSONObject generatePathsObj(JSONObject swagger12doc,Map<String,SwaggerInfoDTO> apiDefinitionPaths) throws ParseException {
  JSONObject pathsObj=new JSONObject();
  JSONArray producesMimeArray=extractProducesObject(swagger12doc);
  JSONArray consumesMimeArray=extractConsumesObject(swagger12doc);
  for (  Map.Entry<String,SwaggerInfoDTO> entry : apiDefinitionPaths.entrySet()) {
    try {
      String key=entry.getKey();
      List<JSONArray> operationsList=entry.getValue().getOperationList();
      JSONObject pathItemObj=new JSONObject();
      String tagName=entry.getValue().getTagName();
      for (      JSONArray operations : operationsList) {
        for (        Object operation : operations) {
          JSONObject operationObject=(JSONObject)operation;
          if (operationObject.containsKey("String_Node_Str")) {
            String method=(String)operationObject.get("String_Node_Str");
            if (operationObject.containsKey("String_Node_Str")) {
              JSONObject swagger2OperationsObj=new JSONObject();
              JSONArray newParameters;
              Object swagger12Params=operationObject.get("String_Node_Str");
              if (swagger12Params != null && (swagger12Params instanceof JSONArray)) {
                JSONArray swagger12ParamObjects=(JSONArray)swagger12Params;
                newParameters=new JSONArray();
                generateSwagger2OperationParameters(newParameters,swagger12ParamObjects);
                swagger2OperationsObj.put(Constants.SWAGGER_PARAMETERS,newParameters);
              }
              swagger2OperationsObj.put(Constants.SWAGGER_OPERATION_ID,operationObject.get("String_Node_Str"));
              if (operationObject.containsKey(Constants.SWAGGER_AUTH_TYPE)) {
                swagger2OperationsObj.put(Constants.SWAGGER_X_AUTH_TYPE,operationObject.get(Constants.SWAGGER_AUTH_TYPE));
              }
              if (operationObject.containsKey(Constants.SWAGGER_THROTTLING_TIER)) {
                swagger2OperationsObj.put(Constants.SWAGGER_X_THROTTLING_TIER,operationObject.get(Constants.SWAGGER_THROTTLING_TIER));
              }
              if (operationObject.containsKey("String_Node_Str")) {
                swagger2OperationsObj.put(Constants.SWAGGER_DESCRIPTION,operationObject.get("String_Node_Str"));
              }
              if (operationObject.containsKey(Constants.SWAGGER_SUMMARY)) {
                swagger2OperationsObj.put(Constants.SWAGGER_SUMMARY,operationObject.get(Constants.SWAGGER_SUMMARY));
              }
              if (entry.getValue().getProducesList() != null) {
                swagger2OperationsObj.put(Constants.SWAGGER_PRODUCES,entry.getValue().getProducesList());
              }
 else               if (producesMimeArray != null) {
                swagger2OperationsObj.put(Constants.SWAGGER_PRODUCES,producesMimeArray);
              }
              if (entry.getValue().getConsumeList() != null) {
                swagger2OperationsObj.put(Constants.SWAGGER_CONSUMES,entry.getValue().getConsumeList());
              }
 else               if (consumesMimeArray != null) {
                swagger2OperationsObj.put(Constants.SWAGGER_CONSUMES,consumesMimeArray);
              }
              buildResponseObject(operationObject,swagger2OperationsObj);
              if (tagName != null) {
                JSONArray tagsArray=new JSONArray();
                tagsArray.add(tagName);
                swagger2OperationsObj.put("String_Node_Str",tagsArray);
              }
              pathItemObj.put(method.toLowerCase(),swagger2OperationsObj);
            }
          }
 else {
            log.error("String_Node_Str");
          }
        }
      }
      pathsObj.put(key,pathItemObj);
    }
 catch (    Exception e) {
      log.error("String_Node_Str" + entry.getKey() + "String_Node_Str"+ "String_Node_Str"+ entry.getValue().toString(),e);
    }
  }
  return pathsObj;
}

Fixed version (ground truth):
/** 
 * Generate Swagger v2 paths object from swagger v1.2 document See <a href="https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#paths-object">Swagger v2 paths object</a>
 * @param apiDefinitionPaths API definition paths
 * @return swagger v2 paths object
 * @throws ParseException
 */
private static JSONObject generatePathsObj(JSONObject swagger12doc,Map<String,SwaggerInfoDTO> apiDefinitionPaths) throws ParseException {
  JSONObject pathsObj=new JSONObject();
  JSONArray producesMimeArray=extractProducesObject(swagger12doc);
  JSONArray consumesMimeArray=extractConsumesObject(swagger12doc);
  for (  Map.Entry<String,SwaggerInfoDTO> entry : apiDefinitionPaths.entrySet()) {
    try {
      String key=entry.getKey();
      List<JSONArray> operationsList=entry.getValue().getOperationList();
      JSONObject pathItemObj=new JSONObject();
      String tagName=entry.getValue().getTagName();
      for (      JSONArray operations : operationsList) {
        for (        Object operation : operations) {
          JSONObject operationObject=(JSONObject)operation;
          if (operationObject.containsKey("String_Node_Str")) {
            String method=(String)operationObject.get("String_Node_Str");
            if (operationObject.containsKey("String_Node_Str")) {
              JSONObject swagger2OperationsObj=new JSONObject();
              JSONArray newParameters;
              Object swagger12Params=operationObject.get("String_Node_Str");
              if (swagger12Params != null && (swagger12Params instanceof JSONArray)) {
                JSONArray swagger12ParamObjects=(JSONArray)swagger12Params;
                newParameters=new JSONArray();
                generateSwagger2OperationParameters(newParameters,swagger12ParamObjects);
                swagger2OperationsObj.put(Constants.SWAGGER_PARAMETERS,newParameters);
              }
              swagger2OperationsObj.put(Constants.SWAGGER_OPERATION_ID,operationObject.get("String_Node_Str"));
              if (operationObject.containsKey(Constants.SWAGGER_AUTH_TYPE)) {
                swagger2OperationsObj.put(Constants.SWAGGER_X_AUTH_TYPE,operationObject.get(Constants.SWAGGER_AUTH_TYPE));
              }
              if (operationObject.containsKey(Constants.SWAGGER_THROTTLING_TIER)) {
                swagger2OperationsObj.put(Constants.SWAGGER_X_THROTTLING_TIER,operationObject.get(Constants.SWAGGER_THROTTLING_TIER));
              }
              if (operationObject.containsKey("String_Node_Str")) {
                swagger2OperationsObj.put(Constants.SWAGGER_DESCRIPTION,operationObject.get("String_Node_Str"));
              }
              if (operationObject.containsKey(Constants.SWAGGER_SUMMARY)) {
                swagger2OperationsObj.put(Constants.SWAGGER_SUMMARY,operationObject.get(Constants.SWAGGER_SUMMARY));
              }
              JSONArray operationsLevelProduces=extractProducesObject(operationObject);
              if (operationsLevelProduces != null) {
                swagger2OperationsObj.put(Constants.SWAGGER_PRODUCES,operationsLevelProduces);
              }
 else               if (entry.getValue().getProducesList() != null) {
                swagger2OperationsObj.put(Constants.SWAGGER_PRODUCES,entry.getValue().getProducesList());
              }
 else               if (producesMimeArray != null) {
                swagger2OperationsObj.put(Constants.SWAGGER_PRODUCES,producesMimeArray);
              }
              JSONArray operationLevelConsumes=extractConsumesObject(operationObject);
              if (operationLevelConsumes != null) {
                swagger2OperationsObj.put(Constants.SWAGGER_CONSUMES,operationLevelConsumes);
              }
 else               if (entry.getValue().getConsumeList() != null) {
                swagger2OperationsObj.put(Constants.SWAGGER_CONSUMES,entry.getValue().getConsumeList());
              }
 else               if (consumesMimeArray != null) {
                swagger2OperationsObj.put(Constants.SWAGGER_CONSUMES,consumesMimeArray);
              }
              buildResponseObject(operationObject,swagger2OperationsObj);
              if (tagName != null) {
                JSONArray tagsArray=new JSONArray();
                tagsArray.add(tagName);
                swagger2OperationsObj.put("String_Node_Str",tagsArray);
              }
              pathItemObj.put(method.toLowerCase(),swagger2OperationsObj);
            }
          }
 else {
            log.error("String_Node_Str");
          }
        }
      }
      pathsObj.put(key,pathItemObj);
    }
 catch (    Exception e) {
      log.error("String_Node_Str" + entry.getKey() + "String_Node_Str"+ "String_Node_Str"+ entry.getValue().toString(),e);
    }
  }
  return pathsObj;
}