nus-yam/ex-repair huggingface dataset:
Program: 14551
Project: 14551
Buggy source:
public static ValueChecker createPathChecker(){
  return new ValueChecker(){
    @Override public String check(    String value) throws InvalidValueException {
      if (value != null && !value.startsWith("String_Node_Str")) {
        throw new InvalidValueException("String_Node_Str");
      }
      for (int i=0; i < value.length(); i++) {
        char c=value.charAt(i);
        if (c < 0x21 || c > 0x7E) {
          throw new InvalidValueException("String_Node_Str" + c);
        }
      }
      return value;
    }
  }
;
}

Fixed version (ground truth):
public static ValueChecker createPathChecker(){
  return new ValueChecker(){
    @Override public String check(    String value) throws InvalidValueException {
      if (Strings.isNullOrEmpty(value)) {
        throw new InvalidValueException("String_Node_Str");
      }
      if (!value.startsWith("String_Node_Str")) {
        throw new InvalidValueException("String_Node_Str");
      }
      for (int i=0; i < value.length(); i++) {
        char c=value.charAt(i);
        if (c < 0x21 || c > 0x7E) {
          throw new InvalidValueException("String_Node_Str" + c);
        }
      }
      return value;
    }
  }
;
}
Program: 14552
Project: 14552
Buggy source:
@Override public List<Policy> getPolicies(){
  return null;
}

Fixed version (ground truth):
@Override public List<Policy> getPolicies(){
  return new ArrayList<Policy>();
}
Program: 14553
Project: 14553
Buggy source:
@Override public void saveValue(ArrayList<String> keys,ArrayList<HasValueWidget> values){
  if (values == null || values.size() < 1 || this.currentSelected == null) {
    clientFactory.getShellView().getFooterView().showStatus(StatusType.ERROR,"String_Node_Str",FooterView.DEFAULT_STATUS_CLEAR_DELAY);
  }
  final SearchResultRow result=new SearchResultRow();
  result.setExtraFieldDescs(this.currentSelected.getExtraFieldDescs());
  for (int i=0; i < values.size(); i++) {
    result.addField(values.get(i).getValue());
  }
  this.clientFactory.getShellView().getFooterView().showStatus(StatusType.LOADING,"String_Node_Str",0);
  this.clientFactory.getBackendService().setConfiguration(this.clientFactory.getLocalSession().getSession(),result,new AsyncCallback<Void>(){
    @Override public void onFailure(    Throwable cause){
      ActivityUtil.logoutForInvalidSession(clientFactory,cause);
      clientFactory.getShellView().getFooterView().showStatus(StatusType.ERROR,"String_Node_Str",FooterView.DEFAULT_STATUS_CLEAR_DELAY);
      clientFactory.getShellView().getLogView().log(LogType.ERROR,"String_Node_Str" + result);
    }
    @Override public void onSuccess(    Void arg0){
      clientFactory.getShellView().getFooterView().showStatus(StatusType.NONE,"String_Node_Str",FooterView.DEFAULT_STATUS_CLEAR_DELAY);
      clientFactory.getShellView().getLogView().log(LogType.INFO,"String_Node_Str" + result);
      clientFactory.getShellView().getDetailView().disableSave();
      reloadCurrentRange();
    }
  }
);
}

Fixed version (ground truth):
@Override public void saveValue(ArrayList<String> keys,ArrayList<HasValueWidget> values){
  if (values == null || values.size() < 1 || this.currentSelected == null) {
    clientFactory.getShellView().getFooterView().showStatus(StatusType.ERROR,"String_Node_Str",FooterView.DEFAULT_STATUS_CLEAR_DELAY);
    LOG.log(Level.WARNING,"String_Node_Str");
    return;
  }
  final SearchResultRow result=new SearchResultRow();
  result.setExtraFieldDescs(this.currentSelected.getExtraFieldDescs());
  for (int i=0; i < values.size(); i++) {
    result.addField(values.get(i).getValue());
  }
  this.clientFactory.getShellView().getFooterView().showStatus(StatusType.LOADING,"String_Node_Str",0);
  this.clientFactory.getBackendService().setConfiguration(this.clientFactory.getLocalSession().getSession(),result,new AsyncCallback<Void>(){
    @Override public void onFailure(    Throwable cause){
      ActivityUtil.logoutForInvalidSession(clientFactory,cause);
      clientFactory.getShellView().getFooterView().showStatus(StatusType.ERROR,"String_Node_Str",FooterView.DEFAULT_STATUS_CLEAR_DELAY);
      clientFactory.getShellView().getLogView().log(LogType.ERROR,"String_Node_Str" + result);
    }
    @Override public void onSuccess(    Void arg0){
      clientFactory.getShellView().getFooterView().showStatus(StatusType.NONE,"String_Node_Str",FooterView.DEFAULT_STATUS_CLEAR_DELAY);
      clientFactory.getShellView().getLogView().log(LogType.INFO,"String_Node_Str" + result);
      clientFactory.getShellView().getDetailView().disableSave();
      reloadCurrentRange();
    }
  }
);
}
Program: 14555
Project: 14555
Buggy source:
@Override public void onClick(ClickEvent event){
  HasValueWidget widget=getContentWidget(Type.KEYVAL,keyInput.getValue(),valueInput.getValue(),true);
  addRow(keyInput.getValue(),new Label(keyInput.getValue()),widget,currentGrid.getRowCount() - 1);
  keyInput.setValue(NEW_KEY);
  valueInput.setValue("String_Node_Str");
  showSaveButton();
}

Fixed version (ground truth):
@Override public void onClick(ClickEvent event){
  HasValueWidget widget=getContentWidget(Type.KEYVAL,keyInput.getValue(),valueInput.getValue(),true);
  if (widget == null) {
    LOG.log(Level.WARNING,"String_Node_Str");
    return;
  }
  addRow(keyInput.getValue(),new Label(keyInput.getValue()),widget,currentGrid.getRowCount() - 1);
  keyInput.setValue(NEW_KEY);
  valueInput.setValue("String_Node_Str");
  showSaveButton();
}
Program: 14556
Project: 14556
Buggy source:
private void addNewKeyValRow(final int rowIndex){
  LOG.log(Level.INFO,"String_Node_Str");
  final TextBox keyInput=new TextBox();
  keyInput.setValue(NEW_KEY);
  final InputWithButton valueInput=new InputWithButton();
  valueInput.setType(IconButton.Type.add);
  valueInput.addClickHandler(new ClickHandler(){
    @Override public void onClick(    ClickEvent event){
      HasValueWidget widget=getContentWidget(Type.KEYVAL,keyInput.getValue(),valueInput.getValue(),true);
      addRow(keyInput.getValue(),new Label(keyInput.getValue()),widget,currentGrid.getRowCount() - 1);
      keyInput.setValue(NEW_KEY);
      valueInput.setValue("String_Node_Str");
      showSaveButton();
    }
  }
);
  currentGrid.setWidget(rowIndex,0,keyInput);
  currentGrid.setWidget(rowIndex,1,valueInput);
}

