nus-yam/ex-repair huggingface dataset:
Program: 61687
Project: 61687
Buggy source:
static Content createIndex(Content largePayload){
  Content.Builder builder=Content.builder();
  builder.withContentType(S3LargeContentDao.CONTENT_TYPE);
  ObjectNode data=mapper.createObjectNode();
  data.put("String_Node_Str",largePayload.getContentKey().get().toUrl());
  data.put("String_Node_Str",largePayload.getSize());
  if (largePayload.getContentType().isPresent()) {
    data.put("String_Node_Str",largePayload.getContentType().get());
  }
  builder.withData(data.toString().getBytes());
  Content indexContent=builder.build();
  indexContent.keyAndStart(TimeUtil.now());
  return indexContent;
}

Fixed version (ground truth):
static Content createIndex(Content largePayload){
  Content.Builder builder=Content.builder();
  builder.withContentType(S3LargeContentDao.CONTENT_TYPE);
  ObjectNode data=mapper.createObjectNode();
  data.put("String_Node_Str",largePayload.getContentKey().get().toUrl());
  data.put("String_Node_Str",largePayload.getSize());
  if (largePayload.getContentType().isPresent()) {
    data.put("String_Node_Str",largePayload.getContentType().get());
  }
  builder.withData(data.toString().getBytes());
  builder.withContentKey(new ContentKey());
  return builder.build();
}
Program: 61688
Project: 61688
Buggy source:
public Content get(String path,ContentKey key){
  Collection<String> servers=cluster.getRandomServers();
  for (  String server : servers) {
    ClientResponse response=null;
    try {
      setThread(path);
      response=query_client.resource(HubHost.getScheme() + server + "String_Node_Str"+ path).get(ClientResponse.class);
      logger.trace("String_Node_Str",server,path,response);
      if (response.getStatus() == 200) {
        byte[] entity=response.getEntity(byte[].class);
        if (entity.length > 0) {
          return ContentMarshaller.toContent(entity,key);
        }
      }
    }
 catch (    JsonMappingException e) {
      logger.info("String_Node_Str" + path);
    }
catch (    ClientHandlerException e) {
      if (e.getCause() != null && e.getCause() instanceof ConnectException) {
        logger.warn("String_Node_Str" + server);
      }
 else {
        logger.warn("String_Node_Str" + server + "String_Node_Str"+ path,e);
      }
    }
catch (    Exception e) {
      logger.warn("String_Node_Str" + path,e);
    }
 finally {
      HubUtils.close(response);
      resetThread();
    }
  }
  return null;
}

Fixed version (ground truth):
public Content get(String path,ContentKey key){
  Collection<String> servers=cluster.getRandomServers();
  for (  String server : servers) {
    ClientResponse response=null;
    try {
      setThread(path);
      response=query_client.resource(HubHost.getScheme() + server + "String_Node_Str"+ path).get(ClientResponse.class);
      logger.trace("String_Node_Str",server,path,response);
      if (response.getStatus() == 200) {
        byte[] entity=response.getEntity(byte[].class);
        if (entity.length > 0) {
          return ContentMarshaller.toContent(entity,key);
        }
      }
    }
 catch (    JsonMappingException e) {
      logger.info("String_Node_Str" + path,e);
    }
catch (    ClientHandlerException e) {
      if (e.getCause() != null && e.getCause() instanceof ConnectException) {
        logger.warn("String_Node_Str" + server);
      }
 else {
        logger.warn("String_Node_Str" + server + "String_Node_Str"+ path,e);
      }
    }
catch (    Exception e) {
      logger.warn("String_Node_Str" + path,e);
    }
 finally {
      HubUtils.close(response);
      resetThread();
    }
  }
  return null;
}
Program: 61689
Project: 61689
Buggy source:
public static HubJettyServer startServer() throws IOException {
  ResourceConfig resourceConfig=new ResourceConfig();
  resourceConfig.register(new ObjectMapperResolver(HubBindings.objectMapper()));
  resourceConfig.register(JacksonJsonProvider.class);
  resourceConfig.registerClasses(EncodingFilter.class,StreamEncodingFilter.class,GZipEncoder.class,DeflateEncoder.class);
  List<Module> modules=new ArrayList<>();
  modules.add(new HubBindings());
  String hubType=HubProperties.getProperty("String_Node_Str","String_Node_Str");
  logger.info("String_Node_Str",hubType);
  resourceConfig.packages("String_Node_Str");
switch (hubType) {
case "String_Node_Str":
    modules.add(new ClusterHubBindings());
  break;
case "String_Node_Str":
case "String_Node_Str":
modules.add(new SingleHubBindings());
break;
default :
throw new RuntimeException("String_Node_Str" + hubType);
}
HubProvider.setInjector(Guice.createInjector(modules));
HubServices.start(HubServices.TYPE.DEFAULT_PRE_START);
HubJettyServer server=new HubJettyServer();
server.start(resourceConfig);
logger.info("String_Node_Str");
HubServices.start(HubServices.TYPE.SET_HEALTHY);
logger.info("String_Node_Str");
HubServices.start(HubServices.TYPE.AFTER_HEALTHY_START);
return server;
}

Fixed version (ground truth):
public static HubJettyServer startServer() throws IOException {
  ResourceConfig resourceConfig=new ResourceConfig();
  resourceConfig.register(new ObjectMapperResolver(HubBindings.objectMapper()));
  resourceConfig.register(JacksonJsonProvider.class);
  resourceConfig.registerClasses(EncodingFilter.class,StreamEncodingFilter.class,GZipEncoder.class,DeflateEncoder.class);
  List<Module> modules=new ArrayList<>();
  modules.add(new HubBindings());
  String hubType=HubProperties.getProperty("String_Node_Str","String_Node_Str");
  logger.info("String_Node_Str",hubType);
  resourceConfig.packages("String_Node_Str");
switch (hubType) {
case "String_Node_Str":
    modules.add(new ClusterHubBindings());
  break;
case "String_Node_Str":
case "String_Node_Str":
modules.add(new SingleHubBindings());
break;
default :
throw new RuntimeException("String_Node_Str" + hubType);
}
HubProvider.setInjector(Guice.createInjector(modules));
HubServices.start(HubServices.TYPE.BEFORE_HEALTH_CHECK);
HubJettyServer server=new HubJettyServer();
server.start(resourceConfig);
logger.info("String_Node_Str");
HubServices.start(HubServices.TYPE.PERFORM_HEALTH_CHECK);
logger.info("String_Node_Str");
HubServices.start(HubServices.TYPE.AFTER_HEALTHY_START);
return server;
}
Program: 61690
Project: 61690
Buggy source:
public static void registerPreStop(Service service){
  register(service,TYPE.DEFAULT_PRE_START,TYPE.PRE_STOP);
}

