nus-yam/ex-repair huggingface dataset:
Program: 96436
Project: 96436
Buggy source:
@Test @Specification({"String_Node_Str"}) public void exceptionMonitorShouldLogMessage() throws Exception {
  k3po.start();
  k3po.awaitBarrier("String_Node_Str");
  connectTo8080(new IoHandlerAdapter<IoSessionEx>(){
    private int counter=1;
    private DataMatcher dataMatch=new DataMatcher("String_Node_Str" + counter);
    @Override protected void doSessionOpened(    IoSessionEx session) throws Exception {
      writeStringMessageToSession("String_Node_Str" + counter,session);
      InetSocketAddress socketAddress=(InetSocketAddress)session.getLocalAddress();
      expectedPatterns=Arrays.asList(String.format("String_Node_Str",session.getId(),socketAddress.getPort()));
    }
    @Override protected void doMessageReceived(    IoSessionEx session,    Object message) throws Exception {
      String decoded=new String(((IoBuffer)message).array());
      if (dataMatch.addFragment(decoded) && counter < 2) {
        counter++;
        writeStringMessageToSession("String_Node_Str" + counter,session);
        dataMatch=new DataMatcher("String_Node_Str" + counter);
      }
    }
  }
);
  k3po.finish();
}

Fixed version (ground truth):
@Test @Specification({"String_Node_Str"}) public void exceptionMonitorShouldLogMessage() throws Exception {
  k3po.start();
  k3po.awaitBarrier("String_Node_Str");
  connectTo8080(new IoHandlerAdapter<IoSessionEx>(){
    private int counter=1;
    private DataMatcher dataMatch=new DataMatcher("String_Node_Str" + counter);
    @Override protected void doSessionOpened(    IoSessionEx session) throws Exception {
      writeStringMessageToSession("String_Node_Str" + counter,session);
      InetSocketAddress socketAddress=(InetSocketAddress)session.getLocalAddress();
      checkLogMessageRule.setExpectedPatterns(Arrays.asList(String.format("String_Node_Str",session.getId(),socketAddress.getPort())));
    }
    @Override protected void doMessageReceived(    IoSessionEx session,    Object message) throws Exception {
      String decoded=new String(((IoBuffer)message).array());
      if (dataMatch.addFragment(decoded) && counter < 2) {
        counter++;
        writeStringMessageToSession("String_Node_Str" + counter,session);
        dataMatch=new DataMatcher("String_Node_Str" + counter);
      }
    }
  }
);
  k3po.finish();
}
Program: 96437
Project: 96437
Buggy source:
@Test public void shouldLogMessageIncludingNullSession() throws Exception {
  new TransportExceptionMonitor().exceptionCaught(new NullPointerException(EXCEPTION_MESSAGE),null);
  expectedPatterns=Arrays.asList("String_Node_Str");
}

Fixed version (ground truth):
@Test public void shouldLogMessageIncludingNullSession() throws Exception {
  new TransportExceptionMonitor().exceptionCaught(new NullPointerException(EXCEPTION_MESSAGE),null);
  checkLogMessageRule.setExpectedPatterns(Arrays.asList("String_Node_Str"));
}
Program: 96438
Project: 96438
Buggy source:
@Test public void shouldLogMessageIncludingSession() throws Exception {
  IoSessionEx session=context.mock(IoSessionEx.class,"String_Node_Str");
  IoServiceEx service=context.mock(IoServiceEx.class,"String_Node_Str");
  TransportMetadata metadata=context.mock(TransportMetadata.class,"String_Node_Str");
  ResourceAddressFactory addressFactory=ResourceAddressFactory.newResourceAddressFactory();
  String addressURI="String_Node_Str";
  SocketAddress address=addressFactory.newResourceAddress(addressURI);
  Subject subject=new Subject();
  context.checking(new Expectations(){
{
      allowing(session).getService();
      will(returnValue(service));
      oneOf(session).getId();
      will(returnValue(TEST_SESSION_NUMBER));
      oneOf(service).getTransportMetadata();
      will(returnValue(metadata));
      oneOf(session).getTransportMetadata();
      will(returnValue(metadata));
      allowing(metadata).getName();
      will(returnValue("String_Node_Str"));
      oneOf(session).getAttribute(with(any(Object.class)));
      will(returnValue(null));
      oneOf(session).getLocalAddress();
      will(returnValue(address));
      oneOf(session).getRemoteAddress();
      will(returnValue(address));
      oneOf(session).getSubject();
      will(returnValue(subject));
      oneOf(session).setAttribute(with(any(Object.class)),with(any(String.class)));
    }
  }
);
  new TransportExceptionMonitor().exceptionCaught(new NullPointerException(EXCEPTION_MESSAGE),session);
  expectedPatterns=Arrays.asList("String_Node_Str");
}

Fixed version (ground truth):
@Test public void shouldLogMessageIncludingSession() throws Exception {
  IoSessionEx session=context.mock(IoSessionEx.class,"String_Node_Str");
  IoServiceEx service=context.mock(IoServiceEx.class,"String_Node_Str");
  TransportMetadata metadata=context.mock(TransportMetadata.class,"String_Node_Str");
  ResourceAddressFactory addressFactory=ResourceAddressFactory.newResourceAddressFactory();
  String addressURI="String_Node_Str";
  SocketAddress address=addressFactory.newResourceAddress(addressURI);
  Subject subject=new Subject();
  context.checking(new Expectations(){
{
      allowing(session).getService();
      will(returnValue(service));
      oneOf(session).getId();
      will(returnValue(TEST_SESSION_NUMBER));
      oneOf(service).getTransportMetadata();
      will(returnValue(metadata));
      oneOf(session).getTransportMetadata();
      will(returnValue(metadata));
      allowing(metadata).getName();
      will(returnValue("String_Node_Str"));
      oneOf(session).getAttribute(with(any(Object.class)));
      will(returnValue(null));
      oneOf(session).getLocalAddress();
      will(returnValue(address));
      oneOf(session).getRemoteAddress();
      will(returnValue(address));
      oneOf(session).getSubject();
      will(returnValue(subject));
      oneOf(session).setAttribute(with(any(Object.class)),with(any(String.class)));
    }
  }
);
  new TransportExceptionMonitor().exceptionCaught(new NullPointerException(EXCEPTION_MESSAGE),session);
  checkLogMessageRule.setExpectedPatterns(Arrays.asList("String_Node_Str"));
}
Program: 96439
Project: 96439
Buggy source:
private boolean isChunked(HttpRequestMessage httpRequest) throws ProtocolDecoderException {
  String transferEncoding=httpRequest.getHeader("String_Node_Str");
  if (transferEncoding != null) {
    int semicolonAt=transferEncoding.indexOf(';');
    if (semicolonAt != -1) {
      transferEncoding=transferEncoding.substring(0,semicolonAt);
    }
    if ("String_Node_Str".equalsIgnoreCase(transferEncoding)) {
      return true;
    }
    throw new ProtocolDecoderException("String_Node_Str" + transferEncoding);
  }
  return false;
}

