Program: 147125
Project: 147125
Buggy source:
private void createJsonForModel(Model model){
  state=model.getWorkingState();
  mdh=model.getDisplayHints();
  ComponentsList mcList=model.getComponentsList();
  ComponentIterator mcIter=mcList.begin();
  BodyList bodies=model.getBodyList();
  BodyIterator body=bodies.begin();
  mapBodyIndicesToFrames.put(0,model.getGround());
  JSONArray json_model_children=(JSONArray)((JSONObject)get("String_Node_Str")).get("String_Node_Str");
  JSONObject model_ground_json=new JSONObject();
  UUID groundUuid=UUID.randomUUID();
  model_ground_json.put("String_Node_Str",groundUuid.toString());
  model_ground_json.put("String_Node_Str","String_Node_Str");
  model_ground_json.put("String_Node_Str","String_Node_Str");
  model_ground_json.put("String_Node_Str",model.getGround().getAbsolutePathName());
  model_ground_json.put("String_Node_Str","String_Node_Str");
  model_ground_json.put("String_Node_Str",true);
  json_model_children.add(model_ground_json);
  addComponentToUUIDMap(model.getGround(),groundUuid);
  JSONArray bodies_json=new JSONArray();
  model_ground_json.put("String_Node_Str",bodies_json);
  mapBodyIndicesToJson.put(0,model_ground_json);
  while (!body.equals(bodies.end())) {
    int id=body.getMobilizedBodyIndex();
    mapBodyIndicesToFrames.put(id,body.__deref__());
    UUID body_uuid=UUID.randomUUID();
    JSONObject bodyJson=createBodyJson(body.__deref__(),body_uuid);
    mapBodyIndicesToJson.put(id,bodyJson);
    addComponentToUUIDMap(body.__deref__(),body_uuid);
    bodies_json.add(bodyJson);
    body.next();
  }
  dgimp=new DecorativeGeometryImplementationJS(json_geometries,json_materials,visScaleFactor);
  while (!mcIter.equals(mcList.end())) {
    Component comp=mcIter.__deref__();
    System.out.println("String_Node_Str" + comp.getAbsolutePathName() + "String_Node_Str"+ comp.getConcreteClassName());
    ArrayDecorativeGeometry adg=new ArrayDecorativeGeometry();
    comp.generateDecorations(true,mdh,state,adg);
    if (adg.size() > 0) {
      processDecorativeGeometry(adg,comp,dgimp,json_materials);
    }
    GeometryPath gPath=GeometryPath.safeDownCast(comp);
    boolean isGeometryPath=(gPath != null);
    if (isGeometryPath) {
      UUID pathUUID=createJsonForGeometryPath(gPath,mdh,state,json_geometries,json_materials);
      pathList.put(gPath,pathUUID);
    }
 else {
      adg.clear();
      comp.generateDecorations(false,mdh,state,adg);
      if (adg.size() > 0) {
        processDecorativeGeometry(adg,comp,dgimp,json_materials);
      }
    }
    mcIter.next();
  }
}

Fixed version (ground truth):
private void createJsonForModel(Model model){
  state=model.getWorkingState();
  mdh=model.getDisplayHints();
  ComponentsList mcList=model.getComponentsList();
  ComponentIterator mcIter=mcList.begin();
  BodyList bodies=model.getBodyList();
  BodyIterator body=bodies.begin();
  mapBodyIndicesToFrames.put(0,model.getGround());
  JSONArray json_model_children=(JSONArray)((JSONObject)get("String_Node_Str")).get("String_Node_Str");
  JSONObject model_ground_json=new JSONObject();
  UUID groundUuid=UUID.randomUUID();
  model_ground_json.put("String_Node_Str",groundUuid.toString());
  model_ground_json.put("String_Node_Str","String_Node_Str");
  model_ground_json.put("String_Node_Str","String_Node_Str");
  model_ground_json.put("String_Node_Str",model.getGround().getAbsolutePathName());
  model_ground_json.put("String_Node_Str","String_Node_Str");
  model_ground_json.put("String_Node_Str",true);
  json_model_children.add(model_ground_json);
  addComponentToUUIDMap(model.getGround(),groundUuid);
  JSONArray bodies_json=new JSONArray();
  model_ground_json.put("String_Node_Str",bodies_json);
  mapBodyIndicesToJson.put(0,model_ground_json);
  while (!body.equals(bodies.end())) {
    int id=body.getMobilizedBodyIndex();
    mapBodyIndicesToFrames.put(id,body.__deref__());
    UUID body_uuid=UUID.randomUUID();
    JSONObject bodyJson=createBodyJson(body.__deref__(),body_uuid);
    mapBodyIndicesToJson.put(id,bodyJson);
    addComponentToUUIDMap(body.__deref__(),body_uuid);
    bodies_json.add(bodyJson);
    body.next();
  }
  dgimp=new DecorativeGeometryImplementationJS(json_geometries,json_materials,visScaleFactor);
  while (!mcIter.equals(mcList.end())) {
    Component comp=mcIter.__deref__();
    ArrayDecorativeGeometry adg=new ArrayDecorativeGeometry();
    comp.generateDecorations(true,mdh,state,adg);
    if (adg.size() > 0) {
      processDecorativeGeometry(adg,comp,dgimp,json_materials);
    }
    GeometryPath gPath=GeometryPath.safeDownCast(comp);
    boolean isGeometryPath=(gPath != null);
    if (isGeometryPath) {
      UUID pathUUID=createJsonForGeometryPath(gPath,mdh,state,json_geometries,json_materials);
      pathList.put(gPath,pathUUID);
    }
 else {
      adg.clear();
      comp.generateDecorations(false,mdh,state,adg);
      if (adg.size() > 0) {
        processDecorativeGeometry(adg,comp,dgimp,json_materials);
      }
    }
    mcIter.next();
  }
}