nus-yam/ex-repair huggingface dataset:
Program: 96487
Project: 96487
Buggy source:
@Test @Specification({"String_Node_Str"}) public void shouldEstablishConnectionWithRandomCaseRequestHeaders() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));
      oneOf(handler).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,handler);
  connectFuture.awaitUninterruptibly();
  assertTrue(connectFuture.isConnected());
  k3po.finish();
}

Fixed version (ground truth):
@Test @Specification({"String_Node_Str"}) public void shouldEstablishConnectionWithRandomCaseRequestHeaders() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));
      atMost(1).of(handler).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,handler);
  connectFuture.awaitUninterruptibly();
  assertTrue(connectFuture.isConnected());
  k3po.finish();
}
Program: 96488
Project: 96488
Buggy source:
@Test @Specification({"String_Node_Str"}) public void shouldEstablishConnectionWithRandomCaseResponseHeaders() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));
      oneOf(handler).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,handler);
  connectFuture.awaitUninterruptibly();
  assertTrue(connectFuture.isConnected());
  k3po.finish();
}

Fixed version (ground truth):
@Test @Specification({"String_Node_Str"}) public void shouldEstablishConnectionWithRandomCaseResponseHeaders() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));
      atMost(1).of(handler).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,handler);
  connectFuture.awaitUninterruptibly();
  assertTrue(connectFuture.isConnected());
  k3po.finish();
}
Program: 96489
Project: 96489
Buggy source:
@Test @Ignore("String_Node_Str") @Specification({"String_Node_Str"}) public void shouldEstablishConnectionWithRequestHeaderSecWebSocketExtensions() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));
      oneOf(handler).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  String[] extensions={"String_Node_Str","String_Node_Str"};
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,extensions,handler);
  connectFuture.awaitUninterruptibly();
  assertTrue(connectFuture.isConnected());
  k3po.finish();
}

Fixed version (ground truth):
@Test @Ignore("String_Node_Str") @Specification({"String_Node_Str"}) public void shouldEstablishConnectionWithRequestHeaderSecWebSocketExtensions() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));
      atMost(1).of(handler).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  String[] extensions={"String_Node_Str","String_Node_Str"};
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,extensions,handler);
  connectFuture.awaitUninterruptibly();
  assertTrue(connectFuture.isConnected());
  k3po.finish();
}
Program: 96490
Project: 96490
Buggy source:
@Test @Specification({"String_Node_Str"}) public void shouldEstablishMultipleConnections() throws Exception {
  final IoHandler handler1=context.mock(IoHandler.class,"String_Node_Str");
  final IoHandler handler2=context.mock(IoHandler.class,"String_Node_Str");
  context.checking(new Expectations(){
{
      oneOf(handler1).sessionCreated(with(any(IoSessionEx.class)));
      oneOf(handler1).sessionOpened(with(any(IoSessionEx.class)));
      oneOf(handler2).sessionCreated(with(any(IoSessionEx.class)));
      oneOf(handler2).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  ConnectFuture connectFuture1=connector.connect("String_Node_Str",null,handler1);
  connectFuture1.awaitUninterruptibly();
  assertTrue(connectFuture1.isConnected());
  ConnectFuture connectFuture2=connector.connect("String_Node_Str",null,handler2);
  connectFuture2.awaitUninterruptibly();
  assertTrue(connectFuture2.isConnected());
  k3po.finish();
}

Fixed version (ground truth):
@Test @Specification({"String_Node_Str"}) public void shouldEstablishMultipleConnections() throws Exception {
  final IoHandler handler1=context.mock(IoHandler.class,"String_Node_Str");
  final IoHandler handler2=context.mock(IoHandler.class,"String_Node_Str");
  context.checking(new Expectations(){
{
      oneOf(handler1).sessionCreated(with(any(IoSessionEx.class)));
      atMost(1).of(handler1).sessionOpened(with(any(IoSessionEx.class)));
      oneOf(handler2).sessionCreated(with(any(IoSessionEx.class)));
      atMost(1).of(handler2).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  ConnectFuture connectFuture1=connector.connect("String_Node_Str",null,handler1);
  connectFuture1.awaitUninterruptibly();
  assertTrue(connectFuture1.isConnected());
  ConnectFuture connectFuture2=connector.connect("String_Node_Str",null,handler2);
  connectFuture2.awaitUninterruptibly();
  assertTrue(connectFuture2.isConnected());
  k3po.finish();
}
Program: 96491
Project: 96491
Buggy source:
@Test @Specification({"String_Node_Str"}) public void shouldEstablishConnection() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));
      oneOf(handler).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,handler);
  connectFuture.awaitUninterruptibly();
  assertTrue(connectFuture.isConnected());
  k3po.finish();
}

Fixed version (ground truth):
@Test @Specification({"String_Node_Str"}) public void shouldEstablishConnection() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));
      oneOf(handler).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,handler);
  connectFuture.awaitUninterruptibly();
  assertTrue(connectFuture.isConnected());
  Thread.sleep(100);
  k3po.finish();
}
Program: 96492
Project: 96492
Buggy source:
@Test @Ignore("String_Node_Str") @Specification({"String_Node_Str"}) public void shouldEstablishConnectionWithRequestHeaderSecWebSocketProtocol() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));
      oneOf(handler).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  String[] protocols={"String_Node_Str","String_Node_Str"};
  ConnectFuture connectFuture=connector.connect("String_Node_Str",protocols,null,handler);
  connectFuture.awaitUninterruptibly();
  assertTrue(connectFuture.isConnected());
  k3po.finish();
}