Fixed version (ground truth):
private boolean isChunked(HttpRequestMessage httpRequest) throws ProtocolDecoderException {
  String transferEncoding=httpRequest.getHeader("String_Node_Str");
  if (transferEncoding != null) {
    int semicolonAt=transferEncoding.indexOf(';');
    if (semicolonAt != -1) {
      transferEncoding=transferEncoding.substring(0,semicolonAt);
    }
    if ("String_Node_Str".equalsIgnoreCase(transferEncoding)) {
      return true;
    }
  }
  return false;
}
Program: 96440
Project: 96440
Buggy source:
@Ignore("String_Node_Str") @Test @Specification({"String_Node_Str"}) public void serverShouldSend501ToUnknownTransferEncoding() throws Exception {
  final CountDownLatch latch=new CountDownLatch(1);
  final IoHandler acceptHandler=new IoHandlerAdapter<HttpAcceptSession>(){
    @Override protected void doSessionOpened(    HttpAcceptSession session) throws Exception {
      latch.countDown();
      session.setStatus(HttpStatus.SUCCESS_OK);
      session.close(true);
    }
  }
;
  acceptor.bind(HTTP_ADDRESS,acceptHandler);
  k3po.finish();
  assertTrue(latch.await(4,SECONDS));
}

Fixed version (ground truth):
@Test @Specification({"String_Node_Str"}) public void serverShouldSend501ToUnknownTransferEncoding() throws Exception {
  final CountDownLatch latch=new CountDownLatch(1);
  final IoHandler acceptHandler=new IoHandlerAdapter<HttpAcceptSession>(){
    @Override protected void doSessionOpened(    HttpAcceptSession session) throws Exception {
      latch.countDown();
      session.setStatus(HttpStatus.SERVER_NOT_IMPLEMENTED);
      session.close(true);
    }
  }
;
  acceptor.bind(HTTP_ADDRESS,acceptHandler);
  k3po.finish();
  assertTrue(latch.await(4,SECONDS));
}
Program: 96442
Project: 96442
Buggy source:
private void appendScriptedOptions(File helpScript,Options all_opt){
  try {
    if (helpScript != null && helpScript.exists()) {
      InputStreamReader input_opt;
      input_opt=new InputStreamReader(new FileInputStream(helpScript));
      CSVReader script_options=new CSVReader(input_opt);
      String[] nextLine;
      while ((nextLine=script_options.readNext()) != null) {
        Option o=new Option(null,nextLine[0],Boolean.parseBoolean(nextLine[1]),nextLine[2]);
        all_opt.addOption(o);
      }
      script_options.close();
    }
  }
 catch (  IOException e) {
    LOGGER.debug("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void appendScriptedOptions(File helpScript,Options all_opt){
  try {
    if (helpScript != null && helpScript.exists()) {
      InputStreamReader input_opt;
      input_opt=new InputStreamReader(new FileInputStream(helpScript));
      CSVReader script_options=new CSVReader(input_opt);
      String[] nextLine;
      while ((nextLine=script_options.readNext()) != null) {
        if (nextLine.length >= 3) {
          Option o=new Option(null,nextLine[0],Boolean.parseBoolean(nextLine[1]),nextLine[2]);
          all_opt.addOption(o);
        }
      }
      script_options.close();
    }
  }
 catch (  IOException e) {
    LOGGER.debug("String_Node_Str",e);
  }
}
Program: 96443
Project: 96443
Buggy source:
private void writeArgsFile(String pathToArgsFile) throws IOException {
  FileWriter fw=new FileWriter(new File(pathToArgsFile));
  fw.write("String_Node_Str");
  fw.flush();
  fw.close();
}

Fixed version (ground truth):
private void writeArgsFile(String pathToArgsFile) throws IOException {
  FileWriter fw=new FileWriter(new File(pathToArgsFile));
  fw.write("String_Node_Str");
  fw.write("String_Node_Str");
  fw.write("String_Node_Str");
  fw.flush();
  fw.close();
}
Program: 96444
Project: 96444
Buggy source:
@Override public void doSessionClosed(final SessionManagementBean sessionBean) throws Exception {
  if (sessionBean != null) {
    sessionBean.doSessionClosed();
  }
}

Fixed version (ground truth):
@Override public void doSessionClosed(final SessionManagementBean sessionBean) throws Exception {
  if (sessionBean != null) {
    sessionBean.doSessionClosed();
    sessionBean.doSessionClosedListeners();
  }
}
Program: 96445
Project: 96445
Buggy source:
@Specification("String_Node_Str") @ScriptProperty("String_Node_Str") @Test public void getActiveSessionCountFromJmx() throws Exception {
  k3po.finish();
  Thread.sleep(1000);
  MBeanServerConnection mbeanServerConn=jmxConnection.getConnection();
  ObjectName summaryBeansObjectNamePattern=new ObjectName("String_Node_Str" + ECHO_WSN_SERVICE + "String_Node_Str");
  Set<ObjectName> mbeanNames=mbeanServerConn.queryNames(summaryBeansObjectNamePattern,null);
  assertEquals(1,mbeanNames.size());
  ObjectName summaryBean=mbeanNames.iterator().next();
  assertEquals(Long.valueOf(1),(Long)mbeanServerConn.getAttribute(summaryBean,"String_Node_Str"));
  assertEquals(Long.valueOf(0),(Long)mbeanServerConn.getAttribute(summaryBean,"String_Node_Str"));
}

Fixed version (ground truth):
@Specification("String_Node_Str") @ScriptProperty("String_Node_Str") @Test public void getActiveSessionCountFromJmx() throws Exception {
  k3po.finish();
  Thread.sleep(1000);
  MBeanServerConnection mbeanServerConn=jmxConnection.getConnection();
  ObjectName summaryBeansObjectNamePattern=new ObjectName("String_Node_Str" + ECHO_WSN_SERVICE + "String_Node_Str");
  Set<ObjectName> mbeanNames=mbeanServerConn.queryNames(summaryBeansObjectNamePattern,null);
  assertEquals(1,mbeanNames.size());
  ObjectName summaryBean=mbeanNames.iterator().next();
  assertEquals(Long.valueOf(1),(Long)mbeanServerConn.getAttribute(summaryBean,"String_Node_Str"));
  assertEquals(Long.valueOf(0),(Long)mbeanServerConn.getAttribute(summaryBean,"String_Node_Str"));
  mbeanNames=mbeanServerConn.queryNames(ObjectName.getInstance("String_Node_Str"),null);
  for (  ObjectName name : mbeanNames) {
    fail("String_Node_Str" + name);
  }
}
Program: 96446
Project: 96446
Buggy source:
private void appendScriptedOptions(File helpScript,Options all_opt){
  try {
    if (helpScript != null && helpScript.exists()) {
      InputStreamReader input_opt;
      input_opt=new InputStreamReader(new FileInputStream(helpScript));
      CSVReader script_options=new CSVReader(input_opt);
      String[] nextLine;
      while ((nextLine=script_options.readNext()) != null) {
        Option o=new Option(null,nextLine[0],Boolean.parseBoolean(nextLine[1]),nextLine[2]);
        all_opt.addOption(o);
      }
      script_options.close();
    }
  }
 catch (  IOException e) {
    LOGGER.debug("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void appendScriptedOptions(File helpScript,Options all_opt){
  try {
    if (helpScript != null && helpScript.exists()) {
      InputStreamReader input_opt;
      input_opt=new InputStreamReader(new FileInputStream(helpScript));
      CSVReader script_options=new CSVReader(input_opt);
      String[] nextLine;
      while ((nextLine=script_options.readNext()) != null) {
        if (nextLine.length >= 3) {
          Option o=new Option(null,nextLine[0],Boolean.parseBoolean(nextLine[1]),nextLine[2]);
          all_opt.addOption(o);
        }
      }
      script_options.close();
    }
  }
 catch (  IOException e) {
    LOGGER.debug("String_Node_Str",e);
  }
}
Program: 96450
Project: 96450
Buggy source:
@Override public void doSessionClosed(ManagementContext managementContext,ServiceManagementBean serviceBean,long sessionId,ManagementSessionType managementSessionType) throws Exception {
  SessionManagementBean sessionBean=serviceBean.removeSessionManagementBean(sessionId);
  if (sessionBean != null) {
    managementContext.removeSessionManagementBean(sessionBean);
    managementContext.getManagementSessionStrategy().doSessionClosed(sessionBean);
  }
  super.doSessionClosed(managementContext,serviceBean,sessionId,managementSessionType);
}

Fixed version (ground truth):
@Override public void doSessionClosed(ManagementContext managementContext,ServiceManagementBean serviceBean,long sessionId,ManagementSessionType managementSessionType) throws Exception {
  SessionManagementBean sessionBean=serviceBean.removeSessionManagementBean(sessionId);
  if (sessionBean != null) {
    managementContext.getManagementSessionStrategy().doSessionClosed(sessionBean);
  }
  super.doSessionClosed(managementContext,serviceBean,sessionId,managementSessionType);
}
Program: 96451
Project: 96451
Buggy source:
@Override public void doSessionClosed(SessionManagementBean sessionBean) throws Exception {
  SessionMXBean sessionMxBean=managementServiceHandler.getSessionMXBean(sessionBean.getId());
  Map<String,String> userPrincipals=sessionBean.getUserPrincipalMap();
  if (userPrincipals != null) {
    Map<String,Map<String,String>> userData=new HashMap<>();
    userData.put(sessionMxBean.getObjectName().toString(),userPrincipals);
    Notification n2=new Notification(SESSION_CLOSED,sessionMxBean,managementServiceHandler.nextNotificationSequenceNumber(),System.currentTimeMillis(),"String_Node_Str");
    n2.setUserData(userData);
    sendNotification(n2);
  }
}

Fixed version (ground truth):
@Override public void doSessionClosed(SessionManagementBean sessionBean) throws Exception {
  SessionMXBean sessionMxBean=managementServiceHandler.removeSessionMXBean(sessionBean);
  Map<String,String> userPrincipals=sessionBean.getUserPrincipalMap();
  if (userPrincipals != null) {
    Map<String,Map<String,String>> userData=new HashMap<>();
    userData.put(sessionMxBean.getObjectName().toString(),userPrincipals);
    Notification n2=new Notification(SESSION_CLOSED,sessionMxBean,managementServiceHandler.nextNotificationSequenceNumber(),System.currentTimeMillis(),"String_Node_Str");
    n2.setUserData(userData);
    sendNotification(n2);
  }
}
Program: 96452
Project: 96452
Buggy source:
/** 
 * Parses a GatewayVersion from a String
 * @param version
 * @return
 * @throws Exception
 */
public static GatewayVersion parseGatewayVersion(String version) throws Exception {
  if ("String_Node_Str".equals(version)) {
    return new GatewayVersion(0,0,0);
  }
 else {
    String regex="String_Node_Str";
    Pattern pattern=Pattern.compile(regex);
    Matcher matcher=pattern.matcher(version);
    if (matcher.matches()) {
      int major=Integer.parseInt(matcher.group("String_Node_Str"));
      int minor=Integer.parseInt(matcher.group("String_Node_Str"));
      int patch=Integer.parseInt(matcher.group("String_Node_Str"));
      return new GatewayVersion(major,minor,patch);
    }
 else {
      throw new IllegalArgumentException(String.format("String_Node_Str",regex));
    }
  }
}

Fixed version (ground truth):
/** 
 * Parses a GatewayVersion from a String
 * @param version
 * @return
 * @throws Exception
 */
public static GatewayVersion parseGatewayVersion(String version) throws Exception {
  if ("String_Node_Str".equals(version)) {
    return new GatewayVersion(0,0,0);
  }
 else {
    String regex="String_Node_Str";
    Pattern pattern=Pattern.compile(regex);
    Matcher matcher=pattern.matcher(version);
    if (matcher.matches()) {
      int major=Integer.parseInt(matcher.group("String_Node_Str"));
      int minor=Integer.parseInt(matcher.group("String_Node_Str"));
      int patch=Integer.parseInt(matcher.group("String_Node_Str"));
      String rc=matcher.group("String_Node_Str");
      return new GatewayVersion(major,minor,patch,rc);
    }
 else {
      throw new IllegalArgumentException(String.format("String_Node_Str",regex));
    }
  }
}
Program: 96453
Project: 96453
Buggy source:
@Override public String toString(){
  return format("String_Node_Str",major,minor,patch);
}

Fixed version (ground truth):
@Override public String toString(){
  if (rc.equals(RELEASE_GA)) {
    return format("String_Node_Str",major,minor,patch);
  }
 else {
    return format("String_Node_Str",major,minor,patch,rc);
  }
}
Program: 96454
Project: 96454
Buggy source:
public GatewayVersion(int major,int minor,int patch){
  this.major=major;
  this.minor=minor;
  this.patch=patch;
}

Fixed version (ground truth):
public GatewayVersion(int major,int minor,int patch){
  this(major,minor,patch,RELEASE_GA);
}
Program: 96455
Project: 96455
Buggy source:
@Override public int compareTo(GatewayVersion o){
  int result;
  if (this.major != o.major) {
    result=(this.major > o.major ? 1 : -1);
  }
 else   if (this.minor != o.minor) {
    result=(this.minor > o.minor ? 1 : -1);
  }
 else   if (this.patch != o.patch) {
    result=(this.patch > o.patch ? 1 : -1);
  }
 else {
    result=0;
  }
  return result;
}

Fixed version (ground truth):
@Override public int compareTo(GatewayVersion o){
  int result;
  if (this.major != o.major) {
    result=this.major > o.major ? 1 : -1;
  }
 else   if (this.minor != o.minor) {
    result=this.minor > o.minor ? 1 : -1;
  }
 else   if (this.patch != o.patch) {
    result=this.patch > o.patch ? 1 : -1;
  }
 else   if (!this.rc.equals(o.rc)) {
    result=RELEASE_GA.equals(this.rc) ? 1 : (RELEASE_GA.equals(o.rc) ? -1 : this.rc.compareTo(o.rc));
  }
 else {
    result=0;
  }
  return result;
}
Program: 96456
Project: 96456
Buggy source:
@Before public void init() throws Exception {
  middle=new GatewayVersion(3,1,3);
  high1=parseGatewayVersion("String_Node_Str");
  high2=parseGatewayVersion("String_Node_Str");
  high3=parseGatewayVersion("String_Node_Str");
  low1=parseGatewayVersion("String_Node_Str");
  low2=parseGatewayVersion("String_Node_Str");
  low3=parseGatewayVersion("String_Node_Str");
  equal=parseGatewayVersion("String_Node_Str");
}

Fixed version (ground truth):
@Before public void init() throws Exception {
  middle=new GatewayVersion(3,1,3);
  high1=parseGatewayVersion("String_Node_Str");
  high2=parseGatewayVersion("String_Node_Str");
  high3=parseGatewayVersion("String_Node_Str");
  low1=parseGatewayVersion("String_Node_Str");
  low2=parseGatewayVersion("String_Node_Str");
  low3=parseGatewayVersion("String_Node_Str");
  equal=parseGatewayVersion("String_Node_Str");
  rc1=new GatewayVersion(3,1,3,"String_Node_Str");
  rc2=parseGatewayVersion("String_Node_Str");
  equalrc1=parseGatewayVersion("String_Node_Str");
}
Program: 96457
Project: 96457
Buggy source:
@Test public void testVersioncompareTo(){
  assertTrue(middle.compareTo(high1) < 0);
  assertTrue(middle.compareTo(high2) < 0);
  assertTrue(middle.compareTo(high3) < 0);
  assertTrue(middle.compareTo(low1) > 0);
  assertTrue(middle.compareTo(low2) > 0);
  assertTrue(middle.compareTo(low3) > 0);
  assertTrue(middle.compareTo(equal) == 0);
  assertTrue(middle.compareTo(middle) == 0);
}

Fixed version (ground truth):
@Test public void testVersioncompareTo(){
  assertTrue(middle.compareTo(high1) < 0);
  assertTrue(middle.compareTo(high2) < 0);
  assertTrue(middle.compareTo(high3) < 0);
  assertTrue(middle.compareTo(low1) > 0);
  assertTrue(middle.compareTo(low2) > 0);
  assertTrue(middle.compareTo(low3) > 0);
  assertTrue(middle.compareTo(equal) == 0);
  assertTrue(middle.compareTo(middle) == 0);
  assertTrue(rc1.compareTo(middle) < 0);
  assertTrue(rc2.compareTo(middle) < 0);
  assertTrue(rc2.compareTo(rc1) > 0);
  assertTrue(rc2.compareTo(low3) > 0);
}
Program: 96458
Project: 96458
Buggy source:
@Test public void testEqual(){
  assertFalse(middle.equals(high1));
  assertFalse(middle.equals(high2));
  assertFalse(middle.equals(high3));
  assertFalse(middle.equals(low1));
  assertFalse(middle.equals(low2));
  assertFalse(middle.equals(low3));
  assertFalse(middle.equals(null));
  assertTrue(middle.equals(middle));
  assertTrue(middle.equals(equal));
}

Fixed version (ground truth):
@Test public void testEqual(){
  assertFalse(middle.equals(high1));
  assertFalse(middle.equals(high2));
  assertFalse(middle.equals(high3));
  assertFalse(middle.equals(low1));
  assertFalse(middle.equals(low2));
  assertFalse(middle.equals(low3));
  assertFalse(middle.equals(null));
  assertTrue(middle.equals(middle));
  assertTrue(middle.equals(equal));
  assertTrue(rc1.equals(equalrc1));
}
Program: 96459
Project: 96459
Buggy source:
@Test public void testListenerNotNotifiedOnLowerVersion(){
  service.addListener(listener);
  GatewayVersion latestVersion=new GatewayVersion(-1,0,12);
  service.setLatestGatewayVersion(latestVersion);
  assertTrue("String_Node_Str",listener.notifiedEvents.size() == 0);
}

Fixed version (ground truth):
@Test public void testListenerNotNotifiedOnLowerVersion(){
  service.addListener(listener);
  GatewayVersion latestVersion=new GatewayVersion(-1,0,12);
  service.setLatestGatewayVersion(latestVersion);
  assertTrue("String_Node_Str",listener.notifiedEvents.size() == 0);
  latestVersion=new GatewayVersion(5,0,0,"String_Node_Str");
  service.setLatestGatewayVersion(latestVersion);
  assertTrue("String_Node_Str",listener.notifiedEvents.size() == 0);
}
Program: 96460
Project: 96460
Buggy source:
@Override protected void setOptions(WsResourceAddress address,ResourceOptions options,Object qualifier){
  options.setOption(SUPPORTED_PROTOCOLS,removeStringArrayElement(options.getOption(SUPPORTED_PROTOCOLS),"String_Node_Str"));
  options.setOption(EXTENSIONS,removeStringListElement(options.getOption(EXTENSIONS),"String_Node_Str"));
  super.setOptions(address,options,qualifier);
}

Fixed version (ground truth):
@Override protected void setOptions(WsResourceAddress address,ResourceOptions options,Object qualifier){
  options.setOption(SUPPORTED_PROTOCOLS,removeStringArrayElement(options.getOption(SUPPORTED_PROTOCOLS),"String_Node_Str"));
  super.setOptions(address,options,qualifier);
}
Program: 96461
Project: 96461
Buggy source:
@Before public void before(){
  addressFactorySpi=new WseResourceAddressFactorySpi();
  addressURI="String_Node_Str";
  options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str",FALSE);
  options.put("String_Node_Str",TRUE);
  options.put("String_Node_Str",asList("String_Node_Str","String_Node_Str","String_Node_Str"));
  options.put("String_Node_Str",1024);
  options.put("String_Node_Str",SECONDS.toMillis(5));
  options.put("String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"});
  options.put("String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"});
  options.put("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Before public void before(){
  addressFactorySpi=new WseResourceAddressFactorySpi();
  addressURI="String_Node_Str";
  options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str",FALSE);
  options.put("String_Node_Str",TRUE);
  options.put("String_Node_Str",asList("String_Node_Str","String_Node_Str"));
  options.put("String_Node_Str",1024);
  options.put("String_Node_Str",SECONDS.toMillis(5));
  options.put("String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"});
  options.put("String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"});
  options.put("String_Node_Str","String_Node_Str");
}
Program: 96462
Project: 96462
Buggy source:
@Override protected void setOptions(WsResourceAddress address,ResourceOptions options,Object qualifier){
  options.setOption(SUPPORTED_PROTOCOLS,removeStringArrayElement(options.getOption(SUPPORTED_PROTOCOLS),"String_Node_Str"));
  super.setOptions(address,options,qualifier);
}

Fixed version (ground truth):
@Override protected void setOptions(WsResourceAddress address,ResourceOptions options,Object qualifier){
  options.setOption(SUPPORTED_PROTOCOLS,removeStringArrayElement(options.getOption(SUPPORTED_PROTOCOLS),"String_Node_Str"));
  options.setOption(EXTENSIONS,removeStringListElement(options.getOption(EXTENSIONS),"String_Node_Str"));
  super.setOptions(address,options,qualifier);
}
Program: 96463
Project: 96463
Buggy source:
@Before public void before(){
  addressFactorySpi=new WseResourceAddressFactorySpi();
  addressURI="String_Node_Str";
  options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str",FALSE);
  options.put("String_Node_Str",TRUE);
  options.put("String_Node_Str",asList("String_Node_Str","String_Node_Str"));
  options.put("String_Node_Str",1024);
  options.put("String_Node_Str",SECONDS.toMillis(5));
  options.put("String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"});
  options.put("String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"});
  options.put("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Before public void before(){
  addressFactorySpi=new WseResourceAddressFactorySpi();
  addressURI="String_Node_Str";
  options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str",FALSE);
  options.put("String_Node_Str",TRUE);
  options.put("String_Node_Str",asList("String_Node_Str","String_Node_Str","String_Node_Str"));
  options.put("String_Node_Str",1024);
  options.put("String_Node_Str",SECONDS.toMillis(5));
  options.put("String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"});
  options.put("String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"});
  options.put("String_Node_Str","String_Node_Str");
}
Program: 96465
Project: 96465
Buggy source:
@Test @Ignore("String_Node_Str" + "String_Node_Str") @Specification({"String_Node_Str"}) public void shouldFailConnectionWhenResponseHeaderConnectionNotUpgrade() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      never(handler).sessionCreated(with(any(IoSessionEx.class)));
      never(handler).sessionOpened(with(any(IoSessionEx.class)));
      never(handler).exceptionCaught(with(any(IoSessionEx.class)),with(any(Throwable.class)));
      never(handler).sessionClosed(with(any(IoSessionEx.class)));
    }
  }
);
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,handler);
  connectFuture.awaitUninterruptibly();
  assertFalse(connectFuture.isConnected());
  k3po.finish();
}

