nus-yam/ex-repair huggingface dataset:
Program: 61647
Project: 61647
Buggy source:
@Override public void upsert(Webhook webhook){
  Map<String,AttributeValue> item=new HashMap<>();
  item.put("String_Node_Str",new AttributeValue(webhook.getName()));
  item.put("String_Node_Str",new AttributeValue(webhook.getCallbackUrl()));
  if (!StringUtils.isEmpty(webhook.getChannelUrl())) {
    item.put("String_Node_Str",new AttributeValue(webhook.getChannelUrl()));
  }
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getParallelCalls())));
  item.put("String_Node_Str",new AttributeValue().withBOOL(webhook.isPaused()));
  item.put("String_Node_Str",new AttributeValue(webhook.getBatch()));
  item.put("String_Node_Str",new AttributeValue().withBOOL(webhook.isHeartbeat()));
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getTtlMinutes())));
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getMaxWaitMinutes())));
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getCallbackTimeoutSeconds())));
  if (!StringUtils.isEmpty(webhook.getTagUrl())) {
    item.put("String_Node_Str",new AttributeValue(webhook.getTagUrl()));
  }
  item.put("String_Node_Str",new AttributeValue(webhook.getTag()));
  dbClient.putItem(getTableName(),item);
}

Fixed version (ground truth):
@Override public void upsert(Webhook webhook){
  Map<String,AttributeValue> item=new HashMap<>();
  item.put("String_Node_Str",new AttributeValue(webhook.getName()));
  item.put("String_Node_Str",new AttributeValue(webhook.getCallbackUrl()));
  if (!StringUtils.isEmpty(webhook.getChannelUrl())) {
    item.put("String_Node_Str",new AttributeValue(webhook.getChannelUrl()));
  }
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getParallelCalls())));
  item.put("String_Node_Str",new AttributeValue().withBOOL(webhook.isPaused()));
  item.put("String_Node_Str",new AttributeValue(webhook.getBatch()));
  item.put("String_Node_Str",new AttributeValue().withBOOL(webhook.isHeartbeat()));
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getTtlMinutes())));
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getMaxWaitMinutes())));
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getCallbackTimeoutSeconds())));
  if (!StringUtils.isEmpty(webhook.getTagUrl())) {
    item.put("String_Node_Str",new AttributeValue(webhook.getTagUrl()));
  }
  if (!StringUtils.isEmpty(webhook.getTag())) {
    item.put("String_Node_Str",new AttributeValue(webhook.getTag()));
  }
  dbClient.putItem(getTableName(),item);
}
Program: 61648
Project: 61648
Buggy source:
static Set<Webhook> webhookInstancesWithTag(String tag){
  Set<Webhook> webhookSet=new HashSet<>(webhookDao.getAll(false));
  Set<Webhook> result=webhookSet.stream().filter(wh -> Objects.equals(tag,wh.getTag()) && !wh.isTagPrototype()).collect(Collectors.toSet());
  return result;
}

Fixed version (ground truth):
static Set<Webhook> webhookInstancesWithTag(String tag){
  Set<Webhook> webhookSet=new HashSet<>(webhookDao.getAll(false));
  Set<Webhook> result=webhookSet.stream().filter(wh -> !wh.isTagPrototype() && Objects.equals(tag,wh.getTag())).collect(Collectors.toSet());
  return result;
}
Program: 61649
Project: 61649
Buggy source:
static void upsertTagWebhookInstances(Webhook webhook){
  Collection<ChannelConfig> channels=channelService.getChannels(webhook.getTag(),false);
  for (  ChannelConfig channel : channels) {
    logger.info("String_Node_Str" + channel.getName());
    webhookService.upsert(Webhook.instanceFromTagPrototype(webhook,channel));
  }
}

Fixed version (ground truth):
static void upsertTagWebhookInstances(Webhook webhookPrototype){
  Collection<ChannelConfig> channels=channelService.getChannels(webhookPrototype.getTagFromTagUrl(),false);
  for (  ChannelConfig channel : channels) {
    logger.info("String_Node_Str" + channel.getName());
    webhookService.upsert(Webhook.instanceFromTagPrototype(webhookPrototype,channel));
  }
}
Program: 61650
Project: 61650
Buggy source:
public static void deleteInstancesIfTagWebhook(String webhookName){
  Optional<Webhook> webhookOptional=webhookService.get(webhookName);
  if (!webhookOptional.isPresent())   return;
  Webhook webhook=webhookOptional.get();
  if (!webhook.isTagPrototype())   return;
  logger.info("String_Node_Str" + webhookName);
  Set<Webhook> taggedWebhooks=webhookInstancesWithTag(webhook.getTag());
  for (  Webhook twh : taggedWebhooks) {
    logger.debug("String_Node_Str" + twh.getName());
    webhookService.delete(twh.getName());
  }
}

Fixed version (ground truth):
public static void deleteInstancesIfTagWebhook(String webhookName){
  Optional<Webhook> webhookOptional=webhookService.get(webhookName);
  if (!webhookOptional.isPresent())   return;
  Webhook webhook=webhookOptional.get();
  if (!webhook.isTagPrototype())   return;
  logger.info("String_Node_Str" + webhookName);
  Set<Webhook> taggedWebhooks=webhookInstancesWithTag(webhook.getTagFromTagUrl());
  for (  Webhook twh : taggedWebhooks) {
    logger.debug("String_Node_Str" + twh.getName());
    webhookService.delete(twh.getName());
  }
}
Program: 61651
Project: 61651
Buggy source:
static void ensureNoOrphans(Set<Webhook> webhookSet,ChannelConfig channelConfig){
  Set<Webhook> managedWebHooks=allManagedWebhooksForChannel(webhookSet,channelConfig);
  Set<String> tags=channelConfig.getTags();
  Set<Webhook> nonOrphanWebhooks=managedWebHooks.stream().filter(wh -> tags.contains(wh.getTagUrl())).collect(Collectors.toSet());
  Sets.SetView<Webhook> orphanedWebhooks=Sets.difference(managedWebHooks,nonOrphanWebhooks);
  for (  Webhook orphan : orphanedWebhooks) {
    logger.info("String_Node_Str" + orphan.getChannelName());
    webhookService.delete(orphan.getName());
  }
}