Fixed version (ground truth):
public static void registerPreStop(Service service){
  register(service,TYPE.BEFORE_HEALTH_CHECK,TYPE.PRE_STOP);
}
Program: 61691
Project: 61691
Buggy source:
public static synchronized void start(TYPE type){
  try {
    for (    Service service : serviceMap.get(type)) {
      logger.info("String_Node_Str" + service.getClass().getName());
      service.startAsync();
      service.awaitRunning();
      logger.info("String_Node_Str" + service.getClass().getName());
    }
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    System.exit(-1);
  }
}

Fixed version (ground truth):
public static void start(TYPE type){
  try {
    List<Service> serviceList=new ArrayList<>();
synchronized (serviceMap) {
      serviceList.addAll(serviceMap.get(type));
    }
    for (    Service service : serviceList) {
      logger.info("String_Node_Str" + service.getClass().getName());
      service.startAsync();
      service.awaitRunning();
      logger.info("String_Node_Str" + service.getClass().getName());
    }
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    System.exit(-1);
  }
}
Program: 61692
Project: 61692
Buggy source:
public static synchronized void register(Service service,TYPE... types){
  for (  TYPE type : types) {
    logger.info("String_Node_Str" + service.getClass().getName() + "String_Node_Str"+ type);
    serviceMap.get(type).add(service);
  }
}

Fixed version (ground truth):
public static void register(Service service,TYPE... types){
  for (  TYPE type : types) {
    logger.info("String_Node_Str" + service.getClass().getName() + "String_Node_Str"+ type);
    serviceMap.get(type).add(service);
  }
}
Program: 61693
Project: 61693
Buggy source:
public HubHealthCheck(){
  HubServices.register(new HealthService(),HubServices.TYPE.SET_HEALTHY);
}

Fixed version (ground truth):
public HubHealthCheck(){
  HubServices.register(new HealthService(),HubServices.TYPE.PERFORM_HEALTH_CHECK);
}
Program: 61694
Project: 61694
Buggy source:
public DelegatingMetricsService(){
  if (HubProperties.getProperty("String_Node_Str",false)) {
    services.add(new HostedGraphiteMetricsService());
  }
  if (HubProperties.getProperty("String_Node_Str",false)) {
    services.add(new DataDogMetricsService());
  }
}

Fixed version (ground truth):
public DelegatingMetricsService(){
  HubServices.register(new DelegatingMetricsServiceInitial(),HubServices.TYPE.BEFORE_HEALTH_CHECK);
}
Program: 61695
Project: 61695
Buggy source:
public SpokeClusterRegister(){
  HubServices.register(new CuratorSpokeClusterHook(),HubServices.TYPE.SET_HEALTHY,HubServices.TYPE.PRE_STOP);
}

Fixed version (ground truth):
public SpokeClusterRegister(){
  HubServices.register(new CuratorSpokeClusterHook(),HubServices.TYPE.PERFORM_HEALTH_CHECK,HubServices.TYPE.PRE_STOP);
}
Program: 61696
Project: 61696
Buggy source:
private void sendChunk(){
  futures.add(service.submit(() -> chunkFunction.apply(chunk)));
}

Fixed version (ground truth):
private void sendChunk(Chunk chunk){
  futures.add(service.submit(() -> chunkFunction.apply(chunk)));
}
Program: 61697
Project: 61697
Buggy source:
public void write(int b) throws IOException {
  if (!chunk.add(b)) {
    sendChunk();
    count++;
    chunk=new Chunk(count);
    chunk.add(b);
  }
}