Fixed version (ground truth):
@Test @Specification({"String_Node_Str"}) public void shouldFailConnectionWhenResponseHeaderConnectionNotUpgrade() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      never(handler).sessionCreated(with(any(IoSessionEx.class)));
      never(handler).sessionOpened(with(any(IoSessionEx.class)));
      never(handler).exceptionCaught(with(any(IoSessionEx.class)),with(any(Throwable.class)));
      never(handler).sessionClosed(with(any(IoSessionEx.class)));
    }
  }
);
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,handler);
  connectFuture.awaitUninterruptibly();
  assertFalse(connectFuture.isConnected());
  k3po.finish();
}
Program: 96467
Project: 96467
Buggy source:
@Test @Ignore("String_Node_Str" + "String_Node_Str") @Specification({"String_Node_Str"}) public void shouldFailConnectionWhenResponseHeaderConnectionNotUpgrade() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      never(handler).sessionCreated(with(any(IoSessionEx.class)));
      never(handler).sessionOpened(with(any(IoSessionEx.class)));
      never(handler).exceptionCaught(with(any(IoSessionEx.class)),with(any(Throwable.class)));
      never(handler).sessionClosed(with(any(IoSessionEx.class)));
    }
  }
);
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,handler);
  connectFuture.awaitUninterruptibly();
  assertFalse(connectFuture.isConnected());
  k3po.finish();
}

