Program: 29254
Project: 29254
Buggy source:
private Response executeSseCommand(CommandName commandName,Payload.Inbound inbound,ParameterMap params,String modelETag,Cookie jSessionId) throws WebApplicationException {
  if (logger.isLoggable(Level.FINEST)) {
    logger.log(Level.FINEST,"String_Node_Str",commandName);
  }
  CommandModel model=getCommandModel(commandName);
  checkCommandModelETag(model,modelETag);
  final CommandRunner.CommandInvocation commandInvocation=getCommandRunner().getCommandInvocation(commandName.getScope(),commandName.getName(),new PropsFileActionReporter());
  if (inbound != null) {
    commandInvocation.inbound(inbound);
  }
  commandInvocation.outbound(new RestPayloadImpl.Outbound(false)).subject(getSubject()).managedJob().parameters(params);
  final EventChannel ec=new EventChannel();
  AdminCommandListener listener=new AdminCommandListener(){
    @Override public void onAdminCommandEvent(    String name,    Object event){
      if (name == null || name.startsWith("String_Node_Str")) {
        return;
      }
      if (event == null) {
        return;
      }
      OutboundEvent outEvent=new OutboundEvent.Builder().name(name).mediaType(MediaType.APPLICATION_JSON_TYPE).data(event.getClass(),event).build();
      try {
        ec.write(outEvent);
      }
 catch (      IOException ex) {
        logger.log(Level.WARNING,strings.getLocalString("String_Node_Str","String_Node_Str",event.getClass().getName()),ex);
      }
    }
  }
;
  commandInvocation.listener("String_Node_Str",listener);
  ResponseBuilder rb=Response.status(HttpURLConnection.HTTP_OK);
  if (isSingleInstanceCommand(model)) {
    rb.cookie(getJSessionCookie(jSessionId));
  }
  rb.entity(ec);
  executeCommandInvocationAsync(commandInvocation,ec,listener);
  return rb.build();
}

Fixed version (ground truth):
private Response executeSseCommand(CommandName commandName,Payload.Inbound inbound,ParameterMap params,String modelETag,Cookie jSessionId) throws WebApplicationException {
  if (logger.isLoggable(Level.FINEST)) {
    logger.log(Level.FINEST,"String_Node_Str",commandName);
  }
  CommandModel model=getCommandModel(commandName);
  checkCommandModelETag(model,modelETag);
  final CommandRunner.CommandInvocation commandInvocation=getCommandRunner().getCommandInvocation(commandName.getScope(),commandName.getName(),new PropsFileActionReporter());
  if (inbound != null) {
    commandInvocation.inbound(inbound);
  }
  commandInvocation.outbound(new RestPayloadImpl.Outbound(false)).subject(getSubject()).managedJob().parameters(params);
  final EventChannel ec=new EventChannel();
  AdminCommandListener listener=new AdminCommandListener(){
    @Override public void onAdminCommandEvent(    String name,    Object event){
      if (name == null || name.startsWith("String_Node_Str")) {
        return;
      }
      if (event == null) {
        return;
      }
      if (ec.isClosed()) {
        return;
      }
      OutboundEvent outEvent=new OutboundEvent.Builder().name(name).mediaType(MediaType.APPLICATION_JSON_TYPE).data(event.getClass(),event).build();
      try {
        ec.write(outEvent);
      }
 catch (      Exception ex) {
        if (logger.isLoggable(Level.FINE)) {
          logger.log(Level.FINE,strings.getLocalString("String_Node_Str","String_Node_Str",event.getClass().getName()),ex);
        }
      }
    }
  }
;
  commandInvocation.listener("String_Node_Str",listener);
  ResponseBuilder rb=Response.status(HttpURLConnection.HTTP_OK);
  if (isSingleInstanceCommand(model)) {
    rb.cookie(getJSessionCookie(jSessionId));
  }
  rb.entity(ec);
  executeCommandInvocationAsync(commandInvocation,ec,listener);
  return rb.build();
}