Program: 19910
Project: 19910
Buggy source:
@DELETE @Produces(APPLICATION_JSON_UTF8) @Path("String_Node_Str") public Response deleteTopicViewPath(@PathParam("String_Node_Str") final String databaseId,@PathParam("String_Node_Str") final String path,@PathParam("String_Node_Str") final String topicId,@PathParam("String_Node_Str") final String viewId) throws Exception {
  boolean readOnly=false;
  Presto session=createPresto(databaseId,readOnly);
  try {
    PrestoContext context=PathParser.getTopicByPath(session,path,topicId,viewId);
    if (context == null || context.isMissingTopic()) {
      return Response.status(Status.NOT_FOUND).build();
    }
 else {
      PrestoType type=context.getType();
      if (type.isRemovable()) {
        try {
          PrestoTopic topic=context.getTopic();
          if (type.isInline()) {
            PrestoContext parentContext=context.getParentContext();
            PrestoFieldUsage parentField=context.getParentField();
            PrestoContextRules parentRules=session.getPrestoContextRules(parentContext);
            PrestoTopic parentTopicAfterSave=session.removeFieldValues(parentRules,parentField,Collections.singletonList(topic));
            FieldData fieldData=session.getFieldData(parentTopicAfterSave,parentField);
            return Response.ok(fieldData).build();
          }
 else {
            session.deleteTopic(topic,type);
            return Response.noContent().build();
          }
        }
 catch (        ConstraintException ce) {
          return getConstraintMessageResponse(ce);
        }
      }
 else {
        return Response.status(Status.FORBIDDEN).build();
      }
    }
  }
 catch (  Exception e) {
    session.abort();
    throw e;
  }
 finally {
    session.close();
  }
}

Fixed version (ground truth):
@DELETE @Produces(APPLICATION_JSON_UTF8) @Path("String_Node_Str") public Response deleteTopicViewPath(@PathParam("String_Node_Str") final String databaseId,@PathParam("String_Node_Str") final String path,@PathParam("String_Node_Str") final String topicId,@PathParam("String_Node_Str") final String viewId) throws Exception {
  boolean readOnly=false;
  Presto session=createPresto(databaseId,readOnly);
  try {
    PrestoContext context=PathParser.getTopicByPath(session,path,topicId,viewId);
    if (context == null || context.isMissingTopic()) {
      return Response.status(Status.NOT_FOUND).build();
    }
 else {
      PrestoType type=context.getType();
      if (type.isRemovable()) {
        try {
          PrestoTopic topic=context.getTopic();
          if (type.isInline()) {
            PrestoContext parentContext=context.getParentContext();
            PrestoFieldUsage parentField=context.getParentField();
            PrestoContextRules parentRules=session.getPrestoContextRules(parentContext);
            PrestoContext updatedParentContext=session.removeFieldValues(parentRules,parentField,Collections.singletonList(topic));
            FieldData fieldData=session.getFieldDataAndProcess(updatedParentContext,parentField);
            return Response.ok(fieldData).build();
          }
 else {
            session.deleteTopic(topic,type);
            return Response.noContent().build();
          }
        }
 catch (        ConstraintException ce) {
          return getConstraintMessageResponse(ce);
        }
      }
 else {
        return Response.status(Status.FORBIDDEN).build();
      }
    }
  }
 catch (  Exception e) {
    session.abort();
    throw e;
  }
 finally {
    session.close();
  }
}