Fixed version (ground truth):
@Test @Specification({"String_Node_Str"}) public void shouldFailConnectionWhenResponseHeaderConnectionNotUpgrade() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      never(handler).sessionCreated(with(any(IoSessionEx.class)));
      never(handler).sessionOpened(with(any(IoSessionEx.class)));
      never(handler).exceptionCaught(with(any(IoSessionEx.class)),with(any(Throwable.class)));
      never(handler).sessionClosed(with(any(IoSessionEx.class)));
    }
  }
);
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,handler);
  connectFuture.awaitUninterruptibly();
  assertFalse(connectFuture.isConnected());
  k3po.finish();
}
Program: 96468
Project: 96468
Buggy source:
@Test @Ignore("String_Node_Str" + "String_Node_Str") @Specification({"String_Node_Str"}) public void shouldFailConnectionWhenResponseHeaderUpgradeNotWebSocket() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      never(handler).sessionCreated(with(any(IoSessionEx.class)));
      never(handler).sessionOpened(with(any(IoSessionEx.class)));
      never(handler).exceptionCaught(with(any(IoSessionEx.class)),with(any(Throwable.class)));
      never(handler).sessionClosed(with(any(IoSessionEx.class)));
    }
  }
);
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,handler);
  connectFuture.awaitUninterruptibly();
  assertFalse(connectFuture.isConnected());
  k3po.finish();
}