Fixed version (ground truth):
static void ensureNoOrphans(Set<Webhook> webhookSet,ChannelConfig channelConfig){
  Set<Webhook> managedWebHooks=allManagedWebhooksForChannel(webhookSet,channelConfig);
  Set<String> tags=channelConfig.getTags();
  Set<Webhook> nonOrphanWebhooks=managedWebHooks.stream().filter(wh -> tags.contains(wh.getTag())).collect(Collectors.toSet());
  Sets.SetView<Webhook> orphanedWebhooks=Sets.difference(managedWebHooks,nonOrphanWebhooks);
  for (  Webhook orphan : orphanedWebhooks) {
    logger.info("String_Node_Str" + orphan.getChannelName());
    webhookService.delete(orphan.getName());
  }
}
Program: 61652
Project: 61652
Buggy source:
static Set<Webhook> webhookPrototypesWithTag(String tag){
  Set<Webhook> webhookSet=new HashSet<>(webhookDao.getAll(false));
  Set<Webhook> result=webhookSet.stream().filter(wh -> Objects.equals(tag,wh.getTag()) && wh.isTagPrototype()).collect(Collectors.toSet());
  return result;
}

Fixed version (ground truth):
static Set<Webhook> webhookPrototypesWithTag(String tag){
  Set<Webhook> webhookSet=new HashSet<>(webhookDao.getAll(false));
  Set<Webhook> result=webhookSet.stream().filter(wh -> wh.isTagPrototype() && Objects.equals(tag,wh.getTagFromTagUrl())).collect(Collectors.toSet());
  return result;
}
Program: 61653
Project: 61653
Buggy source:
public static Webhook instanceFromTagPrototype(Webhook whp,ChannelConfig channel){
  String channenUrl=RequestUtils.getHost(whp.getTagUrl()) + "String_Node_Str" + channel.getName();
  String whName="String_Node_Str" + whp.getTag() + "String_Node_Str"+ channel.getName();
  Webhook instance=new Webhook(whp.callbackUrl,channenUrl,whp.parallelCalls,whName,null,whp.batch,whp.heartbeat,whp.paused,whp.ttlMinutes,whp.maxWaitMinutes,whp.callbackTimeoutSeconds,whp.fastForwardable,whp.tagUrl,whp.tag);
  return instance;
}

Fixed version (ground truth):
public static Webhook instanceFromTagPrototype(Webhook whp,ChannelConfig channel){
  String channenUrl=RequestUtils.getHost(whp.getTagUrl()) + "String_Node_Str" + channel.getName();
  String whName="String_Node_Str" + whp.getTagFromTagUrl() + "String_Node_Str"+ channel.getName();
  Webhook instance=new Webhook(whp.callbackUrl,channenUrl,whp.parallelCalls,whName,null,whp.batch,whp.heartbeat,whp.paused,whp.ttlMinutes,whp.maxWaitMinutes,whp.callbackTimeoutSeconds,whp.fastForwardable,null,whp.getTagFromTagUrl());
  return instance;
}
Program: 61654
Project: 61654
Buggy source:
public String getTag(){
  return StringUtils.isEmpty(tagUrl) ? tag : RequestUtils.getTag(getTagUrl());
}

Fixed version (ground truth):
public String getTag(){
  return tag;
}
Program: 61655
Project: 61655
Buggy source:
@Override public void upsert(Webhook webhook){
  Map<String,AttributeValue> item=new HashMap<>();
  item.put("String_Node_Str",new AttributeValue(webhook.getName()));
  item.put("String_Node_Str",new AttributeValue(webhook.getCallbackUrl()));
  item.put("String_Node_Str",new AttributeValue(webhook.getChannelUrl()));
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getParallelCalls())));
  item.put("String_Node_Str",new AttributeValue().withBOOL(webhook.isPaused()));
  item.put("String_Node_Str",new AttributeValue(webhook.getBatch()));
  item.put("String_Node_Str",new AttributeValue().withBOOL(webhook.isHeartbeat()));
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getTtlMinutes())));
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getMaxWaitMinutes())));
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getCallbackTimeoutSeconds())));
  item.put("String_Node_Str",new AttributeValue(webhook.getTag()));
  item.put("String_Node_Str",new AttributeValue().withBOOL(webhook.isManagedByTag()));
  dbClient.putItem(getTableName(),item);
}

Fixed version (ground truth):
@Override public void upsert(Webhook webhook){
  Map<String,AttributeValue> item=new HashMap<>();
  item.put("String_Node_Str",new AttributeValue(webhook.getName()));
  item.put("String_Node_Str",new AttributeValue(webhook.getCallbackUrl()));
  item.put("String_Node_Str",new AttributeValue(webhook.getChannelUrl()));
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getParallelCalls())));
  item.put("String_Node_Str",new AttributeValue().withBOOL(webhook.isPaused()));
  item.put("String_Node_Str",new AttributeValue(webhook.getBatch()));
  item.put("String_Node_Str",new AttributeValue().withBOOL(webhook.isHeartbeat()));
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getTtlMinutes())));
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getMaxWaitMinutes())));
  item.put("String_Node_Str",new AttributeValue().withN(String.valueOf(webhook.getCallbackTimeoutSeconds())));
  if (!Objects.isNull(webhook.getTag()) && !webhook.getTag().isEmpty()) {
    item.put("String_Node_Str",new AttributeValue(webhook.getTag()));
  }
  item.put("String_Node_Str",new AttributeValue().withBOOL(webhook.isManagedByTag()));
  dbClient.putItem(getTableName(),item);
}
Program: 61656
Project: 61656
Buggy source:
private static Set<Webhook> allManagedWebhooksForChannel(Set<Webhook> webhookSet,ChannelConfig channelConfig){
  String channelName=channelConfig.getName();
  return webhookSet.stream().filter(wh -> channelName.equals(wh.getChannelName())).filter(Webhook::isManagedByTag).collect(Collectors.toSet());
}

Fixed version (ground truth):
private static Set<Webhook> allManagedWebhooksForChannel(Set<Webhook> webhookSet,ChannelConfig channelConfig){
  String channelName=channelConfig.getName().toLowerCase();
  return webhookSet.stream().filter(wh -> Objects.equals(channelName,wh.getChannelName().toLowerCase()) && wh.isManagedByTag()).collect(Collectors.toSet());
}
Program: 61657
Project: 61657
Buggy source:
@Override protected void configure(){
  Names.bindProperties(binder(),HubProperties.getProperties());
  bind(HubHealthCheck.class).asEagerSingleton();
  bind(HubClusterRegister.class).asEagerSingleton();
  bind(ZooKeeperState.class).asEagerSingleton();
  bind(ReplicationGlobalManager.class).asEagerSingleton();
  bind(HubUtils.class).asEagerSingleton();
  bind(GCRunner.class).asEagerSingleton();
  bind(MetricsRunner.class).asEagerSingleton();
  bind(ChannelValidator.class).asEagerSingleton();
  bind(WebhookValidator.class).asEagerSingleton();
  bind(WebhookManager.class).asEagerSingleton();
  bind(LastContentPath.class).asEagerSingleton();
  bind(WatchManager.class).asEagerSingleton();
  bind(MetricsService.class).to(DelegatingMetricsService.class).asEagerSingleton();
  bind(NtpMonitor.class).asEagerSingleton();
  bind(TimeService.class).asEagerSingleton();
  bind(ShutdownManager.class).asEagerSingleton();
  bind(FileSpokeStore.class).asEagerSingleton();
  bind(SpokeClusterRegister.class).asEagerSingleton();
  bind(FinalCheck.class).to(SpokeFinalCheck.class).asEagerSingleton();
  bind(InFlightService.class).asEagerSingleton();
}