Fixed version (ground truth):
private void addNewKeyValRow(final int rowIndex){
  LOG.log(Level.INFO,"String_Node_Str");
  final TextBox keyInput=new TextBox();
  keyInput.setValue(NEW_KEY);
  final InputWithButton valueInput=new InputWithButton();
  valueInput.setType(IconButton.Type.add);
  valueInput.addClickHandler(new ClickHandler(){
    @Override public void onClick(    ClickEvent event){
      HasValueWidget widget=getContentWidget(Type.KEYVAL,keyInput.getValue(),valueInput.getValue(),true);
      if (widget == null) {
        LOG.log(Level.WARNING,"String_Node_Str");
        return;
      }
      addRow(keyInput.getValue(),new Label(keyInput.getValue()),widget,currentGrid.getRowCount() - 1);
      keyInput.setValue(NEW_KEY);
      valueInput.setValue("String_Node_Str");
      showSaveButton();
    }
  }
);
  currentGrid.setWidget(rowIndex,0,keyInput);
  currentGrid.setWidget(rowIndex,1,valueInput);
}
Program: 14557
Project: 14557
Buggy source:
private void displayFields(ArrayList<InputField> fields){
  if (fields == null || fields.size() < 1) {
    return;
  }
  this.fields=fields;
  this.inputs=Lists.newArrayList();
  grid=new Grid(fields.size(),3);
  grid.addStyleName(gridStyle.grid());
  grid.getColumnFormatter().setWidth(0,TITLE_WIDTH);
  grid.getColumnFormatter().setWidth(1,INPUT_WIDTH);
  grid.getColumnFormatter().setWidth(1,INDICATOR_WIDTH);
  for (int i=0; i < fields.size(); i++) {
    InputField field=fields.get(i);
    if (field == null) {
      continue;
    }
    grid.setText(i,0,field.getTitle());
    HasValueWidget widget=getHasValueWidget(field.getType(),field.getChecker());
    inputs.add(widget);
    grid.setWidget(i,1,widget.getWidget());
    grid.setHTML(i,2,"String_Node_Str");
  }
  this.contentPanel.setWidget(grid);
}

Fixed version (ground truth):
private void displayFields(ArrayList<InputField> fields){
  if (fields == null || fields.size() < 1) {
    return;
  }
  this.fields=fields;
  this.inputs=Lists.newArrayList();
  grid=new Grid(fields.size(),3);
  grid.addStyleName(gridStyle.grid());
  grid.getColumnFormatter().setWidth(0,TITLE_WIDTH);
  grid.getColumnFormatter().setWidth(1,INPUT_WIDTH);
  grid.getColumnFormatter().setWidth(1,INDICATOR_WIDTH);
  for (int i=0; i < fields.size(); i++) {
    InputField field=fields.get(i);
    if (field == null) {
      continue;
    }
    grid.setText(i,0,field.getTitle());
    HasValueWidget widget=getHasValueWidget(field.getType(),field.getChecker());
    if (widget == null) {
      LOG.log(Level.WARNING,"String_Node_Str" + field.getType());
      continue;
    }
    inputs.add(widget);
    grid.setWidget(i,1,widget.getWidget());
    grid.setHTML(i,2,"String_Node_Str");
  }
  this.contentPanel.setWidget(grid);
}
Program: 14558
Project: 14558
Buggy source:
private static SearchResultRow serializePolicy(Policy policy,Account account,Group group,User user){
  SearchResultRow result=new SearchResultRow();
  result.addField(policy.getPolicyId());
  result.addField(policy.getName());
  result.addField(policy.getVersion());
  result.addField(account != null ? account.getName() : "String_Node_Str");
  result.addField(group != null ? group.getName() : "String_Node_Str");
  result.addField(user != null ? user.getName() : "String_Node_Str");
  if (user != null) {
    result.addField(QueryBuilder.get().start(QueryType.user).add(ID,user.getUserId()).url());
  }
 else   if (group != null) {
    result.addField(QueryBuilder.get().start(QueryType.group).add(ID,group.getGroupId()).url());
  }
 else {
    result.addField(QueryBuilder.get().start(QueryType.account).add(ID,account.getAccountNumber()).url());
  }
  result.addField(policy.getText());
  return result;
}

Fixed version (ground truth):
private static SearchResultRow serializePolicy(Policy policy,Account account,Group group,User user){
  SearchResultRow result=new SearchResultRow();
  result.addField(policy.getPolicyId());
  result.addField(policy.getName());
  result.addField(policy.getVersion());
  result.addField(account != null ? account.getName() : "String_Node_Str");
  result.addField(group != null ? group.getName() : "String_Node_Str");
  result.addField(user != null ? user.getName() : "String_Node_Str");
  if (user != null) {
    result.addField(QueryBuilder.get().start(QueryType.user).add(ID,user.getUserId()).url());
  }
 else   if (group != null) {
    result.addField(QueryBuilder.get().start(QueryType.group).add(ID,group.getGroupId()).url());
  }
 else   if (account != null) {
    result.addField(QueryBuilder.get().start(QueryType.account).add(ID,account.getAccountNumber()).url());
  }
 else {
    result.addField("String_Node_Str");
  }
  result.addField(policy.getText());
  return result;
}
Program: 14559
Project: 14559
Buggy source:
public static ValueChecker createPathChecker(){
  return new ValueChecker(){
    @Override public String check(    String value) throws InvalidValueException {
      if (value != null && !value.startsWith("String_Node_Str")) {
        throw new InvalidValueException("String_Node_Str");
      }
      for (int i=0; i < value.length(); i++) {
        char c=value.charAt(i);
        if (c < 0x21 || c > 0x7E) {
          throw new InvalidValueException("String_Node_Str" + c);
        }
      }
      return value;
    }
  }
;
}

