nus-yam/ex-repair huggingface dataset:
Program: 36129
Project: 36129
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: 36130
Project: 36130
Buggy source:
@Bean public ThriftConnectorJsonRpcHandler thriftConnectorJsonRpcHandler(){
  return new ThriftConnectorJsonRpcHandler();
}

Fixed version (ground truth):
@Bean public MediaConnectorJsonRpcHandler thriftConnectorJsonRpcHandler(){
  return new MediaConnectorJsonRpcHandler();
}
Program: 36131
Project: 36131
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: 36132
Project: 36132
Buggy source:
@Bean public ThriftConnectorJsonRpcHandler2 thriftConnectorJsonRpcHandler(){
  return new ThriftConnectorJsonRpcHandler2();
}

Fixed version (ground truth):
@Bean public ThriftConnectorJsonRpcHandler thriftConnectorJsonRpcHandler(){
  return new ThriftConnectorJsonRpcHandler();
}
Program: 36133
Project: 36133
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: 36135
Project: 36135
Buggy source:
@Override public void onEvent(MediaSessionStartedEvent event){
  player.play();
}

Fixed version (ground truth):
@Override public void onEvent(MediaSessionTerminatedEvent event){
  latch.countDown();
}
Program: 36136
Project: 36136
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: 36137
Project: 36137
Buggy source:
@Override public void onEvent(MediaSessionTerminatedEvent event){
  sem.release();
}

Fixed version (ground truth):
@Override public void onEvent(MediaSessionTerminatedEvent event){
  events.add(event);
}
Program: 36138
Project: 36138
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: 36139
Project: 36139
Buggy source:
@Override public void onEvent(MediaSessionTerminatedEvent event){
  sem.release();
}

Fixed version (ground truth):
@Override public void onEvent(MediaSessionStartedEvent event){
  player.play();
}
Program: 36140
Project: 36140
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: 36141
Project: 36141
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: 36142
Project: 36142
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: 36143
Project: 36143
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: 36144
Project: 36144
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: 36145
Project: 36145
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: 36146
Project: 36146
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: 36147
Project: 36147
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: 36148
Project: 36148
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: 36149
Project: 36149
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: 36150
Project: 36150
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: 36151
Project: 36151
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: 36152
Project: 36152
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: 36153
Project: 36153
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: 36154
Project: 36154
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: 36155
Project: 36155
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: 36156
Project: 36156
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: 36157
Project: 36157
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: 36158
Project: 36158
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: 36159
Project: 36159
Buggy source:
public static Object[] extractEventParams(Annotation[][] parameterAnnotations,Props data){
  List<String> names=getParamNames(parameterAnnotations);
  Object[] params=new Object[names.size()];
  for (int i=0; i < names.size(); i++) {
    String name=names.get(i);
    if (name.equals("String_Node_Str")) {
      params[i]=data.getProp(name);
    }
  }
  return params;
}

Fixed version (ground truth):
public static Object[] extractEventParams(Annotation[][] parameterAnnotations,Props data){
  List<String> names=getParamNames(parameterAnnotations);
  Object[] params=new Object[names.size()];
  for (int i=0; i < names.size(); i++) {
    String name=names.get(i);
    params[i]=data.getProp(name);
  }
  return params;
}
Program: 36160
Project: 36160
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);
}
Program: 36161
Project: 36161
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();
  JackVaderFilter filter=mp.newJackVaderFilter().build();
  playerEndPoint.connect(filter);
  session.setAttribute("String_Node_Str",playerEndPoint);
  HttpEndpoint httpEndpoint=session.getMediaPipelineFactory().create().newHttpGetEndpoint().terminateOnEOS().build();
  filter.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();
  JackVaderFilter filter=mp.newJackVaderFilter().build();
  playerEndPoint.connect(filter);
  session.setAttribute("String_Node_Str",playerEndPoint);
  HttpEndpoint httpEndpoint=mp.newHttpGetEndpoint().terminateOnEOS().build();
  filter.connect(httpEndpoint);
  session.start(httpEndpoint);
}
Program: 36162
Project: 36162
Buggy source:
@Override public void onContentRequest(HttpPlayerSession session) throws Exception {
  if (CpRtcRtpJackHandler.sharedFilterReference == null) {
    session.terminate(500,"String_Node_Str");
  }
 else {
    HttpEndpoint httpEndpoint=session.getMediaPipelineFactory().create().newHttpGetEndpoint().terminateOnEOS().build();
    CpRtcRtpJackHandler.sharedFilterReference.connect(httpEndpoint);
    session.start(httpEndpoint);
  }
}