Fixed version (ground truth):
@Override protected void configure(){
  Names.bindProperties(binder(),HubProperties.getProperties());
  bind(HubHealthCheck.class).asEagerSingleton();
  bind(HubClusterRegister.class).asEagerSingleton();
  bind(ZooKeeperState.class).asEagerSingleton();
  bind(ReplicationGlobalManager.class).asEagerSingleton();
  bind(HubUtils.class).asEagerSingleton();
  bind(GCRunner.class).asEagerSingleton();
  bind(MetricsRunner.class).asEagerSingleton();
  bind(ChannelValidator.class).asEagerSingleton();
  bind(WebhookValidator.class).asEagerSingleton();
  bind(WebhookManager.class).asEagerSingleton();
  bind(LastContentPath.class).asEagerSingleton();
  bind(WatchManager.class).asEagerSingleton();
  bind(MetricsService.class).to(DelegatingMetricsService.class).asEagerSingleton();
  bind(NtpMonitor.class).asEagerSingleton();
  bind(TimeService.class).asEagerSingleton();
  bind(ShutdownManager.class).asEagerSingleton();
  bind(SpokeClusterRegister.class).asEagerSingleton();
  bind(FinalCheck.class).to(SpokeFinalCheck.class).asEagerSingleton();
  bind(InFlightService.class).asEagerSingleton();
}
Program: 61658
Project: 61658
Buggy source:
@Override protected void configure(){
  bind(ChannelService.class).to(LocalChannelService.class).asEagerSingleton();
  bind(ContentDao.class).annotatedWith(Names.named(ContentDao.WRITE_CACHE)).to(SpokeWriteContentDao.class).asEagerSingleton();
  bind(ContentService.class).to(SingleContentService.class).asEagerSingleton();
  bind(ChannelTtlEnforcer.class).asEagerSingleton();
  bind(DocumentationDao.class).to(FileDocumentationDao.class).asEagerSingleton();
}

Fixed version (ground truth):
@Override protected void configure(){
  bind(ChannelService.class).to(LocalChannelService.class).asEagerSingleton();
  bind(ContentDao.class).annotatedWith(Names.named(ContentDao.WRITE_CACHE)).to(SpokeWriteContentDao.class).asEagerSingleton();
  bind(ContentService.class).to(SingleContentService.class).asEagerSingleton();
  bind(ChannelTtlEnforcer.class).asEagerSingleton();
  bind(DocumentationDao.class).to(FileDocumentationDao.class).asEagerSingleton();
  bind(FileSpokeStore.class).annotatedWith(Names.named(SpokeStore.WRITE.name())).toInstance(new FileSpokeStore(HubProperties.getSpokePath(SpokeStore.WRITE),HubProperties.getSpokeTtlMinutes(SpokeStore.WRITE)));
  bind(FileSpokeStore.class).annotatedWith(Names.named(SpokeStore.READ.name())).toInstance(new FileSpokeStore(HubProperties.getSpokePath(SpokeStore.READ),HubProperties.getSpokeTtlMinutes(SpokeStore.READ)));
}
Program: 61659
Project: 61659
Buggy source:
public SingleContentService(){
  String contentPath=FileUtil.getContentPath();
  logger.info("String_Node_Str",contentPath);
  fileSpokeStore=new FileSpokeStore(contentPath);
}

Fixed version (ground truth):
public SingleContentService(){
  String contentPath=FileUtil.getContentPath();
  logger.info("String_Node_Str",contentPath);
  fileSpokeStore=new FileSpokeStore(contentPath,HubProperties.getSpokeTtlMinutes(SpokeStore.WRITE));
}
Program: 61660
Project: 61660
Buggy source:
@Override public ChannelConfig createChannel(ChannelConfig configuration){
  logger.info("String_Node_Str",configuration);
  channelValidator.validate(configuration,null,false);
  channelConfigDao.upsert(configuration);
  notify(configuration,null);
  TagWebhook.updateTagWebhooks(configuration);
  return configuration;
}

Fixed version (ground truth):
@Override public ChannelConfig createChannel(ChannelConfig configuration){
  logger.info("String_Node_Str",configuration);
  channelValidator.validate(configuration,null,false);
  channelConfigDao.upsert(configuration);
  notify(configuration,null);
  TagWebhook.updateTagWebhooksDoToChannelConfigChange(configuration);
  return configuration;
}
Program: 61661
Project: 61661
Buggy source:
@Override public ChannelConfig updateChannel(ChannelConfig configuration,ChannelConfig oldConfig,boolean isLocalHost){
  if (!configuration.equals(oldConfig)) {
    logger.info("String_Node_Str",configuration,oldConfig);
    channelValidator.validate(configuration,oldConfig,isLocalHost);
    channelConfigDao.upsert(configuration);
    TagWebhook.updateTagWebhooks(configuration);
    notify(configuration,oldConfig);
  }
 else {
    logger.info("String_Node_Str",configuration);
  }
  return configuration;
}

Fixed version (ground truth):
@Override public ChannelConfig updateChannel(ChannelConfig configuration,ChannelConfig oldConfig,boolean isLocalHost){
  if (!configuration.equals(oldConfig)) {
    logger.info("String_Node_Str",configuration,oldConfig);
    channelValidator.validate(configuration,oldConfig,isLocalHost);
    channelConfigDao.upsert(configuration);
    TagWebhook.updateTagWebhooksDoToChannelConfigChange(configuration);
    notify(configuration,oldConfig);
  }
 else {
    logger.info("String_Node_Str",configuration);
  }
  return configuration;
}
Program: 61662
Project: 61662
Buggy source:
private static Set<Webhook> webhookPrototypesWithTag(String tag){
  Set<Webhook> webhookSet=new HashSet<>(webhookDao.getAll(false));
  return webhookSet.stream().filter(wh -> tag.equals(wh.getTag())).filter(Webhook::isTagPrototype).collect(Collectors.toSet());
}

