nus-yam/ex-repair huggingface dataset:
Program: 79418
Project: 79418
Buggy source:
@Override public void prepareForSharedUse(@Nullable PersistMode persistMode,HighAvailabilityMode haMode){
  if (mgmt == null)   throw new NullPointerException("String_Node_Str" + this);
  getBlobStoreContext();
  if (persistMode == null || persistMode == PersistMode.DISABLED) {
    log.warn("String_Node_Str" + this + "String_Node_Str"+ persistMode);
    return;
  }
  Boolean backups=mgmt.getConfig().getConfig(BrooklynServerConfig.PERSISTENCE_BACKUPS_REQUIRED);
  if (Boolean.TRUE.equals(backups)) {
    log.warn("String_Node_Str" + this + "String_Node_Str");
    throw new FatalConfigurationRuntimeException("String_Node_Str" + this + "String_Node_Str");
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void prepareForSharedUse(@Nullable PersistMode persistMode,HighAvailabilityMode haMode){
  if (mgmt == null)   throw new NullPointerException("String_Node_Str" + this);
  getBlobStoreContext();
  if (persistMode == null || persistMode == PersistMode.DISABLED) {
    log.warn("String_Node_Str" + this + "String_Node_Str"+ persistMode);
    return;
  }
  Boolean backups=mgmt.getConfig().getConfig(BrooklynServerConfig.PERSISTENCE_BACKUPS_REQUIRED);
  if (Boolean.TRUE.equals(backups)) {
    log.warn("String_Node_Str" + this + "String_Node_Str");
    throw new FatalConfigurationRuntimeException("String_Node_Str" + this + "String_Node_Str");
  }
}
Program: 79419
Project: 79419
Buggy source:
@Override public List<String> listContentsWithSubPath(final String parentSubPath){
  checkPrepared();
  return FluentIterable.from(context.getBlobStore().list(getContainerNameFirstPart(),ListContainerOptions.Builder.inDirectory(getItemInContainerSubPath(parentSubPath)))).transform(new Function<StorageMetadata,String>(){
    @Override public String apply(    @javax.annotation.Nullable StorageMetadata input){
      return input.getName();
    }
  }
).toList();
}

Fixed version (ground truth):
@Override public List<String> listContentsWithSubPath(final String parentSubPath){
  checkPrepared();
  return FluentIterable.from(context.getBlobStore().list(getContainerNameFirstPart(),ListContainerOptions.Builder.inDirectory(getItemInContainerSubPath(parentSubPath)))).transform(new Function<StorageMetadata,String>(){
    @Override public String apply(    @javax.annotation.Nullable StorageMetadata input){
      String result=input.getName();
      result=Strings.removeFromStart(result,containerSubPath);
      result=Strings.removeFromStart(result,"String_Node_Str");
      return result;
    }
  }
).toList();
}
Program: 79420
Project: 79420
Buggy source:
/** 
 * removes the first prefix in the list which is present at the start of string and returns that string; ignores subsequent prefixes if a matching one is found; returns the original string if no prefixes match
 */
public static String removeFromStart(String string,String... prefixes){
  if (isEmpty(string))   return string;
  for (  String prefix : prefixes)   if (string.startsWith(prefix))   return string.substring(prefix.length());
  return string;
}

Fixed version (ground truth):
/** 
 * removes the first prefix in the list which is present at the start of string and returns that string; ignores subsequent prefixes if a matching one is found; returns the original string if no prefixes match
 */
public static String removeFromStart(String string,String... prefixes){
  if (isEmpty(string))   return string;
  for (  String prefix : prefixes)   if (prefix != null && string.startsWith(prefix))   return string.substring(prefix.length());
  return string;
}
Program: 79421
Project: 79421
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + getJmxUri() + "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + (getManagementContext() != null && getManagementContext().isRunning() ? getJmxUri() : "String_Node_Str") + "String_Node_Str";
}
Program: 79422
Project: 79422
Buggy source:
public String getHttpsSslKeystorePassword(){
  HttpsSslConfig config=getAttribute(HTTPS_SSL_CONFIG);
  return (config == null) ? null : config.getKeystorePassword();
}

Fixed version (ground truth):
public String getHttpsSslKeystorePassword(){
  HttpsSslConfig config=getAttribute(HTTPS_SSL_CONFIG);
  return (config == null) ? "String_Node_Str" : config.getKeystorePassword();
}
Program: 79424
Project: 79424
Buggy source:
@Override public void init(){
  super.init();
  addFeed(FunctionFeed.builder().entity(this).poll(FunctionPollConfig.forSensor(SENSOR_INT).period(POLL_PERIOD).callable(Callables.returning(1))).build());
}

Fixed version (ground truth):
@Override public void init(){
  super.init();
  addFeed(FunctionFeed.builder().entity(this).poll(FunctionPollConfig.forSensor(SENSOR_INT).period(POLL_PERIOD).callable(Callables.returning(1))).build());
  addFeed(FunctionFeed.builder().entity(this).poll(FunctionPollConfig.forSensor(SENSOR_STRING).period(POLL_PERIOD).callable(Callables.returning("String_Node_Str"))).build());
}
Program: 79425
Project: 79425
Buggy source:
@Test public void testFunctionFeedRegisteredInInitIsPersisted() throws Exception {
  TestEntity origEntity=origApp.createAndManageChild(EntitySpec.create(TestEntity.class).impl(MyEntityWithFunctionFeedImpl.class));
  EntityTestUtils.assertAttributeEqualsEventually(origEntity,SENSOR_INT,(Integer)1);
  assertEquals(origEntity.feeds().getFeeds().size(),1);
  newApp=rebind(false);
  TestEntity newEntity=(TestEntity)Iterables.getOnlyElement(newApp.getChildren());
  Collection<Feed> newFeeds=newEntity.feeds().getFeeds();
  assertEquals(newFeeds.size(),1);
  newEntity.setAttribute(SENSOR_INT,null);
  EntityTestUtils.assertAttributeEqualsEventually(newEntity,SENSOR_INT,(Integer)1);
}

Fixed version (ground truth):
@Test public void testFunctionFeedRegisteredInInitIsPersisted() throws Exception {
  TestEntity origEntity=origApp.createAndManageChild(EntitySpec.create(TestEntity.class).impl(MyEntityWithFunctionFeedImpl.class));
  EntityTestUtils.assertAttributeEqualsEventually(origEntity,SENSOR_INT,(Integer)1);
  assertEquals(origEntity.feeds().getFeeds().size(),2);
  newApp=rebind(false);
  TestEntity newEntity=(TestEntity)Iterables.getOnlyElement(newApp.getChildren());
  Collection<Feed> newFeeds=newEntity.feeds().getFeeds();
  assertEquals(newFeeds.size(),2);
  newEntity.setAttribute(SENSOR_INT,null);
  EntityTestUtils.assertAttributeEqualsEventually(newEntity,SENSOR_INT,(Integer)1);
}
Program: 79427
Project: 79427
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) protected synchronized Map<String,CatalogItemDo<?,?>> buildCaches(){
  if (cacheById != null)   return cacheById;
  log.debug("String_Node_Str" + this);
  if (!isLoaded())   log.debug("String_Node_Str" + this);
  Map<String,CatalogItemDo<?,?>> cache=new LinkedHashMap<String,CatalogItemDo<?,?>>();
  if (dto.catalogs != null) {
    List<CatalogDo> catalogsReversed=new ArrayList<CatalogDo>(childrenCatalogs);
    Collections.reverse(catalogsReversed);
    for (    CatalogDo child : catalogsReversed) {
      cache.putAll(child.getIdCache());
    }
  }
  if (dto.entries != null) {
    List<CatalogItemDtoAbstract<?,?>> entriesReversed=new ArrayList<CatalogItemDtoAbstract<?,?>>(dto.entries);
    Collections.reverse(entriesReversed);
    for (    CatalogItemDtoAbstract<?,?> entry : entriesReversed)     cache.put(entry.getId(),new CatalogItemDo(this,entry));
  }
  Map<String,CatalogItemDo<?,?>> typeNameCache=Maps.newHashMap();
  for (  CatalogItemDo<?,?> entry : cache.values()) {
    typeNameCache.put(entry.getRegisteredTypeName(),entry);
  }
  this.cacheById=cache;
  this.cacheByRegisteredTypeName=typeNameCache;
  return cache;
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) protected synchronized Map<String,CatalogItemDo<?,?>> buildCaches(){
  if (cacheById != null)   return cacheById;
  log.debug("String_Node_Str" + this);
  if (!isLoaded())   log.debug("String_Node_Str" + this);
  Map<String,CatalogItemDo<?,?>> cache=new LinkedHashMap<String,CatalogItemDo<?,?>>();
  if (dto.catalogs != null) {
    List<CatalogDo> catalogsReversed=new ArrayList<CatalogDo>(childrenCatalogs);
    Collections.reverse(catalogsReversed);
    for (    CatalogDo child : catalogsReversed) {
      cache.putAll(child.getIdCache());
    }
  }
  if (dto.getUniqueEntries() != null) {
    List<CatalogItemDtoAbstract<?,?>> entriesReversed=MutableList.copyOf(dto.getUniqueEntries());
    Collections.reverse(entriesReversed);
    for (    CatalogItemDtoAbstract<?,?> entry : entriesReversed)     cache.put(entry.getId(),new CatalogItemDo(this,entry));
  }
  Map<String,CatalogItemDo<?,?>> typeNameCache=Maps.newHashMap();
  for (  CatalogItemDo<?,?> entry : cache.values()) {
    typeNameCache.put(entry.getRegisteredTypeName(),entry);
  }
  this.cacheById=cache;
  this.cacheByRegisteredTypeName=typeNameCache;
  return cache;
}
Program: 79428
Project: 79428
Buggy source:
/** 
 * Adds the given entry to the catalog, with no enrichment. Callers may prefer   {@link CatalogClasspathDo#addCatalogEntry(CatalogItemDtoAbstract,Class)}
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public synchronized void addEntry(CatalogItemDtoAbstract<?,?> entry){
  if (dto.entries == null)   dto.entries=new ArrayList<CatalogItemDtoAbstract<?,?>>();
  dto.entries.add(entry);
  if (cacheById != null) {
    CatalogItemDo<?,?> cdo=new CatalogItemDo(this,entry);
    cacheById.put(entry.getId(),cdo);
    cacheByRegisteredTypeName.put(entry.getRegisteredTypeName(),cdo);
  }
  if (mgmt != null) {
    mgmt.getRebindManager().getChangeListener().onManaged(entry);
  }
}

Fixed version (ground truth):
/** 
 * Adds the given entry to the catalog, with no enrichment. Callers may prefer   {@link CatalogClasspathDo#addCatalogEntry(CatalogItemDtoAbstract,Class)}
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public synchronized void addEntry(CatalogItemDtoAbstract<?,?> entry){
  dto.addEntry(entry);
  if (cacheById != null) {
    CatalogItemDo<?,?> cdo=new CatalogItemDo(this,entry);
    cacheById.put(entry.getId(),cdo);
    cacheByRegisteredTypeName.put(entry.getRegisteredTypeName(),cdo);
  }
  if (mgmt != null) {
    mgmt.getRebindManager().getChangeListener().onManaged(entry);
  }
}
Program: 79429
Project: 79429
Buggy source:
/** 
 * Removes the given entry from the catalog.
 */