Fixed version (ground truth):
public void write(int b) throws IOException {
  if (!chunk.add(b)) {
    sendChunk(chunk);
    count++;
    chunk=new Chunk(count);
    chunk.add(b);
  }
}
Program: 61698
Project: 61698
Buggy source:
@Override public void close() throws IOException {
  if (chunk.hasData()) {
    sendChunk();
  }
  ListenableFuture<String> allFutures=Futures.whenAllSucceed(futures).call(() -> "String_Node_Str");
  try {
    allFutures.get();
  }
 catch (  InterruptedException e) {
    throw new RuntimeInterruptedException(e);
  }
catch (  ExecutionException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@Override public void close() throws IOException {
  if (chunk.hasData()) {
    sendChunk(chunk);
  }
  ListenableFuture<String> allFutures=Futures.whenAllSucceed(futures).call(() -> "String_Node_Str");
  try {
    allFutures.get();
  }
 catch (  InterruptedException e) {
    throw new RuntimeInterruptedException(e);
  }
catch (  ExecutionException e) {
    throw new RuntimeException(e);
  }
}
Program: 61699
Project: 61699
Buggy source:
private void limitChildren(String webhook){
  String errorRoot=getErrorRoot(webhook);
  try {
    List<String> children=curator.getChildren().forPath(errorRoot);
    children.sort(String.CASE_INSENSITIVE_ORDER);
    if (children.size() > MAX_SIZE) {
      int transition=children.size() - MAX_SIZE;
      for (int i=0; i < transition; i++) {
        curator.delete().forPath(getChildPath(errorRoot,children.get(i)));
      }
      DateTime cutoffTime=TimeUtil.now().minusHours(1);
      for (int i=transition; i < children.size(); i++) {
        Stat stat=new Stat();
        String child=children.get(i);
        curator.getData().storingStatIn(stat).forPath(getChildPath(errorRoot,child));
        if (new DateTime(stat.getCtime()).isBefore(cutoffTime)) {
          curator.delete().forPath(getChildPath(errorRoot,child));
        }
      }
    }
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str" + errorRoot,e);
  }
}

Fixed version (ground truth):
private List<String> limitChildren(String webhook){
  String errorRoot=getErrorRoot(webhook);
  List<String> results=new ArrayList<>();
  SortedMap<String,Error> errors=new TreeMap<>();
  try {
    for (    String child : curator.getChildren().forPath(errorRoot)) {
      Stat stat=new Stat();
      byte[] bytes=curator.getData().storingStatIn(stat).forPath(getChildPath(errorRoot,child));
      errors.put(child,new Error(child,new DateTime(stat.getCtime()),new String(bytes)));
    }
    while (errors.size() > MAX_SIZE) {
      String firstKey=errors.firstKey();
      errors.remove(firstKey);
      curator.delete().inBackground().forPath(getChildPath(errorRoot,firstKey));
    }
    DateTime cutoffTime=TimeUtil.now().minusDays(1);
    for (    Error error : errors.values()) {
      if (error.getCreationTime().isBefore(cutoffTime)) {
        curator.delete().inBackground().forPath(getChildPath(errorRoot,error.getName()));
      }
 else {
        results.add(error.getData());
      }
    }
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str" + errorRoot,e);
  }
  return results;
}
Program: 61700
Project: 61700
Buggy source:
public List<String> get(String webhook){
  String errorRoot=getErrorRoot(webhook);
  List<String> errors=new ArrayList<>();
  try {
    Collection<String> children=new TreeSet<>(curator.getChildren().forPath(errorRoot));
    for (    String child : children) {
      errors.add(new String(curator.getData().forPath(getChildPath(errorRoot,child))));
    }
  }
 catch (  KeeperException.NoNodeException e) {
    logger.info("String_Node_Str" + errorRoot);
  }
catch (  Exception e) {
    logger.warn("String_Node_Str" + errorRoot,e);
  }
  return errors;
}

Fixed version (ground truth):
public List<String> get(String webhook){
  return limitChildren(webhook);
}
Program: 61701
Project: 61701
Buggy source:
@Override public ContentPath getLastUpdated(String channelName,ContentPath defaultValue){
  if (isReplicating(channelName)) {
    return lastContentPath.get(channelName,defaultValue,REPLICATED_LAST_UPDATED);
  }
  return defaultValue;
}

Fixed version (ground truth):
@Override public ContentPath getLastUpdated(String channelName,ContentPath defaultValue){
  if (isReplicating(channelName)) {
    ContentPath contentPath=lastContentPath.get(channelName,defaultValue,REPLICATED_LAST_UPDATED);
    if (!contentPath.equals(defaultValue)) {
      contentPath=new MinutePath(contentPath.getTime().plusSeconds(1));
    }
    return contentPath;
  }
  return defaultValue;
}
Program: 61702
Project: 61702
Buggy source:
private Collection<ContentKey> queryKeys(DateTime time){
  TimeQuery timeQuery=TimeQuery.builder().channelName(channel).startTime(time).unit(timedWebhook.getUnit()).stable(true).epoch(Epoch.IMMUTABLE).build();
  return channelService.queryByTime(timeQuery);
}

Fixed version (ground truth):
private Collection<ContentKey> queryKeys(DateTime time){
  TimeQuery timeQuery=TimeQuery.builder().channelName(channel).startTime(time).unit(timedWebhook.getUnit()).stable(false).epoch(Epoch.IMMUTABLE).build();
  return channelService.queryByTime(timeQuery);
}
Program: 61703
Project: 61703
Buggy source:
static DirectionQuery getDirectionQuery(String channel,int count,boolean stable,String location,String epoch){
  ChannelConfig channelConfig=channelService.getCachedChannelConfig(channel);
  ContentKey startKey=new ContentKey(channelConfig.getTtlTime(),"String_Node_Str");
  return DirectionQuery.builder().channelName(channel).next(true).stable(stable).startKey(startKey).count(count).location(Location.valueOf(location)).epoch(Epoch.valueOf(epoch)).build();
}

Fixed version (ground truth):
public static DirectionQuery getDirectionQuery(String channel,int count,boolean stable,String location,String epoch){
  ChannelConfig channelConfig=channelService.getCachedChannelConfig(channel);
  ContentKey startKey=new ContentKey(channelConfig.getTtlTime(),"String_Node_Str");
  return DirectionQuery.builder().channelName(channel).next(true).stable(stable).startKey(startKey).count(count).location(Location.valueOf(location)).epoch(Epoch.valueOf(epoch)).build();
}
Program: 61704
Project: 61704
Buggy source:
@GET public Response getEarliest(@PathParam("String_Node_Str") String tag,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") boolean stable,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") boolean trace,@QueryParam("String_Node_Str") @DefaultValue(Location.DEFAULT) String location,@QueryParam("String_Node_Str") @DefaultValue(Epoch.DEFAULT) String epoch,@Context UriInfo uriInfo){
  DirectionQuery query=ChannelEarliestResource.getDirectionQuery(tag,1,stable,location,epoch).withTagName(tag);
  Collection<ChannelContentKey> contentKeys=tagService.getEarliest(query);
  if (!contentKeys.isEmpty()) {
    URI uri=uriInfo.getBaseUriBuilder().path(contentKeys.iterator().next().toUrl()).queryParam("String_Node_Str",tag).build();
    return Response.status(SEE_OTHER).location(uri).build();
  }
  return Response.status(NOT_FOUND).build();
}

Fixed version (ground truth):
@GET public Response getEarliest(@PathParam("String_Node_Str") String tag,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") boolean stable,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") boolean trace,@QueryParam("String_Node_Str") @DefaultValue(Location.DEFAULT) String location,@QueryParam("String_Node_Str") @DefaultValue(Epoch.DEFAULT) String epoch,@Context UriInfo uriInfo){
  Collection<ChannelContentKey> contentKeys=tagService.getEarliest(getQuery(tag,1,stable,location,epoch));
  if (!contentKeys.isEmpty()) {
    URI uri=uriInfo.getBaseUriBuilder().path(contentKeys.iterator().next().toUrl()).queryParam("String_Node_Str",tag).build();
    return Response.status(SEE_OTHER).location(uri).build();
  }
  return Response.status(NOT_FOUND).build();
}
Program: 61706
Project: 61706
Buggy source:
public SortedSet<ChannelContentKey> getEarliest(DirectionQuery tagQuery){
  Iterable<ChannelConfig> channels=getChannels(tagQuery.getTagName());
  Traces traces=ActiveTraces.getLocal();
  traces.add("String_Node_Str",tagQuery.getTagName());
  SortedSet<ChannelContentKey> orderedKeys=Collections.synchronizedSortedSet(new TreeSet<>());
  for (  ChannelConfig channel : channels) {
    Collection<ContentKey> contentKeys=channelService.query(tagQuery.withChannelName(channel.getName()));
    for (    ContentKey contentKey : contentKeys) {
      orderedKeys.add(new ChannelContentKey(channel.getName(),contentKey));
    }
  }
  traces.add("String_Node_Str",orderedKeys);
  return orderedKeys;
}