Fixed version (ground truth):
@Test @Specification({"String_Node_Str"}) public void shouldFailConnectionWhenResponseHeaderUpgradeNotWebSocket() throws Exception {
  final IoHandler handler=context.mock(IoHandler.class);
  context.checking(new Expectations(){
{
      never(handler).sessionCreated(with(any(IoSessionEx.class)));
      never(handler).sessionOpened(with(any(IoSessionEx.class)));
      never(handler).exceptionCaught(with(any(IoSessionEx.class)),with(any(Throwable.class)));
      never(handler).sessionClosed(with(any(IoSessionEx.class)));
    }
  }
);
  ConnectFuture connectFuture=connector.connect("String_Node_Str",null,handler);
  connectFuture.awaitUninterruptibly();
  assertFalse(connectFuture.isConnected());
  k3po.finish();
}
Program: 96469
Project: 96469
Buggy source:
/** 
 * Given an incoming namespace, return the translator pipeline to translate a document with that namespace up to the 'current' format.
 * @param ns
 * @return
 */
@Override public GatewayConfigTranslator getTranslator(GatewayConfigNamespace ns){
  GatewayConfigTranslatorPipeline result=null;
  if (ns.equals(GatewayConfigNamespace.SEPTEMBER_2014)) {
    result=new GatewayConfigTranslatorPipeline();
    GatewayConfigTranslator september2014Translator=new September2014ToNovember2015Translator();
    result.addTranslator(september2014Translator);
    GatewayConfigTranslator november2015Validator=new November2015Validator();
    result.addTranslator(november2015Validator);
  }
  if (ns.equals(GatewayConfigNamespace.CURRENT_NS)) {
    result=new GatewayConfigTranslatorPipeline();
    GatewayConfigTranslator november2015Validator=new November2015Validator();
    result.addTranslator(november2015Validator);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Given an incoming namespace, return the translator pipeline to translate a document with that namespace up to the 'current' format.
 * @param ns
 * @return
 */
@Override public GatewayConfigTranslator getTranslator(GatewayConfigNamespace ns){
  GatewayConfigTranslatorPipeline result=null;
  if (ns.equals(GatewayConfigNamespace.SEPTEMBER_2014)) {
    result=new GatewayConfigTranslatorPipeline();
    GatewayConfigTranslator september2014Translator=new September2014ToNovember2015Translator();
    result.addTranslator(september2014Translator);
    ns=GatewayConfigNamespace.NOVEMBER_2015;
  }
  if (ns.equals(GatewayConfigNamespace.NOVEMBER_2015)) {
    if (result == null) {
      result=new GatewayConfigTranslatorPipeline();
    }
    GatewayConfigTranslator november2015Validator=new November2015ToJune2016Translator();
    result.addTranslator(november2015Validator);
    ns=GatewayConfigNamespace.CURRENT_NS;
  }
  if (ns.equals(GatewayConfigNamespace.CURRENT_NS)) {
    if (result == null) {
      result=new GatewayConfigTranslatorPipeline();
    }
    GatewayConfigTranslator june2016Validator=new June2016Validator();
    result.addTranslator(june2016Validator);
  }
  return result;
}
Program: 96470
Project: 96470
Buggy source:
public September2014ToNovember2015Translator(){
  super();
  addTranslator(new AddDirectoryServiceLocationVisitor());
  addTranslator(new NamespaceVisitor(GatewayConfigNamespace.CURRENT_NS));
}

Fixed version (ground truth):
public September2014ToNovember2015Translator(){
  super();
  addTranslator(new AddDirectoryServiceLocationVisitor());
  addTranslator(new NamespaceVisitor(GatewayConfigNamespace.NOVEMBER_2015));
}
Program: 96472
Project: 96472
Buggy source:
/** 
 * Given an incoming namespace, return the translator pipeline to translate a document with that namespace up to the 'current' format.
 * @param ns
 * @return
 */
@Override public GatewayConfigTranslator getTranslator(GatewayConfigNamespace ns){
  GatewayConfigTranslatorPipeline result=null;
  if (ns.equals(GatewayConfigNamespace.SEPTEMBER_2014)) {
    result=new GatewayConfigTranslatorPipeline();
    GatewayConfigTranslator september2014Translator=new September2014ToNovember2015Translator();
    result.addTranslator(september2014Translator);
    ns=GatewayConfigNamespace.NOVEMBER_2015;
  }
  if (ns.equals(GatewayConfigNamespace.NOVEMBER_2015)) {
    if (result == null) {
      result=new GatewayConfigTranslatorPipeline();
    }
    GatewayConfigTranslator november2015Validator=new November2015ToJune2016Translator();
    result.addTranslator(november2015Validator);
    ns=GatewayConfigNamespace.CURRENT_NS;
  }
  if (ns.equals(GatewayConfigNamespace.CURRENT_NS)) {
    if (result == null) {
      result=new GatewayConfigTranslatorPipeline();
    }
    GatewayConfigTranslator june2016Validator=new June2016Validator();
    result.addTranslator(june2016Validator);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Given an incoming namespace, return the translator pipeline to translate a document with that namespace up to the 'current' format.
 * @param ns
 * @return
 */
@Override public GatewayConfigTranslator getTranslator(GatewayConfigNamespace ns){
  GatewayConfigTranslatorPipeline result=null;
  if (ns.equals(GatewayConfigNamespace.SEPTEMBER_2014)) {
    result=new GatewayConfigTranslatorPipeline();
    GatewayConfigTranslator september2014Translator=new September2014ToNovember2015Translator();
    result.addTranslator(september2014Translator);
    GatewayConfigTranslator november2015Validator=new November2015Validator();
    result.addTranslator(november2015Validator);
  }
  if (ns.equals(GatewayConfigNamespace.CURRENT_NS)) {
    result=new GatewayConfigTranslatorPipeline();
    GatewayConfigTranslator november2015Validator=new November2015Validator();
    result.addTranslator(november2015Validator);
  }
  return result;
}
Program: 96473
Project: 96473
Buggy source:
public September2014ToNovember2015Translator(){
  super();
  addTranslator(new AddDirectoryServiceLocationVisitor());
  addTranslator(new NamespaceVisitor(GatewayConfigNamespace.NOVEMBER_2015));
}

Fixed version (ground truth):
public September2014ToNovember2015Translator(){
  super();
  addTranslator(new AddDirectoryServiceLocationVisitor());
  addTranslator(new NamespaceVisitor(GatewayConfigNamespace.CURRENT_NS));
}
Program: 96475
Project: 96475
Buggy source:
@Override public void visit(Element element) throws Exception {
  Element typeElement=element.getChild(REALM,namespace);
  if (typeElement != null) {
    element.removeChildren(CONSTRAINT,namespace);
    element.removeChildren(AUTH_CONSTRAINT,namespace);
  }
}

Fixed version (ground truth):
@Override public void visit(Element element){
  Element typeElement=element.getChild(REALM,namespace);
  if (typeElement != null) {
    element.removeChildren(CONSTRAINT,namespace);
    element.removeChildren(AUTH_CONSTRAINT,namespace);
  }
}
Program: 96476
Project: 96476
Buggy source:
@Override public void translate(Document dom) throws Exception {
  Element root=dom.getRootElement();
  namespace=root.getNamespace();
  List<Element> children=dom.getRootElement().getChildren(SERVICE_NODE,namespace);
  for (  Element child : children) {
    visit(child);
  }
}

Fixed version (ground truth):
@Override public void translate(Document dom){
  Element root=dom.getRootElement();
  namespace=root.getNamespace();
  List<Element> children=dom.getRootElement().getChildren(SERVICE_NODE,namespace);
  for (  Element child : children) {
    visit(child);
  }
}
Program: 96477
Project: 96477
Buggy source:
public void setRemoteAddress(ResourceAddress newConnectAddress){
  this.localRemoteAddress=newConnectAddress;
}

Fixed version (ground truth):
public void setRemoteAddress(ResourceAddress redirectRemoteAddress){
  this.redirectRemoteAddress=redirectRemoteAddress;
}
Program: 96478
Project: 96478
Buggy source:
@Override public ResourceAddress getRemoteAddress(){
  return (localRemoteAddress == null) ? super.getRemoteAddress() : localRemoteAddress;
}

Fixed version (ground truth):
@Override public ResourceAddress getRemoteAddress(){
  return (this.redirectRemoteAddress != null) ? this.redirectRemoteAddress : super.getRemoteAddress();
}
Program: 96479
Project: 96479
Buggy source:
@Override public ResourceAddress getLocalAddress(){
  return super.getLocalAddress();
}

Fixed version (ground truth):
@Override public ResourceAddress getLocalAddress(){
  return (this.redirectlocalAddress != null) ? this.redirectlocalAddress : super.getLocalAddress();
}
Program: 96480
Project: 96480
Buggy source:
public IoSessionEx setParent(IoSessionEx newParent){
  return super.setParent(newParent);
}

Fixed version (ground truth):
public IoSessionEx setParent(IoSessionEx newParent){
  this.setLocalAddress(LOCAL_ADDRESS.get(newParent));
  upgradeFuture.setSession(newParent);
  if (!SslUtils.isSecure(newParent) && secure) {
    throw new InvalidParameterException("String_Node_Str");
  }
  return super.setParent(newParent);
}
Program: 96481
Project: 96481
Buggy source:
@Override protected void doSessionClosed(IoSessionEx session) throws Exception {
  DefaultHttpSession httpSession=HTTP_SESSION_KEY.remove(session);
  boolean connectionClose=hasCloseHeader(httpSession.getReadHeaders(HttpHeaders.HEADER_CONNECTION));
  if (!httpSession.isClosing() && !connectionClose) {
    httpSession.setStatus(HttpStatus.SERVER_GATEWAY_TIMEOUT);
    httpSession.reset(new IOException("String_Node_Str").fillInStackTrace());
    return;
  }
  if (connectionClose && !httpSession.isClosing()) {
    httpSession.getProcessor().remove(httpSession);
  }
  if (!session.isClosing()) {
    IoFilterChain filterChain=session.getFilterChain();
    removeBridgeFilters(filterChain);
  }
}

Fixed version (ground truth):
@Override protected void doSessionClosed(IoSessionEx session) throws Exception {
  DefaultHttpSession httpSession=HTTP_SESSION_KEY.remove(session);
  if (httpSession != null) {
    boolean connectionClose=hasCloseHeader(httpSession.getReadHeaders(HttpHeaders.HEADER_CONNECTION));
    if (!httpSession.isClosing() && !connectionClose) {
      httpSession.setStatus(HttpStatus.SERVER_GATEWAY_TIMEOUT);
      httpSession.reset(new IOException("String_Node_Str").fillInStackTrace());
      return;
    }
    if (connectionClose && !httpSession.isClosing()) {
      httpSession.getProcessor().remove(httpSession);
    }
    if (!session.isClosing()) {
      IoFilterChain filterChain=session.getFilterChain();
      removeBridgeFilters(filterChain);
    }
  }
}
Program: 96482
Project: 96482
Buggy source:
private DefaultConnectFuture followRedirect(DefaultHttpSession httpSession,IoSessionEx session){
  String location=httpSession.getReadHeader("String_Node_Str");
  ResourceAddress newConnectAddress=addressFactory.newResourceAddress(location.replaceFirst("String_Node_Str","String_Node_Str"),new HttpRedirectResourceOptions(httpSession));
  DefaultConnectFuture connectFuture=new DefaultConnectFuture();
  HTTP_SESSION_KEY.remove(session);
  connectFuture.addListener(future -> session.close(false));
  httpSession.setRemoteAddress(newConnectAddress);
  schedulerProvider.submit(() -> {
    final HttpSessionFactory httpSessionFactory=new RedirectSessionFactory(httpSession);
    connectInternal0(connectFuture,newConnectAddress,httpSessionFactory);
  }
);
  return connectFuture;
}

Fixed version (ground truth):
private DefaultConnectFuture followRedirect(DefaultHttpSession httpSession,IoSessionEx session){
  String location=httpSession.getReadHeader("String_Node_Str");
  ResourceAddress newConnectAddress=addressFactory.newResourceAddress(location.replaceFirst("String_Node_Str","String_Node_Str"),new HttpRedirectResourceOptions(httpSession));
  DefaultConnectFuture connectFuture=new DefaultConnectFuture();
  HTTP_SESSION_KEY.remove(session);
  connectFuture.addListener(future -> session.close(false));
  httpSession.setRemoteAddress(newConnectAddress);
  final HttpSessionFactory httpSessionFactory=new RedirectSessionFactory(httpSession);
  connectInternal0(connectFuture,newConnectAddress,httpSessionFactory);
  return connectFuture;
}
Program: 96483
Project: 96483
Buggy source:
public DefaultUpgradeFuture(IoSession session){
  super(session);
}

Fixed version (ground truth):
public DefaultUpgradeFuture(IoSession session){
  super(session);
  this.setSession(session);
}
Program: 96484
Project: 96484
Buggy source:
@Ignore("String_Node_Str") @Specification("String_Node_Str") @Test public void verifyPrincipalNameLoggedInLayersAboveHttp() throws Exception {
  k3po.finish();
  expectedPatterns=new ArrayList<>(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + TEST_PRINCIPAL_NAME + "String_Node_Str"+ TEST_PRINCIPAL_NAME+ "String_Node_Str","String_Node_Str" + TEST_PRINCIPAL_NAME + "String_Node_Str"+ TEST_PRINCIPAL_NAME+ "String_Node_Str","String_Node_Str" + TEST_PRINCIPAL_NAME + "String_Node_Str"+ TEST_PRINCIPAL_NAME+ "String_Node_Str","String_Node_Str" + TEST_PRINCIPAL_NAME + "String_Node_Str"+ TEST_PRINCIPAL_NAME+ "String_Node_Str","String_Node_Str" + TEST_PRINCIPAL_NAME + "String_Node_Str"+ TEST_PRINCIPAL_NAME+ "String_Node_Str","String_Node_Str" + TEST_PRINCIPAL_NAME + "String_Node_Str"+ TEST_PRINCIPAL_NAME+ "String_Node_Str","String_Node_Str" + TEST_PRINCIPAL_NAME + "String_Node_Str"+ TEST_PRINCIPAL_NAME+ "String_Node_Str"}));
  forbiddenPatterns=new ArrayList<>(Arrays.asList(new String[]{TEST_PRINCIPAL_PASS}));
}

Fixed version (ground truth):
@Specification("String_Node_Str") @Test public void verifyPrincipalNameLoggedInLayersAboveHttp() throws Exception {
  k3po.finish();
  expectedPatterns=new ArrayList<>(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + TEST_PRINCIPAL_NAME + "String_Node_Str"+ TEST_PRINCIPAL_NAME+ "String_Node_Str","String_Node_Str" + TEST_PRINCIPAL_NAME + "String_Node_Str"+ TEST_PRINCIPAL_NAME+ "String_Node_Str","String_Node_Str" + TEST_PRINCIPAL_NAME + "String_Node_Str"+ TEST_PRINCIPAL_NAME+ "String_Node_Str","String_Node_Str" + TEST_PRINCIPAL_NAME + "String_Node_Str"+ TEST_PRINCIPAL_NAME+ "String_Node_Str","String_Node_Str" + TEST_PRINCIPAL_NAME + "String_Node_Str"+ TEST_PRINCIPAL_NAME+ "String_Node_Str","String_Node_Str" + TEST_PRINCIPAL_NAME + "String_Node_Str"+ TEST_PRINCIPAL_NAME+ "String_Node_Str","String_Node_Str" + TEST_PRINCIPAL_NAME + "String_Node_Str"+ TEST_PRINCIPAL_NAME+ "String_Node_Str"}));
  forbiddenPatterns=new ArrayList<>(Arrays.asList(new String[]{TEST_PRINCIPAL_PASS}));
}
Program: 96485
Project: 96485
Buggy source:
/** 
 * Converts a location in the gateway configuration file into a file relative to a specified root directory.
 * @param rootDir the root directory
 * @param location the location (either a file:// URI or a location relative the root directory
 * @return the file corresponding to the location
 */