Fixed version (ground truth):
@Override public void onContentRequest(HttpPlayerSession session) throws Exception {
  if (CpRtcRtpJackHandler.sharedFilterReference == null) {
    session.terminate(500,"String_Node_Str");
  }
 else {
    HttpEndpoint httpEndpoint=CpRtcRtpJackHandler.sharedFilterReference.getMediaPipeline().newHttpGetEndpoint().terminateOnEOS().build();
    CpRtcRtpJackHandler.sharedFilterReference.connect(httpEndpoint);
    session.start(httpEndpoint);
  }
}
Program: 36163
Project: 36163
Buggy source:
@Override public void onContentRequest(final HttpPlayerSession session) throws Exception {
  if (CpRtcRtpZbarHandler.sharedFilterReference == null) {
    session.terminate(500,"String_Node_Str");
    return;
  }
  CpRtcRtpZbarHandler.sharedFilterReference.addCodeFoundListener(new MediaEventListener<CodeFoundEvent>(){
    @Override public void onEvent(    CodeFoundEvent event){
      session.publishEvent(new ContentEvent(event.getType(),event.getValue()));
    }
  }
);
  HttpEndpoint httpEndpoint=session.getMediaPipelineFactory().create().newHttpGetEndpoint().terminateOnEOS().build();
  CpRtcRtpZbarHandler.sharedFilterReference.connect(httpEndpoint);
  session.start(httpEndpoint);
}

Fixed version (ground truth):
@Override public void onContentRequest(final HttpPlayerSession session) throws Exception {
  if (CpRtcRtpZbarHandler.sharedFilterReference == null) {
    session.terminate(500,"String_Node_Str");
    return;
  }
  CpRtcRtpZbarHandler.sharedFilterReference.addCodeFoundListener(new MediaEventListener<CodeFoundEvent>(){
    @Override public void onEvent(    CodeFoundEvent event){
      session.publishEvent(new ContentEvent(event.getType(),event.getValue()));
    }
  }
);
  HttpEndpoint httpEndpoint=CpRtcRtpZbarHandler.sharedFilterReference.getMediaPipeline().newHttpGetEndpoint().terminateOnEOS().build();
  CpRtcRtpZbarHandler.sharedFilterReference.connect(httpEndpoint);
  session.start(httpEndpoint);
}
Program: 36164
Project: 36164
Buggy source:
@Bean public ServletRegistrationBean repositoryServletRegistrationBean(){
  return new ServletRegistrationBean(new RepositoryHttpServlet(),"String_Node_Str");
}

Fixed version (ground truth):
@Bean public ServletRegistrationBean repositoryServletRegistrationBean(){
  ServletRegistrationBean servletRegistrationBean=new ServletRegistrationBean(new RepositoryHttpServlet(),"String_Node_Str");
  servletRegistrationBean.setLoadOnStartup(1);
  return servletRegistrationBean;
}
Program: 36165
Project: 36165
Buggy source:
public static ResponseError newFromException(Exception e){
  StringWriter writer=new StringWriter();
  e.printStackTrace(new PrintWriter(writer));
  return new ResponseError(1,e.getClass().getSimpleName() + "String_Node_Str" + e.getMessage(),writer.toString());
}

Fixed version (ground truth):
public static ResponseError newFromException(Exception e){
  StringWriter writer=new StringWriter();
  e.printStackTrace(new PrintWriter(writer));
  return new ResponseError(-1,e.getClass().getSimpleName() + "String_Node_Str" + e.getMessage(),writer.toString());
}
Program: 36166
Project: 36166
Buggy source:
@Test public void test() throws IOException, InterruptedException {
  JsonRpcClient client=createJsonRpcClient("String_Node_Str");
  try {
    client.sendRequest("String_Node_Str");
    Assert.fail("String_Node_Str");
  }
 catch (  JsonRpcErrorException e) {
    Assert.assertEquals("String_Node_Str",e.getMessage());
    Assert.assertEquals("String_Node_Str",e.getData());
    Assert.assertEquals(-1,e.getCode());
  }
  try {
    client.sendRequest("String_Node_Str");
    Assert.fail("String_Node_Str");
  }
 catch (  JsonRpcErrorException e) {
    Assert.assertEquals("String_Node_Str",e.getMessage());
    Assert.assertEquals("String_Node_Str",e.getData());
    Assert.assertEquals(-1,e.getCode());
  }
  try {
    client.sendRequest("String_Node_Str");
    Assert.fail("String_Node_Str");
  }
 catch (  RuntimeException e) {
    String expected="String_Node_Str";
    Assert.assertEquals(expected,e.getMessage().substring(0,expected.length()));
  }
  client.close();
}

