nus-yam/ex-repair huggingface dataset:
Program: 61943
Project: 61943
Buggy source:
public static void main(String[] args) throws Exception {
  Client noRedirects=GuiceContext.HubCommonModule.buildJerseyClientNoRedirects();
  Client follows=GuiceContext.HubCommonModule.buildJerseyClient();
  ChannelUtils channelUtils=new ChannelUtils(noRedirects,follows);
  ClientContainer container=new ClientContainer();
  container.start();
  MetricRegistry metricRegistry=new MetricRegistry();
  ConsoleReporter reporter=ConsoleReporter.forRegistry(metricRegistry).build();
  reporter.start(1,TimeUnit.SECONDS);
  Channel testy10=new Channel("String_Node_Str","String_Node_Str");
  SequenceIterator iterator=new SequenceIterator(700457,channelUtils,testy10,container,metricRegistry);
  while (iterator.hasNext()) {
    Content next=iterator.next();
  }
  logger.info("String_Node_Str");
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  Client noRedirects=GuiceContext.HubCommonModule.buildJerseyClientNoRedirects();
  Client follows=GuiceContext.HubCommonModule.buildJerseyClient();
  ChannelUtils channelUtils=new ChannelUtils(noRedirects,follows);
  ClientContainer container=new ClientContainer();
  container.start();
  MetricRegistry metricRegistry=new MetricRegistry();
  ConsoleReporter reporter=ConsoleReporter.forRegistry(metricRegistry).build();
  reporter.start(1,TimeUnit.SECONDS);
  Channel testy10=new Channel("String_Node_Str","String_Node_Str");
  SequenceIterator iterator=new SequenceIterator(700457,channelUtils,testy10,container,metricRegistry);
  while (iterator.hasNext()) {
  }
  logger.info("String_Node_Str");
}
Program: 61944
Project: 61944
Buggy source:
private void check(SequenceIterator iterator,String data){
  assertTrue(iterator.hasNext());
  Content content=iterator.next();
  logger.debug("String_Node_Str" + new String(content.getData()) + "String_Node_Str"+ content.getContentKey().get());
  assertNotNull(content);
  assertArrayEquals(data.getBytes(),content.getData());
}

Fixed version (ground truth):
private void check(SequenceIterator iterator,String data){
  assertTrue(iterator.hasNext());
  Content content=iterator.next().get();
  logger.debug("String_Node_Str" + new String(content.getData()) + "String_Node_Str"+ content.getContentKey().get());
  assertNotNull(content);
  assertArrayEquals(data.getBytes(),content.getData());
}
Program: 61945
Project: 61945
Buggy source:
private void replicate(){
  long sequence=getStartingSequence();
  if (sequence == ChannelUtils.NOT_FOUND) {
    return;
  }
  logger.info("String_Node_Str" + channel.getUrl() + "String_Node_Str"+ sequence);
  iterator=sequenceIteratorFactory.create(sequence,channel);
  while (iterator.hasNext() && curatorLock.shouldKeepWorking()) {
    channelService.insert(channel.getName(),iterator.next());
  }
}

Fixed version (ground truth):
private void replicate(){
  long sequence=getStartingSequence();
  if (sequence == ChannelUtils.NOT_FOUND) {
    return;
  }
  logger.info("String_Node_Str" + channel.getUrl() + "String_Node_Str"+ sequence);
  iterator=sequenceIteratorFactory.create(sequence,channel);
  while (iterator.hasNext() && curatorLock.shouldKeepWorking()) {
    Optional<Content> optionalContent=iterator.next();
    if (optionalContent.isPresent()) {
      channelService.insert(channel.getName(),optionalContent.get());
    }
  }
}
Program: 61946
Project: 61946
Buggy source:
public Optional<Long> getLatestSequence(String channelUrl){
  channelUrl=appendSlash(channelUrl);
  ClientResponse response=noRedirectsClient.resource(channelUrl + "String_Node_Str").accept(MediaType.WILDCARD_TYPE).head();
  if (response.getStatus() != Response.Status.SEE_OTHER.getStatusCode()) {
    logger.debug("String_Node_Str" + channelUrl + "String_Node_Str"+ response);
    return Optional.absent();
  }
  String location=response.getLocation().toString();
  String substring=location.substring(channelUrl.length());
  return Optional.of(Long.parseLong(substring));
}

Fixed version (ground truth):
public Optional<Long> getLatestSequence(String channelUrl){
  channelUrl=appendSlash(channelUrl);
  ClientResponse response=noRedirectsClient.resource(channelUrl + "String_Node_Str").accept(MediaType.WILDCARD_TYPE).head();
  if (response.getStatus() != Response.Status.SEE_OTHER.getStatusCode()) {
    logger.info("String_Node_Str" + channelUrl + "String_Node_Str"+ response);
    return Optional.absent();
  }
  String location=response.getLocation().toString();
  String substring=location.substring(channelUrl.length());
  return Optional.of(Long.parseLong(substring));
}
Program: 61947
Project: 61947
Buggy source:
@Override public Content next(){
  Optional<Content> optional=channelUtils.getContent(channelUrl,current);
  while (!optional.isPresent()) {
    logger.warn("String_Node_Str" + channelUrl + "String_Node_Str"+ current);
    current++;
    optional=channelUtils.getContent(channelUrl,current);
  }
  return optional.get();
}

Fixed version (ground truth):
@Override public Optional<Content> next(){
  Optional<Content> optional=channelUtils.getContent(channelUrl,current);
  if (!optional.isPresent()) {
    logger.warn("String_Node_Str" + channelUrl + "String_Node_Str"+ current);
    optional=channelUtils.getContent(channelUrl,current);
  }
  return optional;
}
Program: 61948
Project: 61948
Buggy source:
@OnError public void onError(Throwable throwable){
  if (throwable.getClass().isAssignableFrom(SocketTimeoutException.class) || throwable.getClass().isAssignableFrom(EOFException.class)) {
    logger.info("String_Node_Str" + channelUrl + "String_Node_Str"+ throwable.getMessage());
  }
 else {
    logger.warn("String_Node_Str" + channelUrl,throwable);
  }
  exit();
}