Fixed version (ground truth):
@Test @Ignore("String_Node_Str") @Specification({"String_Node_Str"}) public void shouldEstablishConnectionWithRequestHeaderSecWebSocketProtocol() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));
      atMost(1).of(handler).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  String[] protocols={"String_Node_Str","String_Node_Str"};
  ConnectFuture connectFuture=connector.connect("String_Node_Str",protocols,null,handler);
  connectFuture.awaitUninterruptibly();
  assertTrue(connectFuture.isConnected());
  k3po.finish();
}
Program: 96493
Project: 96493
Buggy source:
@Test @Ignore("String_Node_Str") @Specification({"String_Node_Str"}) public void shouldEstablishConnectionWithSomeExtensionsNegotiated() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));
      oneOf(handler).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  String[] extensions={"String_Node_Str","String_Node_Str"};
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,extensions,handler);
  connectFuture.awaitUninterruptibly();
  assertTrue(connectFuture.isConnected());
  k3po.finish();
}

Fixed version (ground truth):
@Test @Ignore("String_Node_Str") @Specification({"String_Node_Str"}) public void shouldEstablishConnectionWithSomeExtensionsNegotiated() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));
      atMost(1).of(handler).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  String[] extensions={"String_Node_Str","String_Node_Str"};
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,extensions,handler);
  connectFuture.awaitUninterruptibly();
  assertTrue(connectFuture.isConnected());
  k3po.finish();
}
Program: 96494
Project: 96494
Buggy source:
@Test @Ignore("String_Node_Str") @Specification({"String_Node_Str"}) public void shouldEstablishConnectionWhenOrderOfExtensionsNegotiatedChanged() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));
      oneOf(handler).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  String[] extensions={"String_Node_Str","String_Node_Str"};
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,extensions,handler);
  connectFuture.awaitUninterruptibly();
  assertTrue(connectFuture.isConnected());
  k3po.finish();
}

Fixed version (ground truth):
@Test @Ignore("String_Node_Str") @Specification({"String_Node_Str"}) public void shouldEstablishConnectionWhenOrderOfExtensionsNegotiatedChanged() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));
      atMost(1).of(handler).sessionOpened(with(any(IoSessionEx.class)));
    }
  }
);
  String[] extensions={"String_Node_Str","String_Node_Str"};
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,extensions,handler);
  connectFuture.awaitUninterruptibly();
  assertTrue(connectFuture.isConnected());
  k3po.finish();
}
Program: 96495
Project: 96495
Buggy source:
@Override public boolean commit() throws LoginException {
  if (super.commit()) {
    subject.getPrincipals().add(unixPrincipal);
    return true;
  }
 else   return false;
}