public synchronized void deleteEntry(CatalogItemDtoAbstract<?,?> entry){
  if (dto.entries != null)   dto.entries.remove(entry);
  if (cacheById != null) {
    cacheById.remove(entry.getId());
    cacheByRegisteredTypeName.remove(entry.getRegisteredTypeName());
  }
  if (mgmt != null) {
    mgmt.getRebindManager().getChangeListener().onUnmanaged(entry);
  }
}

Fixed version (ground truth):
/** 
 * Removes the given entry from the catalog.
 */
public synchronized void deleteEntry(CatalogItemDtoAbstract<?,?> entry){
  dto.removeEntry(entry);
  if (cacheById != null) {
    cacheById.remove(entry.getId());
    cacheByRegisteredTypeName.remove(entry.getRegisteredTypeName());
  }
  if (mgmt != null) {
    mgmt.getRebindManager().getChangeListener().onUnmanaged(entry);
  }
}
Program: 79430
Project: 79430
Buggy source:
private void loadCatalogItems(){
  List<CatalogItemDtoAbstract<?,?>> entries=dto.entries;
  if (entries != null) {
    for (    CatalogItemDtoAbstract<?,?> entry : entries) {
      CatalogUtils.installLibraries(mgmt,entry.getLibrariesDto());
    }
  }
}

