nus-yam/ex-repair huggingface dataset:
Program: 28906
Project: 28906
Buggy source:
@Override public void parameterValidation(Parameter[] parameters) throws AnnotationValidationException {
  for (  Parameter parameter : parameters) {
    String parameterName=parameter.name();
    if (parameterName.isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",extensionClassFullName));
    }
 else     if (!parameterNamePattern.matcher(parameterName).find()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.description().isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.type().length == 0) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.dynamic()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
  }
}

Fixed version (ground truth):
@Override public void parameterValidation(Parameter[] parameters) throws AnnotationValidationException {
  for (  Parameter parameter : parameters) {
    String parameterName=parameter.name();
    if (parameterName.isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",extensionClassFullName));
    }
 else     if (!PARAMETER_NAME_PATTERN.matcher(parameterName).find()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.description().isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.type().length == 0) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.dynamic()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
  }
}
Program: 28907
Project: 28907
Buggy source:
@Override public void returnAttributesValidation(ReturnAttribute[] returnAttributes) throws AnnotationValidationException {
  for (  ReturnAttribute returnAttribute : returnAttributes) {
    String returnAttributeName=returnAttribute.name();
    if (returnAttributeName.isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",extensionClassFullName));
    }
 else     if (!camelCasePattern.matcher(returnAttributeName).find()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",returnAttributeName,extensionClassFullName));
    }
    if (returnAttribute.description().isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",returnAttributeName,extensionClassFullName));
    }
    if (returnAttribute.type().length == 0) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",returnAttributeName,extensionClassFullName));
    }
  }
}

Fixed version (ground truth):
@Override public void returnAttributesValidation(ReturnAttribute[] returnAttributes) throws AnnotationValidationException {
  for (  ReturnAttribute returnAttribute : returnAttributes) {
    String returnAttributeName=returnAttribute.name();
    if (returnAttributeName.isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",extensionClassFullName));
    }
 else     if (!CAMEL_CASE_PATTERN.matcher(returnAttributeName).find()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",returnAttributeName,extensionClassFullName));
    }
    if (returnAttribute.description().isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",returnAttributeName,extensionClassFullName));
    }
    if (returnAttribute.type().length == 0) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",returnAttributeName,extensionClassFullName));
    }
  }
}
Program: 28908
Project: 28908
Buggy source:
@Override public void parameterValidation(Parameter[] parameters) throws AnnotationValidationException {
  for (  Parameter parameter : parameters) {
    String parameterName=parameter.name();
    if (parameterName.isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",extensionClassFullName));
    }
 else     if (!parameterNamePattern.matcher(parameterName).find()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.description().isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.type().length == 0) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.dynamic()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
  }
}

Fixed version (ground truth):
@Override public void parameterValidation(Parameter[] parameters) throws AnnotationValidationException {
  for (  Parameter parameter : parameters) {
    String parameterName=parameter.name();
    if (parameterName.isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",extensionClassFullName));
    }
 else     if (!PARAMETER_NAME_PATTERN.matcher(parameterName).find()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.description().isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.type().length == 0) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.dynamic()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
  }
}
Program: 28909
Project: 28909
Buggy source:
@Override public void parameterValidation(Parameter[] parameters) throws AnnotationValidationException {
  for (  Parameter parameter : parameters) {
    String parameterName=parameter.name();
    if (parameterName.isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",extensionClassFullName));
    }
 else     if (!parameterNamePattern.matcher(parameterName).find()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.description().isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.type().length == 0) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.dynamic()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
  }
}

Fixed version (ground truth):
@Override public void parameterValidation(Parameter[] parameters) throws AnnotationValidationException {
  for (  Parameter parameter : parameters) {
    String parameterName=parameter.name();
    if (parameterName.isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",extensionClassFullName));
    }
 else     if (!PARAMETER_NAME_PATTERN.matcher(parameterName).find()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.description().isEmpty()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.type().length == 0) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
    if (parameter.dynamic()) {
      throw new AnnotationValidationException(MessageFormat.format("String_Node_Str" + "String_Node_Str",parameterName,extensionClassFullName));
    }
  }
}
Program: 28911
Project: 28911
Buggy source:
public AndConditionExpressionExecutor(ExpressionExecutor leftConditionExecutor,ExpressionExecutor rightConditionExecutor){
  if (leftConditionExecutor.getReturnType().equals(Attribute.Type.BOOL) && rightConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
    this.leftConditionExecutor=leftConditionExecutor;
    this.rightConditionExecutor=rightConditionExecutor;
  }
 else {
    if (!leftConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
      throw new OperationNotSupportedException("String_Node_Str" + leftConditionExecutor.toString() + "String_Node_Str"+ "String_Node_Str"+ leftConditionExecutor.getReturnType().toString());
    }
 else     if (!rightConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
      throw new OperationNotSupportedException("String_Node_Str" + rightConditionExecutor.toString() + "String_Node_Str"+ "String_Node_Str"+ rightConditionExecutor.getReturnType().toString());
    }
 else {
      throw new OperationNotSupportedException("String_Node_Str" + leftConditionExecutor.toString() + "String_Node_Str"+ rightConditionExecutor.toString()+ "String_Node_Str"+ "String_Node_Str"+ leftConditionExecutor.getReturnType().toString()+ "String_Node_Str"+ rightConditionExecutor.getReturnType().toString());
    }
  }
}