Fixed version (ground truth):
@Override public boolean commit() throws LoginException {
  if (super.commit()) {
    subject.getPrincipals().add(unixPrincipal);
    return true;
  }
  return false;
}
Program: 96497
Project: 96497
Buggy source:
protected boolean unbindAdditionalAddressesIfNecessary(ResourceAddress address,HttpBinding newHttpBinding){
  ResourceAddress resourcesAddress=getResourcesAddress(newHttpBinding);
  if (newHttpBinding.size() == 1 && newHttpBinding.get(resourcesAddress.getResource().getPath()) != null) {
    HttpAcceptor.this.unbind(resourcesAddress);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override protected boolean unbindAdditionalAddressesIfNecessary(ResourceAddress address,HttpBinding newHttpBinding){
  ResourceAddress resourcesAddress=getResourcesAddress(newHttpBinding);
  if (newHttpBinding.size() == 1 && newHttpBinding.get(resourcesAddress.getResource().getPath()) != null) {
    HttpAcceptor.this.unbind(resourcesAddress);
    return true;
  }
  return false;
}
Program: 96498
Project: 96498
Buggy source:
static HttpRequestMessage asElevatedRequest(IoSession ioSession) throws Exception {
  DefaultHttpSession session=(DefaultHttpSession)ioSession;
  HttpRequestMessage req=new HttpRequestMessage();
  req.setVersion(session.getVersion());
  req.setMethod(session.getMethod());
  req.setParameters(session.getParameters());
  req.setRequestURI(session.getRequestURI());
  req.setSecure(session.isSecure());
  req.setCookies(session.getReadCookies());
  String contentLengthStr=session.getReadHeader("String_Node_Str");
  if (contentLengthStr != null && !"String_Node_Str".equals(contentLengthStr)) {
    IoBufferAllocatorEx<? extends HttpBuffer> allocator=session.getBufferAllocator();
    HttpContentMessage httpContent=new HttpContentMessage(allocator.wrap(allocator.allocate(0)),false);
    req.setContent(httpContent);
  }
  Map<String,List<String>> requestHeaders=new HashMap<>(session.getReadHeaders());
  req.setHeaders(requestHeaders);
  HttpUtils.restrictHeaders(req,HTTPXE_ENVELOPE_HEADERS);
  DefaultHttpSession httpSession=session;
  Map<String,List<String>> sessionHeaders=new HashMap<>(httpSession.getReadHeaders());
  sessionHeaders.put(HEADER_CONTENT_TYPE,asList(CONTENT_TYPE_APPLICATION_X_MESSAGE_HTTP));
  httpSession.setReadHeaders(sessionHeaders);
  return req;
}

Fixed version (ground truth):
static HttpRequestMessage asElevatedRequest(IoSession ioSession) throws Exception {
  DefaultHttpSession session=(DefaultHttpSession)ioSession;
  HttpRequestMessage req=new HttpRequestMessage();
  req.setVersion(session.getVersion());
  req.setMethod(session.getMethod());
  req.setParameters(session.getParameters());
  req.setRequestURI(session.getRequestURI());
  req.setSecure(session.isSecure());
  req.setCookies(session.getReadCookies());
  String contentLengthStr=session.getReadHeader("String_Node_Str");
  if (contentLengthStr != null && !"String_Node_Str".equals(contentLengthStr)) {
    IoBufferAllocatorEx<? extends HttpBuffer> allocator=session.getBufferAllocator();
    HttpContentMessage httpContent=new HttpContentMessage(allocator.wrap(allocator.allocate(0)),false);
    req.setContent(httpContent);
  }
  Map<String,List<String>> requestHeaders=new HashMap<>(session.getReadHeaders());
  req.setHeaders(requestHeaders);
  HttpUtils.restrictHeaders(req,HTTPXE_ENVELOPE_HEADERS);
  req.setSubject(session.getSubject());
  req.setLoginContext(session.getLoginContext());
  DefaultHttpSession httpSession=session;
  Map<String,List<String>> sessionHeaders=new HashMap<>(httpSession.getReadHeaders());
  sessionHeaders.put(HEADER_CONTENT_TYPE,asList(CONTENT_TYPE_APPLICATION_X_MESSAGE_HTTP));
  httpSession.setReadHeaders(sessionHeaders);
  return req;
}
Program: 96499
Project: 96499
Buggy source:
private static ResourceAddress httpAddress(){
  ResourceAddressFactory addressFactory=ResourceAddressFactory.newResourceAddressFactory();
  String address="String_Node_Str";
  return addressFactory.newResourceAddress(URI.create(address));
}

Fixed version (ground truth):
private static ResourceAddress httpAddress(){
  ResourceAddressFactory addressFactory=ResourceAddressFactory.newResourceAddressFactory();
  String address="String_Node_Str";
  return addressFactory.newResourceAddress(address);
}
Program: 96500
Project: 96500
Buggy source:
private void validateMessageSize(long messageSize) throws ProtocolDecoderException {
  if (maxMessageSize > 0 && (messageSize < 0 || messageSize > maxMessageSize)) {
    throw new ProtocolDecoderException(String.format("String_Node_Str",messageSize,maxMessageSize));
  }
}

Fixed version (ground truth):
private void validateMessageSize(long messageSize) throws WSMessageTooLongException {
  if (maxMessageSize > 0 && (messageSize < 0 || messageSize > maxMessageSize)) {
    throw new WSMessageTooLongException(String.format("String_Node_Str",messageSize,maxMessageSize));
  }
}
Program: 96503
Project: 96503
Buggy source:
void managementServicesChanged(String changeType,String instanceKey,Collection<URI> managementServiceAccepts);

Fixed version (ground truth):
void managementServicesChanged(String changeType,String instanceKey,Collection<String> managementServiceAccepts);
Program: 96504
Project: 96504
Buggy source:
void balancerMapChanged(String changeType,URI balancerURI,Collection<URI> balanceeURIs);

Fixed version (ground truth):
void balancerMapChanged(String changeType,String balancerURI,Collection<String> balanceeURIs);
Program: 96505
Project: 96505
Buggy source:
/** 
 * Create a descriptive string for the type of connection that this session has been created on. This is generally just used in the Command Center. The following is the same as the insides of ResourceAddress.getProtocol(), which is private. NOTE: we're using BridgeSession.LOCAL_ADDRESS.get(session) to retrieve the address to send to management.
 */
public static String getSessionTypeName(ResourceAddress address){
  URI externalURI=address.getExternalURI();
  return externalURI.getScheme();
}

Fixed version (ground truth):
/** 
 * Create a descriptive string for the type of connection that this session has been created on. This is generally just used in the Command Center. The following is the same as the insides of ResourceAddress.getProtocol(), which is private. NOTE: we're using BridgeSession.LOCAL_ADDRESS.get(session) to retrieve the address to send to management.
 */
public static String getSessionTypeName(ResourceAddress address){
  String externalURI=address.getExternalURI();
  return URIUtils.getScheme(externalURI);
}
Program: 96506
Project: 96506
Buggy source:
@Override public String getCrossSiteConstraints(){
  Map<URI,? extends Map<String,? extends CrossSiteConstraintContext>> crossSiteConstraints=serviceContext.getCrossSiteConstraints();
  JSONArray jsonConstraints=new JSONArray();
  if ((crossSiteConstraints != null) && !crossSiteConstraints.isEmpty()) {
    Collection<? extends Map<String,? extends CrossSiteConstraintContext>> crossSiteConstraintsValues=crossSiteConstraints.values();
    if ((crossSiteConstraintsValues != null) && !crossSiteConstraintsValues.isEmpty()) {
      Map<String,? extends CrossSiteConstraintContext> constraintMap=crossSiteConstraintsValues.iterator().next();
      Collection<? extends CrossSiteConstraintContext> constraints=constraintMap.values();
      for (      CrossSiteConstraintContext constraint : constraints) {
        JSONObject jsonObj=new JSONObject();
        String allowHeaders=constraint.getAllowHeaders();
        String allowMethods=constraint.getAllowMethods();
        String allowOrigin=constraint.getAllowOrigin();
        Integer maxAge=constraint.getMaximumAge();
        try {
          jsonObj.put("String_Node_Str",allowOrigin);
          jsonObj.put("String_Node_Str",allowMethods);
          if (allowHeaders != null) {
            jsonObj.put("String_Node_Str",allowHeaders);
          }
          if (maxAge != null) {
            jsonObj.put("String_Node_Str",maxAge);
          }
          jsonConstraints.put(jsonObj);
        }
 catch (        Exception ex) {
        }
      }
    }
  }
  return jsonConstraints.toString();
}

Fixed version (ground truth):
@Override public String getCrossSiteConstraints(){
  Map<String,? extends Map<String,? extends CrossSiteConstraintContext>> crossSiteConstraints=serviceContext.getCrossSiteConstraints();
  JSONArray jsonConstraints=new JSONArray();
  if ((crossSiteConstraints != null) && !crossSiteConstraints.isEmpty()) {
    Collection<? extends Map<String,? extends CrossSiteConstraintContext>> crossSiteConstraintsValues=crossSiteConstraints.values();
    if ((crossSiteConstraintsValues != null) && !crossSiteConstraintsValues.isEmpty()) {
      Map<String,? extends CrossSiteConstraintContext> constraintMap=crossSiteConstraintsValues.iterator().next();
      Collection<? extends CrossSiteConstraintContext> constraints=constraintMap.values();
      for (      CrossSiteConstraintContext constraint : constraints) {
        JSONObject jsonObj=new JSONObject();
        String allowHeaders=constraint.getAllowHeaders();
        String allowMethods=constraint.getAllowMethods();
        String allowOrigin=constraint.getAllowOrigin();
        Integer maxAge=constraint.getMaximumAge();
        try {
          jsonObj.put("String_Node_Str",allowOrigin);
          jsonObj.put("String_Node_Str",allowMethods);
          if (allowHeaders != null) {
            jsonObj.put("String_Node_Str",allowHeaders);
          }
          if (maxAge != null) {
            jsonObj.put("String_Node_Str",maxAge);
          }
          jsonConstraints.put(jsonObj);
        }
 catch (        Exception ex) {
        }
      }
    }
  }
  return jsonConstraints.toString();
}
Program: 96507
Project: 96507
Buggy source:
@Override public String getAccepts(){
  if (serviceContext.supportsAccepts()) {
    Collection<URI> accepts=serviceContext.getAccepts();
    return accepts == null ? "String_Node_Str" : new JSONArray(accepts).toString();
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override public String getAccepts(){
  if (serviceContext.supportsAccepts()) {
    Collection<String> accepts=serviceContext.getAccepts();
    return accepts == null ? "String_Node_Str" : new JSONArray(accepts).toString();
  }
 else {
    return null;
  }
}
Program: 96508
Project: 96508
Buggy source:
@Override public String getConnects(){
  if (serviceContext.supportsConnects()) {
    Collection<URI> connects=serviceContext.getConnects();
    return connects == null ? "String_Node_Str" : new JSONArray(connects).toString();
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override public String getConnects(){
  if (serviceContext.supportsConnects()) {
    Collection<String> connects=serviceContext.getConnects();
    return connects == null ? "String_Node_Str" : new JSONArray(connects).toString();
  }
 else {
    return null;
  }
}
Program: 96509
Project: 96509
Buggy source:
@Override public String getBalances(){
  Collection<URI> balances=serviceContext.getBalances();
  return balances == null ? "String_Node_Str" : new JSONArray(balances).toString();
}

Fixed version (ground truth):
@Override public String getBalances(){
  Collection<String> balances=serviceContext.getBalances();
  return balances == null ? "String_Node_Str" : new JSONArray(balances).toString();
}
Program: 96514
Project: 96514
Buggy source:
@Override public void entryAdded(EntryEvent<MemberId,Collection<URI>> event){
  MemberId memberId=event.getKey();
  String instanceKey=clusterContext.getInstanceKey(memberId);
  for (  ClusterManagementListener listener : clusterManagementListeners) {
    listener.managementServicesChanged("String_Node_Str",instanceKey,event.getValue());
  }
}

Fixed version (ground truth):
@Override public void entryAdded(EntryEvent<MemberId,Collection<String>> event){
  MemberId memberId=event.getKey();
  String instanceKey=clusterContext.getInstanceKey(memberId);
  for (  ClusterManagementListener listener : clusterManagementListeners) {
    listener.managementServicesChanged("String_Node_Str",instanceKey,event.getValue());
  }
}
Program: 96515
Project: 96515
Buggy source:
@Override public void memberRemoved(MemberId removedMember){
  CollectionsFactory factory=clusterContext.getCollectionsFactory();
  Map<MemberId,Collection<URI>> managementServiceUriMap=factory.getMap(ManagementService.MANAGEMENT_SERVICE_MAP_NAME);
  managementServiceUriMap.remove(removedMember);
}

Fixed version (ground truth):
@Override public void memberRemoved(MemberId removedMember){
  CollectionsFactory factory=clusterContext.getCollectionsFactory();
  Map<MemberId,Collection<String>> managementServiceUriMap=factory.getMap(ManagementService.MANAGEMENT_SERVICE_MAP_NAME);
  managementServiceUriMap.remove(removedMember);
}
Program: 96516
Project: 96516
Buggy source:
@Override public String getClusterMembers(){
  if (clusterContext == null) {
    return "String_Node_Str";
  }
  CollectionsFactory factory=clusterContext.getCollectionsFactory();
  Collection<MemberId> memberIds=clusterContext.getMemberIds();
  Map<MemberId,Map<URI,List<URI>>> memberIdBalancerMap=factory.getMap(HttpBalancerService.MEMBERID_BALANCER_MAP_NAME);
  JSONObject jsonObj=new JSONObject();
  try {
    for (    MemberId memberId : memberIds) {
      String instanceKey=clusterContext.getInstanceKey(memberId);
      Map<URI,List<URI>> balancerURIMap=memberIdBalancerMap.get(memberId);
      if (balancerURIMap != null) {
        JSONObject uriMap=new JSONObject();
        for (        URI balancerURI : balancerURIMap.keySet()) {
          List<URI> balanceeURIs=balancerURIMap.get(balancerURI);
          JSONArray jsonArray=new JSONArray();
          for (          URI balanceeURI : balanceeURIs) {
            jsonArray.put(balanceeURI.toString());
          }
          uriMap.put(balancerURI.toString(),jsonArray);
        }
        jsonObj.put(instanceKey,uriMap);
      }
 else {
        jsonObj.put(instanceKey,JSONObject.NULL);
      }
    }
  }
 catch (  JSONException ex) {
    throw new RuntimeException("String_Node_Str");
  }
  return jsonObj.toString();
}

Fixed version (ground truth):
@Override public String getClusterMembers(){
  if (clusterContext == null) {
    return "String_Node_Str";
  }
  CollectionsFactory factory=clusterContext.getCollectionsFactory();
  Collection<MemberId> memberIds=clusterContext.getMemberIds();
  Map<MemberId,Map<String,List<String>>> memberIdBalancerMap=factory.getMap(HttpBalancerService.MEMBERID_BALANCER_MAP_NAME);
  JSONObject jsonObj=new JSONObject();
  try {
    for (    MemberId memberId : memberIds) {
      String instanceKey=clusterContext.getInstanceKey(memberId);
      Map<String,List<String>> balancerURIMap=memberIdBalancerMap.get(memberId);
      if (balancerURIMap != null) {
        JSONObject uriMap=new JSONObject();
        for (        String balancerURI : balancerURIMap.keySet()) {
          List<String> balanceeURIs=balancerURIMap.get(balancerURI);
          JSONArray jsonArray=new JSONArray();
          for (          String balanceeURI : balanceeURIs) {
            jsonArray.put(balanceeURI);
          }
          uriMap.put(balancerURI,jsonArray);
        }
        jsonObj.put(instanceKey,uriMap);
      }
 else {
        jsonObj.put(instanceKey,JSONObject.NULL);
      }
    }
  }
 catch (  JSONException ex) {
    throw new RuntimeException("String_Node_Str");
  }
  return jsonObj.toString();
}
Program: 96517
Project: 96517
Buggy source:
@Override public String getClusterBalancerMap(){
  if (clusterContext == null) {
    return "String_Node_Str";
  }
  CollectionsFactory factory=clusterContext.getCollectionsFactory();
  Map<URI,Collection<URI>> balancers=factory.getMap(HttpBalancerService.BALANCER_MAP_NAME);
  if ((balancers == null) || balancers.isEmpty()) {
    return "String_Node_Str";
  }
  JSONObject jsonObj=new JSONObject();
  try {
    for (    URI uri : balancers.keySet()) {
      Collection<URI> balancees=balancers.get(uri);
      if (balancees != null && balancees.size() > 0) {
        JSONArray jsonArray=new JSONArray();
        for (        URI balanceeURI : balancees) {
          jsonArray.put(balanceeURI.toString());
        }
        jsonObj.put(uri.toString(),jsonArray);
      }
 else {
        jsonObj.put(uri.toString(),JSONObject.NULL);
      }
    }
  }
 catch (  JSONException ex) {
    throw new RuntimeException("String_Node_Str");
  }
  return jsonObj.toString();
}

Fixed version (ground truth):
@Override public String getClusterBalancerMap(){
  if (clusterContext == null) {
    return "String_Node_Str";
  }
  CollectionsFactory factory=clusterContext.getCollectionsFactory();
  Map<String,Collection<String>> balancers=factory.getMap(HttpBalancerService.BALANCER_MAP_NAME);
  if ((balancers == null) || balancers.isEmpty()) {
    return "String_Node_Str";
  }
  JSONObject jsonObj=new JSONObject();
  try {
    for (    String uri : balancers.keySet()) {
      Collection<String> balancees=balancers.get(uri);
      if (balancees != null && balancees.size() > 0) {
        JSONArray jsonArray=new JSONArray();
        for (        String balanceeURI : balancees) {
          jsonArray.put(balanceeURI);
        }
        jsonObj.put(uri,jsonArray);
      }
 else {
        jsonObj.put(uri,JSONObject.NULL);
      }
    }
  }
 catch (  JSONException ex) {
    throw new RuntimeException("String_Node_Str");
  }
  return jsonObj.toString();
}
Program: 96518
Project: 96518
Buggy source:
public void entryRemoved(EntryEvent<MemberId,Collection<URI>> event){
}

Fixed version (ground truth):
public void entryRemoved(EntryEvent<MemberId,Collection<String>> event){
}
Program: 96519
Project: 96519
Buggy source:
public void entryUpdated(EntryEvent<MemberId,Collection<URI>> event){
}

Fixed version (ground truth):
public void entryUpdated(EntryEvent<MemberId,Collection<String>> event){
}
Program: 96520
Project: 96520
Buggy source:
@Override public void balancerEntryAdded(URI balancerURI,Collection<URI> balanceeURIs){
  for (  ClusterManagementListener listener : clusterManagementListeners) {
    listener.balancerMapChanged("String_Node_Str",balancerURI,balanceeURIs);
  }
}

Fixed version (ground truth):
@Override public void balancerEntryAdded(String balancerURI,Collection<String> balanceeURIs){
  for (  ClusterManagementListener listener : clusterManagementListeners) {
    listener.balancerMapChanged("String_Node_Str",balancerURI,balanceeURIs);
  }
}
Program: 96521
Project: 96521
Buggy source:
@Override public String getManagementServiceMap(){
  if (clusterContext == null) {
    return "String_Node_Str";
  }
  CollectionsFactory factory=clusterContext.getCollectionsFactory();
  Map<MemberId,Collection<URI>> managementServices=factory.getMap(ManagementService.MANAGEMENT_SERVICE_MAP_NAME);
  if ((managementServices == null) || managementServices.isEmpty()) {
    return "String_Node_Str";
  }
  JSONObject jsonObj=new JSONObject();
  try {
    for (    MemberId member : managementServices.keySet()) {
      String instanceKey=clusterContext.getInstanceKey(member);
      JSONArray jsonArray=new JSONArray();
      Collection<URI> acceptURIs=managementServices.get(member);
      if (acceptURIs != null) {
        for (        URI acceptURI : acceptURIs) {
          jsonArray.put(acceptURI.toString());
        }
      }
      jsonObj.put(instanceKey,jsonArray);
    }
  }
 catch (  JSONException ex) {
    throw new RuntimeException("String_Node_Str");
  }
  return jsonObj.toString();
}

Fixed version (ground truth):
@Override public String getManagementServiceMap(){
  if (clusterContext == null) {
    return "String_Node_Str";
  }
  CollectionsFactory factory=clusterContext.getCollectionsFactory();
  Map<MemberId,Collection<String>> managementServices=factory.getMap(ManagementService.MANAGEMENT_SERVICE_MAP_NAME);
  if ((managementServices == null) || managementServices.isEmpty()) {
    return "String_Node_Str";
  }
  JSONObject jsonObj=new JSONObject();
  try {
    for (    MemberId member : managementServices.keySet()) {
      String instanceKey=clusterContext.getInstanceKey(member);
      JSONArray jsonArray=new JSONArray();
      Collection<String> acceptURIs=managementServices.get(member);
      if (acceptURIs != null) {
        for (        String acceptURI : acceptURIs) {
          jsonArray.put(acceptURI);
        }
      }
      jsonObj.put(instanceKey,jsonArray);
    }
  }
 catch (  JSONException ex) {
    throw new RuntimeException("String_Node_Str");
  }
  return jsonObj.toString();
}
Program: 96522
Project: 96522
Buggy source:
@Override public void balancerEntryRemoved(URI balancerURI,Collection<URI> balanceeURIs){
  for (  ClusterManagementListener listener : clusterManagementListeners) {
    listener.balancerMapChanged("String_Node_Str",balancerURI,balanceeURIs);
  }
}

Fixed version (ground truth):
@Override public void balancerEntryRemoved(String balancerURI,Collection<String> balanceeURIs){
  for (  ClusterManagementListener listener : clusterManagementListeners) {
    listener.balancerMapChanged("String_Node_Str",balancerURI,balanceeURIs);
  }
}
Program: 96523
Project: 96523
Buggy source:
public void entryEvicted(EntryEvent<MemberId,Collection<URI>> event){
}

Fixed version (ground truth):
public void entryEvicted(EntryEvent<MemberId,Collection<String>> event){
}
Program: 96524
Project: 96524
Buggy source:
@Override public void balancerEntryUpdated(URI balancerURI,Collection<URI> balanceeURIs){
  for (  ClusterManagementListener listener : clusterManagementListeners) {
    listener.balancerMapChanged("String_Node_Str",balancerURI,balanceeURIs);
  }
}

Fixed version (ground truth):
@Override public void balancerEntryUpdated(String balancerURI,Collection<String> balanceeURIs){
  for (  ClusterManagementListener listener : clusterManagementListeners) {
    listener.balancerMapChanged("String_Node_Str",balancerURI,balanceeURIs);
  }
}
Program: 96525
Project: 96525
Buggy source:
@Test(expected=IllegalArgumentException.class) public void shouldNotUsePathInPipeURL() throws Exception {
  addressFactorySpi.newResourceAddress("String_Node_Str");
}

Fixed version (ground truth):
@Test public void shouldNotUsePathInPipeURL() throws Exception {
  expectedException.expect(IllegalArgumentException.class);
  expectedException.expectMessage("String_Node_Str" + "String_Node_Str");
  addressFactorySpi.newResourceAddress("String_Node_Str");
}
Program: 96526
Project: 96526
Buggy source:
@Test(expected=IllegalArgumentException.class) public void shouldNotUsePathInPipeURL() throws Exception {
  addressFactorySpi.newResourceAddress(URI.create("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void shouldNotUsePathInPipeURL() throws Exception {
  expectedException.expect(IllegalArgumentException.class);
  expectedException.expectMessage("String_Node_Str" + "String_Node_Str");
  addressFactorySpi.newResourceAddress(URI.create("String_Node_Str"));
}
Program: 96527
Project: 96527
Buggy source:
@Override public void channelClosed(ChannelHandlerContext ctx,ChannelStateEvent e) throws Exception {
  idleTracker.removeSession(session);
  if (session.isIoRegistered()) {
    session.getProcessor().remove(session);
  }
 else {
    session.setClosedReceived();
  }
}

Fixed version (ground truth):
@Override public void channelClosed(ChannelHandlerContext ctx,ChannelStateEvent e) throws Exception {
  idleTracker.removeSession(session);
  if (session.isIoRegistered()) {
    if (currentThread() == session.getIoThread()) {
      session.getProcessor().remove(session);
    }
 else {
      session.getIoExecutor().execute(new Runnable(){
        @Override public void run(){
          session.getProcessor().remove(session);
        }
      }
);
    }
  }
 else {
    session.setClosedReceived();
  }
}
Program: 96528
Project: 96528
Buggy source:
@Override public void channelClosed(ChannelHandlerContext ctx,ChannelStateEvent e) throws Exception {
  session.getProcessor().remove(session);
  idleTracker.removeSession(session);
}

Fixed version (ground truth):
@Override public void channelClosed(ChannelHandlerContext ctx,ChannelStateEvent e) throws Exception {
  idleTracker.removeSession(session);
  if (session.isIoRegistered()) {
    session.getProcessor().remove(session);
  }
 else {
    session.setClosedReceived();
  }
}
Program: 96529
Project: 96529
Buggy source:
@Override protected void setIoAlignment0(Thread ioThread,Executor ioExecutor){
  NioSocketChannel channel=(NioSocketChannel)getChannel();
  if (ioExecutor == NO_EXECUTOR) {
    channel.setWorker(null);
  }
 else {
    NioWorker newWorker=((WorkerExecutor)ioExecutor).worker;
    channel.setWorker(newWorker);
  }
}

Fixed version (ground truth):
@Override protected void setIoAlignment0(Thread ioThread,Executor ioExecutor){
  NioSocketChannel channel=(NioSocketChannel)getChannel();
  if (ioExecutor == NO_EXECUTOR) {
    channel.setWorker(null);
  }
 else   if (isClosedReceived()) {
    getProcessor().remove(this);
  }
 else {
    NioWorker newWorker=((WorkerExecutor)ioExecutor).worker;
    channel.setWorker(newWorker);
  }
}
Program: 96530
Project: 96530
Buggy source:
@Test @Specification("String_Node_Str") @Ignore("String_Node_Str") public void clientAbruptlyClosesUpstream() throws Exception {
  final AtomicLong timeToClose=new AtomicLong(0);
  CountDownLatch closed=new CountDownLatch(1);
  acceptor.bind("String_Node_Str",new IoHandlerAdapter<IoSession>(){
    @Override protected void doSessionOpened(    IoSession session) throws Exception {
      final long start=currentTimeMillis();
      session.getCloseFuture().addListener(new IoFutureListener<IoFuture>(){
        @Override public void operationComplete(        IoFuture future){
          timeToClose.set(currentTimeMillis() - start);
          closed.countDown();
        }
      }
);
    }
  }
);
  k3po.finish();
  assertTrue("String_Node_Str",closed.await(4,SECONDS));
  assertTrue(format("String_Node_Str",timeToClose.get()),timeToClose.get() < 4000);
}

Fixed version (ground truth):
@Test @Specification("String_Node_Str") public void clientAbruptlyClosesUpstream() throws Exception {
  final AtomicLong timeToClose=new AtomicLong(0);
  CountDownLatch closed=new CountDownLatch(1);
  acceptor.bind("String_Node_Str",new IoHandlerAdapter<IoSession>(){
    @Override protected void doSessionOpened(    IoSession session) throws Exception {
      final long start=currentTimeMillis();
      session.getCloseFuture().addListener(new IoFutureListener<IoFuture>(){
        @Override public void operationComplete(        IoFuture future){
          timeToClose.set(currentTimeMillis() - start);
          closed.countDown();
        }
      }
);
    }
  }
);
  k3po.finish();
  assertTrue("String_Node_Str",closed.await(4,SECONDS));
  assertTrue(format("String_Node_Str",timeToClose.get()),timeToClose.get() < 4000);
}
Program: 96531
Project: 96531
Buggy source:
@Override protected void doMessageReceived(IoSessionEx session,Object message) throws Exception {
  IoFilterChain chain=((BridgeSession)session).getParent().getFilterChain();
  if (chain.contains(HttpAcceptFilter.SUBJECT_SECURITY.filterName())) {
    failures.incrementAndGet();
  }
  checkpoint();
  session.close(false).addListener(new IoFutureListener<CloseFuture>(){
    @Override public void operationComplete(    CloseFuture future){
      checkpoint();
    }
  }
);
}

Fixed version (ground truth):
@Override protected void doMessageReceived(final IoSessionEx session,Object message) throws Exception {
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str");
  }
  DefaultHttpSession httpSession=(DefaultHttpSession)session;
  IoBufferAllocatorEx<?> allocator=httpSession.getBufferAllocator();
  httpSession.setStatus(HttpStatus.SUCCESS_OK);
  httpSession.setVersion(HttpVersion.HTTP_1_1);
  httpSession.setWriteHeader("String_Node_Str","String_Node_Str");
  httpSession.write(allocator.wrap(ByteBuffer.wrap("String_Node_Str".getBytes()))).addListener(new IoFutureListener<IoFuture>(){
    @Override public void operationComplete(    IoFuture future){
      BridgeSession bridgeSession=(BridgeSession)session;
      URI uriConnectURI=URI.create(connectURI);
      assertEquals("String_Node_Str" + connectURI,uriConnectURI,BridgeSession.REMOTE_ADDRESS.get(bridgeSession).getResource());
      assertEquals("String_Node_Str" + connectURI,uriConnectURI,BridgeSession.LOCAL_ADDRESS.get(bridgeSession).getResource());
      assertEquals("String_Node_Str",BridgeSession.REMOTE_ADDRESS.get(bridgeSession).getTransport().getResource().getPort(),BridgeSession.REMOTE_ADDRESS.get(bridgeSession.getParent()).getResource().getPort());
      checkpoint();
    }
  }
);
}
Program: 96533
Project: 96533
Buggy source:
@Override protected void doSessionCreated(IoSessionEx session) throws Exception {
}

Fixed version (ground truth):
@Override protected void doSessionCreated(IoSessionEx session) throws Exception {
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str");
  }
}
Program: 96534
Project: 96534
Buggy source:
@Override protected void consume(DefaultHttpSession session){
  if (session.isReadSuspended()) {
    return;
  }
  IoBufferEx buffer=session.getCurrentReadRequest();
  if (buffer != null && buffer.hasRemaining()) {
    session.setCurrentReadRequest(null);
    IoFilterChain filterChain=session.getFilterChain();
    filterChain.fireMessageReceived(buffer);
  }
}

Fixed version (ground truth):
@Override protected void consume(DefaultHttpSession session){
  if (session.isReadSuspended()) {
    return;
  }
  Queue<IoBufferEx> deferredReads=session.getDeferredReads();
  IoBufferEx buffer;
  while ((buffer=deferredReads.poll()) != null) {
    if (buffer.hasRemaining()) {
      IoFilterChain filterChain=session.getFilterChain();
      filterChain.fireMessageReceived(buffer);
    }
  }
}
Program: 96535
Project: 96535
Buggy source:
private void fireContentReceived(DefaultHttpSession session,HttpContentMessage content) throws Exception {
  IoBufferEx buffer=content.asBuffer();
  if (buffer != null && buffer.hasRemaining()) {
    if (!session.isIoRegistered() || session.isReadSuspended()) {
      IoBufferEx currentBuffer=session.getCurrentReadRequest();
      if (currentBuffer != null) {
        throw new Exception("String_Node_Str");
      }
      session.setCurrentReadRequest(buffer);
    }
 else {
      IoFilterChain filterChain=session.getFilterChain();
      filterChain.fireMessageReceived(buffer);
    }
  }
}

Fixed version (ground truth):
private void fireContentReceived(DefaultHttpSession session,HttpContentMessage content) throws Exception {
  IoBufferEx buffer=content.asBuffer();
  if (buffer != null && buffer.hasRemaining()) {
    if (!session.isIoRegistered() || session.isReadSuspended()) {
      session.addDeferredRead(buffer);
    }
 else {
      IoFilterChain filterChain=session.getFilterChain();
      filterChain.fireMessageReceived(buffer);
    }
  }
}
Program: 96536
Project: 96536
Buggy source:
public final T newResourceAddress(URI location,ResourceOptions options,Object qualifier){
  URI external=location;
  if (location.getPort() == -1) {
    location=modifyURIPort(location,getSchemePort());
  }
  String transportName=getTransportName();
  if (!transportName.equals(getSchemeName())) {
    location=modifyURIScheme(location,transportName);
  }
  List<T> addresses=newResourceAddresses0(external,location,options);
  T alternate=null;
  for (int i=addresses.size() - 1; i >= 0; i--) {
    T address=addresses.get(i);
    if (alternate != null) {
      ResourceOptions newOptions=ResourceOptions.FACTORY.newResourceOptions(options);
      newOptions.setOption(ALTERNATE,alternate);
      setOptions(address,location,newOptions,qualifier);
    }
 else {
      setOptions(address,location,options,qualifier);
    }
    URI resource=address.getResource();
    if (!transportName.equals(resource.getScheme())) {
      throw new IllegalArgumentException(format("String_Node_Str",transportName,resource));
    }
    alternate=address;
  }
  return addresses.get(0);
}

Fixed version (ground truth):
public final T newResourceAddress(URI location,ResourceOptions options,Object qualifier){
  URI external=location;
  if (location.getPort() == -1) {
    location=modifyURIPort(location,getSchemePort());
  }
  String transportName=getTransportName();
  if (!transportName.equals(getSchemeName())) {
    location=modifyURIScheme(location,transportName);
  }
  List<T> addresses=newResourceAddresses0(external,location,options);
  T alternate=null;
  for (int i=addresses.size() - 1; i >= 0; i--) {
    T address=addresses.get(i);
    if (alternate != null) {
      ResourceOptions newOptions=ResourceOptions.FACTORY.newResourceOptions(options);
      newOptions.setOption(ALTERNATE,alternate);
      setOptions(address,location,newOptions,qualifier);
    }
 else {
      setOptions(address,location,options,qualifier);
    }
    URI resource=address.getResource();
    if (!transportName.equals(resource.getScheme())) {
      throw new IllegalArgumentException(format("String_Node_Str",transportName,resource));
    }
    alternate=address;
  }
  if (addresses.size() == 0) {
    throw new IllegalArgumentException(format("String_Node_Str",location));
  }
  return addresses.get(0);
}
Program: 96537
Project: 96537
Buggy source:
@Override protected void consume(DefaultHttpSession session){
  IoBufferEx buffer=session.getCurrentReadRequest();
  if (buffer != null && buffer.hasRemaining()) {
    session.setCurrentReadRequest(null);
    IoFilterChain filterChain=session.getFilterChain();
    filterChain.fireMessageReceived(buffer);
  }
}

Fixed version (ground truth):
@Override protected void consume(DefaultHttpSession session){
  if (session.isReadSuspended()) {
    return;
  }
  IoBufferEx buffer=session.getCurrentReadRequest();
  if (buffer != null && buffer.hasRemaining()) {
    session.setCurrentReadRequest(null);
    IoFilterChain filterChain=session.getFilterChain();
    filterChain.fireMessageReceived(buffer);
  }
}
Program: 96538
Project: 96538
Buggy source:
public void attachReader(final HttpSession newReader){
  if (Thread.currentThread() == getIoThread()) {
    attachReader0(newReader);
  }
 else {
    if (ALIGN_UPSTREAM) {
      final Thread ioThread=getIoThread();
      final Executor ioExecutor=getIoExecutor();
      newReader.setIoAlignment(NO_THREAD,NO_EXECUTOR);
      ioExecutor.execute(new Runnable(){
        @Override public void run(){
          newReader.setIoAlignment(ioThread,ioExecutor);
          attachReader0(newReader);
        }
      }
);
    }
 else {
      getIoExecutor().execute(new Runnable(){
        @Override public void run(){
          attachReader0(newReader);
        }
      }
);
    }
  }
}

Fixed version (ground truth):
public void attachReader(final HttpSession newReader){
  if (Thread.currentThread() == getIoThread()) {
    attachReader0(newReader);
  }
 else {
    if (ALIGN_UPSTREAM) {
      final Thread ioThread=getIoThread();
      final Executor ioExecutor=getIoExecutor();
      newReader.suspendRead();
      newReader.setIoAlignment(NO_THREAD,NO_EXECUTOR);
      ioExecutor.execute(new Runnable(){
        @Override public void run(){
          newReader.setIoAlignment(ioThread,ioExecutor);
          attachReader0(newReader);
          newReader.resumeRead();
        }
      }
);
    }
 else {
      getIoExecutor().execute(new Runnable(){
        @Override public void run(){
          attachReader0(newReader);
        }
      }
);
    }
  }
}
Program: 96539
Project: 96539
Buggy source:
private boolean checkReaderOrder(HttpAcceptSession session){
  if (validateSequenceNo) {
    return isOutOfOrder(session,readerSequenceNo);
  }
  return true;
}

Fixed version (ground truth):
private boolean checkReaderOrder(HttpAcceptSession session){
  if (validateSequenceNo) {
    return checkOrder(session,readerSequenceNo);
  }
  return true;
}