Fixed version (ground truth):
@Test public void test() throws IOException, InterruptedException {
  JsonRpcClient client=createJsonRpcClient("String_Node_Str");
  try {
    client.sendRequest("String_Node_Str");
    Assert.fail("String_Node_Str");
  }
 catch (  JsonRpcErrorException e) {
    checkException(e,"String_Node_Str","String_Node_Str");
  }
  try {
    client.sendRequest("String_Node_Str");
    Assert.fail("String_Node_Str");
  }
 catch (  JsonRpcErrorException e) {
    checkException(e,"String_Node_Str","String_Node_Str");
  }
  try {
    client.sendRequest("String_Node_Str");
    Assert.fail("String_Node_Str");
  }
 catch (  JsonRpcErrorException e) {
    checkException(e,"String_Node_Str","String_Node_Str");
  }
  client.close();
}
Program: 36167
Project: 36167
Buggy source:
@Override public void addWindow(PointerDetectorWindowMediaParam window,Continuation<Void> cont){
  Map<String,MediaParam> params=new HashMap<String,MediaParam>(4);
  PointerDetectorWindowMediaParam param=new PointerDetectorWindowMediaParamBuilder(window.getId(),window.getHeight(),window.getWidth(),window.getUpperRightX(),window.getUpperRightY()).build();
  params.put(ADD_NEW_WINDOW_PARAM_WINDOW,param);
  invoke(ADD_NEW_WINDOW,params,new VoidContinuationWrapper(cont));
}

Fixed version (ground truth):
@Override public void addWindow(PointerDetectorWindowMediaParam window,Continuation<Void> cont){
  Map<String,MediaParam> params=newHashMapWithExpectedSize(1);
  params.put(ADD_NEW_WINDOW_PARAM_WINDOW,window);
  invoke(ADD_NEW_WINDOW,params,new VoidContinuationWrapper(cont));
}
Program: 36168
Project: 36168
Buggy source:
@Override public void removeWindow(String windowId,Continuation<Void> cont){
  Map<String,MediaParam> params=new HashMap<String,MediaParam>(4);
  StringMediaParam param=new StringMediaParam();
  param.setString(windowId);
  params.put(REMOVE_WINDOW_PARAM_WINDOW_ID,param);
  invoke(REMOVE_WINDOW,params,new VoidContinuationWrapper(cont));
}

Fixed version (ground truth):
@Override public void removeWindow(String windowId,Continuation<Void> cont){
  Map<String,MediaParam> params=newHashMapWithExpectedSize(1);
  StringMediaParam param=new StringMediaParam();
  param.setString(windowId);
  params.put(REMOVE_WINDOW_PARAM_WINDOW_ID,param);
  invoke(REMOVE_WINDOW,params,new VoidContinuationWrapper(cont));
}
Program: 36169
Project: 36169
Buggy source:
/** 
 * Adds a new detector window, represented by a simple square or rectangle in the image.
 * @param id
 * @param height
 * @param width
 * @param upperRightX
 * @param upperRightY
 * @return an adder object to add created windows to the set of windows
 */
public void addDetectorWindow(PointerDetectorWindowMediaParam window){
  KmsMediaPointerDetectorWindow kmsWindow=new KmsMediaPointerDetectorWindow(window.getUpperRightX(),window.getUpperRightY(),window.getWidth(),window.getHeight(),window.getId());
  windows.add(kmsWindow);
}

Fixed version (ground truth):
/** 
 * Adds a new detector window, represented by a simple square or rectangle in the image.
 * @param id
 * @param height
 * @param width
 * @param upperRightX
 * @param upperRightY
 * @return an adder object to add created windows to the set of windows
 */
public void addDetectorWindow(PointerDetectorWindowMediaParam window){
  KmsMediaPointerDetectorWindow kmsWindow=new KmsMediaPointerDetectorWindow(window.getUpperRightX(),window.getUpperRightY(),window.getWidth(),window.getHeight(),window.getId());
  kmsWindow.setActiveOverlayImageUri(window.getActiveImageUri().toString());
  kmsWindow.setInactiveOverlayImageUri(window.getInactiveImageUri().toString());
  kmsWindow.setOverlayTransparency(window.getImageTransparency());
  windows.add(kmsWindow);
}
Program: 36170
Project: 36170
Buggy source:
/** 
 * Constructor for the builder, with the minimum set of attributes to build a window. If no further configuration is don, the window will appear outlined as a box.
 * @param id id of the window
 * @param height of the window
 * @param width of the window
 * @param upperRightX x coordinate of the upper right corner
 * @param upperRightY y coordinate of the upper right corner
 */