Fixed version (ground truth):
public static ValueChecker createPathChecker(){
  return new ValueChecker(){
    @Override public String check(    String value) throws InvalidValueException {
      if (Strings.isNullOrEmpty(value)) {
        throw new InvalidValueException("String_Node_Str");
      }
      if (!value.startsWith("String_Node_Str")) {
        throw new InvalidValueException("String_Node_Str");
      }
      for (int i=0; i < value.length(); i++) {
        char c=value.charAt(i);
        if (c < 0x21 || c > 0x7E) {
          throw new InvalidValueException("String_Node_Str" + c);
        }
      }
      return value;
    }
  }
;
}
Program: 14560
Project: 14560
Buggy source:
@Override public void fire(final VmRunResponseType reply){
  Logs.extreme().error(reply);
  if (!reply.get_return()) {
    throw new EucalyptusClusterException("String_Node_Str" + this.getRequest().getInstanceId());
  }
  Function<VmRunResponseType,Boolean> redeemToken=new Function<VmRunResponseType,Boolean>(){
    @Override public Boolean apply(    final VmRunResponseType reply){
      try {
        VmRunCallback.this.token.redeem();
      }
 catch (      Exception ex) {
        Logs.extreme().error(ex,ex);
      }
      for (      final VmInfo vmInfo : reply.getVms()) {
        final VmInstance vm=VmInstances.lookup(vmInfo.getInstanceId());
        vm.updateAddresses(vmInfo.getNetParams().getIpAddress(),vmInfo.getNetParams().getIgnoredPublicIp());
      }
      return true;
    }
  }
;
  try {
    Entities.asTransaction(VmInstance.class,redeemToken).apply(reply);
  }
 catch (  RuntimeException ex) {
    LOG.error(ex,ex);
    throw ex;
  }
}

Fixed version (ground truth):
@Override public void fire(final VmRunResponseType reply){
  Logs.extreme().error(reply);
  if (!reply.get_return()) {
    this.token.abort();
    throw new EucalyptusClusterException("String_Node_Str" + this.getRequest().getInstanceId());
  }
  Function<VmRunResponseType,Boolean> redeemToken=new Function<VmRunResponseType,Boolean>(){
    @Override public Boolean apply(    final VmRunResponseType reply){
      try {
        VmRunCallback.this.token.redeem();
      }
 catch (      Exception ex) {
        LOG.error(ex);
        Logs.extreme().error(ex,ex);
      }
      for (      final VmInfo vmInfo : reply.getVms()) {
        final VmInstance vm=VmInstances.lookup(vmInfo.getInstanceId());
        vm.updateAddresses(vmInfo.getNetParams().getIpAddress(),vmInfo.getNetParams().getIgnoredPublicIp());
      }
      return true;
    }
  }
;
  try {
    Entities.asTransaction(VmInstance.class,redeemToken).apply(reply);
  }
 catch (  RuntimeException ex) {
    LOG.error(ex,ex);
    throw ex;
  }
}
Program: 14561
Project: 14561
Buggy source:
@Override public void fireException(final Throwable e){
  LOG.debug(LogUtil.header("String_Node_Str" + e.getMessage()),e);
  LOG.debug(LogUtil.subheader(VmRunCallback.this.getRequest().toString()));
  Predicate<Throwable> rollbackToken=new Predicate<Throwable>(){
    @Override public boolean apply(    Throwable input){
      LOG.debug("String_Node_Str");
      try {
        VmRunCallback.this.token.release();
      }
 catch (      final Exception ex) {
        LOG.error(ex.getMessage());
        Logs.extreme().error(ex,ex);
      }
      return true;
    }
  }
;
  Predicate<Throwable> rollbackAddr=new Predicate<Throwable>(){
    @Override public boolean apply(    Throwable input){
      final Address addr=VmRunCallback.this.token.getAddress();
      LOG.debug("String_Node_Str" + addr);
      try {
        addr.release();
      }
 catch (      final Exception ex) {
        LOG.error(ex.getMessage());
        Logs.extreme().error(ex,ex);
      }
      return true;
    }
  }
;
  try {
    Entities.asTransaction(VmInstance.class,Functions.forPredicate(Predicates.and(rollbackToken,rollbackAddr))).apply(e);
  }
 catch (  Exception ex) {
    Logs.extreme().error(ex,ex);
  }
}

Fixed version (ground truth):
@Override public void fireException(final Throwable e){
  LOG.debug(LogUtil.header("String_Node_Str" + e.getMessage()),e);
  LOG.debug(LogUtil.subheader(VmRunCallback.this.getRequest().toString()));
  Predicate<Throwable> rollbackToken=new Predicate<Throwable>(){
    @Override public boolean apply(    Throwable input){
      LOG.debug("String_Node_Str");
      try {
        VmRunCallback.this.token.abort();
      }
 catch (      final Exception ex) {
        LOG.error(ex.getMessage());
        Logs.extreme().error(ex,ex);
      }
      return true;
    }
  }
;
  Predicate<Throwable> rollbackAddr=new Predicate<Throwable>(){
    @Override public boolean apply(    Throwable input){
      final Address addr=VmRunCallback.this.token.getAddress();
      LOG.debug("String_Node_Str" + addr);
      try {
        addr.release();
      }
 catch (      final Exception ex) {
        LOG.error(ex.getMessage());
        Logs.extreme().error(ex,ex);
      }
      return true;
    }
  }
;
  try {
    Entities.asTransaction(VmInstance.class,Functions.forPredicate(Predicates.and(rollbackToken,rollbackAddr))).apply(e);
  }
 catch (  Exception ex) {
    Logs.extreme().error(ex,ex);
  }
}
Program: 14563
Project: 14563
Buggy source:
@Override public void initialize(Q request) throws Exception {
  if (Logs.isExtrrreeeme()) {
    Logs.exhaust().debug(cb.getClass().getCanonicalName() + "String_Node_Str" + request);
  }
  try {
    cb.initialize(request);
  }
 catch (  Exception ex) {
    Logs.extreme().error(ex,ex);
    AsyncRequest.this.result.setException(ex);
    AsyncRequest.this.callbackSequence.fireException(ex);
  }
}