Fixed version (ground truth):
public SortedSet<ChannelContentKey> getEarliest(DirectionQuery tagQuery){
  Iterable<ChannelConfig> channels=getChannels(tagQuery.getTagName());
  Traces traces=ActiveTraces.getLocal();
  traces.add("String_Node_Str",tagQuery.getTagName());
  SortedSet<ChannelContentKey> orderedKeys=Collections.synchronizedSortedSet(new TreeSet<>());
  for (  ChannelConfig channel : channels) {
    DirectionQuery query=ChannelEarliestResource.getDirectionQuery(channel.getName(),tagQuery.getCount(),tagQuery.isStable(),tagQuery.getLocation().name(),tagQuery.getEpoch().name());
    for (    ContentKey contentKey : channelService.query(query)) {
      orderedKeys.add(new ChannelContentKey(channel.getName(),contentKey));
    }
  }
  traces.add("String_Node_Str",orderedKeys);
  return orderedKeys;
}
Program: 61707
Project: 61707
Buggy source:
@Override public Optional<ContentKey> getLatest(DirectionQuery query){
  String channel=query.getChannelName();
  if (!channelExists(channel)) {
    return Optional.absent();
  }
  query=query.withStartKey(ContentKey.lastKey(TimeUtil.now().plusMinutes(1)));
  query=configureQuery(query);
  Optional<ContentKey> latest=contentService.getLatest(query);
  if (latest.isPresent()) {
    SortedSet<ContentKey> filtered=ContentKeyUtil.filter(latest.asSet(),query);
    if (filtered.isEmpty()) {
      return Optional.absent();
    }
  }
  return latest;
}

Fixed version (ground truth):
@Override public Optional<ContentKey> getLatest(DirectionQuery query){
  String channel=query.getChannelName();
  if (!channelExists(channel)) {
    return Optional.absent();
  }
  query=query.withStartKey(ContentKey.lastKey(TimeUtil.time(query.isStable())));
  query=configureQuery(query);
  Optional<ContentKey> latest=contentService.getLatest(query);
  ActiveTraces.getLocal().add("String_Node_Str",channel,latest);
  if (latest.isPresent()) {
    SortedSet<ContentKey> filtered=ContentKeyUtil.filter(latest.asSet(),query);
    if (filtered.isEmpty()) {
      return Optional.absent();
    }
  }
  return latest;
}
Program: 61708
Project: 61708
Buggy source:
@Override public Collection<ContentKey> queryDirection(DirectionQuery query){
  TreeSet<ContentKey> keys=new TreeSet<>();
  TimeUtil.Unit hours=TimeUtil.Unit.HOURS;
  DateTime time=query.getContentKey().getTime();
  if (query.isNext()) {
    handleNext(query,keys);
  }
 else {
    DateTime limitTime=query.getTtlTime().minusDays(1);
    while (keys.size() < query.getCount() && time.isAfter(limitTime)) {
      addKeys(query,keys,hours,time);
      time=time.minus(hours.getDuration());
    }
  }
  return keys;
}

Fixed version (ground truth):
@Override public Collection<ContentKey> queryDirection(DirectionQuery query){
  TreeSet<ContentKey> keys=new TreeSet<>();
  TimeUtil.Unit hours=TimeUtil.Unit.HOURS;
  DateTime time=query.getStartKey().getTime();
  if (query.isNext()) {
    handleNext(query,keys);
  }
 else {
    DateTime limitTime=query.getEarliestTime().minusDays(1);
    while (keys.size() < query.getCount() && time.isAfter(limitTime)) {
      addKeys(query,keys,hours,time);
      time=time.minus(hours.getDuration());
    }
  }
  return keys;
}
Program: 61709
Project: 61709
Buggy source:
private void handleNext(DirectionQuery query,Set<ContentKey> keys){
  try {
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    fileSpokeStore.getNext(query.getChannelName(),query.getContentKey().toUrl(),query.getCount(),baos);
    String keyString=baos.toString();
    ContentKeyUtil.convertKeyStrings(keyString,keys);
  }
 catch (  IOException e) {
    logger.warn("String_Node_Str" + query,e);
  }
}

Fixed version (ground truth):
private void handleNext(DirectionQuery query,Set<ContentKey> keys){
  try {
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    fileSpokeStore.getNext(query.getChannelName(),query.getStartKey().toUrl(),query.getCount(),baos);
    String keyString=baos.toString();
    ContentKeyUtil.convertKeyStrings(keyString,keys);
  }
 catch (  IOException e) {
    logger.warn("String_Node_Str" + query,e);
  }
}
Program: 61710
Project: 61710
Buggy source:
/** 
 * This may return more than the request count, as this does not do any sorting.
 */
void getNext(String channel,String startKey,int count,OutputStream output) throws IOException {
  DateTime now=TimeUtil.now();
  String channelPath=storagePath + channel + "String_Node_Str";
  logger.trace("String_Node_Str",channel,startKey,now);
  ContentKey start=ContentKey.fromUrl(startKey).get();
  int found=0;
  MinutePath minutePath=new MinutePath(start.getTime());
  boolean firstMinute=true;
  do {
    String minuteUrl=minutePath.toUrl();
    String minute=channelPath + minuteUrl;
    logger.trace("String_Node_Str",minute);
    String[] items=new File(minute).list();
    if (items != null) {
      for (      String item : items) {
        String keyFromPath=spokeKeyFromPath(minuteUrl + "String_Node_Str" + item);
        if (firstMinute) {
          ContentKey key=ContentKey.fromUrl(keyFromPath).get();
          if (key.compareTo(start) > 0) {
            found++;
            writeKey(output,channel + "String_Node_Str" + keyFromPath);
          }
        }
 else {
          found++;
          writeKey(output,channel + "String_Node_Str" + keyFromPath);
        }
      }
    }
    minutePath=new MinutePath(minutePath.getTime().plusMinutes(1));
    firstMinute=false;
  }
 while (found < count && minutePath.getTime().isBefore(now));
}

Fixed version (ground truth):
/** 
 * This may return more than the request count, as this does not do any sorting.
 */