Fixed version (ground truth):
private static Set<Webhook> webhookPrototypesWithTag(String tag){
  Set<Webhook> webhookSet=new HashSet<>(webhookDao.getAll(false));
  Set<Webhook> result=webhookSet.stream().filter(wh -> Objects.equals(tag,wh.getTag()) && wh.isTagPrototype()).collect(Collectors.toSet());
  return result;
}
Program: 61663
Project: 61663
Buggy source:
static Response get(String name,UriInfo uriInfo){
  Optional<Webhook> webhookOptional=webhookService.get(name);
  if (!webhookOptional.isPresent()) {
    logger.info("String_Node_Str",name);
    return Response.status(Response.Status.NOT_FOUND).build();
  }
  logger.info("String_Node_Str",name);
  Webhook webhook=webhookOptional.get();
  WebhookStatus status=webhookService.getStatus(webhook);
  DateTime stable=TimeUtil.stable();
  ObjectNode root=mapper.createObjectNode();
  addSelfLink(root,uriInfo);
  root.put("String_Node_Str",webhook.getName());
  root.put("String_Node_Str",webhook.getCallbackUrl());
  root.put("String_Node_Str",webhook.getChannelUrl());
  root.put("String_Node_Str",webhook.getParallelCalls());
  root.put("String_Node_Str",webhook.isPaused());
  root.put("String_Node_Str",webhook.getBatch());
  root.put("String_Node_Str",webhook.isHeartbeat());
  root.put("String_Node_Str",webhook.getTtlMinutes());
  root.put("String_Node_Str",webhook.getMaxWaitMinutes());
  root.put("String_Node_Str",webhook.getCallbackTimeoutSeconds());
  addLatest(webhook,status,root,true);
  TimeLinkUtil.addTime(root,stable,"String_Node_Str");
  ArrayNode inFlight=root.putArray("String_Node_Str");
  for (  ContentPath contentPath : status.getInFlight()) {
    inFlight.add(webhook.getChannelUrl() + "String_Node_Str" + contentPath.toUrl());
  }
  addErrors(status,root);
  return Response.ok(root).build();
}

Fixed version (ground truth):
static Response get(String name,UriInfo uriInfo){
  Optional<Webhook> webhookOptional=webhookService.get(name);
  if (!webhookOptional.isPresent()) {
    logger.info("String_Node_Str",name);
    return Response.status(Response.Status.NOT_FOUND).build();
  }
  logger.info("String_Node_Str",name);
  Webhook webhook=webhookOptional.get();
  WebhookStatus status=webhookService.getStatus(webhook);
  DateTime stable=TimeUtil.stable();
  ObjectNode root=mapper.createObjectNode();
  addSelfLink(root,uriInfo);
  root.put("String_Node_Str",webhook.getName());
  root.put("String_Node_Str",webhook.getCallbackUrl());
  root.put("String_Node_Str",webhook.getChannelUrl());
  root.put("String_Node_Str",webhook.getParallelCalls());
  root.put("String_Node_Str",webhook.isPaused());
  root.put("String_Node_Str",webhook.getBatch());
  root.put("String_Node_Str",webhook.isHeartbeat());
  root.put("String_Node_Str",webhook.getTtlMinutes());
  root.put("String_Node_Str",webhook.getMaxWaitMinutes());
  root.put("String_Node_Str",webhook.getCallbackTimeoutSeconds());
  if (webhook.isTagPrototype()) {
    root.put("String_Node_Str",webhook.getTag());
    root.put("String_Node_Str",webhook.isTagPrototype());
  }
  addLatest(webhook,status,root,true);
  TimeLinkUtil.addTime(root,stable,"String_Node_Str");
  ArrayNode inFlight=root.putArray("String_Node_Str");
  for (  ContentPath contentPath : status.getInFlight()) {
    inFlight.add(webhook.getChannelUrl() + "String_Node_Str" + contentPath.toUrl());
  }
  addErrors(status,root);
  return Response.ok(root).build();
}
Program: 61664
Project: 61664
Buggy source:
public void delete(String name){
  logger.info("String_Node_Str" + name);
  webhookDao.delete(name);
  webhookManager.delete(name);
}

Fixed version (ground truth):
public void delete(String name){
  logger.info("String_Node_Str" + name);
  TagWebhook.deleteInstancesIfTagWebhook(name);
  webhookDao.delete(name);
  webhookManager.delete(name);
}
Program: 61665
Project: 61665
Buggy source:
@Inject public ActiveWebhooks(CuratorFramework curator) throws Exception {
  this.curator=curator;
  v1Webhooks=new PathChildrenCache(curator,"String_Node_Str",true);
  v1Webhooks.start(PathChildrenCache.StartMode.BUILD_INITIAL_CACHE);
  v2Webhooks=new PathChildrenCache(curator,"String_Node_Str",true);
  v2Webhooks.start(PathChildrenCache.StartMode.BUILD_INITIAL_CACHE);
  logger.info("String_Node_Str");
  cleanupEmpty(v1Webhooks);
  cleanupEmpty(v2Webhooks);
}

Fixed version (ground truth):
@Inject public ActiveWebhooks(CuratorFramework curator) throws Exception {
  this.curator=curator;
  v1Webhooks=new PathChildrenCache(curator,V1_LEADER,true);
  v1Webhooks.start(PathChildrenCache.StartMode.BUILD_INITIAL_CACHE);
  v2Webhooks=new PathChildrenCache(curator,V2_LEADER,true);
  v2Webhooks.start(PathChildrenCache.StartMode.BUILD_INITIAL_CACHE);
  logger.info("String_Node_Str");
  cleanupEmpty(v1Webhooks);
  cleanupEmpty(v2Webhooks);
}
Program: 61666
Project: 61666
Buggy source:
private void addAll(String name,Set<String> servers,String zkName) throws Exception {
  String path=WebhookLeader.LEADER_PATH + "String_Node_Str" + name+ "String_Node_Str"+ zkName;
  List<String> leases=curator.getChildren().forPath(path);
  for (  String lease : leases) {
    byte[] bytes=curator.getData().forPath(path + "String_Node_Str" + lease);
    servers.add(new String(bytes) + "String_Node_Str" + HubHost.getLocalPort());
  }
}

