nus-yam/ex-repair huggingface dataset:
Program: 28058
Project: 28058
Buggy source:
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class)},output={@HandlerOutput(name="String_Node_Str",type=String.class)}) public static void getPageCount(HandlerContext handlerCtx){
  String jobCountValue=(String)handlerCtx.getInputValue("String_Node_Str");
  int result=1;
  try {
    int jobCount=Integer.parseInt(jobCountValue);
    if (jobCount > 0) {
      result=(jobCount + DEFAULT_OFFSET_INCREMENT - 1) / DEFAULT_OFFSET_INCREMENT;
    }
  }
 catch (  NumberFormatException ex) {
    GuiUtil.getLogger().info("String_Node_Str" + ex);
  }
  handlerCtx.setOutputValue("String_Node_Str",result);
}

Fixed version (ground truth):
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class)},output={@HandlerOutput(name="String_Node_Str",type=String.class)}) public static void getPageCount(HandlerContext handlerCtx){
  String jobCountValue=(String)handlerCtx.getInputValue("String_Node_Str");
  int result=1;
  try {
    int jobCount=Integer.parseInt(jobCountValue);
    if (jobCount > 0) {
      result=(jobCount + DEFAULT_OFFSET_INCREMENT - 1) / DEFAULT_OFFSET_INCREMENT;
    }
  }
 catch (  NumberFormatException ex) {
    GuiUtil.getLogger().info(NUMBER_FORMAT_EXCEPTION_MESSAGE + ex);
  }
  handlerCtx.setOutputValue(RESULT,result);
}
Program: 28059
Project: 28059
Buggy source:
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class)},output={@HandlerOutput(name="String_Node_Str",type=String.class)}) public static void subtractFromOffSetValue(HandlerContext handlerCtx){
  String offsetValue=(String)handlerCtx.getInputValue("String_Node_Str");
  int result=0;
  try {
    result=Integer.parseInt(offsetValue);
    if (result >= DEFAULT_OFFSET_INCREMENT) {
      result=result - DEFAULT_OFFSET_INCREMENT;
    }
 else {
      result=0;
    }
  }
 catch (  NumberFormatException ex) {
    GuiUtil.getLogger().info("String_Node_Str" + ex);
  }
  handlerCtx.setOutputValue("String_Node_Str",result);
}

Fixed version (ground truth):
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class)},output={@HandlerOutput(name="String_Node_Str",type=String.class)}) public static void subtractFromOffSetValue(HandlerContext handlerCtx){
  String offsetValue=(String)handlerCtx.getInputValue(OFFSET);
  int result=0;
  try {
    result=Integer.parseInt(offsetValue);
    if (result >= DEFAULT_OFFSET_INCREMENT) {
      result=result - DEFAULT_OFFSET_INCREMENT;
    }
 else {
      result=0;
    }
  }
 catch (  NumberFormatException ex) {
    GuiUtil.getLogger().info(NUMBER_FORMAT_EXCEPTION_MESSAGE + ex);
  }
  handlerCtx.setOutputValue(RESULT,result);
}
Program: 28060
Project: 28060
Buggy source:
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class)},output={@HandlerOutput(name="String_Node_Str",type=String.class)}) public static void getSpecifiedPageNumber(HandlerContext handlerCtx){
  String pageNumberValue=(String)handlerCtx.getInputValue("String_Node_Str");
  int result=0;
  try {
    int pageNumber=Integer.parseInt(pageNumberValue);
    if (pageNumber > 0) {
      result=(pageNumber * DEFAULT_OFFSET_INCREMENT) - DEFAULT_OFFSET_INCREMENT;
    }
  }
 catch (  NumberFormatException ex) {
    GuiUtil.getLogger().info("String_Node_Str" + ex);
  }
  handlerCtx.setOutputValue("String_Node_Str",result);
}

Fixed version (ground truth):
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class)},output={@HandlerOutput(name="String_Node_Str",type=String.class)}) public static void getSpecifiedPageNumber(HandlerContext handlerCtx){
  String pageNumberValue=(String)handlerCtx.getInputValue("String_Node_Str");
  int result=0;
  try {
    int pageNumber=Integer.parseInt(pageNumberValue);
    if (pageNumber > 0) {
      result=(pageNumber * DEFAULT_OFFSET_INCREMENT) - DEFAULT_OFFSET_INCREMENT;
    }
  }
 catch (  NumberFormatException ex) {
    GuiUtil.getLogger().info(NUMBER_FORMAT_EXCEPTION_MESSAGE + ex);
  }
  handlerCtx.setOutputValue(RESULT,result);
}
Program: 28061
Project: 28061
Buggy source:
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class)},output={@HandlerOutput(name="String_Node_Str",type=String.class)}) public static void addToOffSetValue(HandlerContext handlerCtx){
  String offsetValue=(String)handlerCtx.getInputValue("String_Node_Str");
  int result=0;
  try {
    result=Integer.parseInt(offsetValue) + DEFAULT_OFFSET_INCREMENT;
  }
 catch (  NumberFormatException ex) {
    GuiUtil.getLogger().info("String_Node_Str" + ex);
  }
  handlerCtx.setOutputValue("String_Node_Str",result);
}

Fixed version (ground truth):
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class)},output={@HandlerOutput(name="String_Node_Str",type=String.class)}) public static void addToOffSetValue(HandlerContext handlerCtx){
  String offsetValue=(String)handlerCtx.getInputValue(OFFSET);
  int result=0;
  try {
    result=Integer.parseInt(offsetValue) + DEFAULT_OFFSET_INCREMENT;
  }
 catch (  NumberFormatException ex) {
    GuiUtil.getLogger().info(NUMBER_FORMAT_EXCEPTION_MESSAGE + ex);
  }
  handlerCtx.setOutputValue(RESULT,result);
}
Program: 28063
Project: 28063
Buggy source:
protected void postInvoke(AdminCommandContext context,ActionReport subReport){
  Properties subProperties=subReport.getExtraProperties();
  Properties extraProps=context.getActionReport().getExtraProperties();
  if (subProperties.get("String_Node_Str") != null)   extraProps.put("String_Node_Str",subProperties.get("String_Node_Str"));
}