public void getNext(String channel,String startKey,int count,OutputStream output) throws IOException {
  DateTime now=TimeUtil.now();
  String channelPath=storagePath + channel + "String_Node_Str";
  logger.trace("String_Node_Str",channel,startKey,now);
  ContentKey start=ContentKey.fromUrl(startKey).get();
  int found=0;
  MinutePath minutePath=new MinutePath(start.getTime());
  boolean firstMinute=true;
  do {
    String minuteUrl=minutePath.toUrl();
    String minute=channelPath + minuteUrl;
    logger.trace("String_Node_Str",minute);
    String[] items=new File(minute).list();
    if (items != null) {
      for (      String item : items) {
        String keyFromPath=spokeKeyFromPath(minuteUrl + "String_Node_Str" + item);
        if (firstMinute) {
          ContentKey key=ContentKey.fromUrl(keyFromPath).get();
          if (key.compareTo(start) > 0) {
            found++;
            writeKey(output,channel + "String_Node_Str" + keyFromPath);
          }
        }
 else {
          found++;
          writeKey(output,channel + "String_Node_Str" + keyFromPath);
        }
      }
    }
    minutePath=new MinutePath(minutePath.getTime().plusMinutes(1));
    firstMinute=false;
  }
 while (found < count && minutePath.getTime().isBefore(now));
}
Program: 61711
Project: 61711
Buggy source:
@Test public void testSingleNormalDefault(){
  ChannelConfig channel=ChannelConfig.builder().withName("String_Node_Str").build();
  S3Verifier.VerifierRange range=s3Verifier.getSingleVerifierRange(now,channel);
  logger.info("String_Node_Str",range);
  assertEquals(channel,range.channel);
  assertEquals(new MinutePath(now.minusMinutes(1)),range.endPath);
  assertEquals(new MinutePath(offsetTime.minusMinutes(1)),range.startPath);
  assertEquals(range.endPath,new MinutePath(range.startPath.getTime().plusMinutes(offsetMinutes)));
}

Fixed version (ground truth):
@Test public void testSingleNormalDefault(){
  ChannelConfig channel=ChannelConfig.builder().withName(channelName).build();
  S3Verifier.VerifierRange range=s3Verifier.getSingleVerifierRange(now,channel);
  logger.info("String_Node_Str",channelName,range);
  assertEquals(channel,range.channel);
  assertEquals(new MinutePath(now.minusMinutes(1)),range.endPath);
  assertEquals(new MinutePath(offsetTime.minusMinutes(1)),range.startPath);
  assertEquals(range.endPath,new MinutePath(range.startPath.getTime().plusMinutes(offsetMinutes)));
}
Program: 61712
Project: 61712
Buggy source:
@Test public void testHistoricalNone(){
  lastContentPath.initialize("String_Node_Str",ContentKey.NONE,HISTORICAL_FIRST_UPDATED);
  lastContentPath.initialize("String_Node_Str",ContentKey.NONE,HISTORICAL_LAST_UPDATED);
  ChannelConfig channel=getHistoricalChannel("String_Node_Str");
  localChannelService.updateChannel(channel,null);
  assertNull(s3Verifier.getHistoricalVerifierRange(now,channel));
}

Fixed version (ground truth):
@Test public void testHistoricalNone(){
  lastContentPath.initialize(channelName,ContentKey.NONE,HISTORICAL_FIRST_UPDATED);
  lastContentPath.initialize(channelName,ContentKey.NONE,HISTORICAL_LAST_UPDATED);
  ChannelConfig channel=getHistoricalChannel(channelName);
  localChannelService.updateChannel(channel,null);
  assertNull(s3Verifier.getHistoricalVerifierRange(now,channel));
}
Program: 61713
Project: 61713
Buggy source:
@Test public void testSingleNormal(){
  MinutePath lastVerified=new MinutePath(offsetTime);
  lastContentPath.initialize("String_Node_Str",lastVerified,LAST_SINGLE_VERIFIED);
  ChannelConfig channel=ChannelConfig.builder().withName("String_Node_Str").build();
  S3Verifier.VerifierRange range=s3Verifier.getSingleVerifierRange(now,channel);
  logger.info("String_Node_Str",range);
  assertEquals(new MinutePath(now.minusMinutes(1)),range.endPath);
  assertEquals(lastVerified,range.startPath);
}

Fixed version (ground truth):
@Test public void testSingleNormal(){
  MinutePath lastVerified=new MinutePath(offsetTime);
  lastContentPath.initialize(channelName,lastVerified,LAST_SINGLE_VERIFIED);
  ChannelConfig channel=ChannelConfig.builder().withName(channelName).build();
  S3Verifier.VerifierRange range=s3Verifier.getSingleVerifierRange(now,channel);
  logger.info("String_Node_Str",channelName,range);
  assertEquals(new MinutePath(now.minusMinutes(1)),range.endPath);
  assertEquals(lastVerified,range.startPath);
}
Program: 61714
Project: 61714
Buggy source:
@Test public void testHistoricalOneItem(){
  DateTime historyTime=now.minusYears(1);
  ContentKey oneKey=new ContentKey(historyTime);
  lastContentPath.update(oneKey,"String_Node_Str",HISTORICAL_FIRST_UPDATED);
  lastContentPath.update(oneKey,"String_Node_Str",HISTORICAL_LAST_UPDATED);
  ChannelConfig channel=getHistoricalChannel("String_Node_Str");
  localChannelService.updateChannel(channel,null);
  S3Verifier.VerifierRange range=s3Verifier.getHistoricalVerifierRange(now,channel);
  MinutePath expected=new MinutePath(historyTime);
  logger.info("String_Node_Str",range);
  logger.info("String_Node_Str",expected);
  assertEquals(expected,range.endPath);
  assertEquals(expected,range.startPath);
  lastContentPath.update(range.endPath,"String_Node_Str",LAST_SINGLE_VERIFIED);
  range=s3Verifier.getHistoricalVerifierRange(now,channel);
  logger.info("String_Node_Str",range);
  assertEquals(expected,range.endPath);
  assertEquals(expected,range.startPath);
}