Fixed version (ground truth):
private void addAll(String name,Set<String> servers,String zkName) throws Exception {
  String path=V2_LEADER + "String_Node_Str" + name+ "String_Node_Str"+ zkName;
  List<String> leases=curator.getChildren().forPath(path);
  for (  String lease : leases) {
    byte[] bytes=curator.getData().forPath(path + "String_Node_Str" + lease);
    servers.add(new String(bytes) + "String_Node_Str" + HubHost.getLocalPort());
  }
}
Program: 61667
Project: 61667
Buggy source:
@Test public void testPath() throws Exception {
  logger.info("String_Node_Str");
  HubUtils hubUtils=new HubUtils(HubBindings.buildJerseyClientNoRedirects(),HubBindings.buildJerseyClient());
  CuratorCluster cluster=new CuratorCluster(curator,"String_Node_Str",false,new SpokeDecommissionCluster(curator,hubUtils));
  Collection<String> servers=cluster.getAllServers();
  assertNotNull(servers);
  assertEquals(0,servers.size());
  logger.info("String_Node_Str");
  cluster.register();
  Sleeper.sleep(5000);
  logger.info("String_Node_Str");
  servers=cluster.getAllServers();
  assertNotNull(servers);
  assertEquals(1,servers.size());
  logger.info("String_Node_Str");
  cluster.delete();
  Sleeper.sleep(5000);
  servers=cluster.getAllServers();
  assertNotNull(servers);
  assertEquals(0,servers.size());
}

Fixed version (ground truth):
@Test public void testPath() throws Exception {
  logger.info("String_Node_Str");
  CuratorCluster cluster=new CuratorCluster(curator,"String_Node_Str",false,new SpokeDecommissionCluster(curator));
  Collection<String> servers=cluster.getAllServers();
  assertNotNull(servers);
  assertEquals(0,servers.size());
  logger.info("String_Node_Str");
  cluster.register();
  Sleeper.sleep(5000);
  logger.info("String_Node_Str");
  servers=cluster.getAllServers();
  assertNotNull(servers);
  assertEquals(1,servers.size());
  logger.info("String_Node_Str");
  cluster.delete();
  Sleeper.sleep(5000);
  servers=cluster.getAllServers();
  assertNotNull(servers);
  assertEquals(0,servers.size());
}
Program: 61668
Project: 61668
Buggy source:
@BeforeClass public static void setUpClass() throws Exception {
  curator=Integration.startZooKeeper();
  HubUtils hubUtils=new HubUtils(HubBindings.buildJerseyClientNoRedirects(),HubBindings.buildJerseyClient());
  cluster=new SpokeDecommissionCluster(curator,hubUtils);
}

Fixed version (ground truth):
@BeforeClass public static void setUpClass() throws Exception {
  curator=Integration.startZooKeeper();
  cluster=new SpokeDecommissionCluster(curator);
}
Program: 61669
Project: 61669
Buggy source:
@BeforeClass public static void setUpClass() throws Exception {
  Injector injector=Integration.startAwsHub();
  util=new ContentDaoUtil(injector.getInstance(SpokeContentDao.class));
  CuratorFramework curator=injector.getInstance(CuratorFramework.class);
  HubUtils hubUtils=injector.getInstance(HubUtils.class);
  Cluster cluster=HubBindings.buildSpokeCluster(curator,new SpokeDecommissionCluster(curator,hubUtils));
  for (int i=0; i < 10; i++) {
    if (cluster.getAllServers().size() == 0) {
      logger.info("String_Node_Str");
      Sleeper.sleep(500);
    }
 else {
      logger.info("String_Node_Str",cluster.getAllServers());
      return;
    }
  }
  logger.info("String_Node_Str");
}

Fixed version (ground truth):
@BeforeClass public static void setUpClass() throws Exception {
  Injector injector=Integration.startAwsHub();
  util=new ContentDaoUtil(injector.getInstance(SpokeContentDao.class));
  CuratorFramework curator=injector.getInstance(CuratorFramework.class);
  Cluster cluster=HubBindings.buildSpokeCluster(curator,new SpokeDecommissionCluster(curator));
  for (int i=0; i < 10; i++) {
    if (cluster.getAllServers().size() == 0) {
      logger.info("String_Node_Str");
      Sleeper.sleep(500);
    }
 else {
      logger.info("String_Node_Str",cluster.getAllServers());
      return;
    }
  }
  logger.info("String_Node_Str");
}
Program: 61670
Project: 61670
Buggy source:
public AmazonS3 getS3Client() throws IOException {
  AmazonS3Client amazonS3Client=new AmazonS3Client(getAwsCredentials(),getClientConfiguration("String_Node_Str",true));
  amazonS3Client.setEndpoint(s3Endpoint);
  return amazonS3Client;
}

Fixed version (ground truth):
public AmazonS3 getS3Client() throws IOException {
  AmazonS3Client amazonS3Client;
  ClientConfiguration configuration=getClientConfiguration("String_Node_Str",true);
  try {
    InstanceProfileCredentialsProvider credentialsProvider=new InstanceProfileCredentialsProvider();
    credentialsProvider.getCredentials();
    amazonS3Client=new AmazonS3Client(credentialsProvider,configuration);
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str" + e.getMessage());
    amazonS3Client=new AmazonS3Client(getPropertiesCredentials(),configuration);
  }
  amazonS3Client.setEndpoint(s3Endpoint);
  return amazonS3Client;
}
Program: 61671
Project: 61671
Buggy source:
public AmazonDynamoDBClient getDynamoClient() throws IOException {
  AmazonDynamoDBClient client=new AmazonDynamoDBClient(getAwsCredentials(),getClientConfiguration("String_Node_Str",false));
  client.setEndpoint(dynamoEndpoint);
  return client;
}

Fixed version (ground truth):
public AmazonDynamoDBClient getDynamoClient() throws IOException {
  logger.info("String_Node_Str" + protocol + "String_Node_Str"+ dynamoEndpoint);
  AmazonDynamoDBClient client;
  ClientConfiguration configuration=getClientConfiguration("String_Node_Str",false);
  try {
    InstanceProfileCredentialsProvider credentialsProvider=new InstanceProfileCredentialsProvider();
    credentialsProvider.getCredentials();
    client=new AmazonDynamoDBClient(credentialsProvider,configuration);
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str" + e.getMessage());
    client=new AmazonDynamoDBClient(getPropertiesCredentials(),configuration);
  }
  client.setEndpoint(dynamoEndpoint);
  return client;
}
Program: 61672
Project: 61672
Buggy source:
@GET @Produces(MediaType.APPLICATION_JSON) public Response getChannels(){
  ObjectNode root=mapper.createObjectNode();
  root.put("String_Node_Str","String_Node_Str");
  links=root.with("String_Node_Str");
  requestUri=StringUtils.appendIfMissing(uriInfo.getRequestUri().toString(),"String_Node_Str");
  links.with("String_Node_Str").put("String_Node_Str",requestUri);
  addLink("String_Node_Str",InternalChannelResource.DESCRIPTION);
  addLink("String_Node_Str",InternalClusterResource.DESCRIPTION);
  addLink("String_Node_Str",InternalCuratorResource.DESCRIPTION);
  addLink("String_Node_Str",InternalDeployResource.DESCRIPTION);
  addLink("String_Node_Str",InternalHealthResource.DESCRIPTION);
  addLink("String_Node_Str",InternalPropertiesResource.DESCRIPTION);
  addLink("String_Node_Str",InternalShutdownResource.DESCRIPTION);
  addLink("String_Node_Str",InternalStacktraceResource.DESCRIPTION);
  addLink("String_Node_Str",InternalTimeResource.DESCRIPTION);
  addLink("String_Node_Str",InternalTracesResource.DESCRIPTION);
  addLink("String_Node_Str",InternalWebhookResource.DESCRIPTION);
  addLink("String_Node_Str",InternalZookeeperResource.DESCRIPTION);
  return Response.ok(root).build();
}

