Program: 87527
Project: 87527
Buggy source:
private List<JSONObject> grabModels(List<JSONObject> categories){
  List<JSONObject> models=new ArrayList<JSONObject>();
  log.info("String_Node_Str");
  for (  JSONObject category : categories) {
    try {
      long categoryId=category.getLong(JSONKeys.ID.getKey());
      int modelsNum=category.getInt(JSONKeys.MODELS_NUM.getKey());
      if (modelsNum != 0) {
        int pageCount=(modelsNum / COUNT_MAX_VALUE) + 1;
        for (Integer pageNum=1; pageNum <= pageCount; pageNum++) {
          CategoryRequestBuilder categoryRequestBuilder=new CategoryRequestBuilder();
          Map<String,String> parameters=new HashMap<String,String>();
          parameters.put(RequestParams.COUNT.getKey(),COUNT_MAX_VALUE.toString());
          parameters.put(RequestParams.PAGE.getKey(),pageNum.toString());
          UrlRequest urlRequest=categoryRequestBuilder.requestForListOfModelsOfCategoryById(categoryId,parameters);
          try {
            JSONObject mainObject=contentApiProvider.provide(urlRequest);
            List<JSONObject> modelsList=JSONUtil.extractList(mainObject,JSONKeys.ITEMS.getKey(),JSONKeys.MODELS.getKey());
            processEntityList(modelsList);
            models.addAll(modelsList);
          }
 catch (          HTTPException e) {
            log.error("String_Node_Str" + e.getMessage());
          }
catch (          IOException e) {
            log.error("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ urlRequest.getUrl());
          }
catch (          JSONException e) {
            log.error("String_Node_Str" + "String_Node_Str" + urlRequest.getUrl(),e);
          }
        }
      }
    }
 catch (    JSONException e) {
      log.error("String_Node_Str",e);
    }
  }
  log.info("String_Node_Str");
  return models;
}

Fixed version (ground truth):
private List<JSONObject> grabModels(List<JSONObject> categories){
  List<JSONObject> models=new ArrayList<JSONObject>();
  log.info("String_Node_Str");
  for (  JSONObject category : categories) {
    try {
      long categoryId=category.getLong(JSONKeys.ID.getKey());
      int modelsNum=category.getInt(JSONKeys.MODELS_NUM.getKey());
      if (modelsNum != 0) {
        int pageCount=(modelsNum % COUNT_MAX_VALUE == 0) ? (modelsNum / COUNT_MAX_VALUE) : (modelsNum / COUNT_MAX_VALUE) + 1;
        for (Integer pageNum=1; pageNum <= pageCount; pageNum++) {
          CategoryRequestBuilder categoryRequestBuilder=new CategoryRequestBuilder();
          Map<String,String> parameters=new HashMap<String,String>();
          parameters.put(RequestParams.COUNT.getKey(),COUNT_MAX_VALUE.toString());
          parameters.put(RequestParams.PAGE.getKey(),pageNum.toString());
          UrlRequest urlRequest=categoryRequestBuilder.requestForListOfModelsOfCategoryById(categoryId,parameters);
          try {
            JSONObject mainObject=contentApiProvider.provide(urlRequest);
            List<JSONObject> modelsList=JSONUtil.extractList(mainObject,JSONKeys.ITEMS.getKey(),JSONKeys.MODELS.getKey());
            processEntityList(modelsList);
            models.addAll(modelsList);
          }
 catch (          HTTPException e) {
            log.error("String_Node_Str" + e.getMessage());
          }
catch (          IOException e) {
            log.error("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ urlRequest.getUrl());
          }
catch (          JSONException e) {
            log.error("String_Node_Str" + "String_Node_Str" + urlRequest.getUrl(),e);
          }
        }
      }
    }
 catch (    JSONException e) {
      log.error("String_Node_Str",e);
    }
  }
  log.info("String_Node_Str");
  return models;
}