nus-yam/ex-repair huggingface dataset:
Program: 10839
Project: 10839
Buggy source:
public void start(){
  serverCommand=PropertiesManager.getProperty(KURENTO_SERVER_COMMAND_PROP,KURENTO_SERVER_COMMAND_DEFAULT);
  gstPlugins=PropertiesManager.getProperty(KURENTO_GST_PLUGINS_PROP,KURENTO_GST_PLUGINS_DEFAULT);
  try {
    workspace=Files.createTempDirectory("String_Node_Str").toString();
  }
 catch (  IOException e) {
    workspace=PropertiesManager.getProperty(KURENTO_WORKSPACE_PROP,KURENTO_WORKSPACE_DEFAULT);
    log.error("String_Node_Str",workspace,e);
  }
  debugOptions=PropertiesManager.getProperty(KURENTO_SERVER_DEBUG_PROP,KURENTO_SERVER_DEBUG_DEFAULT);
  testDir=PropertiesManager.getProperty(PROJECT_PATH_PROP,PROJECT_PATH_DEFAULT) + "String_Node_Str";
  if (!workspace.endsWith("String_Node_Str")) {
    workspace+="String_Node_Str";
  }
  log.debug("String_Node_Str",workspace);
  KurentoServicesTestHelper.setTestDir(testDir);
  if (rabbitMqAddress != null) {
    log.info("String_Node_Str" + "String_Node_Str",rabbitMqAddress,serverCommand,gstPlugins,workspace);
  }
 else {
    log.info("String_Node_Str" + "String_Node_Str",thriftAddress,serverCommand,gstPlugins,workspace);
  }
  createKurentoConf();
  File logFile=new File(workspace,"String_Node_Str");
  KurentoServicesTestHelper.setServerLogFilePath(logFile);
  log.debug("String_Node_Str",logFile.getAbsolutePath());
  Shell.runAndWait("String_Node_Str","String_Node_Str",workspace + "String_Node_Str" + logFile.getAbsolutePath()+ "String_Node_Str");
  waitForKurentoMediaServer();
}

Fixed version (ground truth):
public void start(){
  serverCommand=PropertiesManager.getProperty(KURENTO_SERVER_COMMAND_PROP,KURENTO_SERVER_COMMAND_DEFAULT);
  gstPlugins=PropertiesManager.getProperty(KURENTO_GST_PLUGINS_PROP,KURENTO_GST_PLUGINS_DEFAULT);
  try {
    workspace=Files.createTempDirectory("String_Node_Str").toString();
  }
 catch (  IOException e) {
    workspace=PropertiesManager.getProperty(KURENTO_WORKSPACE_PROP,KURENTO_WORKSPACE_DEFAULT);
    log.error("String_Node_Str",workspace,e);
  }
  debugOptions=PropertiesManager.getProperty(KURENTO_SERVER_DEBUG_PROP,KURENTO_SERVER_DEBUG_DEFAULT);
  if (!workspace.endsWith("String_Node_Str")) {
    workspace+="String_Node_Str";
  }
  log.debug("String_Node_Str",workspace);
  if (rabbitMqAddress != null) {
    log.info("String_Node_Str" + "String_Node_Str",rabbitMqAddress,serverCommand,gstPlugins,workspace);
  }
 else {
    log.info("String_Node_Str" + "String_Node_Str",thriftAddress,serverCommand,gstPlugins,workspace);
  }
  createKurentoConf();
  File logFile=new File(testDir + testClassName,testMethodName + "String_Node_Str");
  KurentoServicesTestHelper.setServerLogFilePath(logFile);
  log.debug("String_Node_Str",logFile.getAbsolutePath());
  Shell.runAndWait("String_Node_Str","String_Node_Str",workspace + "String_Node_Str" + logFile.getAbsolutePath()+ "String_Node_Str");
  waitForKurentoMediaServer();
}
Program: 10840
Project: 10840
Buggy source:
public static void startKurentoMediaServer(){
  String transport=PropertiesManager.getProperty(KMS_TRANSPORT_PROP,KMS_TRANSPORT_DEFAULT);
  int httpPort=getKmsHttpPort();
switch (transport) {
case KMS_TRANSPORT_THRIFT_VALUE:
    kms=KurentoMediaServerManager.createWithThriftTransport(getThriftKmsAddress(),httpPort);
  break;
case KMS_TRANSPORT_RABBITMQ_VALUE:
kms=KurentoMediaServerManager.createWithRabbitMqTransport(getRabbitMqAddress(),httpPort);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + transport + "String_Node_Str"+ KMS_TRANSPORT_PROP);
}
kms.setTestClassName(testCaseName);
kms.setTestMethodName(testName);
kms.start();
}

Fixed version (ground truth):
public static void startKurentoMediaServer(){
  String transport=PropertiesManager.getProperty(KMS_TRANSPORT_PROP,KMS_TRANSPORT_DEFAULT);
  int httpPort=getKmsHttpPort();
switch (transport) {
case KMS_TRANSPORT_THRIFT_VALUE:
    kms=KurentoMediaServerManager.createWithThriftTransport(getThriftKmsAddress(),httpPort);
  break;
case KMS_TRANSPORT_RABBITMQ_VALUE:
kms=KurentoMediaServerManager.createWithRabbitMqTransport(getRabbitMqAddress(),httpPort);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + transport + "String_Node_Str"+ KMS_TRANSPORT_PROP);
}
kms.setTestClassName(testCaseName);
kms.setTestMethodName(testName);
kms.setTestDir(testDir);
kms.start();
}
Program: 10841
Project: 10841
Buggy source:
private static void startKurentoMediaServerIfNecessary(){
  kmsAutostart=getProperty(KMS_AUTOSTART_PROP,KMS_AUTOSTART_DEFAULT);
  kmsPrintLog=getProperty(KMS_PRINT_LOG_PROP,KMS_PRINT_LOG_DEFAULT);
switch (kmsAutostart) {
case AUTOSTART_FALSE_VALUE:
    break;
case AUTOSTART_TEST_VALUE:
  startKurentoMediaServer();
break;
case AUTOSTART_TEST_SUITE_VALUE:
if (mediaConnector == null) {
startKurentoMediaServer();
}
break;
default :
throw new IllegalArgumentException("String_Node_Str" + kmsAutostart + "String_Node_Str"+ KMS_AUTOSTART_PROP);
}
}

