nus-yam/ex-repair huggingface dataset:
Program: 96540
Project: 96540
Buggy source:
private void attachWriter0(final HttpSession newWriter){
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug(String.format("String_Node_Str",this.getId(),newWriter));
  }
  reconnecting.set(false);
  if (!getTransportSession().isClosing()) {
    if (!compareAndSetParent(null,newWriter)) {
      cancelTimeout();
      IoSessionEx oldPending=pendingNewWriter.getAndSet(newWriter);
      if (oldPending != null) {
        oldPending.close(false);
      }
      enqueueReconnectRequest();
    }
 else {
      if (newWriter instanceof HttpAcceptSession) {
        HttpAcceptSession newAcceptWriter=(HttpAcceptSession)newWriter;
        if (isLongPollingOutOfOrder(newAcceptWriter) || isWriterOutOfOrder(newAcceptWriter)) {
          closeSession(newAcceptWriter);
          return;
        }
        writeNoop((HttpAcceptSession)newWriter);
      }
      writerSequenceNo++;
      firstWriter=false;
      if (Long.valueOf(0L).equals(newWriter.getAttribute(WsebAcceptor.CLIENT_BUFFER_KEY))) {
        newWriter.suspendWrite();
      }
    }
    if (!isWriteSuspended()) {
      getProcessor().flush(this);
    }
  }
 else {
    if (newWriter != null) {
      newWriter.close(false);
    }
  }
  attachingWrite.set(false);
  if (!isClosing()) {
    try {
      this.startupScheduledCommands();
    }
 catch (    Exception e) {
      logger.error("String_Node_Str",e);
      throw new RuntimeException(e);
    }
  }
}

Fixed version (ground truth):
private void attachWriter0(final HttpSession newWriter){
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug(String.format("String_Node_Str",this.getId(),newWriter));
  }
  reconnecting.set(false);
  if (!getTransportSession().isClosing()) {
    if (!compareAndSetParent(null,newWriter)) {
      cancelTimeout();
      IoSessionEx oldPending=pendingNewWriter.getAndSet(newWriter);
      if (oldPending != null) {
        oldPending.close(false);
      }
      enqueueReconnectRequest();
    }
 else {
      if (newWriter instanceof HttpAcceptSession) {
        HttpAcceptSession newAcceptWriter=(HttpAcceptSession)newWriter;
        if (!checkLongPollingOrder(newAcceptWriter) || !checkWriterOrder(newAcceptWriter)) {
          return;
        }
        writeNoop((HttpAcceptSession)newWriter);
      }
      writerSequenceNo++;
      firstWriter=false;
      if (Long.valueOf(0L).equals(newWriter.getAttribute(WsebAcceptor.CLIENT_BUFFER_KEY))) {
        newWriter.suspendWrite();
      }
    }
    if (!isWriteSuspended()) {
      getProcessor().flush(this);
    }
  }
 else {
    if (newWriter != null) {
      newWriter.close(false);
    }
  }
  attachingWrite.set(false);
  if (!isClosing()) {
    try {
      this.startupScheduledCommands();
    }
 catch (    Exception e) {
      logger.error("String_Node_Str",e);
      throw new RuntimeException(e);
    }
  }
}
Program: 96541
Project: 96541
Buggy source:
private void attachReader0(final IoSessionEx newReader){
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug(String.format("String_Node_Str",this.getId(),newReader));
  }
  if (newReader instanceof HttpAcceptSession) {
    HttpAcceptSession newAcceptReader=(HttpAcceptSession)newReader;
    if (isReaderOutOfOrder(newAcceptReader)) {
      setCloseException(new IOException("String_Node_Str" + session.getMethod()));
      HttpStatus status=HttpStatus.CLIENT_BAD_REQUEST;
      session.setStatus(status);
      session.setWriteHeader(HEADER_CONTENT_LENGTH,"String_Node_Str");
      session.close(true);
      return;
    }
  }
  readerSequenceNo++;
  readSession.set(newReader);
  if (this.isReadSuspended()) {
    newReader.suspendRead();
  }
}

Fixed version (ground truth):
private void attachReader0(final IoSessionEx newReader){
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug(String.format("String_Node_Str",this.getId(),newReader));
  }
  if (newReader instanceof HttpAcceptSession) {
    HttpAcceptSession newAcceptReader=(HttpAcceptSession)newReader;
    if (!checkReaderOrder(newAcceptReader)) {
      return;
    }
  }
  readerSequenceNo++;
  IoSessionEx oldReader=readSession.get();
  if (oldReader != null && !oldReader.isClosing() && oldReader instanceof HttpAcceptSession) {
    String message=String.format("String_Node_Str");
    setCloseException(new IOException(message));
    HttpStatus status=HttpStatus.CLIENT_BAD_REQUEST;
    HttpAcceptSession newAcceptReader=(HttpAcceptSession)newReader;
    newAcceptReader.setStatus(status);
    newAcceptReader.setWriteHeader(HEADER_CONTENT_LENGTH,"String_Node_Str");
    newAcceptReader.close(true);
    return;
  }
  readSession.set(newReader);
  if (this.isReadSuspended()) {
    newReader.suspendRead();
  }
}
Program: 96542
Project: 96542
Buggy source:
@Test @Specification("String_Node_Str") public void shouldRejectParallelUpstreamRequest() throws Exception {
  k3po.finish();
}

Fixed version (ground truth):
@Test @Specification("String_Node_Str") public void shouldRejectParallelUpstreamRequest() throws Exception {
  k3po.finish();
  throw new Exception("String_Node_Str");
}
Program: 96543
Project: 96543
Buggy source:
@Test @Specification({"String_Node_Str","String_Node_Str"}) public void shouldCloseConnectionWhenUpstreamStatusCodeNot200() throws Exception {
  k3po.finish();
}