Fixed version (ground truth):
@Test public void testHistoricalOneItem(){
  DateTime historyTime=now.minusYears(1);
  ContentKey oneKey=new ContentKey(historyTime);
  lastContentPath.update(oneKey,channelName,HISTORICAL_FIRST_UPDATED);
  lastContentPath.update(oneKey,channelName,HISTORICAL_LAST_UPDATED);
  ChannelConfig channel=getHistoricalChannel(channelName);
  localChannelService.updateChannel(channel,null);
  S3Verifier.VerifierRange range=s3Verifier.getHistoricalVerifierRange(now,channel);
  MinutePath expected=new MinutePath(historyTime);
  logger.info("String_Node_Str",channelName,range);
  logger.info("String_Node_Str",channelName,expected);
  assertEquals(expected,range.endPath);
  assertEquals(expected,range.startPath);
  lastContentPath.update(range.endPath,channelName,LAST_SINGLE_VERIFIED);
  range=s3Verifier.getHistoricalVerifierRange(now,channel);
  logger.info("String_Node_Str",channelName,range);
  assertEquals(expected,range.endPath);
  assertEquals(expected,range.startPath);
}
Program: 61716
Project: 61716
Buggy source:
@Test public void testSingleReplicated(){
  MinutePath lastReplicated=new MinutePath(now.minusMinutes(30));
  lastContentPath.initialize("String_Node_Str",lastReplicated,REPLICATED_LAST_UPDATED);
  ChannelConfig channel=getReplicatedChannel("String_Node_Str");
  localChannelService.updateChannel(channel,null);
  S3Verifier.VerifierRange range=s3Verifier.getSingleVerifierRange(now,channel);
  logger.info("String_Node_Str",range);
  assertEquals(new MinutePath(lastReplicated.getTime().minusMinutes(1)),range.endPath);
  assertEquals(new MinutePath(lastReplicated.getTime().minusMinutes(offsetMinutes + 1)),range.startPath);
}

Fixed version (ground truth):
@Test public void testSingleReplicated(){
  MinutePath lastReplicated=new MinutePath(now.minusMinutes(30));
  lastContentPath.initialize(channelName,lastReplicated,REPLICATED_LAST_UPDATED);
  ChannelConfig channel=getReplicatedChannel(channelName);
  localChannelService.updateChannel(channel,null);
  S3Verifier.VerifierRange range=s3Verifier.getSingleVerifierRange(now,channel);
  logger.info("String_Node_Str",channelName,range);
  assertEquals(new MinutePath(lastReplicated.getTime().minusMinutes(1)),range.endPath);
  assertEquals(new MinutePath(lastReplicated.getTime().minusMinutes(offsetMinutes + 1)),range.startPath);
}
Program: 61717
Project: 61717
Buggy source:
@Test public void testSingleReplicatedDefault(){
  ChannelConfig channel=getReplicatedChannel("String_Node_Str");
  S3Verifier.VerifierRange range=s3Verifier.getSingleVerifierRange(now,channel);
  logger.info("String_Node_Str",range);
  assertEquals(new MinutePath(now.minusMinutes(1)),range.endPath);
  assertEquals(new MinutePath(range.endPath.getTime().minusMinutes(offsetMinutes)),range.startPath);
}

Fixed version (ground truth):
@Test public void testSingleReplicatedDefault(){
  ChannelConfig channel=getReplicatedChannel(channelName);
  S3Verifier.VerifierRange range=s3Verifier.getSingleVerifierRange(now,channel);
  logger.info("String_Node_Str",channelName,range);
  assertEquals(new MinutePath(now.minusMinutes(1)),range.endPath);
  assertEquals(new MinutePath(range.endPath.getTime().minusMinutes(offsetMinutes)),range.startPath);
}
Program: 61718
Project: 61718
Buggy source:
@Test public void testSingleReplicationLagging(){
  MinutePath lastReplicated=new MinutePath(now.minusMinutes(90));
  lastContentPath.initialize("String_Node_Str",lastReplicated,REPLICATED_LAST_UPDATED);
  MinutePath lastVerified=new MinutePath(now.minusMinutes(100));
  lastContentPath.initialize("String_Node_Str",lastVerified,LAST_SINGLE_VERIFIED);
  ChannelConfig channel=getReplicatedChannel("String_Node_Str");
  localChannelService.updateChannel(channel,null);
  S3Verifier.VerifierRange range=s3Verifier.getSingleVerifierRange(now,channel);
  logger.info("String_Node_Str",range);
  assertEquals(new MinutePath(lastReplicated.getTime().minusMinutes(1)),range.endPath);
  assertEquals(lastVerified,range.startPath);
}

Fixed version (ground truth):
@Test public void testSingleReplicationLagging(){
  MinutePath lastReplicated=new MinutePath(now.minusMinutes(90));
  lastContentPath.initialize(channelName,lastReplicated,REPLICATED_LAST_UPDATED);
  MinutePath lastVerified=new MinutePath(now.minusMinutes(100));
  lastContentPath.initialize(channelName,lastVerified,LAST_SINGLE_VERIFIED);
  ChannelConfig channel=getReplicatedChannel(channelName);
  localChannelService.updateChannel(channel,null);
  S3Verifier.VerifierRange range=s3Verifier.getSingleVerifierRange(now,channel);
  logger.info("String_Node_Str",channelName,range);
  assertEquals(new MinutePath(lastReplicated.getTime().minusMinutes(1)),range.endPath);
  assertEquals(lastVerified,range.startPath);
}
Program: 61719
Project: 61719
Buggy source:
@Before public void setUp() throws Exception {
  offsetTime=now.minusMinutes(offsetMinutes);
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  offsetTime=now.minusMinutes(offsetMinutes);
  channelName=testName.getMethodName() + RandomStringUtils.randomAlphanumeric(6);
}
Program: 61720
Project: 61720
Buggy source:
@Test public void testSingleNormalLagging(){
  MinutePath lastVerified=new MinutePath(now.minusMinutes(60));
  lastContentPath.initialize("String_Node_Str",lastVerified,LAST_SINGLE_VERIFIED);
  ChannelConfig channel=ChannelConfig.builder().withName("String_Node_Str").build();
  S3Verifier.VerifierRange range=s3Verifier.getSingleVerifierRange(now,channel);
  logger.info("String_Node_Str",range);
  assertEquals(new MinutePath(now.minusMinutes(1)),range.endPath);
  logger.info("String_Node_Str",new MinutePath(now.minusMinutes(58)),range.startPath);
}