Fixed version (ground truth):
private static void startKurentoMediaServerIfNecessary(){
  kmsAutostart=getProperty(KMS_AUTOSTART_PROP,KMS_AUTOSTART_DEFAULT);
  kmsPrintLog=getProperty(KMS_PRINT_LOG_PROP,KMS_PRINT_LOG_DEFAULT);
  testDir=getProperty(PROJECT_PATH_PROP,PROJECT_PATH_DEFAULT) + "String_Node_Str";
  String logFolder=testDir + testCaseName;
  createFolder(logFolder);
switch (kmsAutostart) {
case AUTOSTART_FALSE_VALUE:
    break;
case AUTOSTART_TEST_VALUE:
  startKurentoMediaServer();
break;
case AUTOSTART_TEST_SUITE_VALUE:
if (mediaConnector == null) {
startKurentoMediaServer();
}
break;
default :
throw new IllegalArgumentException("String_Node_Str" + kmsAutostart + "String_Node_Str"+ KMS_AUTOSTART_PROP);
}
}
Program: 10842
Project: 10842
Buggy source:
protected void internalSendRequestThrift(Request<Object> request,final Class<JsonElement> resultClass,final Continuation<Response<JsonElement>> continuation){
  log.debug("String_Node_Str",request);
  if (request.getMethod().equals("String_Node_Str")) {
    JsonObject params=(JsonObject)request.getParams();
    params.addProperty("String_Node_Str",localHandlerAddress.getHostString());
    params.addProperty("String_Node_Str",Integer.valueOf(localHandlerAddress.getPort()));
  }
  sendRequest(request,resultClass,continuation,true);
}

Fixed version (ground truth):
protected void internalSendRequestThrift(Request<Object> request,final Class<JsonElement> resultClass,final Continuation<Response<JsonElement>> continuation){
  log.debug("String_Node_Str",request);
  processRequest(request);
  sendRequest(request,resultClass,continuation,true);
}
Program: 10843
Project: 10843
Buggy source:
@Override public void onComplete(invokeJsonRpc_call thriftResponse){
  clientPool.release(client);
  try {
    String response=thriftResponse.getResult();
    log.debug("String_Node_Str",response.trim());
    continuation.onSuccess(JsonUtils.fromJsonResponse(response,resultClass));
  }
 catch (  TException e) {
    continuation.onError(e);
  }
}