Fixed version (ground truth):
@Specification("String_Node_Str") void shouldCloseConnectionWhenUpstreamStatusCodeNot200() throws Exception {
  k3po.finish();
}
Program: 96544
Project: 96544
Buggy source:
@Override public void init(ServiceContext serviceContext) throws Exception {
  super.init(serviceContext);
  Collection<URI> connectURIs=serviceContext.getConnects();
  if (connectURIs == null || connectURIs.isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  HttpProxyServiceHandler handler=getHandler();
  handler.setConnectURIs(connectURIs);
  handler.initServiceConnectManager();
}

Fixed version (ground truth):
@Override public void init(ServiceContext serviceContext) throws Exception {
  super.init(serviceContext);
  Collection<URI> connectURIs=serviceContext.getConnects();
  if (connectURIs == null || connectURIs.isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  checkForTrailingSlashes(serviceContext);
  HttpProxyServiceHandler handler=getHandler();
  handler.setConnectURIs(connectURIs);
  handler.initServiceConnectManager();
}
Program: 96545
Project: 96545
Buggy source:
@Override public void initializeSession(IoSession session,ConnectFuture future){
  HttpConnectSession connectSession=(HttpConnectSession)session;
  connectSession.setVersion(acceptSession.getVersion());
  connectSession.setMethod(acceptSession.getMethod());
  String acceptPathInfo=acceptSession.getPathInfo().toString();
  if (acceptPathInfo.startsWith("String_Node_Str")) {
    acceptPathInfo=acceptPathInfo.substring(1);
  }
  String connectPath=connectSession.getRequestURI().getPath();
  if (!connectPath.endsWith("String_Node_Str")) {
    connectPath+="String_Node_Str";
  }
  connectSession.setRequestURI(URI.create(connectPath).resolve(acceptPathInfo));
  processRequestHeaders(acceptSession,connectSession);
}

Fixed version (ground truth):
@Override public void initializeSession(IoSession session,ConnectFuture future){
  HttpConnectSession connectSession=(HttpConnectSession)session;
  connectSession.setVersion(acceptSession.getVersion());
  connectSession.setMethod(acceptSession.getMethod());
  URI connectURI=computeConnectPath(connectSession.getRequestURI());
  connectSession.setRequestURI(connectURI);
  processRequestHeaders(acceptSession,connectSession);
}
Program: 96546
Project: 96546
Buggy source:
/** 
 * Parses the class path system attribute and the manifest files and if there are duplicate jar a DuplicateJarsException is thrown.
 * @throws IOException
 * @throws DuplicateJarsException
 */
public void findDuplicateJars() throws IOException, DuplicateJarsException {
  Enumeration<URL> manifestURLs=classPathParser.getManifestURLs();
  while (manifestURLs.hasMoreElements()) {
    parseManifestFileFromClassPathEntry(manifestURLs.nextElement());
  }
  checkForDuplicateJars();
}

Fixed version (ground truth):
/** 
 * Parses the class path system attribute and the manifest files and if there are duplicate jar a DuplicateJarsException is thrown.
 * @throws IOException
 * @throws DuplicateJarsException
 */
public void findDuplicateJars() throws IOException, DuplicateJarsException {
  Map<String,List<String>> artifactsToVersion=new HashMap<String,List<String>>();
  Enumeration<URL> manifestURLs=classPathParser.getManifestURLs();
  while (manifestURLs.hasMoreElements()) {
    parseManifestFileFromClassPathEntry(manifestURLs.nextElement(),artifactsToVersion);
  }
  checkForDuplicateJars(artifactsToVersion);
}
Program: 96547
Project: 96547
Buggy source:
private void checkForDuplicateJars() throws DuplicateJarsException {
  for (  String artifact : artifactsToVersion.keySet()) {
    List<String> versions=artifactsToVersion.get(artifact);
    if (versions.size() > 1) {
      gatewayLogger.error(CONFLICTING_JARS_LOGGING_MESSAGE,artifact,versions);
      throw new DuplicateJarsException();
    }
  }
}

Fixed version (ground truth):
private void checkForDuplicateJars(Map<String,List<String>> artifactsToVersion) throws DuplicateJarsException {
  for (  String artifact : artifactsToVersion.keySet()) {
    List<String> versions=artifactsToVersion.get(artifact);
    if (versions.size() > 1) {
      gatewayLogger.error(CONFLICTING_JARS_LOGGING_MESSAGE,artifact,versions);
      throw new DuplicateJarsException();
    }
  }
}
Program: 96548
Project: 96548
Buggy source:
private void parseManifestFileFromClassPathEntry(URL url) throws IOException {
  Attributes manifestAttributes=classPathParser.getManifestAttributesFromURL(url);
  String version=manifestAttributes.getValue(MANIFEST_VERSION);
  String artifactName=manifestAttributes.getValue(MANIFEST_JAR_NAME);
  if (isKaazingProduct(artifactName)) {
    artifactName=artifactName.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
    List<String> versionList=artifactsToVersion.get(artifactName);
    if (versionList == null) {
      versionList=new ArrayList<String>();
      artifactsToVersion.put(artifactName,versionList);
    }
    versionList.add(version);
  }
  gatewayLogger.debug(JAR_FILE_WITH_VERSION_LOGGING_MESSAGE,artifactName,version);
}

Fixed version (ground truth):
private void parseManifestFileFromClassPathEntry(URL url,Map<String,List<String>> artifactsToVersion) throws IOException {
  Attributes manifestAttributes=classPathParser.getManifestAttributesFromURL(url);
  String version=manifestAttributes.getValue(MANIFEST_VERSION);
  String artifactName=manifestAttributes.getValue(MANIFEST_JAR_NAME);
  if (isKaazingProduct(artifactName)) {
    artifactName=artifactName.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
    List<String> versionList=artifactsToVersion.get(artifactName);
    if (versionList == null) {
      versionList=new ArrayList<String>();
      artifactsToVersion.put(artifactName,versionList);
    }
    versionList.add(version);
    gatewayLogger.debug(JAR_FILE_WITH_VERSION_LOGGING_MESSAGE,artifactName,version);
  }
}
Program: 96549
Project: 96549
Buggy source:
private void addSystemInfo(GatewayManagementBean gatewayBean){
  final HostManagementBean systemManagementBean=new HostManagementBeanImpl(gatewayBean);
  for (  ManagementServiceHandler handler : managementServiceHandlers) {
    handler.addSystemManagementBean(systemManagementBean);
  }
  systemManagementBean.managementStrategyChanged();
}

Fixed version (ground truth):
private void addSystemInfo(GatewayManagementBean gatewayBean){
  final HostManagementBean systemManagementBean=new HostManagementBeanImpl(gatewayBean,InternalSystemProperty.MANAGEMENT_SUMMARY_DATA_LIMIT.getIntProperty(configuration));
  for (  ManagementServiceHandler handler : managementServiceHandlers) {
    handler.addSystemManagementBean(systemManagementBean);
  }
  systemManagementBean.managementStrategyChanged();
}
Program: 96550
Project: 96550
Buggy source:
private void addJvmInfo(GatewayManagementBean gatewayBean){
  final JvmManagementBean jvmManagementBean=new JvmManagementBeanImpl(gatewayBean);
  for (  ManagementServiceHandler handler : managementServiceHandlers) {
    handler.addJvmManagementBean(jvmManagementBean);
  }
  jvmManagementBean.managementStrategyChanged();
}

Fixed version (ground truth):
private void addJvmInfo(GatewayManagementBean gatewayBean){
  final JvmManagementBean jvmManagementBean=new JvmManagementBeanImpl(gatewayBean,InternalSystemProperty.MANAGEMENT_SUMMARY_DATA_LIMIT.getIntProperty(configuration));
  for (  ManagementServiceHandler handler : managementServiceHandlers) {
    handler.addJvmManagementBean(jvmManagementBean);
  }
  jvmManagementBean.managementStrategyChanged();
}
Program: 96551
Project: 96551
Buggy source:
/** 
 * Add a controller management bean for the list of CPUs, and individual CPU management beans for the CPUs/cores in the gateway's system
 */
private void addCpuListInfo(GatewayManagementBean gatewayBean){
  final CpuListManagementBean cpuListManagementBean=new CpuListManagementBeanImpl(gatewayBean);
  for (  ManagementServiceHandler handler : managementServiceHandlers) {
    handler.addCpuListManagementBean(cpuListManagementBean);
  }
  CpuManagementBean[] cpuManagementBeans=cpuListManagementBean.getCpuManagementBeans();
  String hostAndPid=gatewayBean.getHostAndPid();
  for (int i=0; i < cpuManagementBeans.length; i++) {
    for (    ManagementServiceHandler handler : managementServiceHandlers) {
      handler.addCpuManagementBean(cpuManagementBeans[i],hostAndPid);
    }
  }
  cpuListManagementBean.managementStrategyChanged();
}

Fixed version (ground truth):
/** 
 * Add a controller management bean for the list of CPUs, and individual CPU management beans for the CPUs/cores in the gateway's system
 */
private void addCpuListInfo(GatewayManagementBean gatewayBean){
  final CpuListManagementBean cpuListManagementBean=new CpuListManagementBeanImpl(gatewayBean,InternalSystemProperty.MANAGEMENT_SUMMARY_DATA_LIMIT.getIntProperty(configuration));
  for (  ManagementServiceHandler handler : managementServiceHandlers) {
    handler.addCpuListManagementBean(cpuListManagementBean);
  }
  CpuManagementBean[] cpuManagementBeans=cpuListManagementBean.getCpuManagementBeans();
  String hostAndPid=gatewayBean.getHostAndPid();
  for (int i=0; i < cpuManagementBeans.length; i++) {
    for (    ManagementServiceHandler handler : managementServiceHandlers) {
      handler.addCpuManagementBean(cpuManagementBeans[i],hostAndPid);
    }
  }
  cpuListManagementBean.managementStrategyChanged();
}
Program: 96552
Project: 96552
Buggy source:
/** 
 * Add management beans for the entire set of NICs on the gateway's host system.
 */
private void addNicListInfo(GatewayManagementBean gatewayBean){
  final NicListManagementBean nicListManagementBean=new NicListManagementBeanImpl(gatewayBean);
  for (  ManagementServiceHandler handler : managementServiceHandlers) {
    handler.addNicListManagementBean(nicListManagementBean);
  }
  NicManagementBean[] nicManagementBeans=nicListManagementBean.getNicManagementBeans();
  String hostAndPid=gatewayBean.getHostAndPid();
  for (int i=0; i < nicManagementBeans.length; i++) {
    for (    ManagementServiceHandler handler : managementServiceHandlers) {
      handler.addNicManagementBean(nicManagementBeans[i],hostAndPid);
    }
  }
  nicListManagementBean.managementStrategyChanged();
}

Fixed version (ground truth):
/** 
 * Add management beans for the entire set of NICs on the gateway's host system.
 */
private void addNicListInfo(GatewayManagementBean gatewayBean){
  final NicListManagementBean nicListManagementBean=new NicListManagementBeanImpl(gatewayBean,InternalSystemProperty.MANAGEMENT_SUMMARY_DATA_LIMIT.getIntProperty(configuration));
  for (  ManagementServiceHandler handler : managementServiceHandlers) {
    handler.addNicListManagementBean(nicListManagementBean);
  }
  NicManagementBean[] nicManagementBeans=nicListManagementBean.getNicManagementBeans();
  String hostAndPid=gatewayBean.getHostAndPid();
  for (int i=0; i < nicManagementBeans.length; i++) {
    for (    ManagementServiceHandler handler : managementServiceHandlers) {
      handler.addNicManagementBean(nicManagementBeans[i],hostAndPid);
    }
  }
  nicListManagementBean.managementStrategyChanged();
}
Program: 96553
Project: 96553
Buggy source:
public AbstractSystemManagementBean(ManagementContext managementContext,SummaryManagementInterval summaryInterval,String[] summaryDataFields,SummaryManagementInterval gatherInterval,String dataTypeStr,String schedulerName){
  super(managementContext,summaryInterval,summaryDataFields);
  this.dataTypeStr=dataTypeStr;
  this.summaryDataList=new AtomicReference<>(new JSONArray());
  this.schedulerName=schedulerName;
  this.gatherInterval=gatherInterval;
  managementContext.addManagementStrategyChangeListener(this);
}

Fixed version (ground truth):
public AbstractSystemManagementBean(ManagementContext managementContext,SummaryManagementInterval summaryInterval,String[] summaryDataFields,SummaryManagementInterval gatherInterval,String dataTypeStr,int summaryDataLimit,String schedulerName){
  super(managementContext,summaryInterval,summaryDataFields);
  this.dataTypeStr=dataTypeStr;
  if (summaryDataLimit > 0) {
    this.summaryDataList=new ArrayBlockingQueue<JSONObject>(summaryDataLimit);
  }
 else {
    this.summaryDataList=null;
  }
  this.schedulerName=schedulerName;
  this.gatherInterval=gatherInterval;
  managementContext.addManagementStrategyChangeListener(this);
}
Program: 96554
Project: 96554
Buggy source:
public String getSummaryData(){
  JSONArray jsonArray=summaryDataList.getAndSet(new JSONArray());
  return jsonArray.toString();
}

Fixed version (ground truth):
public String getSummaryData(){
  JSONArray jsonArray=new JSONArray();
  if (summaryDataList != null) {
    ArrayList<JSONObject> tmpList=new ArrayList<JSONObject>(summaryDataList.size());
    summaryDataList.drainTo(tmpList);
    for (    JSONObject jsonObject : tmpList) {
      jsonArray.put(jsonObject);
    }
  }
  return jsonArray.toString();
}
Program: 96555
Project: 96555
Buggy source:
/** 
 * Do actual gathering of stats now (i.e. as 'execute' rather than 'schedule'). <p/> THIS ROUTINE IS CALLED INITIALLY ON AN IO THREAD, BUT MUST RUN *OFF* THE IO THREAD.
 */
public void gatherStats(){
  managementContext.runManagementTask(new Runnable(){
    public void run(){
      try {
        long readTime=System.currentTimeMillis();
        JSONObject jsonObj=new JSONObject();
        doGatherStats(jsonObj,readTime);
        jsonObj.put("String_Node_Str",readTime);
        summaryDataList.get().put(jsonObj);
      }
 catch (      SigarException ex) {
        if (!errorShown) {
          logger.warn("String_Node_Str" + dataTypeStr,ex);
          errorShown=true;
        }
      }
catch (      JSONException ex) {
        if (!errorShown) {
          logger.warn("String_Node_Str" + dataTypeStr,ex);
          errorShown=true;
        }
      }
catch (      Exception ex) {
        if (!errorShown) {
          logger.warn("String_Node_Str" + dataTypeStr,ex);
          errorShown=true;
        }
      }
      markChanged();
      ManagementSystemStrategy systemStrategy=managementContext.getManagementSystemStrategy();
      systemStrategy.continueGatherStats(AbstractSystemManagementBean.this);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Do actual gathering of stats now (i.e. as 'execute' rather than 'schedule'). <p/> THIS ROUTINE IS CALLED INITIALLY ON AN IO THREAD, BUT MUST RUN *OFF* THE IO THREAD.
 */
public void gatherStats(){
  managementContext.runManagementTask(new Runnable(){
    public void run(){
      try {
        long readTime=System.currentTimeMillis();
        JSONObject jsonObj=new JSONObject();
        doGatherStats(jsonObj,readTime);
        jsonObj.put("String_Node_Str",readTime);
        if (summaryDataList != null) {
          if (!summaryDataList.offer(jsonObj)) {
            summaryDataList.poll();
            summaryDataList.offer(jsonObj);
          }
        }
      }
 catch (      SigarException ex) {
        if (!errorShown) {
          logger.warn("String_Node_Str" + dataTypeStr,ex);
          errorShown=true;
        }
      }
catch (      JSONException ex) {
        if (!errorShown) {
          logger.warn("String_Node_Str" + dataTypeStr,ex);
          errorShown=true;
        }
      }
catch (      Exception ex) {
        if (!errorShown) {
          logger.warn("String_Node_Str" + dataTypeStr,ex);
          errorShown=true;
        }
      }
      markChanged();
      ManagementSystemStrategy systemStrategy=managementContext.getManagementSystemStrategy();
      systemStrategy.continueGatherStats(AbstractSystemManagementBean.this);
    }
  }
);
}
Program: 96556
Project: 96556
Buggy source:
public CpuListManagementBeanImpl(GatewayManagementBean gatewayManagementBean){
  super(gatewayManagementBean.getManagementContext(),gatewayManagementBean.getManagementContext().getSystemSummaryDataNotificationInterval(),CpuManagementBean.SUMMARY_DATA_FIELD_LIST,gatewayManagementBean.getManagementContext().getCpuListSummaryDataGatherInterval(),"String_Node_Str","String_Node_Str");
  this.gatewayManagementBean=gatewayManagementBean;
  int numCpus=managementContext.getSystemDataProvider().getNumberOfCpus();
  cpuManagementBeans=new CpuManagementBean[numCpus];
  for (int i=0; i < numCpus; i++) {
    cpuManagementBeans[i]=new CpuManagementBeanImpl(i);
  }
}

Fixed version (ground truth):
public CpuListManagementBeanImpl(GatewayManagementBean gatewayManagementBean,int summaryDataLimit){
  super(gatewayManagementBean.getManagementContext(),gatewayManagementBean.getManagementContext().getSystemSummaryDataNotificationInterval(),CpuManagementBean.SUMMARY_DATA_FIELD_LIST,gatewayManagementBean.getManagementContext().getCpuListSummaryDataGatherInterval(),"String_Node_Str",summaryDataLimit,"String_Node_Str");
  this.gatewayManagementBean=gatewayManagementBean;
  int numCpus=managementContext.getSystemDataProvider().getNumberOfCpus();
  cpuManagementBeans=new CpuManagementBean[numCpus];
  for (int i=0; i < numCpus; i++) {
    cpuManagementBeans[i]=new CpuManagementBeanImpl(i);
  }
}
Program: 96557
Project: 96557
Buggy source:
public HostManagementBeanImpl(GatewayManagementBean gatewayManagementBean){
  super(gatewayManagementBean.getManagementContext(),gatewayManagementBean.getManagementContext().getSystemSummaryDataNotificationInterval(),HostManagementBean.SUMMARY_DATA_FIELD_LIST,gatewayManagementBean.getManagementContext().getSystemSummaryDataGatherInterval(),"String_Node_Str","String_Node_Str");
  this.gatewayManagementBean=gatewayManagementBean;
}

Fixed version (ground truth):
public HostManagementBeanImpl(GatewayManagementBean gatewayManagementBean,int summaryDataLimit){
  super(gatewayManagementBean.getManagementContext(),gatewayManagementBean.getManagementContext().getSystemSummaryDataNotificationInterval(),HostManagementBean.SUMMARY_DATA_FIELD_LIST,gatewayManagementBean.getManagementContext().getSystemSummaryDataGatherInterval(),"String_Node_Str",summaryDataLimit,"String_Node_Str");
  this.gatewayManagementBean=gatewayManagementBean;
}
Program: 96558
Project: 96558
Buggy source:
public JvmManagementBeanImpl(GatewayManagementBean gatewayManagementBean){
  super(gatewayManagementBean.getManagementContext(),gatewayManagementBean.getManagementContext().getSystemSummaryDataNotificationInterval(),JvmManagementBean.SUMMARY_DATA_FIELD_LIST,gatewayManagementBean.getManagementContext().getJvmSummaryDataGatherInterval(),"String_Node_Str","String_Node_Str");
  this.gatewayManagementBean=gatewayManagementBean;
}

Fixed version (ground truth):
public JvmManagementBeanImpl(GatewayManagementBean gatewayManagementBean,int summaryDataLimit){
  super(gatewayManagementBean.getManagementContext(),gatewayManagementBean.getManagementContext().getSystemSummaryDataNotificationInterval(),JvmManagementBean.SUMMARY_DATA_FIELD_LIST,gatewayManagementBean.getManagementContext().getJvmSummaryDataGatherInterval(),"String_Node_Str",summaryDataLimit,"String_Node_Str");
  this.gatewayManagementBean=gatewayManagementBean;
}
Program: 96559
Project: 96559
Buggy source:
public NicListManagementBeanImpl(GatewayManagementBean gatewayManagementBean){
  super(gatewayManagementBean.getManagementContext(),gatewayManagementBean.getManagementContext().getSystemSummaryDataNotificationInterval(),NicManagementBean.SUMMARY_DATA_FIELD_LIST,gatewayManagementBean.getManagementContext().getNicListSummaryDataGatherInterval(),"String_Node_Str","String_Node_Str");
  this.gatewayManagementBean=gatewayManagementBean;
  netInterfaceNames=managementContext.getSystemDataProvider().getNetInterfaceNames();
  nicManagementBeans=new NicManagementBean[netInterfaceNames.length];
  for (int i=0; i < netInterfaceNames.length; i++) {
    nicManagementBeans[i]=new NicManagementBeanImpl(i,netInterfaceNames[i]);
  }
}

Fixed version (ground truth):
public NicListManagementBeanImpl(GatewayManagementBean gatewayManagementBean,int summaryDataLimit){
  super(gatewayManagementBean.getManagementContext(),gatewayManagementBean.getManagementContext().getSystemSummaryDataNotificationInterval(),NicManagementBean.SUMMARY_DATA_FIELD_LIST,gatewayManagementBean.getManagementContext().getNicListSummaryDataGatherInterval(),"String_Node_Str",summaryDataLimit,"String_Node_Str");
  this.gatewayManagementBean=gatewayManagementBean;
  netInterfaceNames=managementContext.getSystemDataProvider().getNetInterfaceNames();
  nicManagementBeans=new NicManagementBean[netInterfaceNames.length];
  for (int i=0; i < netInterfaceNames.length; i++) {
    nicManagementBeans[i]=new NicManagementBeanImpl(i,netInterfaceNames[i]);
  }
}
Program: 96560
Project: 96560
Buggy source:
@Override public void addNicListManagementBean(final NicListManagementBean managementBean){
  agent.addNicListManagementBean(managementBean);
  managementContext.runManagementTask(new Runnable(){
    public void run(){
      OID dataOID=((OID)MIBConstants.oidNicListSummaryData.clone()).append(managementBean.getGatewayManagementBean().getId());
      OID notificationOID=MIBConstants.oidNicListSummaryDataNotification;
      managementBean.addSummaryDataListener(new SNMPSummaryDataListener(dataOID,notificationOID));
    }
  }
);
}

Fixed version (ground truth):
@Override public void addNicListManagementBean(final NicListManagementBean managementBean){
  agent.addNicListManagementBean(managementBean);
  managementContext.runManagementTask(new Runnable(){
    @Override public void run(){
      OID dataOID=((OID)MIBConstants.oidNicListSummaryData.clone()).append(managementBean.getGatewayManagementBean().getId());
      OID notificationOID=MIBConstants.oidNicListSummaryDataNotification;
      managementBean.addSummaryDataListener(new SNMPSummaryDataListener(dataOID,notificationOID));
    }
  }
);
}
Program: 96561
Project: 96561
Buggy source:
public RequestStatus getStatus(){
  return status;
}

Fixed version (ground truth):
@Override public RequestStatus getStatus(){
  return status;
}
Program: 96562
Project: 96562
Buggy source:
public void setGatewayBean(GatewayManagementBean gatewayBean){
  this.gatewayBean=gatewayBean;
}

Fixed version (ground truth):
@Override public void setGatewayBean(GatewayManagementBean gatewayBean){
  this.gatewayBean=gatewayBean;
}
Program: 96563
Project: 96563
Buggy source:
public void setQuery(MOQuery query){
  this.query=query;
}

Fixed version (ground truth):
@Override public void setQuery(MOQuery query){
  this.query=query;
}
Program: 96564
Project: 96564
Buggy source:
public MOQuery getQuery(){
  return query;
}

Fixed version (ground truth):
@Override public MOQuery getQuery(){
  return query;
}
Program: 96565
Project: 96565
Buggy source:
public void completed(){
  completed=true;
}

Fixed version (ground truth):
@Override public void completed(){
  completed=true;
}
Program: 96566
Project: 96566
Buggy source:
public VariableBinding getVariableBinding(){
  return vb;
}

Fixed version (ground truth):
@Override public VariableBinding getVariableBinding(){
  return vb;
}
Program: 96567
Project: 96567
Buggy source:
public MOInput createMOInput(){
  return new PropertyMOInput(props,SnmpManagementServiceHandler.this);
}

Fixed version (ground truth):
@Override public MOInput createMOInput(){
  return new PropertyMOInput(props,SnmpManagementServiceHandler.this);
}
Program: 96569
Project: 96569
Buggy source:
public Request getRequest(){
  return null;
}

Fixed version (ground truth):
@Override public Request getRequest(){
  return null;
}
Program: 96570
Project: 96570
Buggy source:
public void setTargetMO(ManagedObject managedObject){
}

Fixed version (ground truth):
@Override public void setTargetMO(ManagedObject managedObject){
}
Program: 96571
Project: 96571
Buggy source:
public boolean hasError(){
  return false;
}

Fixed version (ground truth):
@Override public boolean hasError(){
  return false;
}
Program: 96572
Project: 96572
Buggy source:
public int getErrorStatus(){
  return status.getErrorStatus();
}

Fixed version (ground truth):
@Override public int getErrorStatus(){
  return status.getErrorStatus();
}
Program: 96573
Project: 96573
Buggy source:
public boolean isComplete(){
  return completed;
}

Fixed version (ground truth):
@Override public boolean isComplete(){
  return completed;
}
Program: 96574
Project: 96574
Buggy source:
@Override public void addJvmManagementBean(final JvmManagementBean managementBean){
  agent.addJvmManagementBean(managementBean);
  managementContext.runManagementTask(new Runnable(){
    public void run(){
      OID dataOID=((OID)MIBConstants.oidJvmSummaryData.clone()).append(managementBean.getGatewayManagementBean().getId());
      OID notificationOID=MIBConstants.oidJvmSummaryDataNotification;
      managementBean.addSummaryDataListener(new SNMPSummaryDataListener(dataOID,notificationOID));
    }
  }
);
}

Fixed version (ground truth):
@Override public void addJvmManagementBean(final JvmManagementBean managementBean){
  agent.addJvmManagementBean(managementBean);
  managementContext.runManagementTask(new Runnable(){
    @Override public void run(){
      OID dataOID=((OID)MIBConstants.oidJvmSummaryData.clone()).append(managementBean.getGatewayManagementBean().getId());
      OID notificationOID=MIBConstants.oidJvmSummaryDataNotification;
      managementBean.addSummaryDataListener(new SNMPSummaryDataListener(dataOID,notificationOID));
    }
  }
);
}
Program: 96575
Project: 96575
Buggy source:
public int getIndex(){
  return 0;
}

Fixed version (ground truth):
@Override public int getIndex(){
  return 0;
}
Program: 96577
Project: 96577
Buggy source:
public void run(){
  OID dataOID=((OID)MIBConstants.oidJvmSummaryData.clone()).append(managementBean.getGatewayManagementBean().getId());
  OID notificationOID=MIBConstants.oidJvmSummaryDataNotification;
  managementBean.addSummaryDataListener(new SNMPSummaryDataListener(dataOID,notificationOID));
}

Fixed version (ground truth):
@Override public void run(){
  OID dataOID=((OID)MIBConstants.oidJvmSummaryData.clone()).append(managementBean.getGatewayManagementBean().getId());
  OID notificationOID=MIBConstants.oidJvmSummaryDataNotification;
  managementBean.addSummaryDataListener(new SNMPSummaryDataListener(dataOID,notificationOID));
}
Program: 96578
Project: 96578
Buggy source:
public SubRequestIterator repetitions(){
  return null;
}

Fixed version (ground truth):
@Override public SubRequestIterator repetitions(){
  return null;
}
Program: 96579
Project: 96579
Buggy source:
public Object getUndoValue(){
  return null;
}

Fixed version (ground truth):
@Override public Object getUndoValue(){
  return null;
}
Program: 96580
Project: 96580
Buggy source:
public void updateNextRepetition(){
}

Fixed version (ground truth):
@Override public void updateNextRepetition(){
}
Program: 96581
Project: 96581
Buggy source:
public void setUserObject(Object userObject){
}

Fixed version (ground truth):
@Override public void setUserObject(Object userObject){
}
Program: 96582
Project: 96582
Buggy source:
public void setUndoValue(Object undoInformation){
}

Fixed version (ground truth):
@Override public void setUndoValue(Object undoInformation){
}
Program: 96583
Project: 96583
Buggy source:
public void setErrorStatus(int errorStatus){
  status.setErrorStatus(errorStatus);
}

Fixed version (ground truth):
@Override public void setErrorStatus(int errorStatus){
  status.setErrorStatus(errorStatus);
}
Program: 96584
Project: 96584
Buggy source:
public boolean isSupported(int pduType){
  return pduType == KaazingPDU.GETSUBTREE;
}

Fixed version (ground truth):
@Override public boolean isSupported(int pduType){
  return pduType == KaazingPDU.GETSUBTREE;
}
Program: 96586
Project: 96586
Buggy source:
public Object getUserObject(){
  return null;
}

Fixed version (ground truth):
@Override public Object getUserObject(){
  return null;
}
Program: 96587
Project: 96587
Buggy source:
public MOScope getScope(){
  return scope;
}

Fixed version (ground truth):
@Override public MOScope getScope(){
  return scope;
}
Program: 96588
Project: 96588
Buggy source:
public PDU createPDU(Target target){
  return new KaazingPDU();
}

Fixed version (ground truth):
@Override public PDU createPDU(Target target){
  return new KaazingPDU();
}
Program: 96589
Project: 96589
Buggy source:
@Override public void addCpuListManagementBean(final CpuListManagementBean managementBean){
  agent.addCpuListManagementBean(managementBean);
  managementContext.runManagementTask(new Runnable(){
    public void run(){
      OID dataOID=((OID)MIBConstants.oidCpuListSummaryData.clone()).append(managementBean.getGatewayManagementBean().getId());
      OID notificationOID=MIBConstants.oidCpuListSummaryDataNotification;
      managementBean.addSummaryDataListener(new SNMPSummaryDataListener(dataOID,notificationOID));
    }
  }
);
}

Fixed version (ground truth):
@Override public void addCpuListManagementBean(final CpuListManagementBean managementBean){
  agent.addCpuListManagementBean(managementBean);
  managementContext.runManagementTask(new Runnable(){
    @Override public void run(){
      OID dataOID=((OID)MIBConstants.oidCpuListSummaryData.clone()).append(managementBean.getGatewayManagementBean().getId());
      OID notificationOID=MIBConstants.oidCpuListSummaryDataNotification;
      managementBean.addSummaryDataListener(new SNMPSummaryDataListener(dataOID,notificationOID));
    }
  }
);
}
Program: 96591
Project: 96591
Buggy source:
public ManagedObject getTargetMO(){
  return null;
}

Fixed version (ground truth):
@Override public ManagedObject getTargetMO(){
  return null;
}
Program: 96592
Project: 96592
Buggy source:
@Override public void addSystemManagementBean(final HostManagementBean managementBean){
  agent.addSystemManagementBean(managementBean);
  managementContext.runManagementTask(new Runnable(){
    public void run(){
      OID dataOID=((OID)MIBConstants.oidSystemSummaryData.clone()).append(managementBean.getGatewayManagementBean().getId());
      OID notificationOID=MIBConstants.oidSystemSummaryDataNotification;
      managementBean.addSummaryDataListener(new SNMPSummaryDataListener(dataOID,notificationOID));
    }
  }
);
}

Fixed version (ground truth):
@Override public void addSystemManagementBean(final HostManagementBean managementBean){
  agent.addSystemManagementBean(managementBean);
  managementContext.runManagementTask(new Runnable(){
    @Override public void run(){
      OID dataOID=((OID)MIBConstants.oidSystemSummaryData.clone()).append(managementBean.getGatewayManagementBean().getId());
      OID notificationOID=MIBConstants.oidSystemSummaryDataNotification;
      managementBean.addSummaryDataListener(new SNMPSummaryDataListener(dataOID,notificationOID));
    }
  }
);
}
Program: 96593
Project: 96593
Buggy source:
protected void initMessageDispatcherWithMPs(MessageDispatcher mp){
  PDUFactory pduFactory=new PDUFactory(){
    public PDU createPDU(    Target target){
      return new KaazingPDU();
    }
  }
;
  mp.addMessageProcessingModel(new MPv1());
  mp.addMessageProcessingModel(new MPv2c(pduFactory));
  MPv3 mpv3=new MPv3(agent.getContextEngineID().getValue(),pduFactory);
  mp.addMessageProcessingModel(mpv3);
}

Fixed version (ground truth):
protected void initMessageDispatcherWithMPs(MessageDispatcher mp){
  PDUFactory pduFactory=new PDUFactory(){
    @Override public PDU createPDU(    Target target){
      return new KaazingPDU();
    }
  }
;
  mp.addMessageProcessingModel(new MPv1());
  mp.addMessageProcessingModel(new MPv2c(pduFactory));
  MPv3 mpv3=new MPv3(agent.getContextEngineID().getValue(),pduFactory);
  mp.addMessageProcessingModel(mpv3);
}
Program: 96594
Project: 96594
Buggy source:
public AbstractWsBridgeSession(IoServiceEx service,IoProcessorEx<S> sIoProcessor,ResourceAddress localAddress,ResourceAddress remoteAddress,IoSessionEx parent,IoBufferAllocatorEx<B> allocator,Direction direction,DefaultLoginResult loginResult){
  super(service,sIoProcessor,localAddress,remoteAddress,parent,allocator,direction);
  this.loginResult=loginResult;
  this.sessionTimeout=new WsSessionTimeoutCommand(this);
}

Fixed version (ground truth):
public AbstractWsBridgeSession(IoServiceEx service,IoProcessorEx<S> sIoProcessor,ResourceAddress localAddress,ResourceAddress remoteAddress,IoSessionEx parent,IoBufferAllocatorEx<B> allocator,Direction direction,DefaultLoginResult loginResult,List<WebSocketExtension> extensions){
  super(service,sIoProcessor,localAddress,remoteAddress,parent,allocator,direction);
  this.loginResult=loginResult;
  this.sessionTimeout=new WsSessionTimeoutCommand(this);
}
Program: 96596
Project: 96596
Buggy source:
@Override public WsebSession call() throws Exception {
  WsebSession wsebSession=new WsebSession(httpSession.getIoLayer(),httpSession.getIoThread(),httpSession.getIoExecutor(),WsebConnector.this,getProcessor(),connectAddressNext,connectAddressNext,allocator,null,0,connectAddressNext.getOption(INACTIVITY_TIMEOUT),false,sequenceNo);
  wsebSession.suspendWrite();
  return wsebSession;
}

Fixed version (ground truth):
@Override public WsebSession call() throws Exception {
  WsebSession wsebSession=new WsebSession(httpSession.getIoLayer(),httpSession.getIoThread(),httpSession.getIoExecutor(),WsebConnector.this,getProcessor(),connectAddressNext,connectAddressNext,allocator,null,0,connectAddressNext.getOption(INACTIVITY_TIMEOUT),false,sequenceNo,null);
  wsebSession.suspendWrite();
  return wsebSession;
}
Program: 96597
Project: 96597
Buggy source:
public WsebSession(int ioLayer,Thread ioThread,Executor ioExecutor,IoServiceEx service,IoProcessorEx<WsebSession> processor,ResourceAddress localAddress,ResourceAddress remoteAddress,IoBufferAllocatorEx<WsBuffer> allocator,DefaultLoginResult loginResult,int clientIdleTimeout,long inactivityTimeout,boolean validateSequenceNo,long sequenceNo){
  super(ioLayer,ioThread,ioExecutor,service,wsebSessionProcessor,localAddress,remoteAddress,allocator,Direction.BOTH,loginResult);
  this.attachingWrite=new AtomicBoolean(false);
  this.readSession=new AtomicReference<>();
  this.pendingNewWriter=new AtomicReference<>();
  this.timeout=new TimeoutCommand(this);
  this.clientIdleTimeout=clientIdleTimeout;
  this.inactivityTimeout=inactivityTimeout;
  this.validateSequenceNo=validateSequenceNo;
  this.readerSequenceNo=sequenceNo + 1;
  this.writerSequenceNo=sequenceNo + 1;
  this.transportSession=new TransportSession(this,processor);
  transportSession.setHandler(transportHandler);
}

Fixed version (ground truth):
public WsebSession(int ioLayer,Thread ioThread,Executor ioExecutor,IoServiceEx service,IoProcessorEx<WsebSession> processor,ResourceAddress localAddress,ResourceAddress remoteAddress,IoBufferAllocatorEx<WsBuffer> allocator,DefaultLoginResult loginResult,int clientIdleTimeout,long inactivityTimeout,boolean validateSequenceNo,long sequenceNo,List<WebSocketExtension> extensions){
  super(ioLayer,ioThread,ioExecutor,service,wsebSessionProcessor,localAddress,remoteAddress,allocator,Direction.BOTH,loginResult,extensions);
  this.attachingWrite=new AtomicBoolean(false);
  this.readSession=new AtomicReference<>();
  this.pendingNewWriter=new AtomicReference<>();
  this.timeout=new TimeoutCommand(this);
  this.clientIdleTimeout=clientIdleTimeout;
  this.inactivityTimeout=inactivityTimeout;
  this.validateSequenceNo=validateSequenceNo;
  this.readerSequenceNo=sequenceNo + 1;
  this.writerSequenceNo=sequenceNo + 1;
  this.transportSession=new TransportSession(this,processor);
  transportSession.setHandler(transportHandler);
}
Program: 96598
Project: 96598
Buggy source:
@Override public WsnSession call(){
  URI httpRequestURI=httpUri;
  ResultAwareLoginContext loginContext=(ResultAwareLoginContext)session.getAttribute(HttpLoginSecurityFilter.LOGIN_CONTEXT_KEY);
  IoBufferAllocatorEx<?> parentAllocator=session.getBufferAllocator();
  IoBufferAllocatorEx<WsBuffer> allocator=wasHixieHandshake ? new WsDraftHixieBufferAllocator(parentAllocator) : new WsBufferAllocator(parentAllocator,false);
  WsnSession newWsnSession=new WsnSession(WsnAcceptor.this,getProcessor(),localAddress,remoteAddress,session,allocator,httpRequestURI,loginContext == null ? new DefaultLoginResult() : loginContext.getLoginResult(),wsVersion);
  IoHandler handler=getHandler(localAddress);
  newWsnSession.setHandler(handler);
  newWsnSession.setBridgeServiceFactory(bridgeServiceFactory);
  newWsnSession.setResourceAddressFactory(resourceAddressFactory);
  newWsnSession.setScheduler(scheduler);
  return newWsnSession;
}

Fixed version (ground truth):
@Override public WsnSession call(){
  URI httpRequestURI=httpUri;
  ResultAwareLoginContext loginContext=(ResultAwareLoginContext)session.getAttribute(HttpLoginSecurityFilter.LOGIN_CONTEXT_KEY);
  IoBufferAllocatorEx<?> parentAllocator=session.getBufferAllocator();
  IoBufferAllocatorEx<WsBuffer> allocator=wasHixieHandshake ? new WsDraftHixieBufferAllocator(parentAllocator) : new WsBufferAllocator(parentAllocator,false);
  WsnSession newWsnSession=new WsnSession(WsnAcceptor.this,getProcessor(),localAddress,remoteAddress,session,allocator,httpRequestURI,loginContext == null ? new DefaultLoginResult() : loginContext.getLoginResult(),wsVersion,null);
  IoHandler handler=getHandler(localAddress);
  newWsnSession.setHandler(handler);
  newWsnSession.setBridgeServiceFactory(bridgeServiceFactory);
  newWsnSession.setResourceAddressFactory(resourceAddressFactory);
  newWsnSession.setScheduler(scheduler);
  return newWsnSession;
}
Program: 96599
Project: 96599
Buggy source:
@Override public WsnSession call() throws Exception {
  final ResourceAddress localAddress=resourceAddressFactory.newResourceAddress(wsnConnectAddress,BridgeSession.LOCAL_ADDRESS.get(httpSession));
  IoBufferAllocatorEx<?> parentAllocator=parent.getBufferAllocator();
  WsBufferAllocator wsAllocator=new WsBufferAllocator(parentAllocator);
  return new WsnSession(WsnConnector.this,getProcessor(),localAddress,wsnConnectAddress,parent,wsAllocator,httpSession.getRequestURI(),null,WebSocketWireProtocol.RFC_6455);
}

Fixed version (ground truth):
@Override public WsnSession call() throws Exception {
  final ResourceAddress localAddress=resourceAddressFactory.newResourceAddress(wsnConnectAddress,BridgeSession.LOCAL_ADDRESS.get(httpSession));
  IoBufferAllocatorEx<?> parentAllocator=parent.getBufferAllocator();
  WsBufferAllocator wsAllocator=new WsBufferAllocator(parentAllocator);
  return new WsnSession(WsnConnector.this,getProcessor(),localAddress,wsnConnectAddress,parent,wsAllocator,httpSession.getRequestURI(),null,WebSocketWireProtocol.RFC_6455,null);
}
Program: 96603
Project: 96603
Buggy source:
public WsnSession(IoServiceEx service,IoProcessorEx<WsnSession> processor,ResourceAddress localAddress,ResourceAddress remoteAddress,IoSessionEx parent,IoBufferAllocatorEx<WsBuffer> allocator,URI httpRequestURI,DefaultLoginResult loginResult,WebSocketWireProtocol version){
  super(service,processor,localAddress,remoteAddress,parent,allocator,Direction.BOTH,loginResult);
  this.httpRequestURI=httpRequestURI;
  this.version=version;
  this.sendCloseFrame=new AtomicBoolean();
  this.sendCloseFrame.set(WebSocketWireProtocol.RFC_6455 == version || WebSocketWireProtocol.HYBI_13 == version);
}

Fixed version (ground truth):
public WsnSession(IoServiceEx service,IoProcessorEx<WsnSession> processor,ResourceAddress localAddress,ResourceAddress remoteAddress,IoSessionEx parent,IoBufferAllocatorEx<WsBuffer> allocator,URI httpRequestURI,DefaultLoginResult loginResult,WebSocketWireProtocol version,List<WebSocketExtension> extensions){
  super(service,processor,localAddress,remoteAddress,parent,allocator,Direction.BOTH,loginResult,extensions);
  this.httpRequestURI=httpRequestURI;
  this.version=version;
  this.sendCloseFrame=new AtomicBoolean();
  this.sendCloseFrame.set(WebSocketWireProtocol.RFC_6455 == version || WebSocketWireProtocol.HYBI_13 == version);
}
Program: 96604
Project: 96604
Buggy source:
@Override public WsrSession call(){
  IoBufferAllocatorEx<?> parentAllocator=session.getBufferAllocator();
  WsrBufferAllocator wsrAllocator=new WsrBufferAllocator(parentAllocator);
  ResultAwareLoginContext loginContext=(ResultAwareLoginContext)session.getAttribute(HttpLoginSecurityFilter.LOGIN_CONTEXT_KEY);
  WsrSession wsrSession=new WsrSession(session.getIoLayer(),session.getIoThread(),session.getIoExecutor(),WsrAcceptor.this,getProcessor(),localAddress,remoteAddress,wsrAllocator,loginContext.getLoginResult());
  wsrSession.setBridgeServiceFactory(bridgeServiceFactory);
  wsrSession.setResourceAddressFactory(resourceAddressFactory);
  wsrSession.setScheduler(scheduler);
  IoHandler handler=getHandler(localAddress);
  wsrSession.setHandler(handler);
  wsrSession.suspendWrite();
  return wsrSession;
}

Fixed version (ground truth):
@Override public WsrSession call(){
  IoBufferAllocatorEx<?> parentAllocator=session.getBufferAllocator();
  WsrBufferAllocator wsrAllocator=new WsrBufferAllocator(parentAllocator);
  ResultAwareLoginContext loginContext=(ResultAwareLoginContext)session.getAttribute(HttpLoginSecurityFilter.LOGIN_CONTEXT_KEY);
  WsrSession wsrSession=new WsrSession(session.getIoLayer(),session.getIoThread(),session.getIoExecutor(),WsrAcceptor.this,getProcessor(),localAddress,remoteAddress,wsrAllocator,loginContext.getLoginResult(),negotiated);
  wsrSession.setBridgeServiceFactory(bridgeServiceFactory);
  wsrSession.setResourceAddressFactory(resourceAddressFactory);
  wsrSession.setScheduler(scheduler);
  IoHandler handler=getHandler(localAddress);
  wsrSession.setHandler(handler);
  wsrSession.suspendWrite();
  return wsrSession;
}
Program: 96605
Project: 96605
Buggy source:
@Override public void initializeSession(IoSession wsSession,IoFuture future){
  wsSession.setAttribute(HttpAcceptor.SERVICE_REGISTRATION_KEY,session.getAttribute(HttpAcceptor.SERVICE_REGISTRATION_KEY));
  wsSession.setAttribute(HTTP_REQUEST_URI_KEY,session.getRequestURL());
  ((AbstractWsBridgeSession)wsSession).setSubject(session.getSubject());
  wsSession.setAttribute(BridgeSession.NEXT_PROTOCOL_KEY,wsProtocol0);
  wsExtensions0.set(wsSession);
}

Fixed version (ground truth):
@Override public void initializeSession(IoSession wsSession,IoFuture future){
  wsSession.setAttribute(HttpAcceptor.SERVICE_REGISTRATION_KEY,session.getAttribute(HttpAcceptor.SERVICE_REGISTRATION_KEY));
  wsSession.setAttribute(HTTP_REQUEST_URI_KEY,session.getRequestURL());
  ((AbstractWsBridgeSession)wsSession).setSubject(session.getSubject());
  wsSession.setAttribute(BridgeSession.NEXT_PROTOCOL_KEY,wsProtocol0);
}