public PointerDetectorWindowMediaParamBuilder(final String id,final int height,final int width,final int upperRightX,final int upperRightY){
  window=new KmsMediaPointerDetectorWindow(height,height,width,height,id);
}

Fixed version (ground truth):
/** 
 * Constructor for the builder, with the minimum set of attributes to build a window. If no further configuration is don, the window will appear outlined as a box.
 * @param id id of the window
 * @param height of the window
 * @param width of the window
 * @param upperRightX x coordinate of the upper right corner
 * @param upperRightY y coordinate of the upper right corner
 */
public PointerDetectorWindowMediaParamBuilder(final String id,final int height,final int width,final int upperRightX,final int upperRightY){
  window=new KmsMediaPointerDetectorWindow(upperRightX,upperRightY,width,height,id);
}
Program: 36171
Project: 36171
Buggy source:
protected Map<String,KmsMediaParam> transformMediaParamsMap(Map<String,MediaParam> params){
  int mapSize=1 + (int)(params.size() / 0.75);
  Map<String,KmsMediaParam> kmsParams=new HashMap<String,KmsMediaParam>(mapSize);
  for (  Entry<String,MediaParam> entry : params.entrySet()) {
    kmsParams.put(entry.getKey(),((AbstractMediaParam)entry.getValue()).getThriftParams());
  }
  return kmsParams;
}

Fixed version (ground truth):
protected Map<String,KmsMediaParam> transformMediaParamsMap(Map<String,MediaParam> params){
  Map<String,KmsMediaParam> kmsParams=newHashMapWithExpectedSize(params.size());
  for (  Entry<String,MediaParam> entry : params.entrySet()) {
    kmsParams.put(entry.getKey(),((AbstractMediaParam)entry.getValue()).getThriftParams());
  }
  return kmsParams;
}
Program: 36172
Project: 36172
Buggy source:
@Override public T withWindow(PointerDetectorWindowMediaParam window){
  param.addDetectorWindow(window);
  return self();
}

Fixed version (ground truth):
@Override public T withWindow(PointerDetectorWindowMediaParam window){
  initialiseMediaParam();
  param.addDetectorWindow(window);
  return self();
}
Program: 36173
Project: 36173
Buggy source:
@Override public void addWindow(PointerDetectorWindowMediaParam window,Continuation<Void> cont){
}

Fixed version (ground truth):
@Override public void addWindow(PointerDetectorWindowMediaParam window,Continuation<Void> cont){
  Map<String,MediaParam> params=new HashMap<String,MediaParam>(4);
  PointerDetectorWindowMediaParam param=new PointerDetectorWindowMediaParamBuilder(window.getId(),window.getHeight(),window.getWidth(),window.getUpperRightX(),window.getUpperRightY()).build();
  params.put(ADD_NEW_WINDOW_PARAM_WINDOW,param);
  invoke(ADD_NEW_WINDOW,params,new VoidContinuationWrapper(cont));
}
Program: 36174
Project: 36174
Buggy source:
@Override public void removeWindow(String windowId,Continuation<Void> cont){
  Map<String,MediaParam> params=new HashMap<String,MediaParam>(4);
  StringMediaParam param=new StringMediaParam();
  param.setString(windowId);
  params.put(REMOVE_WINDOW_PARAM_WINDOW_ID,param);
  invoke(REMOVE_WINDOW,params);
}

Fixed version (ground truth):
@Override public void removeWindow(String windowId,Continuation<Void> cont){
  Map<String,MediaParam> params=new HashMap<String,MediaParam>(4);
  StringMediaParam param=new StringMediaParam();
  param.setString(windowId);
  params.put(REMOVE_WINDOW_PARAM_WINDOW_ID,param);
  invoke(REMOVE_WINDOW,params,new VoidContinuationWrapper(cont));
}
Program: 36175
Project: 36175
Buggy source:
/** 
 * Adds a new detector window, represented by a simple square or rectangle in the image.
 * @param id
 * @param height
 * @param width
 * @param upperRightX
 * @param upperRightY
 * @return an adder object to add created windows to the set of windows
 */
public void addDetectorWindow(PointerDetectorWindowMediaParam window){
}

Fixed version (ground truth):
/** 
 * Adds a new detector window, represented by a simple square or rectangle in the image.
 * @param id
 * @param height
 * @param width
 * @param upperRightX
 * @param upperRightY
 * @return an adder object to add created windows to the set of windows
 */
public void addDetectorWindow(PointerDetectorWindowMediaParam window){
  KmsMediaPointerDetectorWindow kmsWindow=new KmsMediaPointerDetectorWindow(window.getUpperRightX(),window.getUpperRightY(),window.getWidth(),window.getHeight(),window.getId());
  windows.add(kmsWindow);
}