Fixed version (ground truth):
protected void postInvoke(AdminCommandContext context,ActionReport subReport){
  Properties subProperties=subReport.getExtraProperties();
  Properties extraProps=context.getActionReport().getExtraProperties();
  if (subProperties.get(LIST_BATCH_JOBS_EXECUTIONS) != null)   extraProps.put(LIST_BATCH_JOBS_EXECUTIONS,subProperties.get(LIST_BATCH_JOBS_EXECUTIONS));
}
Program: 28064
Project: 28064
Buggy source:
@Override protected void executeCommand(AdminCommandContext context,Properties extraProps) throws Exception {
  ColumnFormatter columnFormatter=new ColumnFormatter(getDisplayHeaders());
  List<Map<String,Object>> jobExecutions=new ArrayList<>();
  extraProps.put("String_Node_Str",jobExecutions);
  for (  StepExecution je : findStepExecutions()) {
    try {
      jobExecutions.add(handleJob(je,columnFormatter));
    }
 catch (    Exception ex) {
      logger.log(Level.WARNING,"String_Node_Str" + ex);
      logger.log(Level.FINE,"String_Node_Str",ex);
    }
  }
  context.getActionReport().setMessage(columnFormatter.toString());
}

Fixed version (ground truth):
@Override protected void executeCommand(AdminCommandContext context,Properties extraProps) throws Exception {
  ColumnFormatter columnFormatter=new ColumnFormatter(getDisplayHeaders());
  List<Map<String,Object>> jobExecutions=new ArrayList<>();
  extraProps.put(LIST_BATCH_JOBS_STEPS,jobExecutions);
  for (  StepExecution je : findStepExecutions()) {
    try {
      jobExecutions.add(handleJob(je,columnFormatter));
    }
 catch (    Exception ex) {
      logger.log(Level.WARNING,"String_Node_Str" + ex);
      logger.log(Level.FINE,"String_Node_Str",ex);
    }
  }
  context.getActionReport().setMessage(columnFormatter.toString());
}
Program: 28065
Project: 28065
Buggy source:
protected void postInvoke(AdminCommandContext context,ActionReport subReport){
  Properties subProperties=subReport.getExtraProperties();
  Properties extraProps=context.getActionReport().getExtraProperties();
  if (subProperties.get("String_Node_Str") != null)   extraProps.put("String_Node_Str",subProperties.get("String_Node_Str"));
}

Fixed version (ground truth):
protected void postInvoke(AdminCommandContext context,ActionReport subReport){
  Properties subProperties=subReport.getExtraProperties();
  Properties extraProps=context.getActionReport().getExtraProperties();
  if (subProperties.get(LIST_BATCH_JOBS_STEPS) != null)   extraProps.put(LIST_BATCH_JOBS_STEPS,subProperties.get(LIST_BATCH_JOBS_STEPS));
}
Program: 28067
Project: 28067
Buggy source:
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=List.class,required=true),@HandlerInput(name="String_Node_Str",type=String.class,required=true)},output={@HandlerOutput(name="String_Node_Str",type=List.class)}) public static void getAllSelectedTarget(HandlerContext handlerCtx){
  String prefix=(String)GuiUtil.getSessionValue("String_Node_Str");
  List<String> targetList=(List)handlerCtx.getInputValue("String_Node_Str");
  String resourceName=(String)handlerCtx.getInputValue("String_Node_Str");
  List<String> selectedTargetList=new ArrayList<>();
  String endpoint;
  for (  String targetName : targetList) {
    endpoint=prefix + CLUSTER + targetName+ RESOURCE_REF+ resourceName;
    boolean existsInCluster=isEndpointValid(endpoint);
    if (!existsInCluster) {
      endpoint=prefix + DEPLOYMENT_GROUP + targetName+ RESOURCE_REF+ resourceName;
      boolean existsInDeploymentGroup=isEndpointValid(endpoint);
      if (!existsInDeploymentGroup) {
        endpoint=prefix + SERVER + targetName+ RESOURCE_REF+ resourceName;
        boolean existsInServer=isEndpointValid(endpoint);
        if (existsInServer) {
          selectedTargetList.add(targetName);
        }
      }
      if (existsInDeploymentGroup) {
        selectedTargetList.add(targetName);
      }
    }
    if (existsInCluster) {
      selectedTargetList.add(targetName);
    }
  }
  handlerCtx.setOutputValue("String_Node_Str",selectedTargetList);
}

Fixed version (ground truth):
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=List.class,required=true),@HandlerInput(name="String_Node_Str",type=String.class,required=true)},output={@HandlerOutput(name="String_Node_Str",type=List.class)}) public static void getAllSelectedTarget(HandlerContext handlerCtx){
  String prefix=(String)GuiUtil.getSessionValue(REST_URL);
  List<String> targetList=(List)handlerCtx.getInputValue("String_Node_Str");
  String resourceName=(String)handlerCtx.getInputValue(RESOURCE_NAME);
  List<String> selectedTargetList=new ArrayList<>();
  String endpoint;
  for (  String targetName : targetList) {
    endpoint=prefix + CLUSTER + targetName+ RESOURCE_REF+ resourceName;
    boolean existsInCluster=isEndpointValid(endpoint);
    if (!existsInCluster) {
      endpoint=prefix + DEPLOYMENT_GROUP + targetName+ RESOURCE_REF+ resourceName;
      boolean existsInDeploymentGroup=isEndpointValid(endpoint);
      if (!existsInDeploymentGroup) {
        endpoint=prefix + SERVER + targetName+ RESOURCE_REF+ resourceName;
        boolean existsInServer=isEndpointValid(endpoint);
        if (existsInServer) {
          selectedTargetList.add(targetName);
        }
      }
      if (existsInDeploymentGroup) {
        selectedTargetList.add(targetName);
      }
    }
    if (existsInCluster) {
      selectedTargetList.add(targetName);
    }
  }
  handlerCtx.setOutputValue("String_Node_Str",selectedTargetList);
}
Program: 28068
Project: 28068
Buggy source:
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class,required=true),@HandlerInput(name="String_Node_Str",type=String.class,required=true)},output={@HandlerOutput(name="String_Node_Str",type=Boolean.class)}) public static void isResourceInInstance(HandlerContext handlerCtx){
  String instanceName=(String)handlerCtx.getInputValue("String_Node_Str");
  String resourceName=(String)handlerCtx.getInputValue("String_Node_Str");
  String prefix=(String)GuiUtil.getSessionValue("String_Node_Str");
  String endpoint=prefix + SERVER + instanceName+ RESOURCE_REF;
  boolean isPresent=false;
  Map responseMap=RestUtil.restRequest(endpoint,null,"String_Node_Str",handlerCtx,false,true);
  Map data=(Map)responseMap.get("String_Node_Str");
  if (data != null) {
    Map extraProperties=(Map)data.get("String_Node_Str");
    if (extraProperties != null) {
      Map childResources=(Map)extraProperties.get("String_Node_Str");
      List<String> listOfResources=new ArrayList<String>(childResources.keySet());
      if (listOfResources.contains(resourceName)) {
        isPresent=true;
      }
    }
  }
  handlerCtx.setOutputValue("String_Node_Str",isPresent);
}

