Program: 25303
Project: 25303
Buggy source:
/** 
 * Submit the query for explain or execute or execute with a timeout.
 * @param sessionid The session in which user is submitting the query. Any configuration set in the session will be picked up.
 * @param query The query to run
 * @param operation The operation on the query. Supported operations are  {@value SubmitOp#EXPLAIN},   {@value SubmitOp#EXECUTE}and   {@value SubmitOp#EXECUTE_WITH_TIMEOUT}
 * @param conf The configuration for the query
 * @param timeoutmillis The timeout for the query, honored only in case of  {@value SubmitOp#EXECUTE_WITH_TIMEOUT} operation
 * @param user the user
 * @param queryName human readable query name set by user (optional parameter)
 * @return {@link QueryHandle} in case of {@value SubmitOp#EXECUTE} operation. {@link QueryPlan} in case of{@value SubmitOp#EXPLAIN} operation. {@link QueryHandleWithResultSet} in case{@value SubmitOp#EXECUTE_WITH_TIMEOUT} operation.
 */
@POST @Path("String_Node_Str") @Consumes({MediaType.MULTIPART_FORM_DATA}) @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML,MediaType.TEXT_PLAIN}) public QuerySubmitResult query(@FormDataParam("String_Node_Str") LensSessionHandle sessionid,@FormDataParam("String_Node_Str") String query,@FormDataParam("String_Node_Str") String operation,@FormDataParam("String_Node_Str") LensConf conf,@DefaultValue("String_Node_Str") @FormDataParam("String_Node_Str") Long timeoutmillis,@DefaultValue("String_Node_Str") @FormDataParam("String_Node_Str") String user,@DefaultValue("String_Node_Str") @FormDataParam("String_Node_Str") String queryName){
  checkQuery(query);
  checkSessionId(sessionid);
  try {
    SubmitOp sop=null;
    try {
      sop=SubmitOp.valueOf(operation.toUpperCase());
    }
 catch (    IllegalArgumentException e) {
      throw new BadRequestException(e);
    }
    if (sop == null) {
      throw new BadRequestException("String_Node_Str" + operation + submitClue);
    }
switch (sop) {
case EXECUTE:
      return queryServer.executeAsync(sessionid,query,conf,queryName);
case EXPLAIN:
    return queryServer.explain(sessionid,query,conf);
case EXECUTE_WITH_TIMEOUT:
  return queryServer.execute(sessionid,query,timeoutmillis,conf,queryName);
default :
throw new BadRequestException("String_Node_Str" + operation + submitClue);
}
}
 catch (LensException e) {
throw new WebApplicationException(e);
}
}

Fixed version (ground truth):
/** 
 * Submit the query for explain or execute or execute with a timeout.
 * @param sessionid The session in which user is submitting the query. Any configuration set in the session will be picked up.
 * @param query The query to run
 * @param operation The operation on the query. Supported operations are  {@value SubmitOp#EXPLAIN},   {@value SubmitOp#EXECUTE}and   {@value SubmitOp#EXECUTE_WITH_TIMEOUT}
 * @param conf The configuration for the query
 * @param timeoutmillis The timeout for the query, honored only in case of  {@value SubmitOp#EXECUTE_WITH_TIMEOUT} operation
 * @param queryName human readable query name set by user (optional parameter)
 * @return {@link QueryHandle} in case of {@value SubmitOp#EXECUTE} operation. {@link QueryPlan} in case of{@value SubmitOp#EXPLAIN} operation. {@link QueryHandleWithResultSet} in case{@value SubmitOp#EXECUTE_WITH_TIMEOUT} operation.
 */
@POST @Path("String_Node_Str") @Consumes({MediaType.MULTIPART_FORM_DATA}) @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML,MediaType.TEXT_PLAIN}) public QuerySubmitResult query(@FormDataParam("String_Node_Str") LensSessionHandle sessionid,@FormDataParam("String_Node_Str") String query,@FormDataParam("String_Node_Str") String operation,@FormDataParam("String_Node_Str") LensConf conf,@DefaultValue("String_Node_Str") @FormDataParam("String_Node_Str") Long timeoutmillis,@DefaultValue("String_Node_Str") @FormDataParam("String_Node_Str") String queryName){
  checkQuery(query);
  checkSessionId(sessionid);
  try {
    SubmitOp sop=null;
    try {
      sop=SubmitOp.valueOf(operation.toUpperCase());
    }
 catch (    IllegalArgumentException e) {
      throw new BadRequestException(e);
    }
    if (sop == null) {
      throw new BadRequestException("String_Node_Str" + operation + submitClue);
    }
switch (sop) {
case EXECUTE:
      return queryServer.executeAsync(sessionid,query,conf,queryName);
case EXPLAIN:
    return queryServer.explain(sessionid,query,conf);
case EXECUTE_WITH_TIMEOUT:
  return queryServer.execute(sessionid,query,timeoutmillis,conf,queryName);
default :
throw new BadRequestException("String_Node_Str" + operation + submitClue);
}
}
 catch (LensException e) {
throw new WebApplicationException(e);
}
}