Fixed version (ground truth):
private void loadCatalogItems(){
  Iterable<CatalogItemDtoAbstract<?,?>> entries=dto.getUniqueEntries();
  if (entries != null) {
    for (    CatalogItemDtoAbstract<?,?> entry : entries) {
      CatalogUtils.installLibraries(mgmt,entry.getLibrariesDto());
    }
  }
}
Program: 79431
Project: 79431
Buggy source:
@Test public void testLoadCatalog(){
  CatalogDto catalog=(CatalogDto)serializer.fromString(loadFile("String_Node_Str"));
  assertNotNull(catalog);
  assertEquals(catalog.name,"String_Node_Str");
  assertEquals(catalog.entries.size(),1,"String_Node_Str" + Joiner.on("String_Node_Str").join(catalog.entries));
  CatalogItemDtoAbstract<?,?> template=Iterables.getOnlyElement(catalog.entries);
  assertEquals(template.getDisplayName(),"String_Node_Str");
  assertEquals(template.getVersion(),"String_Node_Str");
  assertEquals(template.getJavaType(),"String_Node_Str");
  assertEquals(template.getLibraries().getBundles().size(),2,"String_Node_Str" + Joiner.on("String_Node_Str").join(template.getLibraries().getBundles()));
  assertEquals(Sets.newHashSet(template.getLibraries().getBundles()),Sets.newHashSet("String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testLoadCatalog(){
  CatalogDto catalog=(CatalogDto)serializer.fromString(loadFile("String_Node_Str"));
  assertNotNull(catalog);
  assertEquals(catalog.name,"String_Node_Str");
  assertEquals(Iterables.size(catalog.getUniqueEntries()),1,"String_Node_Str" + Joiner.on("String_Node_Str").join(catalog.getUniqueEntries()));
  CatalogItemDtoAbstract<?,?> template=Iterables.getOnlyElement(catalog.getUniqueEntries());
  assertEquals(template.getDisplayName(),"String_Node_Str");
  assertEquals(template.getVersion(),"String_Node_Str");
  assertEquals(template.getJavaType(),"String_Node_Str");
  assertEquals(template.getLibraries().getBundles().size(),2,"String_Node_Str" + Joiner.on("String_Node_Str").join(template.getLibraries().getBundles()));
  assertEquals(Sets.newHashSet(template.getLibraries().getBundles()),Sets.newHashSet("String_Node_Str","String_Node_Str"));
}
Program: 79433
Project: 79433
Buggy source:
public UpdatingMap(Map<Object,Object> flags){
  super(flags);
  if (suppressDuplicates == null) {
    suppressDuplicates=true;
  }
}

Fixed version (ground truth):
public UpdatingMap(Map<Object,Object> flags){
  super(flags);
  suppressDuplicates=false;
}
Program: 79434
Project: 79434
Buggy source:
@Override public void clearParent(){
  if (parent.isNull())   return;
  Entity oldParent=parent.get();
  parent.clear();
  if (oldParent != null)   oldParent.removeChild(getProxyIfAvailable());
}

Fixed version (ground truth):
@Override public void clearParent(){
  if (parent.isNull())   return;
  Entity oldParent=parent.get();
  parent.clear();
  if (oldParent != null) {
    if (!Entities.isNoLongerManaged(oldParent))     oldParent.removeChild(getProxyIfAvailable());
  }
}
Program: 79435
Project: 79435
Buggy source:
/** 
 * update the given key in the given map sensor 
 */
public static <TKey,TVal>void updateMapSensorEntry(EntityLocal entity,AttributeSensor<Map<TKey,TVal>> sensor,TKey key,TVal v){
  Map<TKey,TVal> map=entity.getAttribute(sensor);
  boolean created=(map == null);
  if (created)   map=MutableMap.of();
  boolean changed;
  if (v == Entities.REMOVE) {
    changed=map.containsKey(key);
    if (changed)     map.remove(key);
  }
 else {
    TVal oldV=map.get(key);
    if (oldV == null)     changed=(v != null || !map.containsKey(key));
 else     changed=!oldV.equals(v);
    if (changed)     map.put(key,(TVal)v);
  }
  if (changed || created) {
    entity.setAttribute(sensor,map);
  }
}

Fixed version (ground truth):
/** 
 * update the given key in the given map sensor 
 */
public static <TKey,TVal>void updateMapSensorEntry(EntityLocal entity,AttributeSensor<Map<TKey,TVal>> sensor,TKey key,TVal v){
  Map<TKey,TVal> map=entity.getAttribute(sensor);
  boolean created=(map == null);
  if (created)   map=MutableMap.of();
  boolean changed;
  if (v == Entities.REMOVE) {
    changed=map.containsKey(key);
    if (changed)     map.remove(key);
  }
 else {
    TVal oldV=map.get(key);
    if (oldV == null)     changed=(v != null || !map.containsKey(key));
 else     changed=!oldV.equals(v);
    if (changed)     map.put(key,(TVal)v);
  }
  if (changed || created) {
    if (!Entities.isNoLongerManaged(entity)) {
      entity.setAttribute(sensor,map);
    }
  }
}
Program: 79437
Project: 79437
Buggy source:
/** 
 * Should ensure that the entity is no longer managed anywhere, remove from all lists. Returns true if the entity has been removed from management; if it was not previously managed (anything else throws exception) 
 */
private boolean unmanageNonRecursive(Entity e){
  if (!getLastManagementTransitionMode(e.getId()).isReadOnly()) {
    Collection<Group> groups=e.getGroups();
    e.clearParent();
    for (    Group group : groups) {
      group.removeMember(e);
    }
    if (e instanceof Group) {
      Collection<Entity> members=((Group)e).getMembers();
      for (      Entity member : members) {
        member.removeGroup((Group)e);
      }
    }
  }
 else {
    log.debug("String_Node_Str",e);
  }
synchronized (this) {
    Entity proxyE=toProxyEntityIfAvailable(e);
    if (e instanceof Application) {
      applications.remove(proxyE);
      applicationIds.remove(e.getId());
    }
    entities.remove(proxyE);
    entityProxiesById.remove(e.getId());
    entityModesById.remove(e.getId());
    Object old=entitiesById.remove(e.getId());
    entityTypes.remove(e.getId());
    if (old == null) {
      log.warn("String_Node_Str",this,e);
      return false;
    }
 else     if (!old.equals(e)) {
      log.error("String_Node_Str",new Object[]{this,e,old});
      return true;
    }
 else {
      if (log.isDebugEnabled())       log.debug("String_Node_Str",this,e);
      return true;
    }
  }
}

Fixed version (ground truth):
/** 
 * Should ensure that the entity is no longer managed anywhere, remove from all lists. Returns true if the entity has been removed from management; if it was not previously managed (anything else throws exception) 
 */
private boolean unmanageNonRecursive(Entity e){
  if (!getLastManagementTransitionMode(e.getId()).isReadOnly()) {
    e.clearParent();
    Collection<Group> groups=e.getGroups();
    for (    Group group : groups) {
      if (!Entities.isNoLongerManaged(group))       group.removeMember(e);
    }
    if (e instanceof Group) {
      Collection<Entity> members=((Group)e).getMembers();
      for (      Entity member : members) {
        if (!Entities.isNoLongerManaged(member))         member.removeGroup((Group)e);
      }
    }
  }
 else {
    log.debug("String_Node_Str",e);
  }
synchronized (this) {
    Entity proxyE=toProxyEntityIfAvailable(e);
    if (e instanceof Application) {
      applications.remove(proxyE);
      applicationIds.remove(e.getId());
    }
    entities.remove(proxyE);
    entityProxiesById.remove(e.getId());
    entityModesById.remove(e.getId());
    Object old=entitiesById.remove(e.getId());
    entityTypes.remove(e.getId());
    if (old == null) {
      log.warn("String_Node_Str",this,e);
      return false;
    }
 else     if (!old.equals(e)) {
      log.error("String_Node_Str",new Object[]{this,e,old});
      return true;
    }
 else {
      if (log.isDebugEnabled())       log.debug("String_Node_Str",this,e);
      return true;
    }
  }
}
Program: 79438
Project: 79438
Buggy source:
public void run(){
  try {
    sAtClosureCreation.listener.onEvent(event);
  }
 catch (  Throwable t) {
    LOG.warn("String_Node_Str" + this + "String_Node_Str"+ t,t);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    sAtClosureCreation.listener.onEvent(event);
  }
 catch (  Throwable t) {
    if (event != null && event.getSource() != null && Entities.isNoLongerManaged(event.getSource())) {
      LOG.debug("String_Node_Str" + this + "String_Node_Str"+ t,t);
    }
 else {
      LOG.warn("String_Node_Str" + this + "String_Node_Str"+ t,t);
    }
  }
}
Program: 79439
Project: 79439
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public <T>void publish(final SensorEvent<T> event){
  if (LOG.isTraceEnabled())   LOG.trace("String_Node_Str",this,event);
  totalEventsPublishedCount.incrementAndGet();
  Set<Subscription> subs=(Set<Subscription>)((Set<?>)getSubscriptionsForEntitySensor(event.getSource(),event.getSensor()));
  if (groovyTruth(subs)) {
    if (LOG.isTraceEnabled())     LOG.trace("String_Node_Str",new Object[]{event.getSensor().getName(),event,join(subs,"String_Node_Str")});
    for (    Subscription s : subs) {
      if (s.eventFilter != null && !s.eventFilter.apply(event))       continue;
      final Subscription sAtClosureCreation=s;
      Map<String,Object> tagsMap=mapOf("String_Node_Str",s.subscriberExecutionManagerTag);
      em.submit(tagsMap,new Runnable(){
        @Override public String toString(){
          return "String_Node_Str" + event + "String_Node_Str";
        }
        public void run(){
          try {
            sAtClosureCreation.listener.onEvent(event);
          }
 catch (          Throwable t) {
            LOG.warn("String_Node_Str" + this + "String_Node_Str"+ t,t);
          }
        }
      }
);
      totalEventsDeliveredCount.incrementAndGet();
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public <T>void publish(final SensorEvent<T> event){
  if (LOG.isTraceEnabled())   LOG.trace("String_Node_Str",this,event);
  totalEventsPublishedCount.incrementAndGet();
  Set<Subscription> subs=(Set<Subscription>)((Set<?>)getSubscriptionsForEntitySensor(event.getSource(),event.getSensor()));
  if (groovyTruth(subs)) {
    if (LOG.isTraceEnabled())     LOG.trace("String_Node_Str",new Object[]{event.getSensor().getName(),event,join(subs,"String_Node_Str")});
    for (    Subscription s : subs) {
      if (s.eventFilter != null && !s.eventFilter.apply(event))       continue;
      final Subscription sAtClosureCreation=s;
      Map<String,Object> tagsMap=mapOf("String_Node_Str",s.subscriberExecutionManagerTag);
      em.submit(tagsMap,new Runnable(){
        @Override public String toString(){
          return "String_Node_Str" + event + "String_Node_Str";
        }
        public void run(){
          try {
            sAtClosureCreation.listener.onEvent(event);
          }
 catch (          Throwable t) {
            if (event != null && event.getSource() != null && Entities.isNoLongerManaged(event.getSource())) {
              LOG.debug("String_Node_Str" + this + "String_Node_Str"+ t,t);
            }
 else {
              LOG.warn("String_Node_Str" + this + "String_Node_Str"+ t,t);
            }
          }
        }
      }
);
      totalEventsDeliveredCount.incrementAndGet();
    }
  }
}
Program: 79440
Project: 79440
Buggy source:
@Override public void connectSensors(){
  super.connectSensors();
  ConfigToAttributes.apply(this);
  String accessibleRootUrl=inferUrl(true);
  httpFeed=HttpFeed.builder().entity(this).period(getConfig(HTTP_POLL_PERIOD)).baseUri(accessibleRootUrl).baseUriVars(ImmutableMap.of("String_Node_Str","String_Node_Str")).poll(new HttpPollConfig<Boolean>(NGINX_URL_ANSWERS_NICELY).checkSuccess(Predicates.alwaysTrue()).onResult(new Function<HttpToolResponse,Boolean>(){
    @Override public Boolean apply(    HttpToolResponse input){
      List<String> actual=input.getHeaderLists().get("String_Node_Str");
      return actual != null && actual.size() == 1;
    }
  }
).setOnException(false)).build();
  addEnricher(Enrichers.builder().updatingMap(Attributes.SERVICE_NOT_UP_INDICATORS).from(NGINX_URL_ANSWERS_NICELY).computing(Functionals.ifNotEquals(true).value("String_Node_Str")).build());
  connectServiceUpIsRunning();
  Group urlMappings=getConfig(URL_MAPPINGS);
  if (urlMappings != null) {
    subscribeToMembers(urlMappings,UrlMapping.TARGET_ADDRESSES,new SensorEventListener<Collection<String>>(){
      @Override public void onEvent(      SensorEvent<Collection<String>> event){
        updateNeeded();
      }
    }
);
    urlMappingsMemberTrackerPolicy=addPolicy(PolicySpec.create(UrlMappingsMemberTrackerPolicy.class).configure("String_Node_Str",urlMappings));
  }
}

Fixed version (ground truth):
@Override public void connectSensors(){
  super.connectSensors();
  ConfigToAttributes.apply(this);
  String accessibleRootUrl=inferUrl(true);
  httpFeed=HttpFeed.builder().entity(this).period(getConfig(HTTP_POLL_PERIOD)).baseUri(accessibleRootUrl).baseUriVars(ImmutableMap.of("String_Node_Str","String_Node_Str")).poll(new HttpPollConfig<Boolean>(NGINX_URL_ANSWERS_NICELY).checkSuccess(Predicates.alwaysTrue()).onResult(new Function<HttpToolResponse,Boolean>(){
    @Override public Boolean apply(    HttpToolResponse input){
      List<String> actual=input.getHeaderLists().get("String_Node_Str");
      return actual != null && actual.size() == 1;
    }
  }
).setOnException(false)).build();
  if (!Lifecycle.RUNNING.equals(getAttribute(SERVICE_STATE_ACTUAL))) {
    ServiceNotUpLogic.updateNotUpIndicator(this,NGINX_URL_ANSWERS_NICELY,"String_Node_Str");
  }
  addEnricher(Enrichers.builder().updatingMap(Attributes.SERVICE_NOT_UP_INDICATORS).from(NGINX_URL_ANSWERS_NICELY).computing(Functionals.ifNotEquals(true).value("String_Node_Str")).build());
  connectServiceUpIsRunning();
  Group urlMappings=getConfig(URL_MAPPINGS);
  if (urlMappings != null) {
    subscribeToMembers(urlMappings,UrlMapping.TARGET_ADDRESSES,new SensorEventListener<Collection<String>>(){
      @Override public void onEvent(      SensorEvent<Collection<String>> event){
        updateNeeded();
      }
    }
);
    urlMappingsMemberTrackerPolicy=addPolicy(PolicySpec.create(UrlMappingsMemberTrackerPolicy.class).configure("String_Node_Str",urlMappings));
  }
}
Program: 79442
Project: 79442
Buggy source:
static String appendSeparator(String message,String next){
  if (Strings.isBlank(message))   return next;
  if (message.trim().endsWith("String_Node_Str") || message.trim().endsWith("String_Node_Str"))   return message.trim() + "String_Node_Str" + next;
  return message + "String_Node_Str" + next;
}

Fixed version (ground truth):
static String appendSeparator(String message,String next){
  if (Strings.isBlank(message))   return next;
  if (Strings.isBlank(next))   return message;
  if (message.endsWith(next))   return message;
  if (message.trim().endsWith("String_Node_Str") || message.trim().endsWith("String_Node_Str"))   return message.trim() + "String_Node_Str" + next;
  return message + "String_Node_Str" + next;
}
Program: 79443
Project: 79443
Buggy source:
private static String stripBoringPrefixes(String s){
  String was;
  do {
    was=s;
    for (    Class<? extends Throwable> type : BORING_PREFIX_THROWABLE_EXACT_TYPES) {
      s=Strings.removeAllFromStart(type.getCanonicalName(),type.getName(),type.getSimpleName(),"String_Node_Str","String_Node_Str");
    }
  }
 while (!was.equals(s));
  return s;
}

Fixed version (ground truth):
private static String stripBoringPrefixes(String s){
  String was;
  do {
    was=s;
    for (    Class<? extends Throwable> type : BORING_PREFIX_THROWABLE_EXACT_TYPES) {
      s=Strings.removeAllFromStart(s,type.getCanonicalName(),type.getName(),type.getSimpleName(),"String_Node_Str","String_Node_Str");
    }
  }
 while (!was.equals(s));
  return s;
}
Program: 79444
Project: 79444
Buggy source:
/** 
 * creates (but does not throw) a new   {@link PropagatedRuntimeException} whose message is taken from the first _interesting_ element in the source, and optionally also the causal chain 
 */
public static Throwable collapse(Throwable source,boolean collapseCausalChain){
  String message="String_Node_Str";
  Throwable collapsed=source;
  int collapseCount=0;
  while (isBoring(collapsed)) {
    collapseCount++;
    Throwable cause=collapsed.getCause();
    if (cause == null)     return source;
    String collapsedS=collapsed.getMessage();
    if (Strings.isNonBlank(collapsedS)) {
      collapsedS=Strings.removeFromEnd(collapsedS,cause.toString(),stripBoringPrefixes(cause.toString()),cause.getMessage());
      collapsedS=stripBoringPrefixes(collapsedS);
      if (Strings.isNonBlank(collapsedS))       message=appendSeparator(message,collapsedS);
    }
    collapsed=cause;
  }
  Throwable messagesCause=collapsed;
  while (isPrefixBoring(messagesCause) && Strings.isBlank(message)) {
    collapseCount++;
    if (Strings.isNonBlank(messagesCause.getMessage())) {
      message=messagesCause.getMessage();
      break;
    }
    messagesCause=messagesCause.getCause();
  }
  if (collapseCount == 0)   return source;
  if (Strings.isBlank(message))   return new PropagatedRuntimeException(collapseCausalChain ? collapsed : source);
 else   return new PropagatedRuntimeException(message,collapseCausalChain ? collapsed : source,true);
}

Fixed version (ground truth):
/** 
 * creates (but does not throw) a new   {@link PropagatedRuntimeException} whose message is taken from the first _interesting_ element in the source, and optionally also the causal chain 
 */
public static Throwable collapse(Throwable source,boolean collapseCausalChain){
  String message="String_Node_Str";
  Throwable collapsed=source;
  int collapseCount=0;
  while (isBoring(collapsed)) {
    collapseCount++;
    Throwable cause=collapsed.getCause();
    if (cause == null)     return source;
    String collapsedS=collapsed.getMessage();
    if (Strings.isNonBlank(collapsedS)) {
      collapsedS=Strings.removeFromEnd(collapsedS,cause.toString(),stripBoringPrefixes(cause.toString()),cause.getMessage());
      collapsedS=stripBoringPrefixes(collapsedS);
      if (Strings.isNonBlank(collapsedS))       message=appendSeparator(message,collapsedS);
    }
    collapsed=cause;
  }
  Throwable messagesCause=collapsed;
  while (isPrefixBoring(messagesCause) && Strings.isBlank(message)) {
    collapseCount++;
    if (Strings.isNonBlank(messagesCause.getMessage())) {
      message=messagesCause.getMessage();
      messagesCause=messagesCause.getCause();
      break;
    }
    messagesCause=messagesCause.getCause();
  }
  if (collapseCount == 0)   return source;
  if (Strings.isBlank(message)) {
    return new PropagatedRuntimeException(collapseCausalChain ? collapsed : source);
  }
 else {
    if (messagesCause != null) {
      String extraMessage=collapseText(messagesCause);
      message=appendSeparator(message,extraMessage);
    }
    return new PropagatedRuntimeException(message,collapseCausalChain ? collapsed : source,true);
  }
}
Program: 79445
Project: 79445
Buggy source:
@Override public boolean tryAcquireMutex(String mutexId,String description){
  return mutexSupport.tryAcquireMutex(mutexId,description);
}

Fixed version (ground truth):
@Override public boolean tryAcquireMutex(String mutexId,String description){
  return getMutexSupport().tryAcquireMutex(mutexId,description);
}
Program: 79446
Project: 79446
Buggy source:
@Override public boolean hasMutex(String mutexId){
  return mutexSupport.hasMutex(mutexId);
}

Fixed version (ground truth):
@Override public boolean hasMutex(String mutexId){
  return getMutexSupport().hasMutex(mutexId);
}
Program: 79447
Project: 79447
Buggy source:
@Override public void releaseMutex(String mutexId){
  mutexSupport.releaseMutex(mutexId);
}

Fixed version (ground truth):
@Override public void releaseMutex(String mutexId){
  getMutexSupport().releaseMutex(mutexId);
}
Program: 79448
Project: 79448
Buggy source:
@Override public void acquireMutex(String mutexId,String description) throws RuntimeInterruptedException {
  try {
    mutexSupport.acquireMutex(mutexId,description);
  }
 catch (  InterruptedException ie) {
    throw new RuntimeInterruptedException("String_Node_Str" + mutexId,ie);
  }
}

Fixed version (ground truth):
@Override public void acquireMutex(String mutexId,String description) throws RuntimeInterruptedException {
  try {
    getMutexSupport().acquireMutex(mutexId,description);
  }
 catch (  InterruptedException ie) {
    throw new RuntimeInterruptedException("String_Node_Str" + mutexId,ie);
  }
}
Program: 79449
Project: 79449
Buggy source:
@Override public SshMachineLocation configure(Map properties){
  super.configure(properties);
  if (mutexSupport == null) {
    mutexSupport=new MutexSupport();
  }
  boolean deferConstructionChecks=(properties.containsKey("String_Node_Str") && TypeCoercions.coerce(properties.get("String_Node_Str"),Boolean.class));
  if (!deferConstructionChecks) {
    if (getDisplayName() == null) {
      setDisplayName((truth(user) ? user + "String_Node_Str" : "String_Node_Str") + address.getHostName());
    }
  }
  return this;
}

Fixed version (ground truth):
@Override public SshMachineLocation configure(Map properties){
  super.configure(properties);
  boolean deferConstructionChecks=(properties.containsKey("String_Node_Str") && TypeCoercions.coerce(properties.get("String_Node_Str"),Boolean.class));
  if (!deferConstructionChecks) {
    if (getDisplayName() == null) {
      setDisplayName((truth(user) ? user + "String_Node_Str" : "String_Node_Str") + address.getHostName());
    }
  }
  return this;
}
Program: 79450
Project: 79450
Buggy source:
@Override public void connectSensors(){
  super.connectSensors();
  if (getDriver().isJmxEnabled()) {
    String requestProcessorMbeanName="String_Node_Str";
    String connectorMbeanName=format("String_Node_Str",getAttribute(HTTP_PORT));
    jmxWebFeed=JmxFeed.builder().entity(this).period(3000,TimeUnit.MILLISECONDS).pollAttribute(new JmxAttributePollConfig<Integer>(ERROR_COUNT).objectName(requestProcessorMbeanName).attributeName("String_Node_Str")).pollAttribute(new JmxAttributePollConfig<Integer>(REQUEST_COUNT).objectName(requestProcessorMbeanName).attributeName("String_Node_Str")).pollAttribute(new JmxAttributePollConfig<Integer>(TOTAL_PROCESSING_TIME).objectName(requestProcessorMbeanName).attributeName("String_Node_Str")).pollAttribute(new JmxAttributePollConfig<String>(CONNECTOR_STATUS).objectName(connectorMbeanName).attributeName("String_Node_Str")).pollAttribute(new JmxAttributePollConfig<Boolean>(SERVICE_UP).objectName(connectorMbeanName).attributeName("String_Node_Str").onSuccess(Functions.forPredicate(Predicates.<Object>equalTo("String_Node_Str"))).setOnFailureOrException(false)).build();
    jmxAppFeed=JavaAppUtils.connectMXBeanSensors(this);
  }
 else {
    LOG.warn("String_Node_Str");
    connectServiceUpIsRunning();
  }
}

Fixed version (ground truth):
@Override public void connectSensors(){
  super.connectSensors();
  if (getDriver().isJmxEnabled()) {
    String requestProcessorMbeanName="String_Node_Str";
    String connectorMbeanName=format("String_Node_Str",getAttribute(HTTP_PORT));
    jmxWebFeed=JmxFeed.builder().entity(this).period(3000,TimeUnit.MILLISECONDS).pollAttribute(new JmxAttributePollConfig<Integer>(ERROR_COUNT).objectName(requestProcessorMbeanName).attributeName("String_Node_Str")).pollAttribute(new JmxAttributePollConfig<Integer>(REQUEST_COUNT).objectName(requestProcessorMbeanName).attributeName("String_Node_Str")).pollAttribute(new JmxAttributePollConfig<Integer>(TOTAL_PROCESSING_TIME).objectName(requestProcessorMbeanName).attributeName("String_Node_Str")).pollAttribute(new JmxAttributePollConfig<String>(CONNECTOR_STATUS).objectName(connectorMbeanName).attributeName("String_Node_Str")).pollAttribute(new JmxAttributePollConfig<Boolean>(SERVICE_PROCESS_IS_RUNNING).objectName(connectorMbeanName).attributeName("String_Node_Str").onSuccess(Functions.forPredicate(Predicates.<Object>equalTo("String_Node_Str"))).setOnFailureOrException(false)).build();
    jmxAppFeed=JavaAppUtils.connectMXBeanSensors(this);
  }
 else {
    LOG.warn("String_Node_Str");
    connectServiceUpIsRunning();
  }
}
Program: 79451
Project: 79451
Buggy source:
private JsonNode fromEntity(Entity entity){
  ObjectNode aRoot=entityBase(entity);
  aRoot.put("String_Node_Str",entity.getApplicationId());
  if (entity.getParent() != null) {
    aRoot.put("String_Node_Str",entity.getParent().getId());
  }
  if (!entity.getGroups().isEmpty())   aRoot.put("String_Node_Str",entitiesIdAsArray(entity.getGroups()));
  if (!entity.getChildren().isEmpty())   aRoot.put("String_Node_Str",entitiesIdAndNameAsArray(entity.getChildren()));
  if ((entity instanceof Group) && !((Group)entity).getMembers().isEmpty())   aRoot.put("String_Node_Str",entitiesIdAndNameAsArray(((Group)entity).getMembers()));
  return aRoot;
}

Fixed version (ground truth):
private JsonNode fromEntity(Entity entity){
  ObjectNode aRoot=entityBase(entity);
  aRoot.put("String_Node_Str",entity.getApplicationId());
  if (entity.getParent() != null) {
    aRoot.put("String_Node_Str",entity.getParent().getId());
  }
  if (!entity.getGroups().isEmpty())   aRoot.put("String_Node_Str",entitiesIdAsArray(entity.getGroups()));
  if (!entity.getChildren().isEmpty())   aRoot.put("String_Node_Str",entitiesIdAndNameAsArray(entity.getChildren()));
  if (entity instanceof Group) {
    Collection<Entity> members=entity.getAttribute(AbstractGroup.GROUP_MEMBERS);
    if (members != null && !members.isEmpty())     aRoot.put("String_Node_Str",entitiesIdAndNameAsArray(members));
  }
  return aRoot;
}
Program: 79452
Project: 79452
Buggy source:
static ManagementTransitionMode computeMode(BrooklynObject item,Boolean wasReadOnly,boolean isNowReadOnly){
  if (wasReadOnly == null) {
    if (Boolean.TRUE.equals(isNowReadOnly))     return ManagementTransitionMode.REBINDING_READONLY;
 else     return ManagementTransitionMode.CREATING;
  }
 else {
    if (wasReadOnly && isNowReadOnly)     return ManagementTransitionMode.REBINDING_READONLY;
 else     if (wasReadOnly)     return ManagementTransitionMode.REBINDING_BECOMING_PRIMARY;
 else     if (isNowReadOnly)     return ManagementTransitionMode.REBINDING_NO_LONGER_PRIMARY;
 else     throw new IllegalStateException("String_Node_Str" + item);
  }
}

Fixed version (ground truth):
static ManagementTransitionMode computeMode(BrooklynObject item,Boolean wasReadOnly,boolean isNowReadOnly){
  if (wasReadOnly == null) {
    if (Boolean.TRUE.equals(isNowReadOnly))     return ManagementTransitionMode.REBINDING_READONLY;
 else     return ManagementTransitionMode.CREATING;
  }
 else {
    if (wasReadOnly && isNowReadOnly)     return ManagementTransitionMode.REBINDING_READONLY;
 else     if (wasReadOnly)     return ManagementTransitionMode.REBINDING_BECOMING_PRIMARY;
 else     if (isNowReadOnly)     return ManagementTransitionMode.REBINDING_NO_LONGER_PRIMARY;
 else {
      LOG.warn("String_Node_Str" + item);
      return ManagementTransitionMode.REBINDING_BECOMING_PRIMARY;
    }
  }
}
Program: 79454
Project: 79454
Buggy source:
public static void main(String[] argv){
  List<String> args=Lists.newArrayList(argv);
  String port=CommandLineUtil.getCommandLineOption(args,"String_Node_Str","String_Node_Str");
  String location=CommandLineUtil.getCommandLineOption(args,"String_Node_Str","String_Node_Str");
  BrooklynServerDetails server=BrooklynLauncher.newLauncher().webconsolePort(port).launch();
  Location loc=server.getManagementContext().getLocationRegistry().resolve(location);
  StartableApplication app=new WebClusterDatabaseOpenLoopExample().appDisplayName("String_Node_Str").manage(server.getManagementContext());
  app.start(ImmutableList.of(loc));
  Entities.dumpInfo(app);
}

Fixed version (ground truth):
public static void main(String[] argv){
  List<String> args=Lists.newArrayList(argv);
  String port=CommandLineUtil.getCommandLineOption(args,"String_Node_Str","String_Node_Str");
  String location=CommandLineUtil.getCommandLineOption(args,"String_Node_Str","String_Node_Str");
  BrooklynLauncher launcher=BrooklynLauncher.newInstance().webconsolePort(port).start();
  BrooklynServerDetails server=launcher.getServerDetails();
  Location loc=server.getManagementContext().getLocationRegistry().resolve(location);
  StartableApplication app=new WebClusterDatabaseOpenLoopExample().appDisplayName("String_Node_Str").manage(server.getManagementContext());
  app.start(ImmutableList.of(loc));
  Entities.dumpInfo(app);
}
Program: 79455
Project: 79455
Buggy source:
@Deprecated @SuppressWarnings("String_Node_Str") public static Set<Hint<?>> getHintsFor(Object element,Class<? extends Hint> optionalHintSuperClass){
  return getHintsFor(element,optionalHintSuperClass);
}

Fixed version (ground truth):
@Deprecated @SuppressWarnings({"String_Node_Str","String_Node_Str"}) public static Set<Hint<?>> getHintsFor(Object element,Class<? extends Hint> optionalHintSuperClass){
  return (Set<Hint<?>>)_getHintsFor(element,optionalHintSuperClass);
}
Program: 79456
Project: 79456
Buggy source:
@Override protected void disconnectSensors(){
  if (httpFeed != null)   httpFeed.stop();
  super.disconnectSensors();
}

Fixed version (ground truth):
@Override protected void disconnectSensors(){
  if (httpFeed != null)   httpFeed.stop();
  disconnectServiceUpIsRunning();
  super.disconnectSensors();
}
Program: 79457
Project: 79457
Buggy source:
protected List<Entity> pickAndRemoveMembers(int delta){
  if (delta == 0)   return Lists.newArrayList();
  if (delta == 1 && !isAvailabilityZoneEnabled()) {
    return ImmutableList.of(pickAndRemoveMember());
  }
  Preconditions.checkState(getMembers().size() > 0,"String_Node_Str" + delta + "String_Node_Str"+ this);
  if (LOG.isDebugEnabled())   LOG.debug("String_Node_Str",this);
  if (isAvailabilityZoneEnabled()) {
    Multimap<Location,Entity> membersByLocation=getMembersByLocation();
    List<Entity> entities=getZonePlacementStrategy().entitiesToRemove(membersByLocation,delta);
    Preconditions.checkState(entities.size() == delta,"String_Node_Str",getId(),entities.size(),delta);
    for (    Entity entity : entities) {
      removeMember(entity);
    }
    return entities;
  }
 else {
    List<Entity> entities=Lists.newArrayList();
    for (int i=0; i < delta; i++) {
      entities.add(pickAndRemoveMember());
    }
    return entities;
  }
}

Fixed version (ground truth):
protected List<Entity> pickAndRemoveMembers(int delta){
  if (delta == 0)   return Lists.newArrayList();
  if (delta == 1 && !isAvailabilityZoneEnabled()) {
    Maybe<Entity> member=tryPickAndRemoveMember();
    return (member.isPresent()) ? ImmutableList.of(member.get()) : ImmutableList.<Entity>of();
  }
  Preconditions.checkState(getMembers().size() > 0,"String_Node_Str" + delta + "String_Node_Str"+ this);
  if (LOG.isDebugEnabled())   LOG.debug("String_Node_Str",this);
  if (isAvailabilityZoneEnabled()) {
    Multimap<Location,Entity> membersByLocation=getMembersByLocation();
    List<Entity> entities=getZonePlacementStrategy().entitiesToRemove(membersByLocation,delta);
    Preconditions.checkState(entities.size() == delta,"String_Node_Str",getId(),entities.size(),delta);
    for (    Entity entity : entities) {
      removeMember(entity);
    }
    return entities;
  }
 else {
    List<Entity> entities=Lists.newArrayList();
    for (int i=0; i < delta; i++) {
      Maybe<Entity> member=tryPickAndRemoveMember();
      if (member.isPresent())       entities.add(member.get());
    }
    return entities;
  }
}
Program: 79458
Project: 79458
Buggy source:
public String getJmxUrl(){
  init();
  HostAndPort jmx=BrooklynAccessUtils.getBrooklynAccessibleAddress(entity,entity.getAttribute(JMX_PORT));
  HostAndPort rmi=BrooklynAccessUtils.getBrooklynAccessibleAddress(entity,entity.getAttribute(RMI_REGISTRY_PORT));
  if (EnumSet.of(JmxAgentModes.JMXMP,JmxAgentModes.JMXMP_AND_RMI).contains(getJmxAgentMode())) {
    return JmxHelper.toJmxmpUrl(jmx.getHostText(),jmx.getPort());
  }
 else {
    if (getJmxAgentMode() == JmxAgentModes.NONE) {
      fixPortsForModeNone();
    }
    return JmxHelper.toRmiJmxUrl(jmx.getHostText(),jmx.getPort(),rmi.getPort(),entity.getAttribute(JMX_CONTEXT));
  }
}

Fixed version (ground truth):
public String getJmxUrl(){
  init();
  HostAndPort jmx=BrooklynAccessUtils.getBrooklynAccessibleAddress(entity,entity.getAttribute(JMX_PORT));
  if (EnumSet.of(JmxAgentModes.JMXMP,JmxAgentModes.JMXMP_AND_RMI).contains(getJmxAgentMode())) {
    return JmxHelper.toJmxmpUrl(jmx.getHostText(),jmx.getPort());
  }
 else {
    if (getJmxAgentMode() == JmxAgentModes.NONE) {
      fixPortsForModeNone();
    }
    HostAndPort rmi=BrooklynAccessUtils.getBrooklynAccessibleAddress(entity,entity.getAttribute(RMI_REGISTRY_PORT));
    return JmxHelper.toRmiJmxUrl(jmx.getHostText(),jmx.getPort(),rmi.getPort(),entity.getAttribute(JMX_CONTEXT));
  }
}
Program: 79459
Project: 79459
Buggy source:
@Override protected void connectSensors(){
  super.connectSensors();
  ConfigToAttributes.apply(this);
  HostAndPort accessible=BrooklynAccessUtils.getBrooklynAccessibleAddress(this,getAttribute(Attributes.HTTP_PORT));
  String nodeJsUrl=String.format("String_Node_Str",accessible.getHostText(),accessible.getPort());
  LOG.info("String_Node_Str",nodeJsUrl);
  httpFeed=HttpFeed.builder().entity(this).baseUri(nodeJsUrl).poll(new HttpPollConfig<Boolean>(SERVICE_UP).suburl(getConfig(NodeJsWebAppService.SERVICE_UP_PATH)).checkSuccess(Predicates.alwaysTrue()).onSuccess(HttpValueFunctions.responseCodeEquals(200)).setOnException(false)).build();
  WebAppServiceMethods.connectWebAppServerPolicies(this);
}

Fixed version (ground truth):
@Override protected void connectSensors(){
  super.connectSensors();
  ConfigToAttributes.apply(this);
  HostAndPort accessible=BrooklynAccessUtils.getBrooklynAccessibleAddress(this,getHttpPort());
  String nodeJsUrl=String.format("String_Node_Str",accessible.getHostText(),accessible.getPort());
  LOG.info("String_Node_Str",nodeJsUrl);
  httpFeed=HttpFeed.builder().entity(this).baseUri(nodeJsUrl).poll(new HttpPollConfig<Boolean>(SERVICE_UP).suburl(getConfig(NodeJsWebAppService.SERVICE_UP_PATH)).checkSuccess(Predicates.alwaysTrue()).onSuccess(HttpValueFunctions.responseCodeEquals(200)).setOnException(false)).build();
  WebAppServiceMethods.connectWebAppServerPolicies(this);
}
Program: 79460
Project: 79460
Buggy source:
/** 
 * returns a reference which includes an error, and where attempts to get the content cause the error to throw 
 */
public static <T>ReferenceWithError<T> newInstanceThrowingError(T object,Throwable error){
  return new ReferenceWithError<T>(object,error,true);
}

Fixed version (ground truth):
/** 
 * returns a reference which includes an error, and where attempts to get the content cause the error to throw 
 */
public static <T>ReferenceWithError<T> newInstanceThrowingError(T object,Throwable error){
  return new ReferenceWithError<T>(object,error,false);
}
Program: 79461
Project: 79461
Buggy source:
protected ReferenceWithError(@Nullable T object,@Nullable Throwable error,boolean throwErrorOnAccess){
  this.object=object;
  this.error=error;
  this.maskError=throwErrorOnAccess;
}

Fixed version (ground truth):
protected ReferenceWithError(@Nullable T object,@Nullable Throwable error,boolean maskError){
  this.object=object;
  this.error=error;
  this.maskError=maskError;
}
Program: 79462
Project: 79462
Buggy source:
/** 
 * returns a reference which includes an error, but attempts to get the content do not cause the error to throw 
 */
public static <T>ReferenceWithError<T> newInstanceMaskingError(T object,Throwable error){
  return new ReferenceWithError<T>(object,error,false);
}

Fixed version (ground truth):
/** 
 * returns a reference which includes an error, but attempts to get the content do not cause the error to throw 
 */
public static <T>ReferenceWithError<T> newInstanceMaskingError(T object,Throwable error){
  return new ReferenceWithError<T>(object,error,true);
}