Fixed version (ground truth):
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class,required=true),@HandlerInput(name="String_Node_Str",type=String.class,required=true)},output={@HandlerOutput(name="String_Node_Str",type=Boolean.class)}) public static void isResourceInInstance(HandlerContext handlerCtx){
  String instanceName=(String)handlerCtx.getInputValue("String_Node_Str");
  String resourceName=(String)handlerCtx.getInputValue(RESOURCE_NAME);
  String prefix=(String)GuiUtil.getSessionValue(REST_URL);
  String endpoint=prefix + SERVER + instanceName+ RESOURCE_REF;
  boolean isPresent=false;
  Map responseMap=RestUtil.restRequest(endpoint,null,"String_Node_Str",handlerCtx,false,true);
  Map data=(Map)responseMap.get("String_Node_Str");
  if (data != null) {
    Map extraProperties=(Map)data.get("String_Node_Str");
    if (extraProperties != null) {
      Map childResources=(Map)extraProperties.get("String_Node_Str");
      List<String> listOfResources=new ArrayList<String>(childResources.keySet());
      if (listOfResources.contains(resourceName)) {
        isPresent=true;
      }
    }
  }
  handlerCtx.setOutputValue("String_Node_Str",isPresent);
}
Program: 28069
Project: 28069
Buggy source:
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=List.class,required=true),@HandlerInput(name="String_Node_Str",type=String.class,required=true),@HandlerInput(name="String_Node_Str",type=String.class,required=true)},output={@HandlerOutput(name="String_Node_Str",type=Boolean.class)}) public static void isInstanceInDeploymentGroupWithResource(HandlerContext handlerCtx){
  List<String> selectedTargetList=(List)handlerCtx.getInputValue("String_Node_Str");
  String target=(String)handlerCtx.getInputValue("String_Node_Str");
  String prefix=(String)GuiUtil.getSessionValue("String_Node_Str");
  String resourceName=(String)handlerCtx.getInputValue("String_Node_Str");
  String endpoint;
  boolean isPresent=false;
  for (  String selectedTarget : selectedTargetList) {
    if (TargetUtil.isDeploymentGroup(selectedTarget)) {
      List<String> instancesInDeploymentGroup=TargetUtil.getDGInstances(selectedTarget);
      for (      String instance : instancesInDeploymentGroup) {
        if (instance.equals(target)) {
          endpoint=prefix + DEPLOYMENT_GROUP + selectedTarget+ RESOURCE_REF+ resourceName;
          if (isEndpointValid(endpoint)) {
            isPresent=true;
            break;
          }
        }
      }
    }
  }
  handlerCtx.setOutputValue("String_Node_Str",isPresent);
}

Fixed version (ground truth):
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=List.class,required=true),@HandlerInput(name="String_Node_Str",type=String.class,required=true),@HandlerInput(name="String_Node_Str",type=String.class,required=true)},output={@HandlerOutput(name="String_Node_Str",type=Boolean.class)}) public static void isInstanceInDeploymentGroupWithResource(HandlerContext handlerCtx){
  List<String> selectedTargetList=(List)handlerCtx.getInputValue("String_Node_Str");
  String target=(String)handlerCtx.getInputValue("String_Node_Str");
  String prefix=(String)GuiUtil.getSessionValue(REST_URL);
  String resourceName=(String)handlerCtx.getInputValue(RESOURCE_NAME);
  String endpoint;
  boolean isPresent=false;
  for (  String selectedTarget : selectedTargetList) {
    if (TargetUtil.isDeploymentGroup(selectedTarget)) {
      List<String> instancesInDeploymentGroup=TargetUtil.getDGInstances(selectedTarget);
      for (      String instance : instancesInDeploymentGroup) {
        if (instance.equals(target)) {
          endpoint=prefix + DEPLOYMENT_GROUP + selectedTarget+ RESOURCE_REF+ resourceName;
          if (isEndpointValid(endpoint)) {
            isPresent=true;
            break;
          }
        }
      }
    }
  }
  handlerCtx.setOutputValue("String_Node_Str",isPresent);
}
Program: 28071
Project: 28071
Buggy source:
/** 
 * Rotates the old log file and creates a new log file.
 */