Fixed version (ground truth):
@Test public void testSingleNormalLagging(){
  MinutePath lastVerified=new MinutePath(now.minusMinutes(60));
  lastContentPath.initialize(channelName,lastVerified,LAST_SINGLE_VERIFIED);
  ChannelConfig channel=ChannelConfig.builder().withName(channelName).build();
  S3Verifier.VerifierRange range=s3Verifier.getSingleVerifierRange(now,channel);
  logger.info("String_Node_Str",channelName,range);
  assertEquals(new MinutePath(now.minusMinutes(1)),range.endPath);
  logger.info("String_Node_Str",new MinutePath(now.minusMinutes(58)),range.startPath);
}
Program: 61721
Project: 61721
Buggy source:
public boolean updateIncrease(String name,String basePath,Function<ContentPath,ContentPath> function){
  String path=basePath + name;
  try {
    while (true) {
      trace(name,"String_Node_Str",name);
      LastUpdated existing=getLastUpdated(path);
      ContentPath nextPath=function.apply(existing.key);
      if (nextPath.compareTo(existing.key) > 0) {
        if (setValue(path,nextPath,existing)) {
          trace(name,"String_Node_Str",name,nextPath,existing);
          return true;
        }
      }
 else {
        trace(name,"String_Node_Str",name,nextPath,existing);
        return true;
      }
    }
  }
 catch (  KeeperException.NoNodeException e) {
    logger.info("String_Node_Str",path);
    trace(name,"String_Node_Str",name);
    ContentPath nextPath=function.apply(null);
    initialize(name,nextPath,basePath);
    return true;
  }
catch (  ConflictException e) {
    trace(name,"String_Node_Str" + e.getMessage());
    throw e;
  }
catch (  Exception e) {
    logger.warn("String_Node_Str" + path,e);
    return false;
  }
}

Fixed version (ground truth):
public boolean updateIncrease(String name,String basePath,Function<ContentPath,ContentPath> function){
  String path=basePath + name;
  try {
    while (true) {
      trace(name,"String_Node_Str",name);
      LastUpdated existing=getLastUpdated(path);
      ContentPath nextPath=function.apply(existing.key);
      if (nextPath.compareTo(existing.key) > 0) {
        if (setValue(path,nextPath,existing)) {
          trace(name,"String_Node_Str",name,nextPath,existing);
          return true;
        }
      }
 else {
        trace(name,"String_Node_Str",name,nextPath,existing);
        return true;
      }
    }
  }
 catch (  KeeperException.NoNodeException e) {
    logger.info("String_Node_Str",path);
    trace(name,"String_Node_Str",name);
    ContentPath nextPath=function.apply(null);
    initialize(name,nextPath,basePath);
    return true;
  }
catch (  ConflictException e) {
    trace(name,"String_Node_Str" + e.getMessage());
    throw e;
  }
catch (  ContentTooLargeException e) {
    throw e;
  }
catch (  Exception e) {
    logger.warn("String_Node_Str" + path,e);
    return false;
  }
}
Program: 61722
Project: 61722
Buggy source:
private Webhook mapItem(Map<String,AttributeValue> item){
  Webhook.WebhookBuilder builder=Webhook.builder().name(item.get("String_Node_Str").getS()).callbackUrl(item.get("String_Node_Str").getS()).channelUrl(item.get("String_Node_Str").getS());
  if (item.containsKey("String_Node_Str")) {
    builder.parallelCalls(Integer.valueOf(item.get("String_Node_Str").getN()));
  }
  if (item.containsKey("String_Node_Str")) {
    builder.paused(item.get("String_Node_Str").getBOOL());
  }
  if (item.containsKey("String_Node_Str")) {
    builder.batch(item.get("String_Node_Str").getS());
  }
  if (item.containsKey("String_Node_Str")) {
    builder.heartbeat(item.get("String_Node_Str").getBOOL());
  }
  if (item.containsKey("String_Node_Str")) {
    builder.ttlMinutes(Integer.valueOf(item.get("String_Node_Str").getN()));
  }
  if (item.containsKey("String_Node_Str")) {
    builder.maxWaitMinutes(Integer.valueOf(item.get("String_Node_Str").getN()));
  }
  return builder.build().withDefaults(false);
}

Fixed version (ground truth):
private Webhook mapItem(Map<String,AttributeValue> item){
  Webhook.WebhookBuilder builder=Webhook.builder().name(item.get("String_Node_Str").getS()).callbackUrl(item.get("String_Node_Str").getS()).channelUrl(item.get("String_Node_Str").getS());
  if (item.containsKey("String_Node_Str")) {
    builder.parallelCalls(Integer.valueOf(item.get("String_Node_Str").getN()));
  }
  if (item.containsKey("String_Node_Str")) {
    builder.paused(item.get("String_Node_Str").getBOOL());
  }
  if (item.containsKey("String_Node_Str")) {
    builder.batch(item.get("String_Node_Str").getS());
  }
  if (item.containsKey("String_Node_Str")) {
    builder.heartbeat(item.get("String_Node_Str").getBOOL());
  }
  if (item.containsKey("String_Node_Str")) {
    builder.ttlMinutes(Integer.valueOf(item.get("String_Node_Str").getN()));
  }
  if (item.containsKey("String_Node_Str")) {
    builder.maxWaitMinutes(Integer.valueOf(item.get("String_Node_Str").getN()));
  }
  return builder.build().withDefaults();
}
Program: 61723
Project: 61723
Buggy source:
/** 
 * Returns a Webhook with all optional values set to the default.
 */
public Webhook withDefaults(boolean createKey){
  Webhook webhook=this;
  if (parallelCalls == null) {
    webhook=webhook.withParallelCalls(1);
  }
  if (batch == null) {
    webhook=webhook.withBatch("String_Node_Str");
  }
  if (webhook.isMinute() || webhook.isSecond()) {
    webhook=webhook.withHeartbeat(true);
  }
  if (createKey && getStartingKey() == null) {
    webhook=webhook.withStartingKey(WebhookStrategy.createContentPath(webhook));
  }
  if (ttlMinutes == null) {
    webhook=webhook.withTtlMinutes(0);
  }
  if (maxWaitMinutes == null) {
    webhook=webhook.withMaxWaitMinutes(1);
  }
  return webhook;
}

Fixed version (ground truth):
/** 
 * Returns a Webhook with all optional values set to the default.
 */