Fixed version (ground truth):
@OnError public void onError(Throwable throwable){
  if (throwable.getClass().isAssignableFrom(SocketTimeoutException.class) || throwable.getClass().isAssignableFrom(EOFException.class)) {
    logger.info("String_Node_Str" + channel + "String_Node_Str"+ throwable.getMessage());
  }
 else {
    logger.warn("String_Node_Str" + channel,throwable);
  }
  exit();
}
Program: 61949
Project: 61949
Buggy source:
@OnClose public void onClose(CloseReason reason){
  logger.info("String_Node_Str" + reason);
  exit();
}

Fixed version (ground truth):
@OnClose public void onClose(CloseReason reason){
  logger.info("String_Node_Str" + reason + "String_Node_Str"+ channel);
  exit();
}
Program: 61950
Project: 61950
Buggy source:
@OnMessage public void onMessage(String message){
  try {
    long sequence=Long.parseLong(StringUtils.substringAfterLast(message,"String_Node_Str"));
    logger.debug("String_Node_Str",sequence);
    if (sequence > latest.get()) {
      latest.set(sequence);
    }
    signal();
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str" + message + "String_Node_Str"+ channelUrl,e);
  }
}

Fixed version (ground truth):
@OnMessage public void onMessage(String message){
  try {
    long sequence=Long.parseLong(StringUtils.substringAfterLast(message,"String_Node_Str"));
    logger.debug("String_Node_Str",channel,sequence);
    if (sequence > latest.get()) {
      latest.set(sequence);
      signal();
    }
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str" + message + "String_Node_Str"+ channel,e);
  }
}
Program: 61951
Project: 61951
Buggy source:
public ClientResponse handle(ClientRequest clientRequest) throws ClientHandlerException {
  int i=0;
  int maxRetries=3;
  int sleep=1000;
  ClientHandlerException lastCause=null;
  while (i < maxRetries) {
    i++;
    try {
      ClientResponse response=getNext().handle(clientRequest);
      if (response.getStatus() >= 500) {
        logger.info("String_Node_Str",response,i);
        if (i >= maxRetries) {
          return response;
        }
      }
 else {
        return response;
      }
    }
 catch (    ClientHandlerException e) {
      if (e.getCause() == null) {
        throw e;
      }
      if (UnknownHostException.class.isAssignableFrom(e.getCause().getClass())) {
        throw e;
      }
      lastCause=e;
      logger.info("String_Node_Str",clientRequest.getURI().toString(),i);
      logger.debug(clientRequest.getURI().toString() + "String_Node_Str",e);
      Sleeper.sleep(sleep * i);
    }
  }
  String msg="String_Node_Str" + maxRetries + "String_Node_Str"+ clientRequest.getURI();
  logger.warn(msg);
  throw lastCause;
}

Fixed version (ground truth):
public ClientResponse handle(ClientRequest clientRequest) throws ClientHandlerException {
  int maxRetries=5;
  int sleep=1000;
  ClientHandlerException lastCause=null;
  int attempt=0;
  while (attempt < maxRetries) {
    attempt++;
    try {
      ClientResponse response=getNext().handle(clientRequest);
      if (response.getStatus() >= 500) {
        logger.info("String_Node_Str",response,attempt);
        if (attempt >= maxRetries) {
          return response;
        }
      }
 else {
        return response;
      }
    }
 catch (    ClientHandlerException e) {
      if (e.getCause() == null) {
        throw e;
      }
      if (UnknownHostException.class.isAssignableFrom(e.getCause().getClass())) {
        throw e;
      }
      lastCause=e;
      logger.info("String_Node_Str",clientRequest.getURI().toString(),attempt);
      logger.debug(clientRequest.getURI().toString() + "String_Node_Str",e);
      Sleeper.sleep(sleep * 2 ^ attempt);
    }
  }
  String msg="String_Node_Str" + maxRetries + "String_Node_Str"+ clientRequest.getURI();
  logger.warn(msg);
  throw lastCause;
}
Program: 61952
Project: 61952
Buggy source:
@Test public void testLifeCycleNew() throws Exception {
  Content content=mock(Content.class);
  when(sequenceIterator.hasNext()).thenReturn(true).thenReturn(true).thenReturn(false);
  when(sequenceIterator.next()).thenReturn(content).thenReturn(content).thenReturn(null);
  when(channelUtils.getLatestSequence(URL)).thenReturn(Optional.<Long>absent());
  replicator.verifyRemoteChannel();
  replicator.runWithLock();
  verify(channelService).createChannel(configuration);
  verify(channelService,new Times(2)).insert(CHANNEL,content);
}

