Program: 35977
Project: 35977
Buggy source:
public void serveServiceDescription(){
  rsr.startDoc();
  if (isHTML) {
    rsr.write("String_Node_Str" + def.getName() + "String_Node_Str"+ RestServices.PATH_REST+ "String_Node_Str");
  }
  rsr.datawriter.object().key("String_Node_Str").value(def.getName()).key("String_Node_Str").value(def.getDescription()).key("String_Node_Str").value(RestServices.getAbsoluteUrl(def.getName())).key("String_Node_Str").value("String_Node_Str".equals(def.getAccessRole())).key("String_Node_Str").value(def.getUseStrictVersioning());
  if (isHTML)   rsr.datawriter.endObject();
 else   rsr.datawriter.key("String_Node_Str").object();
  startEndpoint("String_Node_Str","String_Node_Str" + RestServices.PARAM_ABOUT,"String_Node_Str");
  addContentType();
  endEndpoint();
  if (def.getEnableListing()) {
    startEndpoint("String_Node_Str","String_Node_Str" + RestServices.PARAM_COUNT,"String_Node_Str");
    addContentType();
    endEndpoint();
    startEndpoint("String_Node_Str","String_Node_Str","String_Node_Str");
    addEndpointParam(RestServices.PARAM_DATA,"String_Node_Str");
    addEndpointParam(RestServices.PARAM_OFFSET,"String_Node_Str");
    addEndpointParam(RestServices.PARAM_LIMIT,"String_Node_Str");
    addContentType();
    endEndpoint();
  }
  if (def.getEnableGet()) {
    startEndpoint("String_Node_Str","String_Node_Str" + def.getSourceKeyAttribute() + "String_Node_Str","String_Node_Str");
    addEndpointParam(RestServices.HEADER_IFNONEMATCH + "String_Node_Str","String_Node_Str");
    addContentType();
    JSONObject schema=JSONSchemaBuilder.build(Core.getReturnType(def.getOnPublishMicroflow()));
    addEndpointParam("String_Node_Str",schema);
    endEndpoint();
  }
  if (def.getEnableChangeLog()) {
    startEndpoint("String_Node_Str","String_Node_Str","String_Node_Str");
    addEndpointParam(RestServices.PARAM_SINCE,SINCEPARAM_HELPTEXT);
    addContentType();
    endEndpoint();
    startEndpoint("String_Node_Str","String_Node_Str","String_Node_Str");
    addEndpointParam(RestServices.PARAM_SINCE,SINCEPARAM_HELPTEXT);
    addEndpointParam(RestServices.PARAM_TIMEOUT,"String_Node_Str");
    addContentType();
    endEndpoint();
  }
  if (def.getEnableCreate()) {
    startEndpoint("String_Node_Str","String_Node_Str","String_Node_Str");
    addBodyParam();
    addEtagParam();
    endEndpoint();
    startEndpoint("String_Node_Str","String_Node_Str" + def.getSourceKeyAttribute() + "String_Node_Str","String_Node_Str");
    addBodyParam();
    addEtagParam();
    endEndpoint();
  }
  if (def.getEnableUpdate()) {
    startEndpoint("String_Node_Str","String_Node_Str" + def.getSourceKeyAttribute() + "String_Node_Str","String_Node_Str" + (def.getEnableCreate() ? "String_Node_Str" : "String_Node_Str"));
    addBodyParam();
    addEtagParam();
    endEndpoint();
  }
  if (def.getEnableDelete()) {
    startEndpoint("String_Node_Str","String_Node_Str" + def.getSourceKeyAttribute() + "String_Node_Str","String_Node_Str");
    addBodyParam();
    addEtagParam();
    endEndpoint();
  }
  if (!isHTML)   rsr.datawriter.endObject().endObject();
  rsr.endDoc();
}

Fixed version (ground truth):
public void serveServiceDescription(){
  rsr.startDoc();
  if (isHTML) {
    rsr.write("String_Node_Str" + def.getName() + "String_Node_Str"+ RestServices.PATH_REST+ "String_Node_Str");
  }
  rsr.datawriter.object().key("String_Node_Str").value(def.getName()).key("String_Node_Str").value(def.getDescription()).key("String_Node_Str").value(RestServices.getAbsoluteUrl(def.getName())).key("String_Node_Str").value("String_Node_Str".equals(def.getAccessRole())).key("String_Node_Str").value(def.getUseStrictVersioning());
  if (isHTML)   rsr.datawriter.endObject();
 else   rsr.datawriter.key("String_Node_Str").array();
  startEndpoint("String_Node_Str","String_Node_Str" + RestServices.PARAM_ABOUT,"String_Node_Str");
  addContentType();
  endEndpoint();
  if (def.getEnableListing()) {
    startEndpoint("String_Node_Str","String_Node_Str" + RestServices.PARAM_COUNT,"String_Node_Str");
    addContentType();
    endEndpoint();
    startEndpoint("String_Node_Str","String_Node_Str","String_Node_Str");
    addEndpointParam(RestServices.PARAM_DATA,"String_Node_Str");
    addEndpointParam(RestServices.PARAM_OFFSET,"String_Node_Str");
    addEndpointParam(RestServices.PARAM_LIMIT,"String_Node_Str");
    addContentType();
    endEndpoint();
  }
  if (def.getEnableGet()) {
    startEndpoint("String_Node_Str","String_Node_Str" + def.getSourceKeyAttribute() + "String_Node_Str","String_Node_Str");
    addEndpointParam(RestServices.HEADER_IFNONEMATCH + "String_Node_Str","String_Node_Str");
    addContentType();
    JSONObject schema=JSONSchemaBuilder.build(Core.getReturnType(def.getOnPublishMicroflow()));
    addEndpointParam("String_Node_Str",schema);
    endEndpoint();
  }
  if (def.getEnableChangeLog()) {
    startEndpoint("String_Node_Str","String_Node_Str","String_Node_Str");
    addEndpointParam(RestServices.PARAM_SINCE,SINCEPARAM_HELPTEXT);
    addContentType();
    endEndpoint();
    startEndpoint("String_Node_Str","String_Node_Str","String_Node_Str");
    addEndpointParam(RestServices.PARAM_SINCE,SINCEPARAM_HELPTEXT);
    addEndpointParam(RestServices.PARAM_TIMEOUT,"String_Node_Str");
    addContentType();
    endEndpoint();
  }
  if (def.getEnableCreate()) {
    startEndpoint("String_Node_Str","String_Node_Str","String_Node_Str");
    addBodyParam();
    addEtagParam();
    endEndpoint();
    startEndpoint("String_Node_Str","String_Node_Str" + def.getSourceKeyAttribute() + "String_Node_Str","String_Node_Str");
    addBodyParam();
    addEtagParam();
    endEndpoint();
  }
  if (def.getEnableUpdate()) {
    startEndpoint("String_Node_Str","String_Node_Str" + def.getSourceKeyAttribute() + "String_Node_Str","String_Node_Str" + (def.getEnableCreate() ? "String_Node_Str" : "String_Node_Str"));
    addBodyParam();
    addEtagParam();
    endEndpoint();
  }
  if (def.getEnableDelete()) {
    startEndpoint("String_Node_Str","String_Node_Str" + def.getSourceKeyAttribute() + "String_Node_Str","String_Node_Str");
    addBodyParam();
    addEtagParam();
    endEndpoint();
  }
  if (!isHTML)   rsr.datawriter.endArray().endObject();
  rsr.endDoc();
}