public Webhook withDefaults(){
  Webhook webhook=this;
  if (parallelCalls == null) {
    webhook=webhook.withParallelCalls(1);
  }
  if (batch == null) {
    webhook=webhook.withBatch("String_Node_Str");
  }
  if (webhook.isMinute() || webhook.isSecond()) {
    webhook=webhook.withHeartbeat(true);
  }
  if (ttlMinutes == null) {
    webhook=webhook.withTtlMinutes(0);
  }
  if (maxWaitMinutes == null) {
    webhook=webhook.withMaxWaitMinutes(1);
  }
  return webhook;
}
Program: 61724
Project: 61724
Buggy source:
public Optional<Webhook> upsert(Webhook webhook){
  webhook=webhook.withDefaults(true);
  logger.info("String_Node_Str" + webhook);
  webhookValidator.validate(webhook);
  String name=webhook.getName();
  Optional<Webhook> webhookOptional=get(name);
  if (webhookOptional.isPresent()) {
    Webhook existing=webhookOptional.get();
    if (existing.equals(webhook)) {
      return webhookOptional;
    }
 else     if (!existing.allowedToChange(webhook)) {
      throw new ConflictException("String_Node_Str");
    }
  }
  ContentPath existing=lastContentPath.getOrNull(name,WEBHOOK_LAST_COMPLETED);
  logger.info("String_Node_Str",name,existing,webhook.getStartingKey());
  if (existing == null || existing.equals(ContentKey.NONE)) {
    webhook=upsertHistorical(webhook,name);
  }
  if (existing == null || webhook.getStartingKey() != null) {
    logger.info("String_Node_Str",name,webhook.getStartingKey());
    lastContentPath.initialize(name,webhook.getStartingKey(),WEBHOOK_LAST_COMPLETED);
  }
  webhookDao.upsert(webhook);
  webhookManager.notifyWatchers();
  return webhookOptional;
}

Fixed version (ground truth):
public Optional<Webhook> upsert(Webhook webhook){
  webhook=webhook.withDefaults();
  webhookValidator.validate(webhook);
  Optional<Webhook> webhookOptional=get(webhook.getName());
  if (webhookOptional.isPresent()) {
    Webhook existing=webhookOptional.get();
    if (existing.equals(webhook)) {
      return webhookOptional;
    }
 else     if (!existing.allowedToChange(webhook)) {
      throw new ConflictException("String_Node_Str");
    }
  }
 else {
    webhook=webhook.withStartingKey(WebhookStrategy.createContentPath(webhook));
  }
  logger.info("String_Node_Str",webhook);
  ContentPath existing=lastContentPath.getOrNull(webhook.getName(),WEBHOOK_LAST_COMPLETED);
  logger.info("String_Node_Str",webhook.getName(),existing,webhook.getStartingKey());
  if (existing == null || existing.equals(ContentKey.NONE)) {
    webhook=upsertHistorical(webhook,webhook.getName());
  }
  if (existing == null || webhook.getStartingKey() != null) {
    logger.info("String_Node_Str",webhook.getName(),webhook.getStartingKey());
    lastContentPath.initialize(webhook.getName(),webhook.getStartingKey(),WEBHOOK_LAST_COMPLETED);
  }
  webhookDao.upsert(webhook);
  webhookManager.notifyWatchers();
  return webhookOptional;
}
Program: 61725
Project: 61725
Buggy source:
@Test public void testAllowedToChange(){
  Webhook hubA=Webhook.builder().name("String_Node_Str").channelUrl("String_Node_Str").callbackUrl("String_Node_Str").build().withDefaults(false);
  Webhook hubB=Webhook.builder().name("String_Node_Str").channelUrl("String_Node_Str").callbackUrl("String_Node_Str").build().withDefaults(false);
  assertTrue(hubA.allowedToChange(hubB));
  assertFalse(hubA.isChanged(hubB));
}

Fixed version (ground truth):
@Test public void testAllowedToChange(){
  Webhook hubA=Webhook.builder().name("String_Node_Str").channelUrl("String_Node_Str").callbackUrl("String_Node_Str").build().withDefaults();
  Webhook hubB=Webhook.builder().name("String_Node_Str").channelUrl("String_Node_Str").callbackUrl("String_Node_Str").build().withDefaults();
  assertTrue(hubA.allowedToChange(hubB));
  assertFalse(hubA.isChanged(hubB));
}
Program: 61726
Project: 61726
Buggy source:
@Test public void testWithDefaults(){
  assertNull(webhook.getParallelCalls());
  assertNull(webhook.getBatch());
  webhook=webhook.withDefaults(true);
  assertEquals(1L,(long)webhook.getParallelCalls());
  assertEquals("String_Node_Str",webhook.getBatch());
}

Fixed version (ground truth):
@Test public void testWithDefaults(){
  assertNull(webhook.getParallelCalls());
  assertNull(webhook.getBatch());
  webhook=webhook.withDefaults();
  assertEquals(1L,(long)webhook.getParallelCalls());
  assertEquals("String_Node_Str",webhook.getBatch());
}
Program: 61727
Project: 61727
Buggy source:
@Test public void testNotChanged(){
  Webhook hubA=Webhook.builder().name("String_Node_Str").channelUrl("String_Node_Str").callbackUrl("String_Node_Str").build().withDefaults(false);
  Webhook hubC=Webhook.builder().name("String_Node_Str").channelUrl("String_Node_Str").callbackUrl("String_Node_Str").build().withDefaults(false);
  assertFalse(hubA.allowedToChange(hubC));
  assertFalse(hubA.isChanged(hubC));
}

Fixed version (ground truth):
@Test public void testNotChanged(){
  Webhook hubA=Webhook.builder().name("String_Node_Str").channelUrl("String_Node_Str").callbackUrl("String_Node_Str").build().withDefaults();
  Webhook hubC=Webhook.builder().name("String_Node_Str").channelUrl("String_Node_Str").callbackUrl("String_Node_Str").build().withDefaults();
  assertFalse(hubA.allowedToChange(hubC));
  assertFalse(hubA.isChanged(hubC));
}
Program: 61728
Project: 61728
Buggy source:
@Test public void testNameLarge() throws Exception {
  webhook=webhook.withDefaults(true);
  webhookValidator.validate(webhook.withName(Strings.repeat("String_Node_Str",128)));
}

Fixed version (ground truth):
@Test public void testNameLarge() throws Exception {
  webhook=webhook.withDefaults();
  webhookValidator.validate(webhook.withName(Strings.repeat("String_Node_Str",128)));
}
Program: 61729
Project: 61729
Buggy source:
@Test public void testName() throws Exception {
  webhook=webhook.withDefaults(true);
  webhookValidator.validate(webhook.withName("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testName() throws Exception {
  webhook=webhook.withDefaults();
  webhookValidator.validate(webhook.withName("String_Node_Str"));
}