private void rotate(){
  if (rotatable) {
synchronized (lock) {
      try {
        if (!logFile.exists()) {
          File creatingDeletedLogFile=new File(logFile.getAbsolutePath());
          if (creatingDeletedLogFile.createNewFile()) {
            logFile=creatingDeletedLogFile;
          }
        }
 else {
          File oldLogFile=logFile;
          StringBuffer renamedLogFile=new StringBuffer(logFile.getAbsolutePath().replace("String_Node_Str","String_Node_Str"));
          logRotationTimeFormatter.format(new Date(),renamedLogFile,new FieldPosition(0));
          File rotatedFile=new File(renamedLogFile.toString() + "String_Node_Str");
          boolean isRenameSuccessful=oldLogFile.renameTo(rotatedFile);
          if (!isRenameSuccessful) {
            FileUtils.copy(logFile,rotatedFile);
            File newServerLogFile=logFile;
            FileOutputStream fileOutputStream=new FileOutputStream(newServerLogFile);
            fileOutputStream.close();
          }
          FileOutputStream oldFileOutputStream=new FileOutputStream(oldLogFile);
          oldFileOutputStream.close();
          logFileOutputStream=new FileOutputStream(logFile,true);
          fileChannel=logFileOutputStream.getChannel();
          if (maxHistoryFiles > 0) {
            cleanUpHistoryLogFiles();
          }
        }
      }
 catch (      IOException ex) {
        _logger.log(Level.SEVERE,"String_Node_Str",ex);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Rotates the old log file and creates a new log file.
 */
private void rotate(){
  if (rotatable) {
synchronized (lock) {
      try {
        if (!logFile.exists()) {
          File creatingDeletedLogFile=new File(logFile.getAbsolutePath());
          if (creatingDeletedLogFile.createNewFile()) {
            logFile=creatingDeletedLogFile;
          }
        }
 else {
          File oldLogFile=logFile;
          StringBuffer renamedLogFile=new StringBuffer(logFile.getAbsolutePath().replace("String_Node_Str","String_Node_Str"));
          LOG_ROTATION_TIME_FORMATTER.format(new Date(),renamedLogFile,new FieldPosition(0));
          File rotatedFile=new File(renamedLogFile.toString() + "String_Node_Str");
          boolean isRenameSuccessful=oldLogFile.renameTo(rotatedFile);
          if (!isRenameSuccessful) {
            FileUtils.copy(logFile,rotatedFile);
            File newServerLogFile=logFile;
            FileOutputStream fileOutputStream=new FileOutputStream(newServerLogFile);
            fileOutputStream.close();
          }
          FileOutputStream oldFileOutputStream=new FileOutputStream(oldLogFile);
          oldFileOutputStream.close();
          logFileOutputStream=new FileOutputStream(logFile,true);
          fileChannel=logFileOutputStream.getChannel();
          if (maxHistoryFiles > 0) {
            cleanUpHistoryLogFiles();
          }
        }
      }
 catch (      IOException ex) {
        _logger.log(Level.SEVERE,"String_Node_Str",ex);
      }
    }
  }
}
Program: 28073
Project: 28073
Buggy source:
public static List<Map<String,String>> getJvmOptions(HandlerContext handlerCtx){
  ArrayList<Map<String,String>> list;
  String endpoint=(String)handlerCtx.getInputValue("String_Node_Str");
  if (!endpoint.endsWith("String_Node_Str"))   endpoint=endpoint + "String_Node_Str";
  Map<String,Object> attrs=(Map<String,Object>)handlerCtx.getInputValue("String_Node_Str");
  Map<String,Map> result=(Map<String,Map>)RestUtil.restRequest(endpoint,attrs,"String_Node_Str",handlerCtx,false).get("String_Node_Str");
  list=(ArrayList<Map<String,String>>)result.get("String_Node_Str").get("String_Node_Str");
  if (list == null)   list=new ArrayList<>();
  return list;
}

Fixed version (ground truth):
public static List<Map<String,String>> getJvmOptions(HandlerContext handlerCtx){
  List<Map<String,String>> list;
  String endpoint=(String)handlerCtx.getInputValue("String_Node_Str");
  if (!endpoint.endsWith("String_Node_Str"))   endpoint=endpoint + "String_Node_Str";
  Map<String,Object> attrs=(Map<String,Object>)handlerCtx.getInputValue("String_Node_Str");
  Map<String,Map> result=(Map<String,Map>)RestUtil.restRequest(endpoint,attrs,"String_Node_Str",handlerCtx,false).get("String_Node_Str");
  if (result == null) {
    list=new ArrayList<>();
  }
 else {
    list=(ArrayList<Map<String,String>>)result.get("String_Node_Str").get("String_Node_Str");
  }
  return list;
}
Program: 28074
Project: 28074
Buggy source:
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class,required=true),@HandlerInput(name="String_Node_Str",type=Map.class,required=false)},output={@HandlerOutput(name="String_Node_Str",type=java.util.List.class)}) public static void getJvmOptionsValues(HandlerContext handlerCtx){
  try {
    List<Map<String,String>> list=getJvmOptions(handlerCtx);
    List<Map<String,Object>> optionValues=new ArrayList<>();
    for (    Map<String,String> item : list) {
      Map<String,Object> valueMap=new HashMap<>(item);
      valueMap.put(SELECTED,false);
      optionValues.add(valueMap);
    }
    handlerCtx.setOutputValue("String_Node_Str",optionValues);
  }
 catch (  Exception ex) {
    handlerCtx.setOutputValue("String_Node_Str",new HashMap());
    GuiUtil.getLogger().info(GuiUtil.getCommonMessage("String_Node_Str") + ex.getLocalizedMessage());
    if (GuiUtil.getLogger().isLoggable(Level.FINE)) {
      ex.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class,required=true),@HandlerInput(name="String_Node_Str",type=Map.class,required=false)},output={@HandlerOutput(name="String_Node_Str",type=java.util.List.class)}) public static void getJvmOptionsValues(HandlerContext handlerCtx){
  try {
    List<Map<String,String>> list=getJvmOptions(handlerCtx);
    List<Map<String,Object>> optionValues=new ArrayList<>();
    for (    Map<String,String> item : list) {
      Map<String,Object> valueMap=new HashMap<>(item);
      valueMap.put(SELECTED,false);
      optionValues.add(valueMap);
    }
    handlerCtx.setOutputValue("String_Node_Str",optionValues);
  }
 catch (  Exception ex) {
    handlerCtx.setOutputValue("String_Node_Str",new ArrayList<>());
    GuiUtil.getLogger().info(GuiUtil.getCommonMessage("String_Node_Str") + ex.getLocalizedMessage());
    if (GuiUtil.getLogger().isLoggable(Level.FINE)) {
      ex.printStackTrace();
    }
  }
}
Program: 28075
Project: 28075
Buggy source:
private synchronized OpenAPI getDocument() throws InterruptedException, ExecutionException, TimeoutException {
  if (!document.isDone()) {
    executor.submit(new OpenApiBuilder(this,document));
  }
  return document.get(10,TimeUnit.SECONDS);
}

Fixed version (ground truth):
private synchronized OpenAPI getDocument() throws OpenAPIBuildException {
  if (document == null) {
    document=buildDocument();
  }
  return document;
}
Program: 28076
Project: 28076
Buggy source:
private OpenApiMapping(ApplicationInfo appInfo){
  this.appInfo=appInfo;
  this.appConfig=new OpenApiConfiguration(appInfo.getAppClassLoader());
  this.document=new CompletableFuture<>();
}

Fixed version (ground truth):
private OpenApiMapping(ApplicationInfo appInfo){
  this.appInfo=appInfo;
  this.appConfig=new OpenApiConfiguration(appInfo.getAppClassLoader());
}
Program: 28077
Project: 28077
Buggy source:
@GET @Produces({APPLICATION_YAML,APPLICATION_JSON}) public Response getResponse(@Context HttpServletResponse response) throws IOException {
  if (!OpenApiService.getInstance().isEnabled()) {
    response.sendError(FORBIDDEN.getStatusCode(),"String_Node_Str");
    return Response.status(FORBIDDEN).build();
  }
  OpenAPI document=null;
  try {
    document=OpenApiService.getInstance().getDocument();
  }
 catch (  InterruptedException|ExecutionException|TimeoutException ex) {
    LOGGER.log(WARNING,"String_Node_Str",ex);
  }
  if (document == null) {
    LOGGER.info("String_Node_Str");
    return Response.status(Status.NOT_FOUND).entity(new OpenAPIImpl()).build();
  }
  return Response.ok(document).build();
}

Fixed version (ground truth):
@GET @Produces({APPLICATION_YAML,APPLICATION_JSON}) public Response getResponse(@Context HttpServletResponse response) throws IOException {
  if (!OpenApiService.getInstance().isEnabled()) {
    response.sendError(FORBIDDEN.getStatusCode(),"String_Node_Str");
    return Response.status(FORBIDDEN).build();
  }
  OpenAPI document=null;
  try {
    document=OpenApiService.getInstance().getDocument();
  }
 catch (  OpenAPIBuildException ex) {
    LOGGER.log(WARNING,"String_Node_Str",ex);
  }
  if (document == null) {
    LOGGER.info("String_Node_Str");
    return Response.status(Status.NOT_FOUND).entity(new OpenAPIImpl()).build();
  }
  return Response.ok(document).build();
}
Program: 28078
Project: 28078
Buggy source:
/** 
 * Normalises a path string. A normalised path has: <ul> <li>no multiple slashes.</li> <li>no trailing slash.</li> </ul>
 * @param path the path to be normalised.
 */
public static String normaliseUrl(String path){
  if (path == null) {
    return null;
  }
  path=path.replaceAll("String_Node_Str","String_Node_Str");
  if (path.endsWith("String_Node_Str")) {
    path=path.substring(0,path.length() - 1);
  }
  if (path.isEmpty()) {
    path="String_Node_Str";
  }
  return path;
}

Fixed version (ground truth):
/** 
 * Normalises a path string. A normalised path has: <ul> <li>no multiple slashes.</li> <li>no trailing slash.</li> </ul>
 * @param path the path to be normalised.
 */
public static String normaliseUrl(String path){
  if (path == null) {
    return null;
  }
  path="String_Node_Str" + path;
  path=path.replaceAll("String_Node_Str","String_Node_Str");
  if (path.endsWith("String_Node_Str")) {
    path=path.substring(0,path.length() - 1);
  }
  if (path.isEmpty()) {
    path="String_Node_Str";
  }
  return path;
}
Program: 28079
Project: 28079
Buggy source:
@Override public void execute(AdminCommandContext adminCommandContext){
  Config targetConfig=targetUtil.getConfig(target);
  if (targetConfig == null) {
    adminCommandContext.getActionReport().setMessage("String_Node_Str" + targetUtil);
    adminCommandContext.getActionReport().setActionExitCode(ActionReport.ExitCode.FAILURE);
    return;
  }
  OpenApiServiceConfiguration openApiConfig=targetConfig.getExtensionByType(OpenApiServiceConfiguration.class);
  ColumnFormatter columnFormatter=new ColumnFormatter(new String[]{"String_Node_Str"});
  Object[] outputValues={openApiConfig.getEnabled()};
  columnFormatter.addRow(outputValues);
  adminCommandContext.getActionReport().appendMessage(columnFormatter.toString());
  Map<String,Object> extraPropertiesMap=new HashMap<>();
  extraPropertiesMap.put("String_Node_Str",openApiConfig.getEnabled());
  Properties extraProperties=new Properties();
  extraProperties.put("String_Node_Str",extraPropertiesMap);
  adminCommandContext.getActionReport().setExtraProperties(extraProperties);
}

Fixed version (ground truth):
@Override public void execute(AdminCommandContext adminCommandContext){
  if (targetUtil.getConfig(target) == null) {
    adminCommandContext.getActionReport().setMessage("String_Node_Str" + targetUtil);
    adminCommandContext.getActionReport().setActionExitCode(ActionReport.ExitCode.FAILURE);
    return;
  }
  OpenApiServiceConfiguration openApiConfig=targetUtil.getConfig(target).getExtensionByType(OpenApiServiceConfiguration.class);
  adminCommandContext.getActionReport().appendMessage("String_Node_Str" + openApiConfig.getEnabled());
  Map<String,Object> extraPropertiesMap=new HashMap<>();
  extraPropertiesMap.put("String_Node_Str",openApiConfig.getEnabled());
  Properties extraProperties=new Properties();
  extraProperties.put("String_Node_Str",extraPropertiesMap);
  adminCommandContext.getActionReport().setExtraProperties(extraProperties);
}
Program: 28080
Project: 28080
Buggy source:
@Override public void execute(AdminCommandContext adminCommandContext){
  Config targetConfig=targetUtil.getConfig(target);
  OpenApiServiceConfiguration openApiConfig=targetConfig.getExtensionByType(OpenApiServiceConfiguration.class);
  try {
    ConfigSupport.apply(configProxy -> {
      if (enabled != null) {
        configProxy.setEnabled(Boolean.toString(enabled));
      }
      return configProxy;
    }
,openApiConfig);
  }
 catch (  TransactionFailure ex) {
    adminCommandContext.getActionReport().failure(LOGGER,"String_Node_Str",ex);
    return;
  }
}

Fixed version (ground truth):
@Override public void execute(AdminCommandContext adminCommandContext){
  if (targetUtil.getConfig(target) == null) {
    adminCommandContext.getActionReport().setMessage("String_Node_Str" + targetUtil);
    adminCommandContext.getActionReport().setActionExitCode(ActionReport.ExitCode.FAILURE);
    return;
  }
  OpenApiServiceConfiguration openApiConfig=targetUtil.getConfig(target).getExtensionByType(OpenApiServiceConfiguration.class);
  try {
    ConfigSupport.apply(configProxy -> {
      if (enabled != null) {
        configProxy.setEnabled(Boolean.toString(enabled));
      }
      return configProxy;
    }
,openApiConfig);
  }
 catch (  TransactionFailure ex) {
    adminCommandContext.getActionReport().failure(LOGGER,"String_Node_Str",ex);
  }
}
Program: 28081
Project: 28081
Buggy source:
private Class<?> getClassFromName(String className,ClassLoader classLoader){
  if (classLoader == null) {
    classLoader=getClass().getClassLoader();
  }
  if (className == null) {
    return null;
  }
  try {
    return classLoader.loadClass(className);
  }
 catch (  ClassNotFoundException ex) {
    LOGGER.log(Level.WARNING,"String_Node_Str",ex);
  }
  return null;
}

Fixed version (ground truth):
private Class<?> getClassFromName(String className,ClassLoader classLoader){
  if (classLoader == null) {
    classLoader=getClass().getClassLoader();
  }
  if (className == null) {
    return null;
  }
  try {
    return classLoader.loadClass(className);
  }
 catch (  ClassNotFoundException ex) {
    LOGGER.log(WARNING,"String_Node_Str",ex);
  }
  return null;
}
Program: 28082
Project: 28082
Buggy source:
/** 
 * @param classes the list of classes to filter.
 * @return a filtered list of classes, using {@link #getScanClasses()},  {@link #getExcludeClasses()},   {@link #getScanPackages()} and{@link #getExcludePackages()}.
 */
public Set<Class<?>> getValidClasses(Set<Class<?>> classes){
  return classes.stream().filter(clazz -> scanClasses.isEmpty() || scanClasses.contains(clazz)).filter(clazz -> excludeClasses.isEmpty() || !excludeClasses.contains(clazz)).filter(clazz -> scanPackages.isEmpty() || scanPackages.stream().anyMatch(pkg -> clazz.getPackage().getName().startsWith(pkg))).filter(clazz -> excludePackages.isEmpty() || !excludePackages.stream().anyMatch(pkg -> clazz.getPackage().getName().startsWith(pkg))).collect(toSet());
}

Fixed version (ground truth):
/** 
 * @param classes the list of classes to filter.
 * @return a filtered list of classes, using {@link #getScanClasses()},  {@link #getExcludeClasses()},   {@link #getScanPackages()} and{@link #getExcludePackages()}.
 */
public Set<Class<?>> getValidClasses(Set<Class<?>> classes){
  return classes.stream().filter(clazz -> scanClasses.isEmpty() || scanClasses.contains(clazz)).filter(clazz -> excludeClasses.isEmpty() || !excludeClasses.contains(clazz)).filter(clazz -> scanPackages.isEmpty() || scanPackages.stream().anyMatch(pkg -> clazz.getPackage().getName().startsWith(pkg))).filter(clazz -> excludePackages.isEmpty() || excludePackages.stream().noneMatch(pkg -> clazz.getPackage().getName().startsWith(pkg))).collect(toSet());
}
Program: 28084
Project: 28084
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public <T extends Constructible>T createObject(Class<T> clazz){
  if (clazz == null) {
    throw new NullPointerException("String_Node_Str");
  }
  Class<? extends Constructible> implClass=MODEL_MAP.get(clazz);
  if (implClass == null) {
    throw new IllegalArgumentException(clazz.getName());
  }
  try {
    return (T)implClass.newInstance();
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public <T extends Constructible>T createObject(Class<T> clazz){
  if (clazz == null) {
    throw new NullPointerException("String_Node_Str");
  }
  Class<? extends Constructible> implClass=MODEL_MAP.get(clazz);
  if (implClass == null) {
    throw new IllegalArgumentException(clazz.getName());
  }
  try {
    return (T)implClass.newInstance();
  }
 catch (  Exception e) {
    throw new OpenAPIClassCreationException(e);
  }
}
Program: 28086
Project: 28086
Buggy source:
public static void merge(ExampleObject example,Map<String,Example> examples,boolean override){
  if (isAnnotationNull(example)) {
    return;
  }
  String exampleName=example.name();
  if (example.name() == null || example.name().isEmpty()) {
    exampleName=UNKNOWN_NAME;
  }
  Example model=examples.getOrDefault(exampleName,new ExampleImpl());
  examples.put(exampleName,model);
  merge(example,model,override);
  if (model.getRef() != null) {
    examples.remove(exampleName);
    examples.put(model.getRef().split("String_Node_Str")[3],model);
  }
}

Fixed version (ground truth):
public static void merge(ExampleObject example,Map<String,Example> examples,boolean override){
  if (isAnnotationNull(example)) {
    return;
  }
  String exampleName=example.name();
  if (example.name() == null || example.name().isEmpty()) {
    exampleName=UNKNOWN_ELEMENT_NAME;
  }
  Example model=examples.getOrDefault(exampleName,new ExampleImpl());
  examples.put(exampleName,model);
  merge(example,model,override);
  if (model.getRef() != null) {
    examples.remove(exampleName);
    examples.put(model.getRef().split("String_Node_Str")[3],model);
  }
}
Program: 28087
Project: 28087
Buggy source:
public static void merge(org.eclipse.microprofile.openapi.annotations.headers.Header header,Map<String,Header> headers,boolean override,Map<String,Schema> currentSchemas){
  if (isAnnotationNull(header)) {
    return;
  }
  String headerName=header.name();
  if (header.name() == null || header.name().isEmpty()) {
    headerName=UNKNOWN_NAME;
  }
  Header model=headers.getOrDefault(headerName,new HeaderImpl());
  headers.put(headerName,model);
  merge(header,model,override,currentSchemas);
  if (model.getRef() != null) {
    headers.remove(headerName);
    headers.put(model.getRef().split("String_Node_Str")[3],model);
  }
}

Fixed version (ground truth):
public static void merge(org.eclipse.microprofile.openapi.annotations.headers.Header header,Map<String,Header> headers,boolean override,Map<String,Schema> currentSchemas){
  if (isAnnotationNull(header)) {
    return;
  }
  String headerName=header.name();
  if (header.name() == null || header.name().isEmpty()) {
    headerName=UNKNOWN_ELEMENT_NAME;
  }
  Header model=headers.getOrDefault(headerName,new HeaderImpl());
  headers.put(headerName,model);
  merge(header,model,override,currentSchemas);
  if (model.getRef() != null) {
    headers.remove(headerName);
    headers.put(model.getRef().split("String_Node_Str")[3],model);
  }
}
Program: 28088
Project: 28088
Buggy source:
public static void merge(org.eclipse.microprofile.openapi.annotations.links.Link link,Map<String,Link> links,boolean override){
  if (isAnnotationNull(link)) {
    return;
  }
  String linkName=link.name();
  if (link.name() == null || link.name().isEmpty()) {
    linkName=UNKNOWN_NAME;
  }
  Link model=links.getOrDefault(linkName,new LinkImpl());
  links.put(linkName,model);
  merge(link,model,override);
  if (model.getRef() != null) {
    links.remove(linkName);
    links.put(model.getRef().split("String_Node_Str")[3],model);
  }
}

Fixed version (ground truth):
public static void merge(org.eclipse.microprofile.openapi.annotations.links.Link link,Map<String,Link> links,boolean override){
  if (isAnnotationNull(link)) {
    return;
  }
  String linkName=link.name();
  if (link.name() == null || link.name().isEmpty()) {
    linkName=UNKNOWN_ELEMENT_NAME;
  }
  Link model=links.getOrDefault(linkName,new LinkImpl());
  links.put(linkName,model);
  merge(link,model,override);
  if (model.getRef() != null) {
    links.remove(linkName);
    links.put(model.getRef().split("String_Node_Str")[3],model);
  }
}
Program: 28089
Project: 28089
Buggy source:
private static void applyLinkParameter(LinkParameter parameter,Map<String,Object> linkParameters){
  String parameterName=parameter.name();
  if (parameterName == null || parameterName.isEmpty()) {
    parameterName=UNKNOWN_NAME;
  }
  Object model=linkParameters.get(parameterName);
  model=mergeProperty(model,parameter.expression(),true);
  linkParameters.put(parameterName,model);
}

Fixed version (ground truth):
private static void applyLinkParameter(LinkParameter parameter,Map<String,Object> linkParameters){
  String parameterName=parameter.name();
  if (parameterName == null || parameterName.isEmpty()) {
    parameterName=UNKNOWN_ELEMENT_NAME;
  }
  Object model=linkParameters.get(parameterName);
  model=mergeProperty(model,parameter.expression(),true);
  linkParameters.put(parameterName,model);
}
Program: 28090
Project: 28090
Buggy source:
public static void merge(ExampleObject example,Map<String,Example> examples,boolean override){
  if (isAnnotationNull(example)) {
    return;
  }
  String exampleName=example.name();
  if (example.name() == null || example.name().isEmpty()) {
    exampleName="String_Node_Str";
  }
  Example model=examples.getOrDefault(exampleName,new ExampleImpl());
  examples.put(exampleName,model);
  merge(example,model,override);
  if (model.getRef() != null) {
    examples.remove(exampleName);
    examples.put(model.getRef().split("String_Node_Str")[3],model);
  }
}

Fixed version (ground truth):
public static void merge(ExampleObject example,Map<String,Example> examples,boolean override){
  if (isAnnotationNull(example)) {
    return;
  }
  String exampleName=example.name();
  if (example.name() == null || example.name().isEmpty()) {
    exampleName=UNKNOWN_NAME;
  }
  Example model=examples.getOrDefault(exampleName,new ExampleImpl());
  examples.put(exampleName,model);
  merge(example,model,override);
  if (model.getRef() != null) {
    examples.remove(exampleName);
    examples.put(model.getRef().split("String_Node_Str")[3],model);
  }
}
Program: 28091
Project: 28091
Buggy source:
public static void merge(org.eclipse.microprofile.openapi.annotations.headers.Header header,Map<String,Header> headers,boolean override,Map<String,Schema> currentSchemas){
  if (isAnnotationNull(header)) {
    return;
  }
  String headerName=header.name();
  if (header.name() == null || header.name().isEmpty()) {
    headerName="String_Node_Str";
  }
  Header model=headers.getOrDefault(headerName,new HeaderImpl());
  headers.put(headerName,model);
  merge(header,model,override,currentSchemas);
  if (model.getRef() != null) {
    headers.remove(headerName);
    headers.put(model.getRef().split("String_Node_Str")[3],model);
  }
}

Fixed version (ground truth):
public static void merge(org.eclipse.microprofile.openapi.annotations.headers.Header header,Map<String,Header> headers,boolean override,Map<String,Schema> currentSchemas){
  if (isAnnotationNull(header)) {
    return;
  }
  String headerName=header.name();
  if (header.name() == null || header.name().isEmpty()) {
    headerName=UNKNOWN_NAME;
  }
  Header model=headers.getOrDefault(headerName,new HeaderImpl());
  headers.put(headerName,model);
  merge(header,model,override,currentSchemas);
  if (model.getRef() != null) {
    headers.remove(headerName);
    headers.put(model.getRef().split("String_Node_Str")[3],model);
  }
}
Program: 28092
Project: 28092
Buggy source:
public static void merge(org.eclipse.microprofile.openapi.annotations.links.Link link,Map<String,Link> links,boolean override){
  if (isAnnotationNull(link)) {
    return;
  }
  String linkName=link.name();
  if (link.name() == null || link.name().isEmpty()) {
    linkName="String_Node_Str";
  }
  Link model=links.getOrDefault(linkName,new LinkImpl());
  links.put(linkName,model);
  merge(link,model,override);
  if (model.getRef() != null) {
    links.remove(linkName);
    links.put(model.getRef().split("String_Node_Str")[3],model);
  }
}

Fixed version (ground truth):
public static void merge(org.eclipse.microprofile.openapi.annotations.links.Link link,Map<String,Link> links,boolean override){
  if (isAnnotationNull(link)) {
    return;
  }
  String linkName=link.name();
  if (link.name() == null || link.name().isEmpty()) {
    linkName=UNKNOWN_NAME;
  }
  Link model=links.getOrDefault(linkName,new LinkImpl());
  links.put(linkName,model);
  merge(link,model,override);
  if (model.getRef() != null) {
    links.remove(linkName);
    links.put(model.getRef().split("String_Node_Str")[3],model);
  }
}
Program: 28093
Project: 28093
Buggy source:
private static void applyLinkParameter(LinkParameter parameter,Map<String,Object> linkParameters){
  String parameterName=parameter.name();
  if (parameterName == null || parameterName.isEmpty()) {
    parameterName="String_Node_Str";
  }
  Object model=linkParameters.get(parameterName);
  model=mergeProperty(model,parameter.expression(),true);
  linkParameters.put(parameterName,model);
}

Fixed version (ground truth):
private static void applyLinkParameter(LinkParameter parameter,Map<String,Object> linkParameters){
  String parameterName=parameter.name();
  if (parameterName == null || parameterName.isEmpty()) {
    parameterName=UNKNOWN_NAME;
  }
  Object model=linkParameters.get(parameterName);
  model=mergeProperty(model,parameter.expression(),true);
  linkParameters.put(parameterName,model);
}
Program: 28094
Project: 28094
Buggy source:
/** 
 * Gets the set of classes contained within a   {@link ClassLoader}. The set returned will not be null, but could be empty.
 * @param classLoader the classloader to get the classes from.
 * @return the set of classes managed by the classloader.
 */
@SuppressWarnings("String_Node_Str") private Set<Class<?>> getClassesFromLoader(ClassLoader classLoader){
  Set<Class<?>> classes=new HashSet<>();
  try {
    Field classesField=ClassLoader.class.getDeclaredField("String_Node_Str");
    classesField.setAccessible(true);
    classes=new HashSet<>((Vector<Class<?>>)classesField.get(classLoader));
  }
 catch (  Exception ex) {
    LOGGER.log(Level.WARNING,"String_Node_Str",ex);
  }
  return classes;
}

Fixed version (ground truth):
/** 
 * Gets the set of classes contained within a   {@link ClassLoader}. The set returned will not be null, but could be empty.
 * @param classLoader the classloader to get the classes from.
 * @return the set of classes managed by the classloader.
 */
@SuppressWarnings("String_Node_Str") private Set<Class<?>> getClassesFromLoader(ClassLoader classLoader){
  Set<Class<?>> classes=new HashSet<>();
  try {
    Field classesField=ClassLoader.class.getDeclaredField("String_Node_Str");
    classesField.setAccessible(true);
    classes=new HashSet<>((Vector<Class<?>>)classesField.get(classLoader));
  }
 catch (  Exception ex) {
    LOGGER.log(Level.WARNING,"String_Node_Str",ex);
  }
  if (classes.isEmpty()) {
    LOGGER.fine("String_Node_Str");
    try {
      URI classpath=classLoader.getResource("String_Node_Str").toURI();
      if (classpath != null) {
        List<File> expand=new LinkedList<>();
        expand.add(new File(classpath));
        while (!expand.isEmpty()) {
          List<File> subFiles=new LinkedList<>();
          for (          File file : expand) {
            if (file.isDirectory()) {
              subFiles.addAll(Arrays.asList(file.listFiles()));
            }
 else             if (file.getPath().endsWith("String_Node_Str")) {
              String className=file.getPath().replaceAll("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
              LOGGER.finer("String_Node_Str" + className);
              try {
                classes.add(Class.forName(className));
              }
 catch (              ClassNotFoundException ex) {
                LOGGER.log(Level.WARNING,"String_Node_Str",ex);
              }
            }
          }
          expand.clear();
          expand.addAll(subFiles);
        }
      }
 else {
        LOGGER.log(Level.WARNING,"String_Node_Str");
      }
    }
 catch (    URISyntaxException ex) {
      LOGGER.log(Level.WARNING,"String_Node_Str",ex);
    }
  }
  return classes;
}
Program: 28096
Project: 28096
Buggy source:
public ServerSocketFactory getServerSocketFactory(){
  return new GlassfishServerSocketFactory();
}

Fixed version (ground truth):
public ServerSocketFactory getServerSocketFactory(){
  if (Boolean.valueOf(System.getProperty(PROP_GLASSFISH_SOCKETFACTORY,"String_Node_Str"))) {
    return new GlassfishServerSocketFactory();
  }
 else {
    return new JSSE14SocketFactory();
  }
}
Program: 28097
Project: 28097
Buggy source:
@Override public void event(Event event){
  if (event.is(HazelcastEvents.HAZELCAST_BOOTSTRAP_COMPLETE) && hzCore.isEnabled()) {
    logger.config("String_Node_Str");
    for (    String topic : messageReceivers.keySet()) {
      TopicListener tl=messageReceivers.get(topic);
      if (tl != null) {
        String regId=hzCore.getInstance().getTopic(topic).addMessageListener(tl);
        tl.setRegistrationID(regId);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void event(Event event){
  if (event.is(HazelcastEvents.HAZELCAST_BOOTSTRAP_COMPLETE) && hzCore.isEnabled()) {
    logger.config("String_Node_Str");
  }
}
Program: 28098
Project: 28098
Buggy source:
@Override protected EJBContextImpl _constructEJBContextImpl(Object instance){
  EJBContextImpl rv=new SingletonContextImpl(instance,this);
  if (rv.getJCDIInjectionContext() == null && isJCDIEnabled()) {
    rv.setJCDIInjectionContext(_createJCDIInjectionContext(rv));
  }
  return rv;
}

Fixed version (ground truth):
@Override protected EJBContextImpl _constructEJBContextImpl(Object instance){
  return new SingletonContextImpl(instance,this);
}
Program: 28100
Project: 28100
Buggy source:
private JCDIService.JCDIInjectionContext<?> _createJCDIInjectionContext(EJBContextImpl ejbContext,Object instance,JCDIService.JCDIInjectionContext<?> cdiInjectionContext){
  JCDIService.JCDIInjectionContext<?> rv=jcdiService.createJCDIInjectionContext(ejbDescriptor,instance,buildJCDIInjectionEjbInfo(ejbContext,cdiInjectionContext));
  if (rv == null) {
    jcdiService=null;
  }
  return rv;
}

Fixed version (ground truth):
protected JCDIService.JCDIInjectionContext<?> _createJCDIInjectionContext(EJBContextImpl ejbContext,Object instance,JCDIService.JCDIInjectionContext<?> cdiInjectionContext){
  JCDIService.JCDIInjectionContext<?> rv=jcdiService.createJCDIInjectionContext(ejbDescriptor,instance,buildJCDIInjectionEjbInfo(ejbContext,cdiInjectionContext));
  if (rv == null) {
    jcdiService=null;
  }
  return rv;
}