private File toFile(File rootDir,String location){
  File locationFile=null;
  if (location != null) {
    URI locationURI=URI.create(location);
    locationFile=new File(locationURI.getPath());
    if (locationURI.getScheme() == null) {
      locationFile=new File(rootDir,location);
    }
 else     if (!"String_Node_Str".equals(locationURI.getScheme())) {
      throw new IllegalArgumentException("String_Node_Str" + location);
    }
  }
  return locationFile;
}

Fixed version (ground truth):
/** 
 * Converts a location in the gateway configuration file into a file relative to a specified root directory.
 * @param rootDir the root directory
 * @param location the location (either a file:// URI or a location relative the root directory
 * @return the file corresponding to the location
 */
private File toFile(File rootDir,String location){
  File locationFile=rootDir;
  if (location != null) {
    URI locationURI=URI.create(location);
    locationFile=new File(locationURI.getPath());
    if (locationURI.getScheme() == null) {
      locationFile=new File(rootDir,location);
    }
 else     if (!"String_Node_Str".equals(locationURI.getScheme())) {
      throw new IllegalArgumentException("String_Node_Str" + location);
    }
  }
  return locationFile;
}
Program: 96486
Project: 96486
Buggy source:
@Test @Specification({"String_Node_Str"}) public void shouldEstablishConnectionWithRequestHeaderOrigin() 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 shouldEstablishConnectionWithRequestHeaderOrigin() 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());
  Thread.sleep(100);
  k3po.finish();
}