Fixed version (ground truth):
@Test public void testLifeCycleNew() throws Exception {
  Content content=mock(Content.class);
  Optional<Content> optional=Optional.of(content);
  when(sequenceIterator.hasNext()).thenReturn(true).thenReturn(true).thenReturn(false);
  when(sequenceIterator.next()).thenReturn(optional).thenReturn(optional).thenReturn(null);
  when(channelUtils.getLatestSequence(URL)).thenReturn(Optional.<Long>absent());
  replicator.verifyRemoteChannel();
  replicator.runWithLock();
  verify(channelService).createChannel(configuration);
  verify(channelService,new Times(2)).insert(CHANNEL,content);
}
Program: 61953
Project: 61953
Buggy source:
public static void main(String[] args) throws Exception {
  Client noRedirects=GuiceContext.HubCommonModule.buildJerseyClientNoRedirects();
  Client follows=GuiceContext.HubCommonModule.buildJerseyClient();
  ChannelUtils channelUtils=new ChannelUtils(noRedirects,follows);
  ClientContainer container=new ClientContainer();
  container.start();
  MetricRegistry metricRegistry=new MetricRegistry();
  ConsoleReporter reporter=ConsoleReporter.forRegistry(metricRegistry).build();
  reporter.start(1,TimeUnit.SECONDS);
  Channel testy10=new Channel("String_Node_Str","String_Node_Str");
  SequenceIterator iterator=new SequenceIterator(700457,channelUtils,testy10,container,metricRegistry);
  while (iterator.hasNext()) {
    Content next=iterator.next();
  }
  logger.info("String_Node_Str");
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  Client noRedirects=GuiceContext.HubCommonModule.buildJerseyClientNoRedirects();
  Client follows=GuiceContext.HubCommonModule.buildJerseyClient();
  ChannelUtils channelUtils=new ChannelUtils(noRedirects,follows);
  ClientContainer container=new ClientContainer();
  container.start();
  MetricRegistry metricRegistry=new MetricRegistry();
  ConsoleReporter reporter=ConsoleReporter.forRegistry(metricRegistry).build();
  reporter.start(1,TimeUnit.SECONDS);
  Channel testy10=new Channel("String_Node_Str","String_Node_Str");
  SequenceIterator iterator=new SequenceIterator(700457,channelUtils,testy10,container,metricRegistry);
  while (iterator.hasNext()) {
  }
  logger.info("String_Node_Str");
}
Program: 61954
Project: 61954
Buggy source:
private void check(SequenceIterator iterator,String data){
  assertTrue(iterator.hasNext());
  Content content=iterator.next();
  logger.debug("String_Node_Str" + new String(content.getData()) + "String_Node_Str"+ content.getContentKey().get());
  assertNotNull(content);
  assertArrayEquals(data.getBytes(),content.getData());
}

Fixed version (ground truth):
private void check(SequenceIterator iterator,String data){
  assertTrue(iterator.hasNext());
  Content content=iterator.next().get();
  logger.debug("String_Node_Str" + new String(content.getData()) + "String_Node_Str"+ content.getContentKey().get());
  assertNotNull(content);
  assertArrayEquals(data.getBytes(),content.getData());
}
Program: 61955
Project: 61955
Buggy source:
@Test public void testSimple() throws Exception {
  Channel channel=new Channel(channelName,channelUrl);
  SequenceIterator iterator=factory.create(999,channel);
  check(iterator,"String_Node_Str");
  check(iterator,"String_Node_Str");
  for (int i=3; i < 10; i++) {
    String data="String_Node_Str" + i;
    insert(data);
    check(iterator,data);
  }
}

Fixed version (ground truth):
@Test public void testSimple() throws Exception {
  Channel channel=new Channel(channelName,channelUrl);
  SequenceIterator iterator=factory.create(999,channel);
  check(iterator,"String_Node_Str");
  check(iterator,"String_Node_Str");
  int end=insertAndCheck(iterator,3);
  iterator.exit();
  iterator=factory.create(iterator.getCurrent(),channel);
  insertAndCheck(iterator,end);
}
Program: 61956
Project: 61956
Buggy source:
private void check(SequenceIterator iterator,String data){
  assertTrue(iterator.hasNext());
  Content content=iterator.next();
  assertNotNull(content);
  assertArrayEquals(data.getBytes(),content.getData());
}