Fixed version (ground truth):
public AndConditionExpressionExecutor(ExpressionExecutor leftConditionExecutor,ExpressionExecutor rightConditionExecutor){
  if (leftConditionExecutor.getReturnType().equals(Attribute.Type.BOOL) && rightConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
    this.leftConditionExecutor=leftConditionExecutor;
    this.rightConditionExecutor=rightConditionExecutor;
  }
 else {
    if (!leftConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
      throw new OperationNotSupportedException("String_Node_Str" + leftConditionExecutor.toString() + "String_Node_Str"+ "String_Node_Str"+ leftConditionExecutor.getReturnType().toString());
    }
 else     if (!rightConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
      throw new OperationNotSupportedException("String_Node_Str" + rightConditionExecutor.toString() + "String_Node_Str"+ "String_Node_Str"+ rightConditionExecutor.getReturnType().toString());
    }
 else {
      throw new OperationNotSupportedException("String_Node_Str" + leftConditionExecutor.toString() + "String_Node_Str"+ rightConditionExecutor.toString()+ "String_Node_Str"+ "String_Node_Str"+ leftConditionExecutor.getReturnType().toString()+ "String_Node_Str"+ "String_Node_Str"+ rightConditionExecutor.getReturnType().toString());
    }
  }
}
Program: 28912
Project: 28912
Buggy source:
public static IncrementalExecutor week(List<AttributeFunction> functionAttributes,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,EventTable> eventTableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  IncrementalExecutor week=new IncrementalExecutor(TimePeriod.Duration.WEEKS,child,functionAttributes,metaEvent,currentState,eventTableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
  return week;
}

Fixed version (ground truth):
public static IncrementalExecutor week(List<AttributeFunction> functionAttributes,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,Table> tableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  IncrementalExecutor week=new IncrementalExecutor(TimePeriod.Duration.WEEKS,child,functionAttributes,metaEvent,currentState,tableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
  return week;
}
Program: 28913
Project: 28913
Buggy source:
public static IncrementalExecutor year(List<AttributeFunction> functionAttributes,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,EventTable> eventTableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  IncrementalExecutor year=new IncrementalExecutor(TimePeriod.Duration.YEARS,child,functionAttributes,metaEvent,currentState,eventTableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
  return year;
}

Fixed version (ground truth):
public static IncrementalExecutor year(List<AttributeFunction> functionAttributes,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,Table> tableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  IncrementalExecutor year=new IncrementalExecutor(TimePeriod.Duration.YEARS,child,functionAttributes,metaEvent,currentState,tableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
  return year;
}
Program: 28914
Project: 28914
Buggy source:
private IncrementalExecutor(TimePeriod.Duration duration,IncrementalExecutor child,List<AttributeFunction> functionAttributes,MetaComplexEvent metaEvent,int currentState,Map<String,EventTable> eventTableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  this.duration=duration;
  this.child=child;
  this.compositeAggregators=createIncrementalAggregators(functionAttributes);
  this.basicExecutorDetails=basicFunctionExecutors(metaEvent,currentState,eventTableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName);
  this.groupByExecutor=generateGroupByExecutor(groupByVariable,metaEvent,currentState,eventTableMap,executorList,executionPlanContext,defaultStreamEventIndex,queryName);
  storeAggregatorFunctions=new ConcurrentHashMap<>();
  this.executionPlanContext=executionPlanContext;
}

Fixed version (ground truth):
private IncrementalExecutor(TimePeriod.Duration duration,IncrementalExecutor child,List<AttributeFunction> functionAttributes,MetaComplexEvent metaEvent,int currentState,Map<String,Table> tableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  this.duration=duration;
  this.child=child;
  this.compositeAggregators=createIncrementalAggregators(functionAttributes);
  this.basicExecutorDetails=basicFunctionExecutors(metaEvent,currentState,tableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName);
  this.groupByExecutor=generateGroupByExecutor(groupByVariable,metaEvent,currentState,tableMap,executorList,executionPlanContext,defaultStreamEventIndex,queryName);
  storeAggregatorFunctions=new ConcurrentHashMap<>();
  this.executionPlanContext=executionPlanContext;
}
Program: 28915
Project: 28915
Buggy source:
public static IncrementalExecutor second(List<AttributeFunction> functionAttributes,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,EventTable> eventTableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  IncrementalExecutor second=new IncrementalExecutor(TimePeriod.Duration.SECONDS,child,functionAttributes,metaEvent,currentState,eventTableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
  return second;
}

Fixed version (ground truth):
public static IncrementalExecutor second(List<AttributeFunction> functionAttributes,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,Table> tableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  IncrementalExecutor second=new IncrementalExecutor(TimePeriod.Duration.SECONDS,child,functionAttributes,metaEvent,currentState,tableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
  return second;
}
Program: 28916
Project: 28916
Buggy source:
public static IncrementalExecutor minute(List<AttributeFunction> functionAttributes,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,EventTable> eventTableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  IncrementalExecutor minute=new IncrementalExecutor(TimePeriod.Duration.MINUTES,child,functionAttributes,metaEvent,currentState,eventTableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
  return minute;
}

Fixed version (ground truth):
public static IncrementalExecutor minute(List<AttributeFunction> functionAttributes,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,Table> tableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  IncrementalExecutor minute=new IncrementalExecutor(TimePeriod.Duration.MINUTES,child,functionAttributes,metaEvent,currentState,tableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
  return minute;
}
Program: 28917
Project: 28917
Buggy source:
public static IncrementalExecutor hour(List<AttributeFunction> functionAttributes,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,EventTable> eventTableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  IncrementalExecutor hour=new IncrementalExecutor(TimePeriod.Duration.HOURS,child,functionAttributes,metaEvent,currentState,eventTableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
  return hour;
}

Fixed version (ground truth):
public static IncrementalExecutor hour(List<AttributeFunction> functionAttributes,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,Table> tableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  IncrementalExecutor hour=new IncrementalExecutor(TimePeriod.Duration.HOURS,child,functionAttributes,metaEvent,currentState,tableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
  return hour;
}
Program: 28918
Project: 28918
Buggy source:
public static IncrementalExecutor month(List<AttributeFunction> functionAttributes,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,EventTable> eventTableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  IncrementalExecutor month=new IncrementalExecutor(TimePeriod.Duration.MONTHS,child,functionAttributes,metaEvent,currentState,eventTableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
  return month;
}

Fixed version (ground truth):
public static IncrementalExecutor month(List<AttributeFunction> functionAttributes,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,Table> tableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  IncrementalExecutor month=new IncrementalExecutor(TimePeriod.Duration.MONTHS,child,functionAttributes,metaEvent,currentState,tableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
  return month;
}
Program: 28920
Project: 28920
Buggy source:
public static IncrementalExecutor day(List<AttributeFunction> functionAttributes,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,EventTable> eventTableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  IncrementalExecutor day=new IncrementalExecutor(TimePeriod.Duration.DAYS,child,functionAttributes,metaEvent,currentState,eventTableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
  return day;
}

Fixed version (ground truth):
public static IncrementalExecutor day(List<AttributeFunction> functionAttributes,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,Table> tableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
  IncrementalExecutor day=new IncrementalExecutor(TimePeriod.Duration.DAYS,child,functionAttributes,metaEvent,currentState,tableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
  return day;
}
Program: 28921
Project: 28921
Buggy source:
/** 
 * @param groupByClause
 * @param metaEvent
 * @param currentState
 * @param eventTableMap
 * @param executorList
 * @param executionPlanContext
 * @param defaultStreamEventIndex
 * @param queryName
 * @return
 */
private ExpressionExecutor generateGroupByExecutor(Variable groupByClause,MetaComplexEvent metaEvent,int currentState,Map<String,EventTable> eventTableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,int defaultStreamEventIndex,String queryName){
  ExpressionExecutor variableExpressionExecutor=ExpressionParser.parseExpression(groupByClause,metaEvent,currentState,eventTableMap,executorList,executionPlanContext,true,defaultStreamEventIndex,queryName);
  return variableExpressionExecutor;
}

Fixed version (ground truth):
/** 
 * @param groupByClause
 * @param metaEvent
 * @param currentState
 * @param tableMap
 * @param executorList
 * @param executionPlanContext
 * @param defaultStreamEventIndex
 * @param queryName
 * @return
 */
private ExpressionExecutor generateGroupByExecutor(Variable groupByClause,MetaComplexEvent metaEvent,int currentState,Map<String,Table> tableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,int defaultStreamEventIndex,String queryName){
  ExpressionExecutor variableExpressionExecutor=ExpressionParser.parseExpression(groupByClause,metaEvent,currentState,tableMap,executorList,executionPlanContext,true,defaultStreamEventIndex,queryName);
  return variableExpressionExecutor;
}
Program: 28922
Project: 28922
Buggy source:
private static IncrementalExecutor build(List<AttributeFunction> functionsAttributes,TimePeriod.Duration duration,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,EventTable> eventTableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
switch (duration) {
case SECONDS:
    return IncrementalExecutor.second(functionsAttributes,child,metaEvent,currentState,eventTableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
case MINUTES:
  return IncrementalExecutor.minute(functionsAttributes,child,metaEvent,currentState,eventTableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
default :
return null;
}
}

Fixed version (ground truth):
private static IncrementalExecutor build(List<AttributeFunction> functionsAttributes,TimePeriod.Duration duration,IncrementalExecutor child,MetaComplexEvent metaEvent,int currentState,Map<String,Table> tableMap,List<VariableExpressionExecutor> executorList,ExecutionPlanContext executionPlanContext,boolean groupBy,int defaultStreamEventIndex,String queryName,Variable groupByVariable){
switch (duration) {
case SECONDS:
    return IncrementalExecutor.second(functionsAttributes,child,metaEvent,currentState,tableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
case MINUTES:
  return IncrementalExecutor.minute(functionsAttributes,child,metaEvent,currentState,tableMap,executorList,executionPlanContext,groupBy,defaultStreamEventIndex,queryName,groupByVariable);
default :
return null;
}
}
Program: 28924
Project: 28924
Buggy source:
public AndConditionExpressionExecutor(ExpressionExecutor leftConditionExecutor,ExpressionExecutor rightConditionExecutor){
  if (leftConditionExecutor.getReturnType().equals(Attribute.Type.BOOL) && rightConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
    this.leftConditionExecutor=leftConditionExecutor;
    this.rightConditionExecutor=rightConditionExecutor;
  }
 else {
    if (!leftConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
      throw new OperationNotSupportedException("String_Node_Str" + leftConditionExecutor.toString() + "String_Node_Str"+ "String_Node_Str"+ leftConditionExecutor.getReturnType().toString());
    }
 else     if (!rightConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
      throw new OperationNotSupportedException("String_Node_Str" + rightConditionExecutor.toString() + "String_Node_Str"+ "String_Node_Str"+ rightConditionExecutor.getReturnType().toString());
    }
 else {
      throw new OperationNotSupportedException("String_Node_Str" + leftConditionExecutor.toString() + "String_Node_Str"+ rightConditionExecutor.toString()+ "String_Node_Str"+ "String_Node_Str"+ leftConditionExecutor.getReturnType().toString()+ "String_Node_Str"+ "String_Node_Str"+ rightConditionExecutor.getReturnType().toString());
    }
  }
}

Fixed version (ground truth):
public AndConditionExpressionExecutor(ExpressionExecutor leftConditionExecutor,ExpressionExecutor rightConditionExecutor){
  if (leftConditionExecutor.getReturnType().equals(Attribute.Type.BOOL) && rightConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
    this.leftConditionExecutor=leftConditionExecutor;
    this.rightConditionExecutor=rightConditionExecutor;
  }
 else {
    if (!leftConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
      throw new OperationNotSupportedException("String_Node_Str" + leftConditionExecutor.toString() + "String_Node_Str"+ leftConditionExecutor.getReturnType().toString());
    }
 else     if (!rightConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
      throw new OperationNotSupportedException("String_Node_Str" + rightConditionExecutor.toString() + "String_Node_Str"+ "String_Node_Str"+ rightConditionExecutor.getReturnType().toString());
    }
 else {
      throw new OperationNotSupportedException("String_Node_Str" + leftConditionExecutor.toString() + "String_Node_Str"+ rightConditionExecutor.toString()+ "String_Node_Str"+ leftConditionExecutor.getReturnType().toString()+ "String_Node_Str"+ rightConditionExecutor.getReturnType().toString());
    }
  }
}
Program: 28925
Project: 28925
Buggy source:
public NotConditionExpressionExecutor(ExpressionExecutor conditionExecutor){
  if (conditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
    this.conditionExecutor=conditionExecutor;
  }
 else {
    throw new OperationNotSupportedException("String_Node_Str" + conditionExecutor.toString() + "String_Node_Str"+ "String_Node_Str"+ conditionExecutor.getReturnType().toString());
  }
}

Fixed version (ground truth):
public NotConditionExpressionExecutor(ExpressionExecutor conditionExecutor){
  if (conditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
    this.conditionExecutor=conditionExecutor;
  }
 else {
    throw new OperationNotSupportedException("String_Node_Str" + conditionExecutor.toString() + "String_Node_Str"+ conditionExecutor.getReturnType().toString());
  }
}
Program: 28926
Project: 28926
Buggy source:
public OrConditionExpressionExecutor(ExpressionExecutor leftConditionExecutor,ExpressionExecutor rightConditionExecutor){
  if (leftConditionExecutor.getReturnType().equals(Attribute.Type.BOOL) && rightConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
    this.leftConditionExecutor=leftConditionExecutor;
    this.rightConditionExecutor=rightConditionExecutor;
  }
 else {
    if (!leftConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
      throw new OperationNotSupportedException("String_Node_Str" + leftConditionExecutor.toString() + "String_Node_Str"+ "String_Node_Str"+ leftConditionExecutor.getReturnType().toString());
    }
 else     if (!rightConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
      throw new OperationNotSupportedException("String_Node_Str" + rightConditionExecutor.toString() + "String_Node_Str"+ "String_Node_Str"+ rightConditionExecutor.getReturnType().toString());
    }
 else {
      throw new OperationNotSupportedException("String_Node_Str" + leftConditionExecutor.toString() + "String_Node_Str"+ rightConditionExecutor.toString()+ "String_Node_Str"+ "String_Node_Str"+ leftConditionExecutor.getReturnType().toString()+ "String_Node_Str"+ rightConditionExecutor.getReturnType().toString());
    }
  }
}

Fixed version (ground truth):
public OrConditionExpressionExecutor(ExpressionExecutor leftConditionExecutor,ExpressionExecutor rightConditionExecutor){
  if (leftConditionExecutor.getReturnType().equals(Attribute.Type.BOOL) && rightConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
    this.leftConditionExecutor=leftConditionExecutor;
    this.rightConditionExecutor=rightConditionExecutor;
  }
 else {
    if (!leftConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
      throw new OperationNotSupportedException("String_Node_Str" + leftConditionExecutor.toString() + "String_Node_Str"+ leftConditionExecutor.getReturnType().toString());
    }
 else     if (!rightConditionExecutor.getReturnType().equals(Attribute.Type.BOOL)) {
      throw new OperationNotSupportedException("String_Node_Str" + rightConditionExecutor.toString() + "String_Node_Str"+ "String_Node_Str"+ rightConditionExecutor.getReturnType().toString());
    }
 else {
      throw new OperationNotSupportedException("String_Node_Str" + leftConditionExecutor.toString() + "String_Node_Str"+ rightConditionExecutor.toString()+ "String_Node_Str"+ leftConditionExecutor.getReturnType().toString()+ "String_Node_Str"+ rightConditionExecutor.getReturnType().toString());
    }
  }
}
Program: 28927
Project: 28927
Buggy source:
@Override protected void init(ExpressionExecutor[] attributeExpressionExecutors,ConfigReader configReader,ExecutionPlanContext executionPlanContext){
  if (attributeExpressionExecutors.length != 2) {
    throw new ExecutionPlanValidationException("String_Node_Str" + "String_Node_Str" + attributeExpressionExecutors.length);
  }
  if (!(attributeExpressionExecutors[1] instanceof ConstantExpressionExecutor)) {
    throw new ExecutionPlanValidationException("String_Node_Str" + "String_Node_Str");
  }
 else {
    String type=attributeExpressionExecutors[1].execute(null).toString();
    if (type.toLowerCase().equals("String_Node_Str")) {
      returnType=Attribute.Type.INT;
    }
 else     if (type.toLowerCase().equals("String_Node_Str")) {
      returnType=Attribute.Type.LONG;
    }
 else     if (type.toLowerCase().equals("String_Node_Str")) {
      returnType=Attribute.Type.FLOAT;
    }
 else     if (type.toLowerCase().equals("String_Node_Str")) {
      returnType=Attribute.Type.DOUBLE;
    }
 else     if (type.toLowerCase().equals("String_Node_Str")) {
      returnType=Attribute.Type.BOOL;
    }
 else     if (type.toLowerCase().equals("String_Node_Str")) {
      returnType=Attribute.Type.STRING;
    }
 else {
      throw new ExecutionPlanValidationException("String_Node_Str" + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override protected void init(ExpressionExecutor[] attributeExpressionExecutors,ConfigReader configReader,ExecutionPlanContext executionPlanContext){
  if (attributeExpressionExecutors.length != 2) {
    throw new ExecutionPlanValidationException("String_Node_Str" + "String_Node_Str" + attributeExpressionExecutors.length);
  }
  if (!(attributeExpressionExecutors[1] instanceof ConstantExpressionExecutor)) {
    throw new ExecutionPlanValidationException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  }
 else {
    String type=attributeExpressionExecutors[1].execute(null).toString();
    if (type.toLowerCase().equals("String_Node_Str")) {
      returnType=Attribute.Type.INT;
    }
 else     if (type.toLowerCase().equals("String_Node_Str")) {
      returnType=Attribute.Type.LONG;
    }
 else     if (type.toLowerCase().equals("String_Node_Str")) {
      returnType=Attribute.Type.FLOAT;
    }
 else     if (type.toLowerCase().equals("String_Node_Str")) {
      returnType=Attribute.Type.DOUBLE;
    }
 else     if (type.toLowerCase().equals("String_Node_Str")) {
      returnType=Attribute.Type.BOOL;
    }
 else     if (type.toLowerCase().equals("String_Node_Str")) {
      returnType=Attribute.Type.STRING;
    }
 else {
      throw new ExecutionPlanValidationException("String_Node_Str" + "String_Node_Str");
    }
  }
}
Program: 28930
Project: 28930
Buggy source:
private void buildStreamVariableExecutor(Variable variable,int streamEventChainIndex,ConditionVisitor conditionVisitor,Attribute.Type type){
  String id=variable.getAttributeName();
  if (variable.getStreamId() != null) {
    id=variable.getStreamId() + "String_Node_Str" + id;
  }
  conditionVisitor.beginVisitStreamVariable(id,variable.getStreamId(),variable.getAttributeName(),type);
  if (!variableExpressionExecutorMap.containsKey(id)) {
    ExpressionExecutor variableExpressionExecutor=ExpressionParser.parseExpression(expression,matchingMetaInfoHolder.getMetaStateEvent(),streamEventChainIndex,eventTableMap,variableExpressionExecutors,executionPlanContext,false,0,queryName);
    variableExpressionExecutorMap.put(id,variableExpressionExecutor);
  }
  conditionVisitor.endVisitStreamVariable(id,variable.getStreamId(),variable.getAttributeName(),type);
}

Fixed version (ground truth):
private void buildStreamVariableExecutor(Variable variable,int streamEventChainIndex,ConditionVisitor conditionVisitor,Attribute.Type type){
  String id=variable.getAttributeName();
  if (variable.getStreamId() != null) {
    id=variable.getStreamId() + "String_Node_Str" + id;
  }
  conditionVisitor.beginVisitStreamVariable(id,variable.getStreamId(),variable.getAttributeName(),type);
  if (!variableExpressionExecutorMap.containsKey(id)) {
    ExpressionExecutor variableExpressionExecutor=ExpressionParser.parseExpression(variable,matchingMetaInfoHolder.getMetaStateEvent(),streamEventChainIndex,eventTableMap,variableExpressionExecutors,executionPlanContext,false,0,queryName);
    variableExpressionExecutorMap.put(id,variableExpressionExecutor);
  }
  conditionVisitor.endVisitStreamVariable(id,variable.getStreamId(),variable.getAttributeName(),type);
}
Program: 28932
Project: 28932
Buggy source:
private void scheduleCronJob(String cronString,String elementId){
  try {
    SchedulerFactory schedulerFactory=new StdSchedulerFactory();
    scheduler=schedulerFactory.getScheduler();
    jobName="String_Node_Str" + elementId;
    JobKey jobKey=new JobKey(jobName,jobGroup);
    if (scheduler.checkExists(jobKey)) {
      scheduler.deleteJob(jobKey);
    }
    scheduler.start();
    JobDataMap dataMap=new JobDataMap();
    dataMap.put("String_Node_Str",this);
    JobDetail job=org.quartz.JobBuilder.newJob(CronEventTrigger.class).withIdentity(jobName,jobGroup).usingJobData(dataMap).build();
    Trigger trigger=org.quartz.TriggerBuilder.newTrigger().withIdentity("String_Node_Str" + elementId,jobGroup).withSchedule(CronScheduleBuilder.cronSchedule(cronString)).build();
    scheduler.scheduleJob(job,trigger);
  }
 catch (  SchedulerException e) {
    log.error("String_Node_Str" + triggerDefinition.getId() + "String_Node_Str"+ e.getMessage(),e);
  }
}

Fixed version (ground truth):
private void scheduleCronJob(String cronString,String elementId){
  try {
    SchedulerFactory schedulerFactory=new StdSchedulerFactory();
    scheduler=schedulerFactory.getScheduler();
    jobName="String_Node_Str" + elementId;
    JobKey jobKey=new JobKey(jobName,jobGroup);
    if (scheduler.checkExists(jobKey)) {
      scheduler.deleteJob(jobKey);
    }
    scheduler.start();
    JobDataMap dataMap=new JobDataMap();
    dataMap.put("String_Node_Str",this);
    JobDetail job=org.quartz.JobBuilder.newJob(CronEventTrigger.class).withIdentity(jobName,jobGroup).usingJobData(dataMap).build();
    Trigger trigger=org.quartz.TriggerBuilder.newTrigger().withIdentity("String_Node_Str" + elementId,jobGroup).withSchedule(CronScheduleBuilder.cronSchedule(cronString)).build();
    scheduler.scheduleJob(job,trigger);
  }
 catch (  SchedulerException e) {
    LOG.error("String_Node_Str" + triggerDefinition.getId() + "String_Node_Str"+ e.getMessage(),e);
  }
}
Program: 28933
Project: 28933
Buggy source:
/** 
 * This will be called only once and this can be used to release the acquired resources for processing. This will be called before shutting down the system.
 */
@Override public void stop(){
  try {
    if (scheduler != null) {
      scheduler.deleteJob(new JobKey(jobName,jobGroup));
    }
  }
 catch (  SchedulerException e) {
    log.error("String_Node_Str" + e.getMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * This will be called only once and this can be used to release the acquired resources for processing. This will be called before shutting down the system.
 */
@Override public void stop(){
  try {
    if (scheduler != null) {
      scheduler.deleteJob(new JobKey(jobName,jobGroup));
    }
  }
 catch (  SchedulerException e) {
    LOG.error("String_Node_Str" + e.getMessage(),e);
  }
}
Program: 28934
Project: 28934
Buggy source:
@Override public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
  JobDataMap dataMap=jobExecutionContext.getJobDetail().getJobDataMap();
  CronEventTrigger cronEventTrigger=(CronEventTrigger)dataMap.get("String_Node_Str");
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + cronEventTrigger.getId() + "String_Node_Str");
  }
  cronEventTrigger.sendEvent();
}

Fixed version (ground truth):
@Override public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
  JobDataMap dataMap=jobExecutionContext.getJobDetail().getJobDataMap();
  CronEventTrigger cronEventTrigger=(CronEventTrigger)dataMap.get("String_Node_Str");
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + cronEventTrigger.getId() + "String_Node_Str");
  }
  cronEventTrigger.sendEvent();
}
Program: 28937
Project: 28937
Buggy source:
@Test public void testTcpSource3() throws InterruptedException {
  log.info("String_Node_Str");
  SiddhiManager siddhiManager=new SiddhiManager();
  String inStreamDefinition="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  String query=("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
  ExecutionPlanRuntime executionPlanRuntime=siddhiManager.createExecutionPlanRuntime(inStreamDefinition + query);
  executionPlanRuntime.addCallback("String_Node_Str",new QueryCallback(){
    @Override public void receive(    long timeStamp,    Event[] inEvents,    Event[] removeEvents){
      EventPrinter.print(timeStamp,inEvents,removeEvents);
      eventArrived=true;
    }
  }
);
  executionPlanRuntime.start();
  TCPNettyClient TCPNettyClient=new TCPNettyClient();
  TCPNettyClient.connect("String_Node_Str",8080);
  ArrayList<Event> arrayList=new ArrayList<Event>(3);
  arrayList.add(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",36,3.0f,380l,23.0,true}));
  arrayList.add(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",361,31.0f,3801l,231.0,false}));
  arrayList.add(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",362,32.0f,3802l,232.0,true}));
  TCPNettyClient.send("String_Node_Str",arrayList.toArray(new Event[3]));
  TCPNettyClient.disconnect();
  TCPNettyClient.shutdown();
  Thread.sleep(300);
  Assert.assertFalse(eventArrived);
  executionPlanRuntime.shutdown();
}

Fixed version (ground truth):
@Test public void testTcpSource3() throws InterruptedException {
  log.info("String_Node_Str");
  SiddhiManager siddhiManager=new SiddhiManager();
  String inStreamDefinition="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  String query=("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
  ExecutionPlanRuntime executionPlanRuntime=siddhiManager.createExecutionPlanRuntime(inStreamDefinition + query);
  executionPlanRuntime.addCallback("String_Node_Str",new QueryCallback(){
    @Override public void receive(    long timeStamp,    Event[] inEvents,    Event[] removeEvents){
      EventPrinter.print(timeStamp,inEvents,removeEvents);
      eventArrived=true;
    }
  }
);
  executionPlanRuntime.start();
  TCPNettyClient TCPNettyClient=new TCPNettyClient();
  TCPNettyClient.connect("String_Node_Str",9892);
  ArrayList<Event> arrayList=new ArrayList<Event>(3);
  arrayList.add(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",36,3.0f,380l,23.0,true}));
  arrayList.add(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",361,31.0f,3801l,231.0,false}));
  arrayList.add(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",362,32.0f,3802l,232.0,true}));
  TCPNettyClient.send("String_Node_Str",arrayList.toArray(new Event[3]));
  TCPNettyClient.disconnect();
  TCPNettyClient.shutdown();
  Thread.sleep(300);
  Assert.assertFalse(eventArrived);
  executionPlanRuntime.shutdown();
}
Program: 28939
Project: 28939
Buggy source:
@Override public void restoreState(Map<String,Object> state){
  count=(int)state.get("String_Node_Str");
}

Fixed version (ground truth):
@Override public void restoreState(Map<String,Object> state){
  count=(long)state.get("String_Node_Str");
}
Program: 28940
Project: 28940
Buggy source:
/** 
 * Release the current lock and wait for the events arrive to the next point. For this to work, the next endpoint is not required to be a checkpoint marked by the user. For example, if user adds breakpoint only for the IN of query 1, next will track the event in OUT of query 1.
 */
public void next(){
synchronized (this) {
    this.enableNext.set(true);
  }
  this.breakPointLock.release();
}

Fixed version (ground truth):
/** 
 * Release the current lock and wait for the events arrive to the next point. For this to work, the next endpoint is not required to be a checkpoint marked by the user. For example, if user adds breakpoint only for the IN of query 1, next will track the event in OUT of query 1.
 */
public void next(){
  this.enableNext.set(true);
  this.breakPointLock.release();
}
Program: 28941
Project: 28941
Buggy source:
private void buildStreamVariableExecutor(Variable variable,int streamEventChainIndex,ConditionVisitor conditionVisitor,Attribute.Type type){
  String id=variable.getAttributeName();
  if (variable.getStreamId() != null) {
    id=variable.getStreamId() + "String_Node_Str" + id;
  }
  conditionVisitor.beginVisitStreamVariable(variable,id,type);
  if (!variableExpressionExecutorMap.containsKey(id)) {
    ExpressionExecutor variableExpressionExecutor=ExpressionParser.parseExpression(expression,matchingMetaInfoHolder.getMetaStateEvent(),streamEventChainIndex,eventTableMap,variableExpressionExecutors,executionPlanContext,false,matchingMetaInfoHolder.getStreamEventIndex(),queryName);
    variableExpressionExecutorMap.put(id,variableExpressionExecutor);
  }
  conditionVisitor.endVisitStreamVariable(variable,id,type);
}

Fixed version (ground truth):
private void buildStreamVariableExecutor(Variable variable,int streamEventChainIndex,ConditionVisitor conditionVisitor,Attribute.Type type){
  String id=variable.getAttributeName();
  if (variable.getStreamId() != null) {
    id=variable.getStreamId() + "String_Node_Str" + id;
  }
  conditionVisitor.beginVisitStreamVariable(variable,id,type);
  if (!variableExpressionExecutorMap.containsKey(id)) {
    ExpressionExecutor variableExpressionExecutor=ExpressionParser.parseExpression(expression,matchingMetaInfoHolder.getMetaStateEvent(),streamEventChainIndex,eventTableMap,variableExpressionExecutors,executionPlanContext,false,0,queryName);
    variableExpressionExecutorMap.put(id,variableExpressionExecutor);
  }
  conditionVisitor.endVisitStreamVariable(variable,id,type);
}
Program: 28945
Project: 28945
Buggy source:
public Mapping map(String rename,String mapping){
  attributeMappingList.add(new AttributeMapping(rename,mapping));
  return null;
}

Fixed version (ground truth):
public Mapping map(String rename,String mapping){
  attributeMappingList.add(new AttributeMapping(rename,mapping));
  return this;
}