Fixed version (ground truth):
@Override public void onComplete(invokeJsonRpc_call thriftResponse){
  clientPool.release(client);
  try {
    String responseStr=thriftResponse.getResult();
    log.debug("String_Node_Str",responseStr.trim());
    Response<JsonElement> response=JsonUtils.fromJsonResponse(responseStr,resultClass);
    processResponse(response);
    continuation.onSuccess(response);
  }
 catch (  TException e) {
    continuation.onError(e);
  }
}
Program: 10844
Project: 10844
Buggy source:
@Override public void run(){
  while (true) {
    try {
      Thread.sleep(KEEP_ALIVE_TIME);
    }
 catch (    InterruptedException e) {
      return;
    }
synchronized (keepAliveThread) {
      if (stopKeepAlive) {
        return;
      }
    }
    Set<String> copiedSessions;
synchronized (sessions) {
      copiedSessions=new HashSet<>(sessions);
    }
    for (    String copiedSession : copiedSessions) {
      int id=new Random().nextInt();
      Request<Void> request=new Request<>(copiedSession,Integer.valueOf(id),"String_Node_Str",null);
      log.info("String_Node_Str",copiedSession);
      try {
        Response<Void> response=internalSendRequestThrift(request,Void.class);
        if (response.isError()) {
          log.error("String_Node_Str",copiedSession);
synchronized (sessions) {
            sessions.remove(copiedSession);
          }
        }
      }
 catch (      TransportException e) {
        log.warn("String_Node_Str",copiedSession,e);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  log.debug("String_Node_Str");
  while (true) {
    try {
      Thread.sleep(KEEP_ALIVE_TIME);
    }
 catch (    InterruptedException e) {
      return;
    }
    log.debug("String_Node_Str");
synchronized (keepAliveThread) {
      if (stopKeepAlive) {
        return;
      }
    }
    Set<String> copiedSessions;
synchronized (sessions) {
      copiedSessions=new HashSet<>(sessions);
    }
    for (    String copiedSession : copiedSessions) {
      int id=new Random().nextInt();
      Request<Void> request=new Request<>(copiedSession,Integer.valueOf(id),"String_Node_Str",null);
      log.info("String_Node_Str",copiedSession);
      try {
        Response<Void> response=internalSendRequestThrift(request,Void.class);
        if (response.isError()) {
          log.error("String_Node_Str",copiedSession);
synchronized (sessions) {
            sessions.remove(copiedSession);
          }
        }
      }
 catch (      TransportException e) {
        log.warn("String_Node_Str",copiedSession,e);
      }
    }
  }
}
Program: 10845
Project: 10845
Buggy source:
private void sendRequest(final Request<Object> request,final Class<JsonElement> resultClass,final Continuation<Response<JsonElement>> continuation,final boolean retry){
  final AsyncClient client=clientPool.acquireAsync();
  try {
    client.invokeJsonRpc(request.toString(),new AsyncMethodCallback<AsyncClient.invokeJsonRpc_call>(){
      @Override public void onError(      Exception exception){
        clientPool.release(client);
        log.error("String_Node_Str",exception);
        if (retry && exception instanceof ConnectException) {
          sendRequest(request,resultClass,continuation,false);
        }
 else {
          continuation.onError(exception);
        }
      }
      @Override public void onComplete(      invokeJsonRpc_call thriftResponse){
        clientPool.release(client);
        try {
          String response=thriftResponse.getResult();
          log.debug("String_Node_Str",response.trim());
          continuation.onSuccess(JsonUtils.fromJsonResponse(response,resultClass));
        }
 catch (        TException e) {
          continuation.onError(e);
        }
      }
    }
);
  }
 catch (  TException e) {
    log.error("String_Node_Str",e);
    continuation.onError(e);
  }
}

Fixed version (ground truth):
private void sendRequest(final Request<Object> request,final Class<JsonElement> resultClass,final Continuation<Response<JsonElement>> continuation,final boolean retry){
  final AsyncClient client=clientPool.acquireAsync();
  try {
    client.invokeJsonRpc(request.toString(),new AsyncMethodCallback<AsyncClient.invokeJsonRpc_call>(){
      @Override public void onError(      Exception exception){
        clientPool.release(client);
        log.error("String_Node_Str",exception);
        if (retry && exception instanceof ConnectException) {
          sendRequest(request,resultClass,continuation,false);
        }
 else {
          continuation.onError(exception);
        }
      }
      @Override public void onComplete(      invokeJsonRpc_call thriftResponse){
        clientPool.release(client);
        try {
          String responseStr=thriftResponse.getResult();
          log.debug("String_Node_Str",responseStr.trim());
          Response<JsonElement> response=JsonUtils.fromJsonResponse(responseStr,resultClass);
          processResponse(response);
          continuation.onSuccess(response);
        }
 catch (        TException e) {
          continuation.onError(e);
        }
      }
    }
);
  }
 catch (  TException e) {
    log.error("String_Node_Str",e);
    continuation.onError(e);
  }
}
Program: 10846
Project: 10846
Buggy source:
private <P,R>Response<R> internalSendRequestWebSocket(Request<P> request,Class<R> resultClass) throws IOException {
  connectIfNecessary();
  Future<Response<JsonElement>> responseFuture=null;
  if (request.getId() != null) {
    responseFuture=pendingRequests.prepareResponse(request.getId());
  }
  String jsonMessage=request.toString();
synchronized (wsSession) {
    wsSession.sendMessage(new TextMessage(jsonMessage));
  }
  if (responseFuture == null) {
    return null;
  }
  Response<JsonElement> responseJson;
  try {
    responseJson=responseFuture.get(TIMEOUT,TimeUnit.MILLISECONDS);
    Response<R> response=MessageUtils.convertResponse(responseJson,resultClass);
    if (response.getSessionId() != null) {
      session.setSessionId(response.getSessionId());
    }
    return response;
  }
 catch (  InterruptedException e) {
    throw new KurentoException("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    throw new KurentoException("String_Node_Str",e);
  }
catch (  TimeoutException e) {
    throw new TransportException("String_Node_Str" + TIMEOUT + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
private <P,R>Response<R> internalSendRequestWebSocket(Request<P> request,Class<R> resultClass) throws IOException {
  connectIfNecessary();
  Future<Response<JsonElement>> responseFuture=null;
  if (request.getId() != null) {
    responseFuture=pendingRequests.prepareResponse(request.getId());
  }
  String jsonMessage=request.toString();
  log.debug("String_Node_Str",jsonMessage.trim());
synchronized (wsSession) {
    wsSession.sendMessage(new TextMessage(jsonMessage));
  }
  if (responseFuture == null) {
    return null;
  }
  Response<JsonElement> responseJson;
  try {
    responseJson=responseFuture.get(TIMEOUT,TimeUnit.MILLISECONDS);
    log.debug("String_Node_Str",responseJson.toString());
    Response<R> response=MessageUtils.convertResponse(responseJson,resultClass);
    if (response.getSessionId() != null) {
      session.setSessionId(response.getSessionId());
    }
    return response;
  }
 catch (  InterruptedException e) {
    throw new KurentoException("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    throw new KurentoException("String_Node_Str",e);
  }
catch (  TimeoutException e) {
    throw new TransportException("String_Node_Str" + TIMEOUT + "String_Node_Str",e);
  }
}
Program: 10847
Project: 10847
Buggy source:
@Override public void run(){
  try {
    Response<JsonElement> result=internalSendRequestWebSocket(request,resultClass);
    try {
      continuation.onSuccess(result);
    }
 catch (    Exception e) {
      log.error("String_Node_Str",e);
    }
  }
 catch (  Exception e) {
    continuation.onError(e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    handlerManager.handleRequest(session,fromJsonRequest(message,JsonElement.class),rs);
  }
 catch (  IOException e) {
    log.warn("String_Node_Str" + message,e);
  }
}
Program: 10848
Project: 10848
Buggy source:
private void handleRequestFromServer(JsonObject message) throws IOException {
  handlerManager.handleRequest(session,fromJsonRequest(message,JsonElement.class),rs);
}

Fixed version (ground truth):
private void handleRequestFromServer(final JsonObject message) throws IOException {
  execService.submit(new Runnable(){
    @Override public void run(){
      try {
        handlerManager.handleRequest(session,fromJsonRequest(message,JsonElement.class),rs);
      }
 catch (      IOException e) {
        log.warn("String_Node_Str" + message,e);
      }
    }
  }
);
}
Program: 10849
Project: 10849
Buggy source:
@Bean public ThriftConnectorJsonRpcHandler thriftConnectorJsonRpcHandler(){
  return new ThriftConnectorJsonRpcHandler();
}

Fixed version (ground truth):
@Bean public MediaConnectorJsonRpcHandler thriftConnectorJsonRpcHandler(){
  return new MediaConnectorJsonRpcHandler();
}
Program: 10850
Project: 10850
Buggy source:
public KwsBowerTest(){
  kwsUrl=getProperty("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public KwsBowerTest(){
  kwsUrl="String_Node_Str";
}
Program: 10851
Project: 10851
Buggy source:
@Before public void setupMediaElements() throws InterruptedException {
  pipeline.newWebRtcEndpoint().buildAsync(cont);
  pipeline.newWebRtcEndpoint().buildAsync(cont);
  sdp=creationResults.poll(1,SECONDS);
  sdp2=creationResults.poll(1,SECONDS);
  Assert.assertNotNull(sdp);
  Assert.assertNotNull(sdp2);
}

Fixed version (ground truth):
@Before public void setupMediaElements() throws InterruptedException {
  pipeline.newWebRtcEndpoint().buildAsync(cont);
  pipeline.newWebRtcEndpoint().buildAsync(cont);
  sdp=creationResults.poll(2,SECONDS);
  sdp2=creationResults.poll(2,SECONDS);
  Assert.assertNotNull(sdp);
  Assert.assertNotNull(sdp2);
}
Program: 10852
Project: 10852
Buggy source:
@Bean public ThriftConnectorJsonRpcHandler2 thriftConnectorJsonRpcHandler(){
  return new ThriftConnectorJsonRpcHandler2();
}

Fixed version (ground truth):
@Bean public ThriftConnectorJsonRpcHandler thriftConnectorJsonRpcHandler(){
  return new ThriftConnectorJsonRpcHandler();
}
Program: 10854
Project: 10854
Buggy source:
@Override public void onEvent(MediaSessionStartedEvent event){
  player.play();
}

Fixed version (ground truth):
@Override public void onEvent(MediaSessionTerminatedEvent event){
  latch.countDown();
}
Program: 10855
Project: 10855
Buggy source:
/** 
 * Test for   {@link MediaSessionTerminatedEvent}
 */
@Ignore @Test public void testEventMediaSessionTerminated(){
}

Fixed version (ground truth):
/** 
 * Test for   {@link MediaSessionTerminatedEvent}
 * @throws InterruptedException
 */
@Ignore @Test public void testEventMediaSessionTerminated() throws InterruptedException {
  final PlayerEndpoint player=pipeline.newPlayerEndpoint(URL_SMALL).build();
  player.connect(httpEp);
  httpEp.addMediaSessionStartedListener(new MediaEventListener<MediaSessionStartedEvent>(){
    @Override public void onEvent(    MediaSessionStartedEvent event){
      player.play();
    }
  }
);
  final CountDownLatch latch=new CountDownLatch(1);
  final BlockingQueue<ListenerRegistration> events=new ArrayBlockingQueue<>(1);
  httpEp.addMediaSessionTerminatedListener(new MediaEventListener<MediaSessionTerminatedEvent>(){
    @Override public void onEvent(    MediaSessionTerminatedEvent event){
      latch.countDown();
    }
  }
,new Continuation<ListenerRegistration>(){
    @Override public void onSuccess(    ListenerRegistration result){
      events.add(result);
    }
    @Override public void onError(    Throwable cause){
      throw new KurentoMediaFrameworkException(cause);
    }
  }
);
  ListenerRegistration reg=events.poll(500,MILLISECONDS);
  Assert.assertNotNull(reg);
  try (CloseableHttpClient httpclient=HttpClientBuilder.create().build()){
    httpclient.execute(new HttpGet(httpEp.getUrl()));
  }
 catch (  ClientProtocolException e) {
    throw new KurentoMediaFrameworkException();
  }
catch (  IOException e) {
    throw new KurentoMediaFrameworkException();
  }
  try {
    latch.await(500,MILLISECONDS);
  }
  finally {
    player.release();
  }
}
Program: 10856
Project: 10856
Buggy source:
@Override public void onEvent(MediaSessionTerminatedEvent event){
  sem.release();
}

Fixed version (ground truth):
@Override public void onEvent(MediaSessionTerminatedEvent event){
  events.add(event);
}
Program: 10857
Project: 10857
Buggy source:
/** 
 * Test for   {@link MediaSessionTerminatedEvent}
 * @throws InterruptedException
 */
@Ignore @Test public void testEventMediaSessionTerminated() throws InterruptedException {
  HttpGetEndpoint httpEP=pipeline.newHttpGetEndpoint().build();
  final Semaphore sem=new Semaphore(0);
  httpEP.addMediaSessionTerminatedListener(new MediaEventListener<MediaSessionTerminatedEvent>(){
    @Override public void onEvent(    MediaSessionTerminatedEvent event){
      sem.release();
    }
  }
);
  try (CloseableHttpClient httpclient=HttpClientBuilder.create().build()){
    httpclient.execute(new HttpGet(httpEP.getUrl()));
  }
 catch (  ClientProtocolException e) {
    throw new KurentoMediaFrameworkException();
  }
catch (  IOException e) {
    throw new KurentoMediaFrameworkException();
  }
  Assert.assertTrue(sem.tryAcquire(50,SECONDS));
  httpEP.release();
}

Fixed version (ground truth):
/** 
 * Test for   {@link MediaSessionTerminatedEvent}
 * @throws InterruptedException
 */
@Test public void testEventMediaSessionTerminated() throws InterruptedException {
  final PlayerEndpoint player=pipeline.newPlayerEndpoint(URL_SMALL).build();
  HttpGetEndpoint httpEP=pipeline.newHttpGetEndpoint().terminateOnEOS().build();
  player.connect(httpEP);
  httpEP.addMediaSessionStartedListener(new MediaEventListener<MediaSessionStartedEvent>(){
    @Override public void onEvent(    MediaSessionStartedEvent event){
      player.play();
    }
  }
);
  final BlockingQueue<MediaSessionTerminatedEvent> events=new ArrayBlockingQueue<>(1);
  httpEP.addMediaSessionTerminatedListener(new MediaEventListener<MediaSessionTerminatedEvent>(){
    @Override public void onEvent(    MediaSessionTerminatedEvent event){
      events.add(event);
    }
  }
);
  try (CloseableHttpClient httpclient=HttpClientBuilder.create().build()){
    httpclient.execute(new HttpGet(httpEP.getUrl()));
  }
 catch (  ClientProtocolException e) {
    throw new KurentoMediaFrameworkException();
  }
catch (  IOException e) {
    throw new KurentoMediaFrameworkException();
  }
  Assert.assertNotNull(events.poll(20,SECONDS));
  httpEP.release();
  player.release();
}
Program: 10858
Project: 10858
Buggy source:
@Override public void onEvent(MediaSessionTerminatedEvent event){
  sem.release();
}

Fixed version (ground truth):
@Override public void onEvent(MediaSessionStartedEvent event){
  player.play();
}
Program: 10859
Project: 10859
Buggy source:
@Override protected void failed(Throwable e,Description description){
  if (KurentoServicesTestHelper.printKmsLog()) {
    String testDir=KurentoServicesTestHelper.getTestDir();
    String testCaseName=KurentoServicesTestHelper.getTestCaseName();
    String testName=KurentoServicesTestHelper.getTestName();
    log.info("String_Node_Str");
    log.info("String_Node_Str",description.getClassName(),testName);
    log.info("String_Node_Str",e.getClass().getCanonicalName(),e.getMessage());
    log.info("String_Node_Str");
    try {
      BufferedReader br=new BufferedReader(new FileReader(testDir + "String_Node_Str" + testCaseName+ "String_Node_Str"+ testName+ "String_Node_Str"));
      String line;
      while ((line=br.readLine()) != null) {
        log.info(line);
      }
      br.close();
    }
 catch (    IOException ioe) {
      ioe.printStackTrace();
    }
    log.info("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override protected void failed(Throwable e,Description description){
  if (KurentoServicesTestHelper.printKmsLog()) {
    String testDir=KurentoServicesTestHelper.getTestDir();
    String testCaseName=KurentoServicesTestHelper.getTestCaseName();
    String testName=KurentoServicesTestHelper.getTestName();
    File file=new File(testDir + "String_Node_Str" + testCaseName+ "String_Node_Str"+ testName+ "String_Node_Str");
    if (file.exists()) {
      log.info("String_Node_Str");
      log.info("String_Node_Str",description.getClassName(),testName);
      log.info("String_Node_Str",e.getClass().getCanonicalName(),e.getMessage());
      log.info("String_Node_Str");
      try {
        for (        String line : FileUtils.readLines(file)) {
          log.info(line);
        }
      }
 catch (      IOException e1) {
        log.warn("String_Node_Str",e1);
      }
      log.info("String_Node_Str");
    }
  }
}
Program: 10860
Project: 10860
Buggy source:
public int countKmsProcesses(){
  int result=0;
  try {
    String[] command={"String_Node_Str","String_Node_Str","String_Node_Str" + workspace + "String_Node_Str"};
    Process countKms=Runtime.getRuntime().exec(command);
    BufferedReader br=new BufferedReader(new InputStreamReader(countKms.getInputStream()));
    StringBuilder builder=new StringBuilder();
    String line=null;
    while ((line=br.readLine()) != null) {
      builder.append(line);
    }
    result=Integer.parseInt(builder.toString());
  }
 catch (  IOException e) {
    log.error("String_Node_Str",e);
  }
  return result;
}

Fixed version (ground truth):
public int countKmsProcesses(){
  int result=0;
  try {
    String[] command={"String_Node_Str","String_Node_Str","String_Node_Str" + workspace + "String_Node_Str"};
    Process countKms=Runtime.getRuntime().exec(command);
    String stringFromStream=CharStreams.toString(new InputStreamReader(countKms.getInputStream(),"String_Node_Str"));
    result=Integer.parseInt(stringFromStream.trim());
  }
 catch (  IOException e) {
    log.error("String_Node_Str",e);
  }
  return result;
}
Program: 10861
Project: 10861
Buggy source:
private void createKurentoConf(){
  Configuration cfg=new Configuration();
  Map<String,Object> data=new HashMap<String,Object>();
  if (rabbitMqAddress != null) {
    data.put("String_Node_Str","String_Node_Str");
    data.put("String_Node_Str",rabbitMqAddress.getHost());
    data.put("String_Node_Str",rabbitMqAddress.getPort());
  }
 else {
    data.put("String_Node_Str","String_Node_Str");
    data.put("String_Node_Str",thriftAddress.getHost());
    data.put("String_Node_Str",thriftAddress.getPort());
  }
  data.put("String_Node_Str",gstPlugins);
  data.put("String_Node_Str",debugOptions);
  data.put("String_Node_Str",serverCommand);
  data.put("String_Node_Str",workspace);
  data.put("String_Node_Str",httpPort);
  cfg.setClassForTemplateLoading(KurentoMediaServerManager.class,"String_Node_Str");
  createFileFromTemplate(cfg,data,"String_Node_Str");
  createFileFromTemplate(cfg,data,"String_Node_Str");
  createFileFromTemplate(cfg,data,"String_Node_Str");
  Shell.run("String_Node_Str","String_Node_Str",workspace + "String_Node_Str");
}

Fixed version (ground truth):
private void createKurentoConf(){
  Configuration cfg=new Configuration();
  Map<String,Object> data=new HashMap<String,Object>();
  if (rabbitMqAddress != null) {
    data.put("String_Node_Str","String_Node_Str");
    data.put("String_Node_Str",rabbitMqAddress.getHost());
    data.put("String_Node_Str",String.valueOf(rabbitMqAddress.getPort()));
  }
 else {
    data.put("String_Node_Str","String_Node_Str");
    data.put("String_Node_Str",thriftAddress.getHost());
    data.put("String_Node_Str",String.valueOf(thriftAddress.getPort()));
  }
  data.put("String_Node_Str",gstPlugins);
  data.put("String_Node_Str",debugOptions);
  data.put("String_Node_Str",serverCommand);
  data.put("String_Node_Str",workspace);
  data.put("String_Node_Str",String.valueOf(httpPort));
  cfg.setClassForTemplateLoading(KurentoMediaServerManager.class,"String_Node_Str");
  createFileFromTemplate(cfg,data,"String_Node_Str");
  createFileFromTemplate(cfg,data,"String_Node_Str");
  createFileFromTemplate(cfg,data,"String_Node_Str");
  Shell.run("String_Node_Str","String_Node_Str",workspace + "String_Node_Str");
}
Program: 10862
Project: 10862
Buggy source:
public static <P>Request<P> convertRequest(Request<? extends Object> request,Class<P> paramsClass){
  P paramsP;
  if (paramsClass.isAssignableFrom(request.getParams().getClass())) {
    paramsP=(P)request.getParams();
  }
 else   if (request.getParams() instanceof JsonElement) {
    paramsP=convertJsonTo((JsonElement)request.getParams(),paramsClass);
  }
 else {
    throw new ClassCastException();
  }
  @SuppressWarnings("String_Node_Str") Request<P> requestP=(Request<P>)request;
  requestP.setParams(paramsP);
  return requestP;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static <P>Request<P> convertRequest(Request<? extends Object> request,Class<P> paramsClass){
  P paramsP=null;
  Object params=request.getParams();
  if (params != null) {
    if (paramsClass.isAssignableFrom(params.getClass())) {
      paramsP=(P)params;
    }
 else     if (params instanceof JsonElement) {
      paramsP=convertJsonTo((JsonElement)request.getParams(),paramsClass);
    }
 else {
      throw new ClassCastException();
    }
  }
  @SuppressWarnings("String_Node_Str") Request<P> requestP=(Request<P>)request;
  requestP.setParams(paramsP);
  return requestP;
}
Program: 10863
Project: 10863
Buggy source:
@Bean public ThriftInterfaceConfiguration thriftInterfaceConfiguration(){
  ThriftInterfaceConfigurationOverload config=new ThriftInterfaceConfigurationOverload();
  return config;
}

Fixed version (ground truth):
@Bean public ThriftInterfaceConfiguration thriftInterfaceConfiguration(){
  ThriftInterfaceConfiguration config=new ThriftInterfaceConfiguration();
  config.setServerAddress(System.getProperty("String_Node_Str","String_Node_Str"));
  config.setServerPort(Integer.parseInt(PropertiesManager.getSystemProperty("String_Node_Str","String_Node_Str")));
  log.info("String_Node_Str" + config.getServerAddress() + "String_Node_Str");
  log.info("String_Node_Str" + config.getServerPort() + "String_Node_Str");
  return config;
}
Program: 10864
Project: 10864
Buggy source:
@Bean public MediaApiConfiguration mediaApiConfiguration(){
  MediaApiConfigurationOverload config=new MediaApiConfigurationOverload();
  return config;
}

Fixed version (ground truth):
@Bean public MediaApiConfiguration mediaApiConfiguration(){
  MediaApiConfiguration config=new MediaApiConfiguration();
  config.setHandlerAddress(System.getProperty("String_Node_Str","String_Node_Str"));
  config.setHandlerPort(Integer.parseInt(PropertiesManager.getSystemProperty("String_Node_Str","String_Node_Str")));
  log.info("String_Node_Str" + config.getHandlerAddress() + "String_Node_Str");
  log.info("String_Node_Str" + config.getHandlerPort() + "String_Node_Str");
  return config;
}
Program: 10865
Project: 10865
Buggy source:
/** 
 * Sender method for error messages in JSON throw a request.
 * @param asyncCtx Asynchronous context
 * @param message JSON error message (as a Java class)
 * @throws IOException Exception while parsing operating with asynchronous context
 */
public void sendJsonError(AsyncContext asyncCtx,JsonRpcResponse message){
  try {
    internalSendJsonAnswer(asyncCtx,message);
  }
 catch (  Throwable e) {
    log.info("String_Node_Str",e);
  }
 finally {
    if (asyncCtx != null) {
      asyncCtx.complete();
    }
  }
}

Fixed version (ground truth):
/** 
 * Sender method for error messages in JSON throw a request.
 * @param asyncCtx Asynchronous context
 * @param message JSON error message (as a Java class)
 * @throws IOException Exception while parsing operating with asynchronous context
 */
public void sendJsonError(AsyncContext asyncCtx,JsonRpcResponse message){
  try {
    internalSendJsonAnswer(asyncCtx,message);
  }
 catch (  Throwable e) {
    log.info("String_Node_Str",e);
  }
 finally {
    if (asyncCtx != null) {
      try {
        asyncCtx.complete();
      }
 catch (      IllegalStateException e) {
        log.warn("String_Node_Str",e.getClass().getName());
      }
    }
  }
}
Program: 10866
Project: 10866
Buggy source:
protected synchronized void destroy(){
  registered=false;
  if (initialAsyncCtx != null) {
    initialAsyncCtx.complete();
    initialAsyncCtx=null;
  }
  if (manager != null) {
    manager.remove(this.sessionId);
  }
  if (eventQueue.isEmpty() && currentPollingThread != null) {
    currentPollingThread.interrupt();
  }
  try {
    releaseOwnMediaServerResources();
  }
 catch (  Throwable e) {
    getLogger().error(e.getMessage(),e);
  }
}

Fixed version (ground truth):
protected synchronized void destroy(){
  registered=false;
  if (initialAsyncCtx != null) {
    try {
      initialAsyncCtx.complete();
    }
 catch (    IllegalStateException e) {
      log.warn("String_Node_Str",e.getClass().getName());
    }
    initialAsyncCtx=null;
  }
  if (manager != null) {
    manager.remove(this.sessionId);
  }
  if (eventQueue.isEmpty() && currentPollingThread != null) {
    currentPollingThread.interrupt();
  }
  try {
    releaseOwnMediaServerResources();
  }
 catch (  Throwable e) {
    getLogger().error(e.getMessage(),e);
  }
}
Program: 10867
Project: 10867
Buggy source:
public void callOnUncaughtExceptionThrown(Throwable t){
  try {
    internalRawCallToOnUncaughtExceptionThrown(t);
  }
 catch (  Throwable tw) {
    callOnUncaughtExceptionThrown(tw);
  }
}

Fixed version (ground truth):
public void callOnUncaughtExceptionThrown(Throwable t){
  try {
    internalRawCallToOnUncaughtExceptionThrown(t);
  }
 catch (  Throwable tw) {
    log.error("String_Node_Str",t);
    log.error("String_Node_Str",tw);
  }
}
Program: 10868
Project: 10868
Buggy source:
protected void internalSendRequestThrift(Request<Object> request,final Class<JsonElement> resultClass,final Continuation<Response<JsonElement>> continuation){
  LOG.info("String_Node_Str",request);
  if (request.getMethod().equals("String_Node_Str")) {
    JsonObject params=(JsonObject)request.getParams();
    params.addProperty("String_Node_Str",localHandlerAddress.getHostName());
    params.addProperty("String_Node_Str",localHandlerAddress.getPort());
  }
  sendRequest(request,resultClass,continuation,true);
}

Fixed version (ground truth):
protected void internalSendRequestThrift(Request<Object> request,final Class<JsonElement> resultClass,final Continuation<Response<JsonElement>> continuation){
  LOG.info("String_Node_Str",request);
  if (request.getMethod().equals("String_Node_Str")) {
    JsonObject params=(JsonObject)request.getParams();
    params.addProperty("String_Node_Str",localHandlerAddress.getHostString());
    params.addProperty("String_Node_Str",localHandlerAddress.getPort());
  }
  sendRequest(request,resultClass,continuation,true);
}
Program: 10869
Project: 10869
Buggy source:
private void internalEventJsonRpc(String request){
  try {
    LOG.debug("String_Node_Str",request.trim());
    Request<JsonObject> requestObj=JsonUtils.fromJsonRequest(request,JsonObject.class);
    JsonElement subsJsonElem=requestObj.getParams().get("String_Node_Str");
    if (subsJsonElem == null) {
      LOG.error("String_Node_Str",request);
      return;
    }
    String subscription=subsJsonElem.getAsString().trim();
    Session session=subscriptions.get(subscription);
    if (session == null) {
      LOG.error("String_Node_Str",subscriptions);
      LOG.info("String_Node_Str");
      return;
    }
    try {
      session.sendNotification("String_Node_Str",requestObj.getParams());
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void internalEventJsonRpc(String request){
  try {
    LOG.debug("String_Node_Str",request.trim());
    Request<JsonObject> requestObj=JsonUtils.fromJsonRequest(request,JsonObject.class);
    JsonElement subsJsonElem=requestObj.getParams().get("String_Node_Str").getAsJsonObject().get("String_Node_Str");
    if (subsJsonElem == null) {
      LOG.error("String_Node_Str",request);
      return;
    }
    String subscription=subsJsonElem.getAsString().trim();
    Session session=subscriptions.get(subscription);
    if (session == null) {
      LOG.error("String_Node_Str",subscriptions);
      LOG.info("String_Node_Str");
      return;
    }
    try {
      session.sendNotification("String_Node_Str",requestObj.getParams());
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 10870
Project: 10870
Buggy source:
protected void requestOnComplete(invokeJsonRpc_call mediaServerResponse,Transaction transaction,boolean subscribeResponse){
  try {
    String result=mediaServerResponse.getResult();
    Response<JsonElement> response=JsonUtils.fromJsonResponse(result,JsonElement.class);
    if (response.isError()) {
      ResponseError error=response.getError();
      transaction.sendError(error.getCode(),error.getMessage(),error.getData());
    }
 else {
      if (subscribeResponse) {
        String subscription=response.getResult().getAsString().trim();
        subscriptions.put(subscription,transaction.getSession());
      }
      transaction.sendResponse(response.getResult());
    }
  }
 catch (  TException e) {
    try {
      transaction.sendError(e);
    }
 catch (    IOException e1) {
      throw new KurentoMediaFrameworkException("String_Node_Str");
    }
  }
catch (  IOException e) {
    throw new KurentoMediaFrameworkException("String_Node_Str");
  }
}

Fixed version (ground truth):
protected void requestOnComplete(invokeJsonRpc_call mediaServerResponse,Transaction transaction,boolean subscribeResponse){
  try {
    String result=mediaServerResponse.getResult();
    Response<JsonElement> response=JsonUtils.fromJsonResponse(result,JsonElement.class);
    if (response.isError()) {
      ResponseError error=response.getError();
      transaction.sendError(error.getCode(),error.getMessage(),error.getData());
    }
 else {
      if (subscribeResponse) {
        try {
          String subscription=((JsonObject)response.getResult()).get("String_Node_Str").getAsString().trim();
          subscriptions.put(subscription,transaction.getSession());
        }
 catch (        Exception e) {
          LOG.error("String_Node_Str" + response + "String_Node_Str",e);
        }
      }
      transaction.sendResponse(response.getResult());
    }
  }
 catch (  TException e) {
    try {
      transaction.sendError(e);
    }
 catch (    IOException e1) {
      throw new KurentoMediaFrameworkException("String_Node_Str");
    }
  }
catch (  IOException e) {
    throw new KurentoMediaFrameworkException("String_Node_Str");
  }
}
Program: 10871
Project: 10871
Buggy source:
private <P,R>Response<R> sendRequestWebSocket(Request<P> request,Class<R> resultClass) throws IOException {
  Future<Response<JsonElement>> responseFuture=null;
  if (request.getId() != null) {
    responseFuture=pendingRequests.prepareResponse(request.getId());
  }
  try {
    wsSession.sendMessage(new TextMessage(JsonUtils.toJson(request)));
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",JsonUtils.toJson(request),wsSession.getId(),e);
    return null;
  }
  if (responseFuture == null) {
    return null;
  }
  Response<JsonElement> responseJsonObject;
  try {
    responseJsonObject=responseFuture.get();
  }
 catch (  InterruptedException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return MessageUtils.convertResponse(responseJsonObject,resultClass);
}

Fixed version (ground truth):
private <P,R>Response<R> sendRequestWebSocket(Request<P> request,Class<R> resultClass) throws IOException {
  Future<Response<JsonElement>> responseFuture=null;
  if (request.getId() != null) {
    responseFuture=pendingRequests.prepareResponse(request.getId());
  }
  try {
synchronized (wsSession) {
      wsSession.sendMessage(new TextMessage(JsonUtils.toJson(request)));
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",JsonUtils.toJson(request),wsSession.getId(),e);
    return null;
  }
  if (responseFuture == null) {
    return null;
  }
  Response<JsonElement> responseJsonObject;
  try {
    responseJsonObject=responseFuture.get();
  }
 catch (  InterruptedException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return MessageUtils.convertResponse(responseJsonObject,resultClass);
}
Program: 10872
Project: 10872
Buggy source:
@PostConstruct private void init(){
  ctx.getBean("String_Node_Str",this.processor,new InetSocketAddress(config.getHandlerAddress(),config.getHandlerPort()));
}

Fixed version (ground truth):
@PostConstruct private void init(){
  LOG.info("String_Node_Str" + config.getHandlerAddress());
  LOG.info("String_Node_Str" + config.getHandlerPort());
  ThriftServer server=(ThriftServer)ctx.getBean("String_Node_Str",this.processor,new InetSocketAddress(config.getHandlerAddress(),config.getHandlerPort()));
  server.start();
}
Program: 10873
Project: 10873
Buggy source:
@Override protected void doFilterInternal(HttpServletRequest request,HttpServletResponse response,FilterChain filterChain) throws ServletException, IOException {
  String fullUrl=request.getRequestURL().append('?').append(request.getQueryString()).toString();
  log.info("String_Node_Str",fullUrl);
  if (!Strings.isNullOrEmpty(props.getKeystoneHost())) {
    String accessToken=parseAccessToken(request);
    if (Strings.isNullOrEmpty(accessToken)) {
      log.warn("String_Node_Str",request.getRemoteAddr());
      response.sendError(HttpServletResponse.SC_UNAUTHORIZED,"String_Node_Str");
    }
 else     if (isTokenValid(accessToken)) {
      log.info("String_Node_Str",request.getRemoteAddr());
      filterChain.doFilter(request,response);
    }
 else {
      response.sendError(HttpServletResponse.SC_UNAUTHORIZED,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override protected void doFilterInternal(HttpServletRequest request,HttpServletResponse response,FilterChain filterChain) throws ServletException, IOException {
  String fullUrl=request.getRequestURL().append('?').append(request.getQueryString()).toString();
  log.info("String_Node_Str",fullUrl);
  if (!Strings.isNullOrEmpty(props.getKeystoneHost())) {
    String accessToken=parseAccessToken(request);
    if (Strings.isNullOrEmpty(accessToken)) {
      log.warn("String_Node_Str",request.getRemoteAddr());
      response.sendError(HttpServletResponse.SC_UNAUTHORIZED,"String_Node_Str");
    }
 else     if (isTokenValid(accessToken)) {
      log.info("String_Node_Str",request.getRemoteAddr());
      filterChain.doFilter(request,response);
    }
 else {
      response.sendError(HttpServletResponse.SC_UNAUTHORIZED,"String_Node_Str");
    }
  }
 else {
    log.info("String_Node_Str" + "String_Node_Str",request.getRemoteAddr());
    filterChain.doFilter(request,response);
  }
}
Program: 10874
Project: 10874
Buggy source:
@PostConstruct private void init(){
  LOG.info("String_Node_Str" + config.getHandlerAddress());
  LOG.info("String_Node_Str" + config.getHandlerPort());
  ThriftServer server=(ThriftServer)ctx.getBean("String_Node_Str",this.processor,new InetSocketAddress(config.getHandlerAddress(),config.getHandlerPort()));
  server.start();
}

Fixed version (ground truth):
@PostConstruct private void init(){
  LOG.info("String_Node_Str",config.getHandlerAddress());
  LOG.info("String_Node_Str",config.getHandlerPort());
  server=(ThriftServer)ctx.getBean("String_Node_Str",this.processor,new InetSocketAddress(config.getHandlerAddress(),config.getHandlerPort()));
  server.start();
}
Program: 10875
Project: 10875
Buggy source:
@Override public void eventJsonRpc(String request) throws TException {
  try {
    Request<JsonObject> requestObj=JsonUtils.fromJsonRequest(request,JsonObject.class);
    try {
      session.sendNotification("String_Node_Str",requestObj.getParams());
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
    }
  }
 catch (  Exception e) {
    throw new KurentoMediaFrameworkException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void eventJsonRpc(String request) throws TException {
  try {
    LOG.debug("String_Node_Str",request.trim());
    Request<JsonObject> requestObj=JsonUtils.fromJsonRequest(request,JsonObject.class);
    try {
      session.sendNotification("String_Node_Str",requestObj.getParams());
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
    }
  }
 catch (  Exception e) {
    throw new KurentoMediaFrameworkException("String_Node_Str",e);
  }
}
Program: 10876
Project: 10876
Buggy source:
@Override public void handleRequest(final Transaction transaction,final Request<JsonObject> request) throws Exception {
  final AsyncClient client=clientPool.acquireAsync();
  transaction.startAsync();
  if (request.getMethod().equals("String_Node_Str")) {
    request.getParams().addProperty("String_Node_Str",config.getHandlerAddress());
    request.getParams().addProperty("String_Node_Str",config.getHandlerPort());
  }
  client.invokeJsonRpc(request.toString(),new AsyncMethodCallback<invokeJsonRpc_call>(){
    @Override public void onComplete(    invokeJsonRpc_call response){
      clientPool.release(client);
      if (request.getId() != null)       requestOnComplete(response,transaction);
    }
    @Override public void onError(    Exception exception){
      clientPool.release(client);
      requestOnError(exception,transaction);
    }
  }
);
}

Fixed version (ground truth):
@Override public void handleRequest(final Transaction transaction,final Request<JsonObject> request) throws Exception {
  final AsyncClient client=clientPool.acquireAsync();
  transaction.startAsync();
  if (request.getMethod().equals("String_Node_Str")) {
    request.getParams().addProperty("String_Node_Str",config.getHandlerAddress());
    request.getParams().addProperty("String_Node_Str",config.getHandlerPort());
  }
  try {
    client.invokeJsonRpc(request.toString(),new AsyncMethodCallback<invokeJsonRpc_call>(){
      @Override public void onComplete(      invokeJsonRpc_call response){
        clientPool.release(client);
        if (request.getId() != null)         requestOnComplete(response,transaction);
      }
      @Override public void onError(      Exception exception){
        clientPool.release(client);
        requestOnError(exception,transaction);
      }
    }
);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str" + "String_Node_Str",e);
  }
}
Program: 10877
Project: 10877
Buggy source:
@Override public synchronized void onSessionTerminated(WebRtcContentSession session,int code,String reason) throws Exception {
  DispatcherParticipant participant=(DispatcherParticipant)session.getAttribute("String_Node_Str");
  participants.remove(participant.getId());
  participant.endpoint.release();
  participant.port.release();
  notifyUnjoined(participant);
  if (participants.isEmpty()) {
    getLogger().info("String_Node_Str");
    mp.release();
    mp=null;
    participants.clear();
  }
  super.onSessionTerminated(session,code,reason);
}

Fixed version (ground truth):
@Override public synchronized void onSessionTerminated(WebRtcContentSession session,int code,String reason) throws Exception {
  DispatcherParticipant participant=(DispatcherParticipant)session.getAttribute("String_Node_Str");
  participants.remove(participant.getId());
  notifyUnjoined(participant);
  if (participants.isEmpty()) {
    getLogger().info("String_Node_Str");
    mp.release();
    mp=null;
    participants.clear();
  }
  super.onSessionTerminated(session,code,reason);
}
Program: 10878
Project: 10878
Buggy source:
private boolean selectParticipant(WebRtcContentSession session,String partId){
  DispatcherParticipant partSelected=participants.get(partId);
  if (partSelected == null) {
    getLogger().error("String_Node_Str",partId);
    return false;
  }
  partSelected.endpoint.connect(((DispatcherParticipant)session.getAttribute("String_Node_Str")).endpoint);
  return true;
}

Fixed version (ground truth):
private boolean selectParticipant(WebRtcContentSession session,String partId){
  DispatcherParticipant partSelected=participants.get(partId);
  if (partSelected == null) {
    getLogger().error("String_Node_Str",partId);
    return false;
  }
  dispatcher.connect(partSelected.port,((DispatcherParticipant)session.getAttribute("String_Node_Str")).port);
  return true;
}
Program: 10879
Project: 10879
Buggy source:
@Override public void onContentRequest(HttpPlayerSession session) throws Exception {
  MediaPipelineFactory mpf=session.getMediaPipelineFactory();
  MediaPipeline mp=mpf.create();
  session.releaseOnTerminate(mp);
  PlayerEndpoint playerEndpoint=mp.newPlayerEndpoint("String_Node_Str").build();
  session.setAttribute("String_Node_Str",playerEndpoint);
  HttpEndpoint httpEndpoint=session.getMediaPipelineFactory().create().newHttpGetEndpoint().terminateOnEOS().build();
  playerEndpoint.connect(httpEndpoint);
  session.start(httpEndpoint);
}

Fixed version (ground truth):
@Override public void onContentRequest(HttpPlayerSession session) throws Exception {
  MediaPipelineFactory mpf=session.getMediaPipelineFactory();
  MediaPipeline mp=mpf.create();
  session.releaseOnTerminate(mp);
  PlayerEndpoint playerEndpoint=mp.newPlayerEndpoint("String_Node_Str").build();
  session.setAttribute("String_Node_Str",playerEndpoint);
  HttpEndpoint httpEndpoint=mp.newHttpGetEndpoint().terminateOnEOS().build();
  playerEndpoint.connect(httpEndpoint);
  session.start(httpEndpoint);
}