Fixed version (ground truth):
private void check(SequenceIterator iterator,String data){
  assertTrue(iterator.hasNext());
  Content content=iterator.next();
  logger.debug("String_Node_Str" + new String(content.getData()) + "String_Node_Str"+ content.getContentKey().get());
  assertNotNull(content);
  assertArrayEquals(data.getBytes(),content.getData());
}
Program: 61957
Project: 61957
Buggy source:
@VisibleForTesting boolean verifyRemoteChannel(){
  try {
    Optional<ChannelConfiguration> optionalConfig=channelUtils.getConfiguration(channel.getUrl());
    if (!optionalConfig.isPresent()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    configuration=optionalConfig.get();
    if (!configuration.isSequence()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    return true;
  }
 catch (  IOException e) {
    message="String_Node_Str" + channel.getUrl() + "String_Node_Str"+ e.getMessage();
    logger.warn(message);
    return false;
  }
}

Fixed version (ground truth):
@VisibleForTesting boolean verifyRemoteChannel(){
  try {
    Optional<ChannelConfiguration> optionalConfig=channelUtils.getConfiguration(channel.getUrl());
    if (!optionalConfig.isPresent()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    configuration=optionalConfig.get();
    logger.debug("String_Node_Str" + configuration);
    if (!configuration.isSequence()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    return true;
  }
 catch (  IOException e) {
    message="String_Node_Str" + channel.getUrl() + "String_Node_Str"+ e.getMessage();
    logger.warn(message);
    return false;
  }
}
Program: 61958
Project: 61958
Buggy source:
private ClientResponse getResponse(String url){
  return noRedirectsClient.resource(url).accept(MediaType.WILDCARD_TYPE).header(HttpHeaders.ACCEPT_ENCODING,"String_Node_Str").get(ClientResponse.class);
}

Fixed version (ground truth):
private ClientResponse getResponse(String url){
  return followClient.resource(url).accept(MediaType.WILDCARD_TYPE).header(HttpHeaders.ACCEPT_ENCODING,"String_Node_Str").get(ClientResponse.class);
}
Program: 61959
Project: 61959
Buggy source:
public Optional<Content> getContent(String channelUrl,long sequence){
  ClientResponse response=getResponse(appendSlash(channelUrl) + sequence);
  if (response.getStatus() != Response.Status.OK.getStatusCode()) {
    logger.debug("String_Node_Str" + response);
    return Optional.absent();
  }
  Content content=Content.builder().withContentKey(new SequenceContentKey(sequence)).withContentType(response.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE)).withContentLanguage(response.getHeaders().getFirst(Headers.LANGUAGE)).withData(response.getEntity(byte[].class)).withMillis(getCreationDate(response).getMillis()).build();
  return Optional.of(content);
}

Fixed version (ground truth):
public Optional<Content> getContent(String channelUrl,long sequence){
  ClientResponse response=getResponse(appendSlash(channelUrl) + sequence);
  if (response.getStatus() != Response.Status.OK.getStatusCode()) {
    logger.info("String_Node_Str" + response);
    return Optional.absent();
  }
  Content content=Content.builder().withContentKey(new SequenceContentKey(sequence)).withContentType(response.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE)).withContentLanguage(response.getHeaders().getFirst(Headers.LANGUAGE)).withData(response.getEntity(byte[].class)).withMillis(getCreationDate(response).getMillis()).build();
  return Optional.of(content);
}
Program: 61960
Project: 61960
Buggy source:
@Override public Content next(){
  Optional<Content> optional=channelUtils.getContent(channelUrl,current);
  while (!optional.isPresent()) {
    logger.warn("String_Node_Str" + channelUrl + current);
    current++;
    optional=channelUtils.getContent(channelUrl,current);
  }
  return optional.get();
}

Fixed version (ground truth):
@Override public Content next(){
  Optional<Content> optional=channelUtils.getContent(channelUrl,current);
  while (!optional.isPresent()) {
    logger.warn("String_Node_Str" + channelUrl + "String_Node_Str"+ current);
    current++;
    optional=channelUtils.getContent(channelUrl,current);
  }
  return optional.get();
}
Program: 61961
Project: 61961
Buggy source:
private void startMetrics(){
  String name="String_Node_Str" + URI.create(channelUrl).getHost() + "String_Node_Str"+ channel.getName()+ "String_Node_Str";
  metricRegistry.register(name,new Gauge<Long>(){
    @Override public Long getValue(){
      long delta=getDelta();
      logger.info("String_Node_Str" + delta);
      return delta;
    }
  }
);
}

Fixed version (ground truth):
private void startMetrics(){
  String name="String_Node_Str" + URI.create(channelUrl).getHost() + "String_Node_Str"+ channel.getName()+ "String_Node_Str";
  metricRegistry.remove(name);
  metricRegistry.register(name,new Gauge<Long>(){
    @Override public Long getValue(){
      long delta=getDelta();
      logger.info("String_Node_Str" + delta);
      return delta;
    }
  }
);
}
Program: 61962
Project: 61962
Buggy source:
@VisibleForTesting boolean verifyRemoteChannel(){
  try {
    Optional<ChannelConfiguration> optionalConfig=channelUtils.getConfiguration(channel.getUrl());
    if (!optionalConfig.isPresent()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    configuration=optionalConfig.get();
    if (!configuration.isSequence()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    return true;
  }
 catch (  IOException e) {
    message="String_Node_Str" + channel.getUrl() + "String_Node_Str"+ e.getMessage();
    logger.warn(message);
    return false;
  }
}

Fixed version (ground truth):
@VisibleForTesting boolean verifyRemoteChannel(){
  try {
    Optional<ChannelConfiguration> optionalConfig=channelUtils.getConfiguration(channel.getUrl());
    if (!optionalConfig.isPresent()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    configuration=optionalConfig.get();
    logger.debug("String_Node_Str" + configuration);
    if (!configuration.isSequence()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    return true;
  }
 catch (  IOException e) {
    message="String_Node_Str" + channel.getUrl() + "String_Node_Str"+ e.getMessage();
    logger.warn(message);
    return false;
  }
}
Program: 61963
Project: 61963
Buggy source:
private ClientResponse getResponse(String url){
  return noRedirectsClient.resource(url).accept(MediaType.WILDCARD_TYPE).header(HttpHeaders.ACCEPT_ENCODING,"String_Node_Str").get(ClientResponse.class);
}

Fixed version (ground truth):
private ClientResponse getResponse(String url){
  return followClient.resource(url).accept(MediaType.WILDCARD_TYPE).header(HttpHeaders.ACCEPT_ENCODING,"String_Node_Str").get(ClientResponse.class);
}
Program: 61964
Project: 61964
Buggy source:
public Optional<Content> getContent(String channelUrl,long sequence){
  ClientResponse response=getResponse(appendSlash(channelUrl) + sequence);
  if (response.getStatus() != Response.Status.OK.getStatusCode()) {
    logger.debug("String_Node_Str" + response);
    return Optional.absent();
  }
  Content content=Content.builder().withContentKey(new SequenceContentKey(sequence)).withContentType(response.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE)).withContentLanguage(response.getHeaders().getFirst(Headers.LANGUAGE)).withData(response.getEntity(byte[].class)).withMillis(getCreationDate(response).getMillis()).build();
  return Optional.of(content);
}

Fixed version (ground truth):
public Optional<Content> getContent(String channelUrl,long sequence){
  ClientResponse response=getResponse(appendSlash(channelUrl) + sequence);
  if (response.getStatus() != Response.Status.OK.getStatusCode()) {
    logger.info("String_Node_Str" + response);
    return Optional.absent();
  }
  Content content=Content.builder().withContentKey(new SequenceContentKey(sequence)).withContentType(response.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE)).withContentLanguage(response.getHeaders().getFirst(Headers.LANGUAGE)).withData(response.getEntity(byte[].class)).withMillis(getCreationDate(response).getMillis()).build();
  return Optional.of(content);
}
Program: 61965
Project: 61965
Buggy source:
@Override public Content next(){
  Optional<Content> optional=channelUtils.getContent(channelUrl,current);
  while (!optional.isPresent()) {
    logger.warn("String_Node_Str" + channelUrl + current);
    current++;
    optional=channelUtils.getContent(channelUrl,current);
  }
  return optional.get();
}

Fixed version (ground truth):
@Override public Content next(){
  Optional<Content> optional=channelUtils.getContent(channelUrl,current);
  while (!optional.isPresent()) {
    logger.warn("String_Node_Str" + channelUrl + "String_Node_Str"+ current);
    current++;
    optional=channelUtils.getContent(channelUrl,current);
  }
  return optional.get();
}
Program: 61966
Project: 61966
Buggy source:
private void startMetrics(){
  String name="String_Node_Str" + URI.create(channelUrl).getHost() + "String_Node_Str"+ channel.getName()+ "String_Node_Str";
  metricRegistry.register(name,new Gauge<Long>(){
    @Override public Long getValue(){
      long delta=getDelta();
      logger.info("String_Node_Str" + delta);
      return delta;
    }
  }
);
}

Fixed version (ground truth):
private void startMetrics(){
  String name="String_Node_Str" + URI.create(channelUrl).getHost() + "String_Node_Str"+ channel.getName()+ "String_Node_Str";
  metricRegistry.remove(name);
  metricRegistry.register(name,new Gauge<Long>(){
    @Override public Long getValue(){
      long delta=getDelta();
      logger.info("String_Node_Str" + delta);
      return delta;
    }
  }
);
}
Program: 61967
Project: 61967
Buggy source:
@VisibleForTesting boolean verifyRemoteChannel(){
  try {
    Optional<ChannelConfiguration> optionalConfig=channelUtils.getConfiguration(channel.getUrl());
    if (!optionalConfig.isPresent()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    configuration=optionalConfig.get();
    if (!configuration.isSequence()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    return true;
  }
 catch (  IOException e) {
    message="String_Node_Str" + channel.getUrl() + "String_Node_Str"+ e.getMessage();
    logger.warn(message);
    return false;
  }
}

Fixed version (ground truth):
@VisibleForTesting boolean verifyRemoteChannel(){
  try {
    Optional<ChannelConfiguration> optionalConfig=channelUtils.getConfiguration(channel.getUrl());
    if (!optionalConfig.isPresent()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    configuration=optionalConfig.get();
    logger.debug("String_Node_Str" + configuration);
    if (!configuration.isSequence()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    return true;
  }
 catch (  IOException e) {
    message="String_Node_Str" + channel.getUrl() + "String_Node_Str"+ e.getMessage();
    logger.warn(message);
    return false;
  }
}
Program: 61968
Project: 61968
Buggy source:
private ClientResponse getResponse(String url){
  return noRedirectsClient.resource(url).accept(MediaType.WILDCARD_TYPE).header(HttpHeaders.ACCEPT_ENCODING,"String_Node_Str").get(ClientResponse.class);
}

Fixed version (ground truth):
private ClientResponse getResponse(String url){
  return followClient.resource(url).accept(MediaType.WILDCARD_TYPE).header(HttpHeaders.ACCEPT_ENCODING,"String_Node_Str").get(ClientResponse.class);
}
Program: 61969
Project: 61969
Buggy source:
public Optional<Content> getContent(String channelUrl,long sequence){
  ClientResponse response=getResponse(appendSlash(channelUrl) + sequence);
  if (response.getStatus() != Response.Status.OK.getStatusCode()) {
    logger.debug("String_Node_Str" + response);
    return Optional.absent();
  }
  Content content=Content.builder().withContentKey(new SequenceContentKey(sequence)).withContentType(response.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE)).withContentLanguage(response.getHeaders().getFirst(Headers.LANGUAGE)).withData(response.getEntity(byte[].class)).withMillis(getCreationDate(response).getMillis()).build();
  return Optional.of(content);
}

Fixed version (ground truth):
public Optional<Content> getContent(String channelUrl,long sequence){
  ClientResponse response=getResponse(appendSlash(channelUrl) + sequence);
  if (response.getStatus() != Response.Status.OK.getStatusCode()) {
    logger.info("String_Node_Str" + response);
    return Optional.absent();
  }
  Content content=Content.builder().withContentKey(new SequenceContentKey(sequence)).withContentType(response.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE)).withContentLanguage(response.getHeaders().getFirst(Headers.LANGUAGE)).withData(response.getEntity(byte[].class)).withMillis(getCreationDate(response).getMillis()).build();
  return Optional.of(content);
}
Program: 61970
Project: 61970
Buggy source:
@Override public Content next(){
  Optional<Content> optional=channelUtils.getContent(channelUrl,current);
  while (!optional.isPresent()) {
    logger.warn("String_Node_Str" + channelUrl + current);
    current++;
    optional=channelUtils.getContent(channelUrl,current);
  }
  return optional.get();
}

Fixed version (ground truth):
@Override public Content next(){
  Optional<Content> optional=channelUtils.getContent(channelUrl,current);
  while (!optional.isPresent()) {
    logger.warn("String_Node_Str" + channelUrl + "String_Node_Str"+ current);
    current++;
    optional=channelUtils.getContent(channelUrl,current);
  }
  return optional.get();
}
Program: 61971
Project: 61971
Buggy source:
private void startMetrics(){
  String name="String_Node_Str" + URI.create(channelUrl).getHost() + "String_Node_Str"+ channel.getName()+ "String_Node_Str";
  metricRegistry.register(name,new Gauge<Long>(){
    @Override public Long getValue(){
      long delta=getDelta();
      logger.info("String_Node_Str" + delta);
      return delta;
    }
  }
);
}

Fixed version (ground truth):
private void startMetrics(){
  String name="String_Node_Str" + URI.create(channelUrl).getHost() + "String_Node_Str"+ channel.getName()+ "String_Node_Str";
  metricRegistry.remove(name);
  metricRegistry.register(name,new Gauge<Long>(){
    @Override public Long getValue(){
      long delta=getDelta();
      logger.info("String_Node_Str" + delta);
      return delta;
    }
  }
);
}
Program: 61972
Project: 61972
Buggy source:
@VisibleForTesting boolean verifyRemoteChannel(){
  try {
    Optional<ChannelConfiguration> optionalConfig=channelUtils.getConfiguration(channel.getUrl());
    if (!optionalConfig.isPresent()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    configuration=optionalConfig.get();
    if (!configuration.isSequence()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    return true;
  }
 catch (  IOException e) {
    message="String_Node_Str" + channel.getUrl() + "String_Node_Str"+ e.getMessage();
    logger.warn(message);
    return false;
  }
}

Fixed version (ground truth):
@VisibleForTesting boolean verifyRemoteChannel(){
  try {
    Optional<ChannelConfiguration> optionalConfig=channelUtils.getConfiguration(channel.getUrl());
    if (!optionalConfig.isPresent()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    configuration=optionalConfig.get();
    logger.debug("String_Node_Str" + configuration);
    if (!configuration.isSequence()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    return true;
  }
 catch (  IOException e) {
    message="String_Node_Str" + channel.getUrl() + "String_Node_Str"+ e.getMessage();
    logger.warn(message);
    return false;
  }
}
Program: 61973
Project: 61973
Buggy source:
private ClientResponse getResponse(String url){
  return noRedirectsClient.resource(url).accept(MediaType.WILDCARD_TYPE).header(HttpHeaders.ACCEPT_ENCODING,"String_Node_Str").get(ClientResponse.class);
}

Fixed version (ground truth):
private ClientResponse getResponse(String url){
  return followClient.resource(url).accept(MediaType.WILDCARD_TYPE).header(HttpHeaders.ACCEPT_ENCODING,"String_Node_Str").get(ClientResponse.class);
}
Program: 61974
Project: 61974
Buggy source:
public Optional<Content> getContent(String channelUrl,long sequence){
  ClientResponse response=getResponse(appendSlash(channelUrl) + sequence);
  if (response.getStatus() != Response.Status.OK.getStatusCode()) {
    logger.debug("String_Node_Str" + response);
    return Optional.absent();
  }
  Content content=Content.builder().withContentKey(new SequenceContentKey(sequence)).withContentType(response.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE)).withContentLanguage(response.getHeaders().getFirst(Headers.LANGUAGE)).withData(response.getEntity(byte[].class)).withMillis(getCreationDate(response).getMillis()).build();
  return Optional.of(content);
}

Fixed version (ground truth):
public Optional<Content> getContent(String channelUrl,long sequence){
  ClientResponse response=getResponse(appendSlash(channelUrl) + sequence);
  if (response.getStatus() != Response.Status.OK.getStatusCode()) {
    logger.info("String_Node_Str" + response);
    return Optional.absent();
  }
  Content content=Content.builder().withContentKey(new SequenceContentKey(sequence)).withContentType(response.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE)).withContentLanguage(response.getHeaders().getFirst(Headers.LANGUAGE)).withData(response.getEntity(byte[].class)).withMillis(getCreationDate(response).getMillis()).build();
  return Optional.of(content);
}
Program: 61975
Project: 61975
Buggy source:
@Override public Content next(){
  Optional<Content> optional=channelUtils.getContent(channelUrl,current);
  while (!optional.isPresent()) {
    logger.warn("String_Node_Str" + channelUrl + current);
    current++;
    optional=channelUtils.getContent(channelUrl,current);
  }
  return optional.get();
}

Fixed version (ground truth):
@Override public Content next(){
  Optional<Content> optional=channelUtils.getContent(channelUrl,current);
  while (!optional.isPresent()) {
    logger.warn("String_Node_Str" + channelUrl + "String_Node_Str"+ current);
    current++;
    optional=channelUtils.getContent(channelUrl,current);
  }
  return optional.get();
}
Program: 61976
Project: 61976
Buggy source:
private void startMetrics(){
  String name="String_Node_Str" + URI.create(channelUrl).getHost() + "String_Node_Str"+ channel.getName()+ "String_Node_Str";
  metricRegistry.register(name,new Gauge<Long>(){
    @Override public Long getValue(){
      long delta=getDelta();
      logger.info("String_Node_Str" + delta);
      return delta;
    }
  }
);
}

Fixed version (ground truth):
private void startMetrics(){
  String name="String_Node_Str" + URI.create(channelUrl).getHost() + "String_Node_Str"+ channel.getName()+ "String_Node_Str";
  metricRegistry.remove(name);
  metricRegistry.register(name,new Gauge<Long>(){
    @Override public Long getValue(){
      long delta=getDelta();
      logger.info("String_Node_Str" + delta);
      return delta;
    }
  }
);
}
Program: 61977
Project: 61977
Buggy source:
@Test public void testSimple() throws Exception {
  Channel channel=new Channel(channelName,channelUrl);
  SequenceIterator iterator=factory.create(999,channel);
  check(iterator,"String_Node_Str");
  check(iterator,"String_Node_Str");
  for (int i=3; i < 10; i++) {
    String data="String_Node_Str" + i;
    insert(data);
    check(iterator,data);
  }
}

Fixed version (ground truth):
@Test public void testSimple() throws Exception {
  Channel channel=new Channel(channelName,channelUrl);
  SequenceIterator iterator=factory.create(999,channel);
  check(iterator,"String_Node_Str");
  check(iterator,"String_Node_Str");
  int end=insertAndCheck(iterator,3);
  iterator.exit();
  iterator=factory.create(iterator.getCurrent(),channel);
  insertAndCheck(iterator,end);
}
Program: 61978
Project: 61978
Buggy source:
private void check(SequenceIterator iterator,String data){
  assertTrue(iterator.hasNext());
  Content content=iterator.next();
  assertNotNull(content);
  assertArrayEquals(data.getBytes(),content.getData());
}

Fixed version (ground truth):
private void check(SequenceIterator iterator,String data){
  assertTrue(iterator.hasNext());
  Content content=iterator.next();
  logger.debug("String_Node_Str" + new String(content.getData()) + "String_Node_Str"+ content.getContentKey().get());
  assertNotNull(content);
  assertArrayEquals(data.getBytes(),content.getData());
}
Program: 61979
Project: 61979
Buggy source:
@VisibleForTesting boolean verifyRemoteChannel(){
  try {
    Optional<ChannelConfiguration> optionalConfig=channelUtils.getConfiguration(channel.getUrl());
    if (!optionalConfig.isPresent()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    configuration=optionalConfig.get();
    if (!configuration.isSequence()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    return true;
  }
 catch (  IOException e) {
    message="String_Node_Str" + channel.getUrl() + "String_Node_Str"+ e.getMessage();
    logger.warn(message);
    return false;
  }
}

Fixed version (ground truth):
@VisibleForTesting boolean verifyRemoteChannel(){
  try {
    Optional<ChannelConfiguration> optionalConfig=channelUtils.getConfiguration(channel.getUrl());
    if (!optionalConfig.isPresent()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    configuration=optionalConfig.get();
    logger.debug("String_Node_Str" + configuration);
    if (!configuration.isSequence()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    return true;
  }
 catch (  IOException e) {
    message="String_Node_Str" + channel.getUrl() + "String_Node_Str"+ e.getMessage();
    logger.warn(message);
    return false;
  }
}
Program: 61980
Project: 61980
Buggy source:
private ClientResponse getResponse(String url){
  return noRedirectsClient.resource(url).accept(MediaType.WILDCARD_TYPE).header(HttpHeaders.ACCEPT_ENCODING,"String_Node_Str").get(ClientResponse.class);
}

Fixed version (ground truth):
private ClientResponse getResponse(String url){
  return followClient.resource(url).accept(MediaType.WILDCARD_TYPE).header(HttpHeaders.ACCEPT_ENCODING,"String_Node_Str").get(ClientResponse.class);
}
Program: 61981
Project: 61981
Buggy source:
public Optional<Content> getContent(String channelUrl,long sequence){
  ClientResponse response=getResponse(appendSlash(channelUrl) + sequence);
  if (response.getStatus() != Response.Status.OK.getStatusCode()) {
    logger.debug("String_Node_Str" + response);
    return Optional.absent();
  }
  Content content=Content.builder().withContentKey(new SequenceContentKey(sequence)).withContentType(response.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE)).withContentLanguage(response.getHeaders().getFirst(Headers.LANGUAGE)).withData(response.getEntity(byte[].class)).withMillis(getCreationDate(response).getMillis()).build();
  return Optional.of(content);
}

Fixed version (ground truth):
public Optional<Content> getContent(String channelUrl,long sequence){
  ClientResponse response=getResponse(appendSlash(channelUrl) + sequence);
  if (response.getStatus() != Response.Status.OK.getStatusCode()) {
    logger.info("String_Node_Str" + response);
    return Optional.absent();
  }
  Content content=Content.builder().withContentKey(new SequenceContentKey(sequence)).withContentType(response.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE)).withContentLanguage(response.getHeaders().getFirst(Headers.LANGUAGE)).withData(response.getEntity(byte[].class)).withMillis(getCreationDate(response).getMillis()).build();
  return Optional.of(content);
}
Program: 61982
Project: 61982
Buggy source:
@Override public Content next(){
  Optional<Content> optional=channelUtils.getContent(channelUrl,current);
  while (!optional.isPresent()) {
    logger.warn("String_Node_Str" + channelUrl + current);
    current++;
    optional=channelUtils.getContent(channelUrl,current);
  }
  return optional.get();
}

Fixed version (ground truth):
@Override public Content next(){
  Optional<Content> optional=channelUtils.getContent(channelUrl,current);
  while (!optional.isPresent()) {
    logger.warn("String_Node_Str" + channelUrl + "String_Node_Str"+ current);
    current++;
    optional=channelUtils.getContent(channelUrl,current);
  }
  return optional.get();
}
Program: 61983
Project: 61983
Buggy source:
private void startMetrics(){
  String name="String_Node_Str" + URI.create(channelUrl).getHost() + "String_Node_Str"+ channel.getName()+ "String_Node_Str";
  metricRegistry.register(name,new Gauge<Long>(){
    @Override public Long getValue(){
      long delta=getDelta();
      logger.info("String_Node_Str" + delta);
      return delta;
    }
  }
);
}

Fixed version (ground truth):
private void startMetrics(){
  String name="String_Node_Str" + URI.create(channelUrl).getHost() + "String_Node_Str"+ channel.getName()+ "String_Node_Str";
  metricRegistry.remove(name);
  metricRegistry.register(name,new Gauge<Long>(){
    @Override public Long getValue(){
      long delta=getDelta();
      logger.info("String_Node_Str" + delta);
      return delta;
    }
  }
);
}
Program: 61984
Project: 61984
Buggy source:
@Test public void testSimple() throws Exception {
  Channel channel=new Channel(channelName,channelUrl);
  SequenceIterator iterator=factory.create(999,channel);
  check(iterator,"String_Node_Str");
  check(iterator,"String_Node_Str");
  for (int i=3; i < 10; i++) {
    String data="String_Node_Str" + i;
    insert(data);
    check(iterator,data);
  }
}

Fixed version (ground truth):
@Test public void testSimple() throws Exception {
  Channel channel=new Channel(channelName,channelUrl);
  SequenceIterator iterator=factory.create(999,channel);
  check(iterator,"String_Node_Str");
  check(iterator,"String_Node_Str");
  int end=insertAndCheck(iterator,3);
  iterator.exit();
  iterator=factory.create(iterator.getCurrent(),channel);
  insertAndCheck(iterator,end);
}
Program: 61985
Project: 61985
Buggy source:
private void check(SequenceIterator iterator,String data){
  assertTrue(iterator.hasNext());
  Content content=iterator.next();
  assertNotNull(content);
  assertArrayEquals(data.getBytes(),content.getData());
}

Fixed version (ground truth):
private void check(SequenceIterator iterator,String data){
  assertTrue(iterator.hasNext());
  Content content=iterator.next();
  logger.debug("String_Node_Str" + new String(content.getData()) + "String_Node_Str"+ content.getContentKey().get());
  assertNotNull(content);
  assertArrayEquals(data.getBytes(),content.getData());
}
Program: 61986
Project: 61986
Buggy source:
@VisibleForTesting boolean verifyRemoteChannel(){
  try {
    Optional<ChannelConfiguration> optionalConfig=channelUtils.getConfiguration(channel.getUrl());
    if (!optionalConfig.isPresent()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    configuration=optionalConfig.get();
    if (!configuration.isSequence()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    return true;
  }
 catch (  IOException e) {
    message="String_Node_Str" + channel.getUrl() + "String_Node_Str"+ e.getMessage();
    logger.warn(message);
    return false;
  }
}

Fixed version (ground truth):
@VisibleForTesting boolean verifyRemoteChannel(){
  try {
    Optional<ChannelConfiguration> optionalConfig=channelUtils.getConfiguration(channel.getUrl());
    if (!optionalConfig.isPresent()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    configuration=optionalConfig.get();
    logger.debug("String_Node_Str" + configuration);
    if (!configuration.isSequence()) {
      message="String_Node_Str" + channel.getUrl();
      logger.warn(message);
      return false;
    }
    return true;
  }
 catch (  IOException e) {
    message="String_Node_Str" + channel.getUrl() + "String_Node_Str"+ e.getMessage();
    logger.warn(message);
    return false;
  }
}
Program: 61987
Project: 61987
Buggy source:
private ClientResponse getResponse(String url){
  return noRedirectsClient.resource(url).accept(MediaType.WILDCARD_TYPE).header(HttpHeaders.ACCEPT_ENCODING,"String_Node_Str").get(ClientResponse.class);
}

Fixed version (ground truth):
private ClientResponse getResponse(String url){
  return followClient.resource(url).accept(MediaType.WILDCARD_TYPE).header(HttpHeaders.ACCEPT_ENCODING,"String_Node_Str").get(ClientResponse.class);
}
Program: 61988
Project: 61988
Buggy source:
public Optional<Content> getContent(String channelUrl,long sequence){
  ClientResponse response=getResponse(appendSlash(channelUrl) + sequence);
  if (response.getStatus() != Response.Status.OK.getStatusCode()) {
    logger.debug("String_Node_Str" + response);
    return Optional.absent();
  }
  Content content=Content.builder().withContentKey(new SequenceContentKey(sequence)).withContentType(response.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE)).withContentLanguage(response.getHeaders().getFirst(Headers.LANGUAGE)).withData(response.getEntity(byte[].class)).withMillis(getCreationDate(response).getMillis()).build();
  return Optional.of(content);
}

Fixed version (ground truth):
public Optional<Content> getContent(String channelUrl,long sequence){
  ClientResponse response=getResponse(appendSlash(channelUrl) + sequence);
  if (response.getStatus() != Response.Status.OK.getStatusCode()) {
    logger.info("String_Node_Str" + response);
    return Optional.absent();
  }
  Content content=Content.builder().withContentKey(new SequenceContentKey(sequence)).withContentType(response.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE)).withContentLanguage(response.getHeaders().getFirst(Headers.LANGUAGE)).withData(response.getEntity(byte[].class)).withMillis(getCreationDate(response).getMillis()).build();
  return Optional.of(content);
}
Program: 61989
Project: 61989
Buggy source:
@Override public Content next(){
  Optional<Content> optional=channelUtils.getContent(channelUrl,current);
  while (!optional.isPresent()) {
    logger.warn("String_Node_Str" + channelUrl + current);
    current++;
    optional=channelUtils.getContent(channelUrl,current);
  }
  return optional.get();
}

Fixed version (ground truth):
@Override public Content next(){
  Optional<Content> optional=channelUtils.getContent(channelUrl,current);
  while (!optional.isPresent()) {
    logger.warn("String_Node_Str" + channelUrl + "String_Node_Str"+ current);
    current++;
    optional=channelUtils.getContent(channelUrl,current);
  }
  return optional.get();
}
Program: 61990
Project: 61990
Buggy source:
private void startMetrics(){
  String name="String_Node_Str" + URI.create(channelUrl).getHost() + "String_Node_Str"+ channel.getName()+ "String_Node_Str";
  metricRegistry.register(name,new Gauge<Long>(){
    @Override public Long getValue(){
      long delta=getDelta();
      logger.info("String_Node_Str" + delta);
      return delta;
    }
  }
);
}

Fixed version (ground truth):
private void startMetrics(){
  String name="String_Node_Str" + URI.create(channelUrl).getHost() + "String_Node_Str"+ channel.getName()+ "String_Node_Str";
  metricRegistry.remove(name);
  metricRegistry.register(name,new Gauge<Long>(){
    @Override public Long getValue(){
      long delta=getDelta();
      logger.info("String_Node_Str" + delta);
      return delta;
    }
  }
);
}
Program: 61991
Project: 61991
Buggy source:
@Override public void publish(final String channelName,final ContentKey key){
  final MessageListener<String> listener=messageListenerMap.get(channelName);
  if (listener == null) {
    return;
  }
  new Thread(new Runnable(){
    @Override public void run(){
      Message<String> message=new Message<>(channelName,key.keyToString(),System.currentTimeMillis(),null);
      listener.onMessage(message);
    }
  }
).start();
}

Fixed version (ground truth):
@Override public void publish(final String channelName,final ContentKey key){
  final MessageListener<String> listener=messageListenerMap.get(channelName);
  if (listener == null) {
    return;
  }
  threadPoolExecutor.execute(new Runnable(){
    @Override public void run(){
      Message<String> message=new Message<>(channelName,key.keyToString(),System.currentTimeMillis(),null);
      listener.onMessage(message);
    }
  }
);
}
Program: 61992
Project: 61992
Buggy source:
@Override public void publish(final String channelName,final ContentKey key){
  final MessageListener<String> listener=messageListenerMap.get(channelName);
  if (listener == null) {
    return;
  }
  new Thread(new Runnable(){
    @Override public void run(){
      Message<String> message=new Message<>(channelName,key.keyToString(),System.currentTimeMillis(),null);
      listener.onMessage(message);
    }
  }
).start();
}

Fixed version (ground truth):
@Override public void publish(final String channelName,final ContentKey key){
  final MessageListener<String> listener=messageListenerMap.get(channelName);
  if (listener == null) {
    return;
  }
  threadPoolExecutor.execute(new Runnable(){
    @Override public void run(){
      Message<String> message=new Message<>(channelName,key.keyToString(),System.currentTimeMillis(),null);
      listener.onMessage(message);
    }
  }
);
}