Fixed version (ground truth):
@Override public void initialize(Q request) throws Exception {
  Logs.extreme().debug(cb.getClass().getCanonicalName() + "String_Node_Str" + request);
  try {
    cb.initialize(request);
  }
 catch (  Exception ex) {
    Logs.extreme().error(ex,ex);
    AsyncRequest.this.result.setException(ex);
    AsyncRequest.this.callbackSequence.fireException(ex);
    throw ex;
  }
}
Program: 14564
Project: 14564
Buggy source:
@SuppressWarnings("String_Node_Str") private void queueEvents(final E state){
  for (  final Request event : this.messages.get(state)) {
    EventRecord.caller(StatefulMessageSet.class,EventType.VM_STARTING,state.name(),event.getCallback().toString()).debug();
    if (event.getCallback() instanceof BroadcastCallback) {
      final BroadcastCallback callback=(BroadcastCallback)event.getCallback();
      this.pendingEvents.addAll(Lists.transform(Clusters.getInstance().listValues(),new Function<Cluster,CheckedListenableFuture>(){
        @Override public CheckedListenableFuture apply(        final Cluster c){
          EventRecord.caller(StatefulMessageSet.class,EventType.VM_STARTING,state.name(),c.getName(),event.getClass().getSimpleName(),event.getRequest().toSimpleString()).info();
          EventRecord.caller(StatefulMessageSet.class,EventType.VM_STARTING,state.name(),c.getName(),event.getClass().getSimpleName(),event.getRequest()).debug();
          final Request request=AsyncRequests.newRequest(callback.newInstance());
          request.getRequest().regardingUserRequest(callback.getRequest());
          return request.dispatch(c.getConfiguration());
        }
      }
));
    }
 else {
      EventRecord.caller(StatefulMessageSet.class,EventType.VM_STARTING,state.name(),this.cluster.getName(),event.getClass().getSimpleName(),event.getRequest().toSimpleString()).info();
      EventRecord.caller(StatefulMessageSet.class,EventType.VM_STARTING,state.name(),this.cluster.getName(),event.getClass().getSimpleName(),event.getRequest()).debug();
      this.pendingEvents.add(event.dispatch(this.cluster.getConfiguration()));
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void queueEvents(final E state){
  for (  final Request event : this.messages.get(state)) {
    EventRecord.caller(StatefulMessageSet.class,EventType.VM_STARTING,state.name(),event.getCallback().toString()).debug();
    if (event.getCallback() instanceof BroadcastCallback) {
      final BroadcastCallback callback=(BroadcastCallback)event.getCallback();
      this.pendingEvents.addAll(Lists.transform(Clusters.getInstance().listValues(),new Function<Cluster,CheckedListenableFuture>(){
        @Override public CheckedListenableFuture apply(        final Cluster c){
          LOG.debug("String_Node_Str" + state.name() + "String_Node_Str"+ c.getName()+ "String_Node_Str"+ event.getClass().getSimpleName()+ "String_Node_Str"+ event.getCallback());
          final Request request=AsyncRequests.newRequest(callback.newInstance());
          request.getRequest().regardingUserRequest(callback.getRequest());
          return request.dispatch(c.getConfiguration());
        }
      }
));
    }
 else {
      LOG.debug("String_Node_Str" + state.name() + "String_Node_Str"+ this.cluster.getName()+ "String_Node_Str"+ event.getClass().getSimpleName()+ "String_Node_Str"+ event.getCallback());
      this.pendingEvents.add(event.dispatch(this.cluster.getConfiguration()));
    }
  }
}
Program: 14565
Project: 14565
Buggy source:
@Override public CheckedListenableFuture apply(final Cluster c){
  EventRecord.caller(StatefulMessageSet.class,EventType.VM_STARTING,state.name(),c.getName(),event.getClass().getSimpleName(),event.getRequest().toSimpleString()).info();
  EventRecord.caller(StatefulMessageSet.class,EventType.VM_STARTING,state.name(),c.getName(),event.getClass().getSimpleName(),event.getRequest()).debug();
  final Request request=AsyncRequests.newRequest(callback.newInstance());
  request.getRequest().regardingUserRequest(callback.getRequest());
  return request.dispatch(c.getConfiguration());
}

Fixed version (ground truth):
@Override public CheckedListenableFuture apply(final Cluster c){
  LOG.debug("String_Node_Str" + state.name() + "String_Node_Str"+ c.getName()+ "String_Node_Str"+ event.getClass().getSimpleName()+ "String_Node_Str"+ event.getCallback());
  final Request request=AsyncRequests.newRequest(callback.newInstance());
  request.getRequest().regardingUserRequest(callback.getRequest());
  return request.dispatch(c.getConfiguration());
}
Program: 14566
Project: 14566
Buggy source:
/** 
 * @see com.eucalyptus.util.async.Request#dispatch(java.lang.String)
 * @param cluster
 * @return
 */
@Override public CheckedListenableFuture<R> dispatch(final ServiceConfiguration serviceConfig){
  Callable<CheckedListenableFuture<R>> call=new Callable<CheckedListenableFuture<R>>(){
    @Override public String toString(){
      return AsyncRequest.class.getSimpleName() + "String_Node_Str" + serviceConfig.getFullName()+ "String_Node_Str"+ AsyncRequest.this.getRequest().toSimpleString();
    }
    @Override public CheckedListenableFuture<R> call() throws Exception {
      return AsyncRequest.this.execute(serviceConfig).getResponse();
    }
  }
;
  try {
    Future<CheckedListenableFuture<R>> res=Threads.enqueue(serviceConfig,call);
    return this.getResponse();
  }
 catch (  Exception ex1) {
    Logs.extreme().error(ex1,ex1);
    Future<CheckedListenableFuture<R>> res=Threads.lookup(Empyrean.class,AsyncRequest.class,serviceConfig.getFullName().toString()).limitTo(NUM_WORKERS).submit(call);
    return this.getResponse();
  }
}

Fixed version (ground truth):
/** 
 * @see com.eucalyptus.util.async.Request#dispatch(java.lang.String)
 * @param cluster
 * @return
 */
@Override public CheckedListenableFuture<R> dispatch(final ServiceConfiguration serviceConfig){
  Callable<CheckedListenableFuture<R>> call=new Callable<CheckedListenableFuture<R>>(){
    @Override public String toString(){
      return AsyncRequest.class.getSimpleName() + "String_Node_Str" + serviceConfig.getFullName()+ "String_Node_Str"+ AsyncRequest.this.getRequest().toSimpleString();
    }
    @Override public CheckedListenableFuture<R> call() throws Exception {
      try {
        Request<Q,R> execute=AsyncRequest.this.execute(serviceConfig);
        return execute.getResponse();
      }
 catch (      Exception ex) {
        AsyncRequest.this.result.setException(ex);
        LOG.error(ex);
        Logs.extreme().error(ex,ex);
        throw ex;
      }
    }
  }
;
  try {
    Future<CheckedListenableFuture<R>> res=Threads.enqueue(serviceConfig,call);
    return this.getResponse();
  }
 catch (  Exception ex1) {
    LOG.error(ex1);
    Logs.extreme().error(ex1,ex1);
    Future<CheckedListenableFuture<R>> res=Threads.lookup(Empyrean.class,AsyncRequest.class,serviceConfig.getFullName().toString()).limitTo(NUM_WORKERS).submit(call);
    return this.getResponse();
  }
}
Program: 14567
Project: 14567
Buggy source:
@Override public CheckedListenableFuture<R> call() throws Exception {
  return AsyncRequest.this.execute(serviceConfig).getResponse();
}

Fixed version (ground truth):
@Override public CheckedListenableFuture<R> call() throws Exception {
  try {
    Request<Q,R> execute=AsyncRequest.this.execute(serviceConfig);
    return execute.getResponse();
  }
 catch (  Exception ex) {
    AsyncRequest.this.result.setException(ex);
    LOG.error(ex);
    Logs.extreme().error(ex,ex);
    throw ex;
  }
}
Program: 14569
Project: 14569
Buggy source:
private static String getAuthKeyString(UserFullName userName,String keyName,KeyPair newKeys){
  RSAPublicKey publicKey=(RSAPublicKey)newKeys.getPublic();
  byte[] keyType="String_Node_Str".getBytes();
  byte[] expBlob=publicKey.getPublicExponent().toByteArray();
  byte[] modBlob=publicKey.getModulus().toByteArray();
  byte[] authKeyBlob=new byte[3 * 4 + keyType.length + expBlob.length + modBlob.length];
  byte[] lenArray=null;
  lenArray=BigInteger.valueOf(keyType.length).toByteArray();
  System.arraycopy(lenArray,0,authKeyBlob,4 - lenArray.length,lenArray.length);
  System.arraycopy(keyType,0,authKeyBlob,4,keyType.length);
  lenArray=BigInteger.valueOf(expBlob.length).toByteArray();
  System.arraycopy(lenArray,0,authKeyBlob,4 + keyType.length + 4 - lenArray.length,lenArray.length);
  System.arraycopy(expBlob,0,authKeyBlob,4 + (4 + keyType.length),expBlob.length);
  lenArray=BigInteger.valueOf(modBlob.length).toByteArray();
  System.arraycopy(lenArray,0,authKeyBlob,4 + expBlob.length + 4+ keyType.length+ 4 - lenArray.length,lenArray.length);
  System.arraycopy(modBlob,0,authKeyBlob,4 + (4 + expBlob.length + (4 + keyType.length)),modBlob.length);
  String authKeyString=String.format("String_Node_Str",new String(keyType),new String(Base64.encode(authKeyBlob)),keyName,userName.toString());
  return authKeyString;
}

Fixed version (ground truth):
private static String getAuthKeyString(UserFullName userName,String keyName,KeyPair newKeys){
  RSAPublicKey publicKey=(RSAPublicKey)newKeys.getPublic();
  byte[] keyType="String_Node_Str".getBytes();
  byte[] expBlob=publicKey.getPublicExponent().toByteArray();
  byte[] modBlob=publicKey.getModulus().toByteArray();
  byte[] authKeyBlob=new byte[3 * 4 + keyType.length + expBlob.length + modBlob.length];
  byte[] lenArray=null;
  lenArray=BigInteger.valueOf(keyType.length).toByteArray();
  System.arraycopy(lenArray,0,authKeyBlob,4 - lenArray.length,lenArray.length);
  System.arraycopy(keyType,0,authKeyBlob,4,keyType.length);
  lenArray=BigInteger.valueOf(expBlob.length).toByteArray();
  System.arraycopy(lenArray,0,authKeyBlob,4 + keyType.length + 4 - lenArray.length,lenArray.length);
  System.arraycopy(expBlob,0,authKeyBlob,4 + (4 + keyType.length),expBlob.length);
  lenArray=BigInteger.valueOf(modBlob.length).toByteArray();
  System.arraycopy(lenArray,0,authKeyBlob,4 + expBlob.length + 4+ keyType.length+ 4 - lenArray.length,lenArray.length);
  System.arraycopy(modBlob,0,authKeyBlob,4 + (4 + expBlob.length + (4 + keyType.length)),modBlob.length);
  String authKeyString=String.format("String_Node_Str",new String(keyType),new String(Base64.encode(authKeyBlob)),userName.getAccountNumber(),keyName);
  return authKeyString;
}
Program: 14570
Project: 14570
Buggy source:
public static ExtantNetwork bogus(final NetworkGroup networkGroup){
  return new ExtantNetwork(networkGroup,-1);
}

Fixed version (ground truth):
public static ExtantNetwork bogus(final NetworkGroup networkGroup){
  for (; ; ) {
    final EntityTransaction db=Entities.get(ExtantNetwork.class);
    try {
      final ExtantNetwork net=Entities.uniqueResult(new ExtantNetwork(bogusTag.decrementAndGet()));
      db.rollback();
    }
 catch (    final Exception ex) {
      db.rollback();
      return new ExtantNetwork(networkGroup,bogusTag.get());
    }
  }
}
Program: 14571
Project: 14571
Buggy source:
public ExtantNetwork extantNetwork() throws NotEnoughResourcesException, TransientEntityException {
  if (!NetworkGroups.networkingConfiguration().hasNetworking()) {
    return ExtantNetwork.bogus(this);
  }
 else   if (!Entities.isPersistent(this)) {
    throw new TransientEntityException(this.toString());
  }
 else {
    ExtantNetwork exNet=this.getExtantNetwork();
    if (exNet == null) {
      for (      Integer i : Numbers.shuffled(NetworkGroups.networkTagInterval())) {
        try {
          Entities.uniqueResult(ExtantNetwork.named(i));
          continue;
        }
 catch (        Exception ex) {
          exNet=ExtantNetwork.create(this,i);
          Entities.persist(exNet);
          this.setExtantNetwork(exNet);
          return this.getExtantNetwork();
        }
      }
      throw new NotEnoughResourcesException("String_Node_Str" + this.getFullName() + "String_Node_Str");
    }
 else {
      return this.getExtantNetwork();
    }
  }
}

Fixed version (ground truth):
public ExtantNetwork extantNetwork() throws NotEnoughResourcesException, TransientEntityException {
  if (!NetworkGroups.networkingConfiguration().hasNetworking()) {
    ExtantNetwork bogusNet=ExtantNetwork.bogus(this);
    if (!this.hasExtantNetwork())     this.setExtantNetwork(bogusNet);
    return bogusNet;
  }
 else   if (!Entities.isPersistent(this)) {
    throw new TransientEntityException(this.toString());
  }
 else {
    ExtantNetwork exNet=this.getExtantNetwork();
    if (exNet == null) {
      for (      Integer i : Numbers.shuffled(NetworkGroups.networkTagInterval())) {
        try {
          Entities.uniqueResult(ExtantNetwork.named(i));
          continue;
        }
 catch (        Exception ex) {
          exNet=ExtantNetwork.create(this,i);
          Entities.persist(exNet);
          this.setExtantNetwork(exNet);
          return this.getExtantNetwork();
        }
      }
      throw new NotEnoughResourcesException("String_Node_Str" + this.getFullName() + "String_Node_Str");
    }
 else {
      return this.getExtantNetwork();
    }
  }
}
Program: 14572
Project: 14572
Buggy source:
public static void cleanUp(final VmInstance vm){
  LOG.trace(Logs.dump(vm));
  LOG.trace(Threads.currentStackString());
  try {
    final Cluster cluster=Clusters.lookup(Topology.lookup(ClusterController.class,vm.lookupPartition()));
    VmInstances.cleanUpAttachedVolumes(vm);
    Address address=null;
    final Request<TerminateInstancesType,TerminateInstancesResponseType> req=AsyncRequests.newRequest(new TerminateCallback(vm.getInstanceId()));
    if (NetworkGroups.networkingConfiguration().hasNetworking()) {
      try {
        address=Addresses.getInstance().lookup(vm.getPublicAddress());
      }
 catch (      final NoSuchElementException e) {
      }
catch (      final Throwable e1) {
        LOG.debug(e1,e1);
      }
    }
    req.then(VmInstances.getCleanUpCallback(address,vm,cluster));
    req.dispatch(cluster.getConfiguration());
  }
 catch (  final Throwable e) {
    LOG.error(e,e);
  }
}

Fixed version (ground truth):
public static void cleanUp(final VmInstance vm){
  LOG.trace(Logs.dump(vm));
  LOG.info("String_Node_Str" + vm.getInstanceId(),new RuntimeException());
  try {
    final Cluster cluster=Clusters.lookup(Topology.lookup(ClusterController.class,vm.lookupPartition()));
    VmInstances.cleanUpAttachedVolumes(vm);
    Address address=null;
    final Request<TerminateInstancesType,TerminateInstancesResponseType> req=AsyncRequests.newRequest(new TerminateCallback(vm.getInstanceId()));
    if (NetworkGroups.networkingConfiguration().hasNetworking()) {
      try {
        address=Addresses.getInstance().lookup(vm.getPublicAddress());
      }
 catch (      final NoSuchElementException e) {
      }
catch (      final Throwable e1) {
        LOG.debug(e1,e1);
      }
    }
    req.then(VmInstances.getCleanUpCallback(address,vm,cluster));
    req.dispatch(cluster.getConfiguration());
  }
 catch (  final Throwable e) {
    LOG.error(e,e);
  }
}
Program: 14573
Project: 14573
Buggy source:
@Override public Set<String> get(){
  return Sets.newHashSet(Collections2.transform(Hosts.listDatabases(),Hosts.NameTransform.INSTANCE));
}

Fixed version (ground truth):
@Override public abstract Set<String> get();
Program: 14574
Project: 14574
Buggy source:
@Override public Set<String> get(){
  return Sets.newHashSet(Collections2.transform(Hosts.listDatabases(),Hosts.NameTransform.INSTANCE));
}

Fixed version (ground truth):
@Override public abstract Set<String> get();
Program: 14575
Project: 14575
Buggy source:
public boolean isSystemAdmin(){
  return "String_Node_Str".equals(userName) && "String_Node_Str".equals(accountName);
}

Fixed version (ground truth):
public boolean isSystemAdmin(){
  return "String_Node_Str".equals(accountName);
}
Program: 14576
Project: 14576
Buggy source:
public static void addUserToGroupById(User requestUser,String userId,String groupName) throws EucalyptusServiceException {
  try {
    User user=Accounts.lookupUserById(userId);
    Account account=user.getAccount();
    Group group=account.lookupGroupByName(groupName);
    Privileged.removeUserFromGroup(requestUser,account,user,group);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str" + userId + "String_Node_Str"+ groupName,e);
    LOG.debug(e,e);
    throw new EucalyptusServiceException("String_Node_Str" + userId + "String_Node_Str"+ e.getMessage()+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public static void addUserToGroupById(User requestUser,String userId,String groupName) throws EucalyptusServiceException {
  try {
    User user=Accounts.lookupUserById(userId);
    Account account=user.getAccount();
    Group group=account.lookupGroupByName(groupName);
    Privileged.addUserToGroup(requestUser,account,user,group);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str" + userId + "String_Node_Str"+ groupName,e);
    LOG.debug(e,e);
    throw new EucalyptusServiceException("String_Node_Str" + userId + "String_Node_Str"+ e.getMessage()+ "String_Node_Str");
  }
}
Program: 14577
Project: 14577
Buggy source:
public boolean isSystemAdmin(){
  return "String_Node_Str".equals(userName) && "String_Node_Str".equals(accountName);
}

Fixed version (ground truth):
public boolean isSystemAdmin(){
  return Account.SYSTEM_ACCOUNT.equals(accountName);
}
Program: 14578
Project: 14578
Buggy source:
public static void addUserToGroupById(User requestUser,String userId,String groupName) throws EucalyptusServiceException {
  try {
    User user=Accounts.lookupUserById(userId);
    Account account=user.getAccount();
    Group group=account.lookupGroupByName(groupName);
    Privileged.removeUserFromGroup(requestUser,account,user,group);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str" + userId + "String_Node_Str"+ groupName,e);
    LOG.debug(e,e);
    throw new EucalyptusServiceException("String_Node_Str" + userId + "String_Node_Str"+ e.getMessage()+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public static void addUserToGroupById(User requestUser,String userId,String groupName) throws EucalyptusServiceException {
  try {
    User user=Accounts.lookupUserById(userId);
    Account account=user.getAccount();
    Group group=account.lookupGroupByName(groupName);
    Privileged.addUserToGroup(requestUser,account,user,group);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str" + userId + "String_Node_Str"+ groupName,e);
    LOG.debug(e,e);
    throw new EucalyptusServiceException("String_Node_Str" + userId + "String_Node_Str"+ e.getMessage()+ "String_Node_Str");
  }
}
Program: 14580
Project: 14580
Buggy source:
@Override public void fireEvent(final Event event){
  if (!Bootstrap.isFinished()) {
    LOG.info(this.getFullName() + "String_Node_Str");
  }
 else   if (event instanceof Hertz) {
    this.fireClockTick((Hertz)event);
  }
}

Fixed version (ground truth):
@Override public void fireEvent(final Event event){
  if (!Bootstrap.isFinished()) {
    LOG.info(this.getFullName() + "String_Node_Str");
  }
 else   if (Hosts.isCoordinator() && event instanceof Hertz) {
    this.fireClockTick((Hertz)event);
  }
}
Program: 14581
Project: 14581
Buggy source:
private static void fireCallback(final Cluster parent,final ServiceConfiguration config,final boolean doCoordinatorCheck,final SubjectRemoteCallbackFactory<RemoteCallback,Cluster> factory,final Callback.Completion transitionCallback){
  RemoteCallback messageCallback=null;
  try {
    if (!doCoordinatorCheck || checkCoordinator(transitionCallback)) {
      try {
        messageCallback=factory.newInstance();
        try {
          BaseMessage baseMessage=AsyncRequests.newRequest(messageCallback).sendSync(config);
          transitionCallback.fire();
          if (Logs.isExtrrreeeme()) {
            Logs.extreme().debug(baseMessage);
          }
        }
 catch (        final Exception t) {
          if (!parent.swallowException(t)) {
            transitionCallback.fireException(Exceptions.unwrapCause(t));
          }
 else {
            transitionCallback.fire();
          }
        }
      }
 catch (      CancellationException ex) {
        transitionCallback.fire();
      }
catch (      Exception ex) {
        transitionCallback.fireException(ex);
      }
    }
  }
  finally {
    if (!transitionCallback.isDone()) {
      LOG.debug(parent.getFullName() + "String_Node_Str" + messageCallback);
      Logs.exhaust().debug(Exceptions.toUndeclared(parent.getFullName() + "String_Node_Str" + messageCallback));
      transitionCallback.fire();
    }
  }
}

Fixed version (ground truth):
private static void fireCallback(final Cluster parent,final ServiceConfiguration config,final boolean doCoordinatorCheck,final SubjectRemoteCallbackFactory<RemoteCallback,Cluster> factory,final Callback.Completion transitionCallback){
  RemoteCallback messageCallback=null;
  try {
    if (!doCoordinatorCheck || checkCoordinator(transitionCallback)) {
      try {
        messageCallback=factory.newInstance();
        try {
          BaseMessage baseMessage=AsyncRequests.newRequest(messageCallback).sendSync(config);
          transitionCallback.fire();
          if (Logs.isExtrrreeeme()) {
            Logs.extreme().debug(baseMessage);
          }
        }
 catch (        final Exception t) {
          if (!parent.swallowException(t)) {
            transitionCallback.fireException(Exceptions.unwrapCause(t));
          }
 else {
            transitionCallback.fire();
          }
        }
      }
 catch (      CancellationException ex) {
        transitionCallback.fire();
      }
catch (      Exception ex) {
        transitionCallback.fireException(ex);
      }
    }
 else {
      transitionCallback.fire();
    }
  }
  finally {
    if (!transitionCallback.isDone()) {
      LOG.debug(parent.getFullName() + "String_Node_Str" + messageCallback);
      Logs.exhaust().debug(Exceptions.toUndeclared(parent.getFullName() + "String_Node_Str" + messageCallback));
      transitionCallback.fire();
    }
  }
}
Program: 14582
Project: 14582
Buggy source:
public void disable() throws ServiceRegistrationException {
  try {
    if (State.NOTREADY.equals(this.getStateMachine().getState())) {
      Automata.sequenceTransitions(this,State.NOTREADY,State.DISABLED).call().get();
    }
 else     if (State.ENABLED.equals(this.getStateMachine().getState())) {
      Automata.sequenceTransitions(this,State.ENABLED,State.DISABLED).call().get();
    }
  }
 catch (  final InterruptedException ex) {
    Thread.currentThread().interrupt();
  }
catch (  final Exception ex) {
    Logs.exhaust().debug(ex,ex);
    throw new ServiceRegistrationException("String_Node_Str" + this.configuration + "String_Node_Str"+ ex.getMessage(),ex);
  }
 finally {
    try {
      Clusters.getInstance().disable(this.getName());
    }
 catch (    Exception ex) {
    }
  }
}

Fixed version (ground truth):
public void disable() throws ServiceRegistrationException {
  try {
    if (State.NOTREADY.equals(this.getStateMachine().getState())) {
      Automata.sequenceTransitions(this,State.NOTREADY,State.DISABLED).call().get();
    }
 else     if (State.ENABLED.equals(this.getStateMachine().getState())) {
      Automata.sequenceTransitions(this,State.ENABLED,State.DISABLED).call().get();
    }
  }
 catch (  final InterruptedException ex) {
    Thread.currentThread().interrupt();
  }
catch (  final Exception ex) {
    Logs.exhaust().debug(ex,ex);
  }
 finally {
    try {
      Clusters.getInstance().disable(this.getName());
    }
 catch (    Exception ex) {
    }
  }
}
Program: 14583
Project: 14583
Buggy source:
@Override public Boolean isHostLocal(){
  return true;
}

Fixed version (ground truth):
@Override public Boolean isHostLocal(){
  return BootstrapArgs.isCloudController();
}
Program: 14584
Project: 14584
Buggy source:
public boolean isSystem(){
  ClusterConfiguration cConfig=new ClusterConfiguration();
  cConfig.setSourceHostName(this.requestIp);
  EntityTransaction db=Entities.get(ClusterConfiguration.class);
  try {
    ClusterConfiguration ccAddresses=Entities.uniqueResult(cConfig);
    if (ccAddresses.getSourceHostName().equals(this.requestIp) || ccAddresses.getHostName().equals(this.requestIp)) {
      db.commit();
      return true;
    }
 else {
      db.commit();
    }
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str",e);
    db.rollback();
  }
  return false;
}

Fixed version (ground truth):
public boolean isSystem(){
  for (  ServiceConfiguration config : Components.lookup(ClusterController.class).services()) {
    if (config.getHostName().equals(this.requestIp)) {
      return true;
    }
 else     if (config instanceof ClusterConfiguration && ((ClusterConfiguration)config).getSourceHostName().equals(this.requestIp)) {
      return true;
    }
  }
  if (!Databases.isVolatile()) {
    ClusterConfiguration cConfig=new ClusterConfiguration();
    cConfig.setSourceHostName(this.requestIp);
    EntityTransaction db=Entities.get(ClusterConfiguration.class);
    try {
      ClusterConfiguration ccAddresses=Entities.uniqueResult(cConfig);
      if (ccAddresses.getSourceHostName().equals(this.requestIp) || ccAddresses.getHostName().equals(this.requestIp)) {
        db.commit();
        return true;
      }
 else {
        db.commit();
      }
    }
 catch (    Exception e) {
      LOG.debug("String_Node_Str",e);
      db.rollback();
    }
  }
  return false;
}
Program: 14585
Project: 14585
Buggy source:
public MetadataRequest(String requestIp,String requestUrl){
  super();
  try {
    this.requestIp=requestIp;
    String[] path=requestUrl.replaceFirst("String_Node_Str","String_Node_Str").split("String_Node_Str");
    if (path.length > 0) {
      this.metadataName=path[0];
      if (path.length > 1) {
        this.localPath=path[1].replaceFirst("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
      }
 else {
        this.localPath="String_Node_Str";
      }
    }
 else {
      this.metadataName="String_Node_Str";
      this.localPath="String_Node_Str";
    }
    VmInstance findVm=null;
    try {
      findVm=VmInstances.lookupByPublicIp(requestIp);
    }
 catch (    Exception ex2) {
      try {
        findVm=VmInstances.lookupByPrivateIp(requestIp);
      }
 catch (      Exception ex) {
        Logs.exhaust().error(ex);
      }
    }
    this.vm=findVm;
  }
  finally {
    LOG.debug((this.vm != null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str" + this.requestIp+ "String_Node_Str"+ this.metadataName+ "String_Node_Str"+ this.localPath+ "String_Node_Str"+ requestUrl);
  }
}

Fixed version (ground truth):
public MetadataRequest(String requestIp,String requestUrl){
  super();
  try {
    this.requestIp=requestIp;
    String[] path=requestUrl.replaceFirst("String_Node_Str","String_Node_Str").split("String_Node_Str");
    if (path.length > 0) {
      this.metadataName=path[0];
      if (path.length > 1) {
        this.localPath=path[1].replaceFirst("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
      }
 else {
        this.localPath="String_Node_Str";
      }
    }
 else {
      this.metadataName="String_Node_Str";
      this.localPath="String_Node_Str";
    }
    VmInstance findVm=null;
    if (!Databases.isVolatile()) {
      try {
        findVm=VmInstances.lookupByPublicIp(requestIp);
      }
 catch (      Exception ex2) {
        try {
          findVm=VmInstances.lookupByPrivateIp(requestIp);
        }
 catch (        Exception ex) {
          Logs.exhaust().error(ex);
        }
      }
    }
    this.vm=findVm;
  }
  finally {
    LOG.debug((this.vm != null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str" + this.requestIp+ "String_Node_Str"+ this.metadataName+ "String_Node_Str"+ this.localPath+ "String_Node_Str"+ requestUrl);
  }
}
Program: 14587
Project: 14587
Buggy source:
private String getNetworkTopology(){
  return generateTopology();
}

Fixed version (ground truth):
private String getNetworkTopology(){
  if (Databases.isVolatile()) {
    return topoString.get();
  }
 else {
    return topoMemoSupplier.get();
  }
}
Program: 14588
Project: 14588
Buggy source:
public static void awaitSynchronized(){
  if (!isVolatile()) {
    return;
  }
 else {
    Collection<StackTraceElement> stack=Threads.filteredStack(stackFilter);
    String caller=(stack.isEmpty() ? "String_Node_Str" : stack.iterator().next().toString());
    for (int i=0; i < MAX_TX_START_SYNC_RETRIES && isVolatile(); i++) {
      try {
        TimeUnit.MILLISECONDS.sleep(1000);
        LOG.debug("String_Node_Str" + caller);
      }
 catch (      InterruptedException ex) {
        Exceptions.maybeInterrupted(ex);
        return;
      }
    }
    if (!isSynchronized()) {
      throw new DatabaseStateException("String_Node_Str" + Hosts.listDatabases() + "String_Node_Str"+ Joiner.on("String_Node_Str").join(stack));
    }
  }
}

Fixed version (ground truth):
public static void awaitSynchronized(){
  if (!isVolatile()) {
    return;
  }
 else {
    Collection<StackTraceElement> stack=Threads.filteredStack(stackFilter);
    String caller=(stack.isEmpty() ? "String_Node_Str" : stack.iterator().next().toString());
    for (int i=0; i < MAX_TX_START_SYNC_RETRIES && isVolatile(); i++) {
      try {
        TimeUnit.MILLISECONDS.sleep(1000);
        LOG.debug("String_Node_Str" + caller);
      }
 catch (      InterruptedException ex) {
        Exceptions.maybeInterrupted(ex);
        return;
      }
    }
    if (isVolatile()) {
      throw new DatabaseStateException("String_Node_Str" + Hosts.listDatabases() + "String_Node_Str"+ Joiner.on("String_Node_Str").join(stack));
    }
  }
}
Program: 14589
Project: 14589
Buggy source:
private static <T extends ComponentId>boolean teardown(final Class<T> compClass,final InetAddress addr){
  if (Internets.testLocal(addr)) {
    return false;
  }
 else {
    try {
      for (      final ComponentId c : ShouldLoadRemote.findDependentComponents(compClass,addr)) {
        try {
          final ServiceConfiguration dependsConfig=ServiceConfigurations.lookupByName(c.getClass(),addr.getHostAddress());
          Topology.destroy(dependsConfig).get();
        }
 catch (        final Exception ex) {
          LOG.error(ex);
          Logs.extreme().error(ex,ex);
        }
      }
    }
 catch (    final Exception ex) {
      LOG.error(ex,ex);
      return false;
    }
    return true;
  }
}

Fixed version (ground truth):
private static <T extends ComponentId>boolean teardown(final Class<T> compClass,final InetAddress addr){
  if (Internets.testLocal(addr)) {
    return false;
  }
 else {
    try {
      for (      final ComponentId c : ShouldLoadRemote.findDependentComponents(compClass,addr)) {
        try {
          for (          final ServiceConfiguration s : Components.lookup(compClass).services()) {
            try {
              if (s.getHostName().equals(addr.getHostAddress())) {
                Topology.destroy(s).get();
              }
            }
 catch (            final Exception ex) {
              LOG.error(ex);
              Logs.extreme().error(ex,ex);
            }
          }
        }
 catch (        Exception ex) {
          Logs.extreme().error(ex,ex);
        }
      }
    }
 catch (    final Exception ex) {
      LOG.error(ex);
      Logs.extreme().error(ex,ex);
      return false;
    }
    return true;
  }
}