Fixed version (ground truth):
@GET @Produces(MediaType.APPLICATION_JSON) public Response getChannels(){
  ObjectNode root=mapper.createObjectNode();
  root.put("String_Node_Str","String_Node_Str");
  links=root.with("String_Node_Str");
  requestUri=StringUtils.appendIfMissing(uriInfo.getRequestUri().toString(),"String_Node_Str");
  links.with("String_Node_Str").put("String_Node_Str",requestUri);
  addLink("String_Node_Str",InternalChannelResource.DESCRIPTION);
  addLink("String_Node_Str",InternalCuratorResource.DESCRIPTION);
  addLink("String_Node_Str",InternalDeployResource.DESCRIPTION);
  addLink("String_Node_Str",InternalHealthResource.DESCRIPTION);
  addLink("String_Node_Str",InternalPropertiesResource.DESCRIPTION);
  addLink("String_Node_Str",InternalShutdownResource.DESCRIPTION);
  addLink("String_Node_Str",InternalStacktraceResource.DESCRIPTION);
  addLink("String_Node_Str",InternalTimeResource.DESCRIPTION);
  addLink("String_Node_Str",InternalTracesResource.DESCRIPTION);
  addLink("String_Node_Str",InternalWebhookResource.DESCRIPTION);
  addLink("String_Node_Str",InternalZookeeperResource.DESCRIPTION);
  return Response.ok(root).build();
}
Program: 61673
Project: 61673
Buggy source:
@Override public Content get(String channelName,ContentKey key){
  String path=getPath(channelName,key);
  Traces traces=ActiveTraces.getLocal();
  traces.add("String_Node_Str");
  try {
    return spokeStore.get(channelName,path,key);
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str" + path,e);
    return null;
  }
 finally {
    traces.add("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public Content get(String channelName,ContentKey key){
  String path=getPath(channelName,key);
  Traces traces=ActiveTraces.getLocal();
  traces.add("String_Node_Str");
  try {
    return spokeStore.get(path,key);
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str" + path,e);
    return null;
  }
 finally {
    traces.add("String_Node_Str");
  }
}
Program: 61675
Project: 61675
Buggy source:
private SortedSet<ContentKey> queryByTimeKeys(TimeQuery query){
  try {
    QueryResult queryResult=spokeStore.readTimeBucket(query);
    ActiveTraces.getLocal().add("String_Node_Str",queryResult);
    if (!queryResult.hadSuccess()) {
      QueryResult retryResult=spokeStore.readTimeBucket(query);
      ActiveTraces.getLocal().add("String_Node_Str",retryResult);
      if (!retryResult.hadSuccess()) {
        ActiveTraces.getLocal().log(logger);
        throw new FailedQueryException("String_Node_Str" + query + "String_Node_Str"+ queryResult);
      }
      queryResult.getContentKeys().addAll(retryResult.getContentKeys());
    }
    ActiveTraces.getLocal().add("String_Node_Str",queryResult.getContentKeys());
    return queryResult.getContentKeys();
  }
 catch (  FailedQueryException rethrow) {
    throw rethrow;
  }
catch (  Exception e) {
    logger.warn("String_Node_Str" + query,e);
  }
  return Collections.emptySortedSet();
}

Fixed version (ground truth):
private SortedSet<ContentKey> queryByTimeKeys(TimeQuery query){
  try {
    String timePath=query.getUnit().format(query.getStartTime());
    QueryResult queryResult=spokeStore.readTimeBucket(query.getChannelName(),timePath);
    ActiveTraces.getLocal().add("String_Node_Str",queryResult);
    if (!queryResult.hadSuccess()) {
      QueryResult retryResult=spokeStore.readTimeBucket(query.getChannelName(),timePath);
      ActiveTraces.getLocal().add("String_Node_Str",retryResult);
      if (!retryResult.hadSuccess()) {
        ActiveTraces.getLocal().log(logger);
        throw new FailedQueryException("String_Node_Str" + query + "String_Node_Str"+ queryResult);
      }
      queryResult.getContentKeys().addAll(retryResult.getContentKeys());
    }
    ActiveTraces.getLocal().add("String_Node_Str",queryResult.getContentKeys());
    return queryResult.getContentKeys();
  }
 catch (  FailedQueryException rethrow) {
    throw rethrow;
  }
catch (  Exception e) {
    logger.warn("String_Node_Str" + query,e);
  }
  return Collections.emptySortedSet();
}
Program: 61676
Project: 61676
Buggy source:
public static ChannelConfig createFromJson(String json){
  if (StringUtils.isEmpty(json)) {
    throw new InvalidRequestException("String_Node_Str");
  }
 else {
    return gson.fromJson(json,ChannelConfig.ChannelConfigBuilder.class).build();
  }
}

Fixed version (ground truth):
public static ChannelConfig createFromJson(String json){
  if (StringUtils.isEmpty(json)) {
    throw new InvalidRequestException("String_Node_Str");
  }
 else {
    return gson.fromJson(json,ChannelConfigBuilder.class).build();
  }
}
Program: 61677
Project: 61677
Buggy source:
private ChannelConfig(String name,String owner,Date creationDate,long ttlDays,long maxItems,String description,Set<String> tags,String replicationSource,String storage,GlobalConfig global,boolean protect,DateTime mutableTime,boolean allowZeroBytes,String displayName){
  this.name=StringUtils.trim(name);
  this.displayName=StringUtils.defaultIfBlank(displayName,name);
  this.owner=StringUtils.trim(owner);
  this.creationDate=creationDate;
  this.description=description;
  this.tags=tags;
  this.replicationSource=replicationSource;
  this.mutableTime=mutableTime;
  this.allowZeroBytes=allowZeroBytes;
  if (maxItems == 0 && ttlDays == 0 && mutableTime == null) {
    this.ttlDays=120;
    this.maxItems=0;
  }
 else {
    this.ttlDays=ttlDays;
    this.maxItems=maxItems;
  }
  if (isBlank(storage)) {
    this.storage=SINGLE;
  }
 else {
    this.storage=StringUtils.upperCase(storage);
  }
  if (global != null) {
    this.global=global.cleanup();
  }
 else {
    this.global=null;
  }
  addTagIf(!isBlank(replicationSource),REPLICATED);
  addTagIf(isGlobal(),GLOBAL);
  addTagIf(isHistorical(),HISTORICAL);
  if (HubProperties.isProtected()) {
    this.protect=true;
  }
 else {
    this.protect=protect;
  }
}

Fixed version (ground truth):
private ChannelConfig(String name,String owner,Date creationDate,long ttlDays,long maxItems,String description,Set<String> tags,String replicationSource,String storage,GlobalConfig global,boolean protect,DateTime mutableTime,boolean allowZeroBytes,String displayName){
  this.name=StringUtils.trim(name);
  this.displayName=StringUtils.defaultIfBlank(StringUtils.trim(displayName),this.name);
  this.owner=StringUtils.trim(owner);
  this.creationDate=creationDate;
  this.description=description;
  this.tags=tags;
  this.replicationSource=replicationSource;
  this.mutableTime=mutableTime;
  this.allowZeroBytes=allowZeroBytes;
  if (maxItems == 0 && ttlDays == 0 && mutableTime == null) {
    this.ttlDays=120;
    this.maxItems=0;
  }
 else {
    this.ttlDays=ttlDays;
    this.maxItems=maxItems;
  }
  if (isBlank(storage)) {
    this.storage=SINGLE;
  }
 else {
    this.storage=StringUtils.upperCase(storage);
  }
  if (global != null) {
    this.global=global.cleanup();
  }
 else {
    this.global=null;
  }
  addTagIf(!isBlank(replicationSource),REPLICATED);
  addTagIf(isGlobal(),GLOBAL);
  addTagIf(isHistorical(),HISTORICAL);
  if (HubProperties.isProtected()) {
    this.protect=true;
  }
 else {
    this.protect=protect;
  }
}
Program: 61678
Project: 61678
Buggy source:
private void setStartTime(ClusterEvent clusterEvent){
  this.startTime=new DateTime(clusterEvent.getCreationTime(),DateTimeZone.UTC);
  timeInterval=new TimeInterval(startTime,null);
}

Fixed version (ground truth):
private void setStartTime(ClusterEvent clusterEvent){
  this.startTime=new DateTime(clusterEvent.getModifiedTime(),DateTimeZone.UTC);
  timeInterval=new TimeInterval(startTime,null);
}
Program: 61681
Project: 61681
Buggy source:
@Test public void test3Nodes(){
  List<String> strings=Arrays.asList(steps[0] + "String_Node_Str",steps[1] + "String_Node_Str",steps[2] + "String_Node_Str");
  SpokeRings spokeRings=new SpokeRings();
  spokeRings.process(strings);
  assertTrue(spokeRings.getNodes("String_Node_Str").containsAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")));
  assertTrue(spokeRings.getNodes("String_Node_Str").containsAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")));
  assertTrue(spokeRings.getNodes("String_Node_Str",getTime(steps[0])).containsAll(Arrays.asList("String_Node_Str")));
  assertTrue(spokeRings.getNodes("String_Node_Str",getTime(steps[1])).containsAll(Arrays.asList("String_Node_Str","String_Node_Str")));
  assertTrue(spokeRings.getNodes("String_Node_Str",getTime(steps[2])).containsAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")));
  assertTrue(spokeRings.getNodes("String_Node_Str",getTime(steps[0]),getTime(steps[2])).containsAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")));
}

Fixed version (ground truth):
@Test public void test3Nodes(){
  List<ClusterEvent> clusterEvents=new ArrayList<>();
  clusterEvents.add(new ClusterEvent("String_Node_Str" + steps[0] + "String_Node_Str",steps[0]));
  clusterEvents.add(new ClusterEvent("String_Node_Str" + steps[1] + "String_Node_Str",steps[1]));
  clusterEvents.add(new ClusterEvent("String_Node_Str" + steps[2] + "String_Node_Str",steps[2]));
  SpokeRings spokeRings=new SpokeRings();
  spokeRings.process(clusterEvents);
  assertTrue(spokeRings.getNodes("String_Node_Str").containsAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")));
  assertTrue(spokeRings.getNodes("String_Node_Str").containsAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")));
  assertTrue(spokeRings.getNodes("String_Node_Str",getTime(steps[0])).containsAll(Arrays.asList("String_Node_Str")));
  assertTrue(spokeRings.getNodes("String_Node_Str",getTime(steps[1])).containsAll(Arrays.asList("String_Node_Str","String_Node_Str")));
  assertTrue(spokeRings.getNodes("String_Node_Str",getTime(steps[2])).containsAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")));
  assertTrue(spokeRings.getNodes("String_Node_Str",getTime(steps[0]),getTime(steps[2])).containsAll(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")));
}
Program: 61683
Project: 61683
Buggy source:
SpokeRing(ClusterEvent clusterEvent,SpokeRing previousRing){
  setStartTime(clusterEvent);
  previousRing.setEndTime(this.startTime);
  HashSet<String> nodes=new HashSet<>(previousRing.spokeNodes);
  if (clusterEvent.isAdded()) {
    nodes.add(clusterEvent.getName());
  }
 else {
    nodes.remove(clusterEvent.getName());
  }
  initialize(nodes);
}

Fixed version (ground truth):
SpokeRing(ClusterEvent clusterEvent,SpokeRing previousRing){
  setStartTime(clusterEvent);
  previousRing.setEndTime(new DateTime(clusterEvent.getModifiedTime(),DateTimeZone.UTC));
  HashSet<String> nodes=new HashSet<>(previousRing.spokeNodes);
  if (clusterEvent.isAdded()) {
    nodes.add(clusterEvent.getName());
  }
 else {
    nodes.remove(clusterEvent.getName());
  }
  initialize(nodes);
}
Program: 61684
Project: 61684
Buggy source:
@Override public void mute(){
  logger.info("String_Node_Str");
  String api_key=HubProperties.getProperty("String_Node_Str","String_Node_Str");
  String app_key=HubProperties.getProperty("String_Node_Str","String_Node_Str");
  String name=HubHost.getLocalName();
  if ("String_Node_Str".equals(api_key) || "String_Node_Str".equals(app_key)) {
    logger.warn("String_Node_Str");
    return;
  }
  logger.info("String_Node_Str" + api_key + "String_Node_Str"+ app_key);
  try {
    String url="String_Node_Str" + api_key + "String_Node_Str"+ app_key;
    ObjectNode root=mapper.createObjectNode();
    root.put("String_Node_Str","String_Node_Str" + name);
    root.put("String_Node_Str","String_Node_Str");
    root.put("String_Node_Str",(new Instant()).getMillis() + (4 * 60 * 60* 1000));
    ClientResponse response=RestClient.defaultClient().resource(url).type(MediaType.APPLICATION_JSON).post(ClientResponse.class,root);
    int status=response.getStatus();
    if (status >= 200 && status <= 299) {
      logger.info("String_Node_Str" + name + "String_Node_Str");
    }
 else {
      logger.warn("String_Node_Str" + name + "String_Node_Str"+ status);
    }
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void mute(){
  logger.info("String_Node_Str");
  String api_key=HubProperties.getProperty("String_Node_Str","String_Node_Str");
  String app_key=HubProperties.getProperty("String_Node_Str","String_Node_Str");
  String name=HubHost.getLocalName();
  long end=(new Instant()).getMillis() + (4 * 60 * 60* 1000);
  if ("String_Node_Str".equals(api_key) || "String_Node_Str".equals(app_key)) {
    logger.warn("String_Node_Str");
    return;
  }
  try {
    String url="String_Node_Str" + api_key + "String_Node_Str"+ app_key;
    ObjectNode root=mapper.createObjectNode();
    root.put("String_Node_Str","String_Node_Str" + name);
    root.put("String_Node_Str","String_Node_Str");
    root.put("String_Node_Str",end);
    String data=root.toString();
    ClientResponse response=RestClient.defaultClient().resource(url).type(MediaType.APPLICATION_JSON).post(ClientResponse.class,data);
    int status=response.getStatus();
    if (status >= 200 && status <= 299) {
      logger.info("String_Node_Str" + name + "String_Node_Str");
    }
 else {
      logger.warn("String_Node_Str" + name + "String_Node_Str"+ status);
      logger.warn(data);
    }
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e);
  }
}
Program: 61685
Project: 61685
Buggy source:
@Override public void mute(){
  logger.info("String_Node_Str");
  String api_key=HubProperties.getProperty("String_Node_Str","String_Node_Str");
  String app_key=HubProperties.getProperty("String_Node_Str","String_Node_Str");
  String name=HubHost.getLocalName();
  if ("String_Node_Str".equals(api_key) || "String_Node_Str".equals(app_key)) {
    logger.warn("String_Node_Str");
    return;
  }
  logger.info("String_Node_Str" + api_key + "String_Node_Str"+ app_key);
  try {
    String url="String_Node_Str" + api_key + "String_Node_Str"+ app_key;
    ObjectNode root=mapper.createObjectNode();
    root.put("String_Node_Str","String_Node_Str" + name);
    root.put("String_Node_Str","String_Node_Str");
    root.put("String_Node_Str",(new Instant()).getMillis() + (4 * 60 * 60));
    ClientResponse response=RestClient.defaultClient().resource(url).type(MediaType.APPLICATION_JSON).put(ClientResponse.class,root);
    if (response.getStatus() == 200) {
      logger.info("String_Node_Str" + name + "String_Node_Str");
    }
 else {
      logger.warn("String_Node_Str" + name);
    }
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void mute(){
  logger.info("String_Node_Str");
  String api_key=HubProperties.getProperty("String_Node_Str","String_Node_Str");
  String app_key=HubProperties.getProperty("String_Node_Str","String_Node_Str");
  String name=HubHost.getLocalName();
  if ("String_Node_Str".equals(api_key) || "String_Node_Str".equals(app_key)) {
    logger.warn("String_Node_Str");
    return;
  }
  logger.info("String_Node_Str" + api_key + "String_Node_Str"+ app_key);
  try {
    String url="String_Node_Str" + api_key + "String_Node_Str"+ app_key;
    ObjectNode root=mapper.createObjectNode();
    root.put("String_Node_Str","String_Node_Str" + name);
    root.put("String_Node_Str","String_Node_Str");
    root.put("String_Node_Str",(new Instant()).getMillis() + (4 * 60 * 60* 1000));
    ClientResponse response=RestClient.defaultClient().resource(url).type(MediaType.APPLICATION_JSON).post(ClientResponse.class,root);
    int status=response.getStatus();
    if (status >= 200 && status <= 299) {
      logger.info("String_Node_Str" + name + "String_Node_Str");
    }
 else {
      logger.warn("String_Node_Str" + name + "String_Node_Str"+ status);
    }
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e);
  }
}
Program: 61686
Project: 61686
Buggy source:
private ContentKey insertInternal(String channelName,Content content) throws Exception {
  return inFlightService.inFlight(() -> {
    Traces traces=ActiveTraces.getLocal();
    traces.add("String_Node_Str");
    try {
      content.packageStream();
      traces.add("String_Node_Str");
      ContentKey key=content.keyAndStart(timeService.getNow());
      logger.trace("String_Node_Str",key,channelName);
      contentService.insert(channelName,content);
      traces.add("String_Node_Str",key);
      return key;
    }
 catch (    ContentTooLargeException e) {
      logger.info("String_Node_Str" + channelName);
      throw e;
    }
catch (    Exception e) {
      traces.add("String_Node_Str","String_Node_Str",e.getMessage());
      logger.warn("String_Node_Str" + channelName,e);
      throw e;
    }
  }
);
}

Fixed version (ground truth):
private ContentKey insertInternal(String channelName,Content content) throws Exception {
  return inFlightService.inFlight(() -> {
    Traces traces=ActiveTraces.getLocal();
    traces.add("String_Node_Str");
    try {
      content.packageStream();
      traces.add("String_Node_Str");
      ContentKey key=content.keyAndStart(timeService.getNow());
      logger.trace("String_Node_Str",key,channelName);
      key=contentService.insert(channelName,content);
      traces.add("String_Node_Str",key);
      return key;
    }
 catch (    ContentTooLargeException e) {
      logger.info("String_Node_Str" + channelName);
      throw e;
    }
catch (    Exception e) {
      traces.add("String_Node_Str","String_Node_Str",e.getMessage());
      logger.warn("String_Node_Str" + channelName,e);
      throw e;
    }
  }
);
}