nus-yam/ex-repair huggingface dataset:
Program: 188327
Project: 188327
Buggy source:
protected static <T extends IsIndexed>IterableIndexResult<T> findAll(final Class<T> returnClass,final Filter filter,final Sorter sorter,final Sublist sublist,final Facets facets,final User user,final boolean justActive,List<String> fieldsToReturn){
  return RodaCoreFactory.getIndexService().findAll(returnClass,filter,sorter,sublist,facets,user,justActive,true,fieldsToReturn);
}

Fixed version (ground truth):
protected static <T extends IsIndexed>IterableIndexResult<T> findAll(final Class<T> returnClass,final Filter filter,final Sorter sorter,final Sublist sublist,final Facets facets,final User user,final boolean justActive,List<String> fieldsToReturn){
  return RodaCoreFactory.getIndexService().findAll(returnClass,filter,sorter,sublist,facets,user,justActive,fieldsToReturn);
}
Program: 188328
Project: 188328
Buggy source:
public static ContentPayload getMetadataPayload(TransferredResource transferredResource){
  try {
    Element root=new Element("String_Node_Str");
    org.jdom2.Document doc=new org.jdom2.Document();
    Element child=new Element("String_Node_Str");
    child.setAttribute("String_Node_Str","String_Node_Str");
    child.addContent(escapeContent(transferredResource.getName()));
    root.addContent(child);
    doc.setRootElement(root);
    XMLOutputter outter=new XMLOutputter();
    outter.setFormat(Format.getPrettyFormat());
    outter.outputString(doc);
    return new StringContentPayload(outter.outputString(doc));
  }
 catch (  IllegalDataException e) {
    LOGGER.debug("String_Node_Str",e.getMessage());
    return new StringContentPayload("String_Node_Str");
  }
}

Fixed version (ground truth):
public static ContentPayload getMetadataPayload(TransferredResource transferredResource){
  try {
    Element root=new Element("String_Node_Str");
    org.jdom2.Document doc=new org.jdom2.Document();
    Element child=new Element("String_Node_Str");
    child.setAttribute("String_Node_Str","String_Node_Str");
    child.addContent(transferredResource.getName());
    root.addContent(child);
    doc.setRootElement(root);
    XMLOutputter outter=new XMLOutputter();
    outter.setFormat(Format.getPrettyFormat());
    outter.outputString(doc);
    return new StringContentPayload(outter.outputString(doc));
  }
 catch (  IllegalDataException e) {
    LOGGER.debug("String_Node_Str",e.getMessage());
    return new StringContentPayload("String_Node_Str");
  }
}
Program: 188333
Project: 188333
Buggy source:
private void showRelativeTo(UIObject target,CalloutPosition position,int offsetWidth,int offsetHeight){
  int left;
  int top;
  if (CalloutPosition.BOTTOM_RIGHT.equals(position)) {
    left=target.getAbsoluteLeft() + target.getOffsetWidth() / 2 - offsetWidth + ARROW_OFFSET_PX;
    top=target.getAbsoluteTop() - offsetHeight - MARGIN_FROM_TARGET_PX;
  }
 else   if (CalloutPosition.TOP_RIGHT.equals(position)) {
    left=target.getAbsoluteLeft() + target.getOffsetWidth() / 2 - offsetWidth + ARROW_OFFSET_PX;
    top=target.getAbsoluteTop() + target.getOffsetHeight() + MARGIN_FROM_TARGET_PX;
  }
 else {
    left=0;
    top=0;
  }
  setPopupPosition(left,top);
}

Fixed version (ground truth):
private void showRelativeTo(UIObject target,CalloutPosition position,int offsetWidth,int offsetHeight){
  Pair<Integer,Integer> positionPair=Pair.of(0,0);
  if (CalloutPosition.BOTTOM_RIGHT.equals(position)) {
    positionPair=getBottomRight(target,offsetWidth,offsetHeight);
  }
 else   if (CalloutPosition.TOP_RIGHT.equals(position)) {
    positionPair=getTopRight(target,offsetWidth,offsetHeight);
  }
  setPopupPosition(positionPair.getFirst(),positionPair.getSecond());
}
Program: 188335
Project: 188335
Buggy source:
private Report verifyProducerAuthorization(IndexService index,ModelService model,StorageService storage,List<AIP> aips){
  return executePlugin(index,model,storage,aips,VerifyProducerAuthorizationPlugin.class.getName());
}

Fixed version (ground truth):
private Report verifyProducerAuthorization(IndexService index,ModelService model,StorageService storage,List<AIP> aips){
  return executePlugin(index,model,storage,aips,VerifyUserAuthorizationPlugin.class.getName());
}
Program: 188336
Project: 188336
Buggy source:
String pluginLabel(String name,String version);

Fixed version (ground truth):
String pluginLabel(String name);
Program: 188341
Project: 188341
Buggy source:
@Override public void onSuccess(List<PluginInfo> pluginsInfo){
  Label parameterName=new Label(parameter.getName());
  layout.add(parameterName);
  addHelp();
  FlowPanel radioGroup=new FlowPanel();
  PluginUtils.sortByName(pluginsInfo);
  for (  final PluginInfo pluginInfo : pluginsInfo) {
    if (pluginInfo != null) {
      RadioButton pRadio=new RadioButton(parameter.getName(),messages.pluginLabel(pluginInfo.getName(),pluginInfo.getVersion()));
      if (pluginInfo.getId().equals(parameter.getDefaultValue())) {
        pRadio.setValue(true);
        value=pluginInfo.getId();
      }
      Label pHelp=new Label(pluginInfo.getDescription());
      pRadio.setTitle("String_Node_Str");
      radioGroup.add(pRadio);
      radioGroup.add(pHelp);
      pRadio.addStyleName("String_Node_Str");
      pHelp.addStyleName("String_Node_Str");
      pRadio.addValueChangeHandler(new ValueChangeHandler<Boolean>(){
        @Override public void onValueChange(        ValueChangeEvent<Boolean> event){
          if (event.getValue()) {
            value=pluginInfo.getId();
          }
        }
      }
);
    }
 else {
      GWT.log("String_Node_Str");
    }
  }
  layout.add(radioGroup);
  radioGroup.addStyleName("String_Node_Str");
  parameterName.addStyleName("String_Node_Str");
}

Fixed version (ground truth):
@Override public void onSuccess(List<PluginInfo> pluginsInfo){
  Label parameterName=new Label(parameter.getName());
  layout.add(parameterName);
  addHelp();
  FlowPanel radioGroup=new FlowPanel();
  PluginUtils.sortByName(pluginsInfo);
  for (  final PluginInfo pluginInfo : pluginsInfo) {
    if (pluginInfo != null) {
      RadioButton pRadio=new RadioButton(parameter.getName(),messages.pluginLabelWithVersion(pluginInfo.getName(),pluginInfo.getVersion()));
      if (pluginInfo.getId().equals(parameter.getDefaultValue())) {
        pRadio.setValue(true);
        value=pluginInfo.getId();
      }
      Label pHelp=new Label(pluginInfo.getDescription());
      pRadio.setTitle("String_Node_Str");
      radioGroup.add(pRadio);
      radioGroup.add(pHelp);
      pRadio.addStyleName("String_Node_Str");
      pHelp.addStyleName("String_Node_Str");
      pRadio.addValueChangeHandler(new ValueChangeHandler<Boolean>(){
        @Override public void onValueChange(        ValueChangeEvent<Boolean> event){
          if (event.getValue()) {
            value=pluginInfo.getId();
          }
        }
      }
);
    }
 else {
      GWT.log("String_Node_Str");
    }
  }
  layout.add(radioGroup);
  radioGroup.addStyleName("String_Node_Str");
  parameterName.addStyleName("String_Node_Str");
}
Program: 188343
Project: 188343
Buggy source:
private void createPluginSipToAipLayout(PluginParameter parameter){
  String value=job.getPluginParameters().get(parameter.getId());
  if (value == null) {
    value=parameter.getDefaultValue();
  }
  if (StringUtils.isNotBlank(value)) {
    Label pluginLabel=new Label(parameter.getName());
    PluginInfo sipToAipPlugin=pluginsInfo.get(value);
    RadioButton pluginValue;
    pluginOptions.add(pluginLabel);
    addHelp(parameter.getDescription());
    if (sipToAipPlugin != null) {
      pluginValue=new RadioButton(parameter.getId(),messages.pluginLabel(sipToAipPlugin.getName(),sipToAipPlugin.getVersion()));
      pluginValue.setValue(true);
      pluginValue.setEnabled(false);
      pluginOptions.add(pluginValue);
      addHelp(sipToAipPlugin.getDescription());
    }
 else {
      pluginValue=new RadioButton(parameter.getId(),value);
      pluginValue.setValue(true);
      pluginValue.setEnabled(false);
      pluginOptions.add(pluginValue);
      GWT.log("String_Node_Str" + value);
    }
    pluginLabel.addStyleName("String_Node_Str");
    pluginValue.addStyleName("String_Node_Str");
  }
}

Fixed version (ground truth):
private void createPluginSipToAipLayout(PluginParameter parameter){
  String value=job.getPluginParameters().get(parameter.getId());
  if (value == null) {
    value=parameter.getDefaultValue();
  }
  if (StringUtils.isNotBlank(value)) {
    Label pluginLabel=new Label(parameter.getName());
    PluginInfo sipToAipPlugin=pluginsInfo.get(value);
    RadioButton pluginValue;
    pluginOptions.add(pluginLabel);
    addHelp(parameter.getDescription());
    if (sipToAipPlugin != null) {
      pluginValue=new RadioButton(parameter.getId(),messages.pluginLabelWithVersion(sipToAipPlugin.getName(),sipToAipPlugin.getVersion()));
      pluginValue.setValue(true);
      pluginValue.setEnabled(false);
      pluginOptions.add(pluginValue);
      addHelp(sipToAipPlugin.getDescription());
    }
 else {
      pluginValue=new RadioButton(parameter.getId(),value);
      pluginValue.setValue(true);
      pluginValue.setEnabled(false);
      pluginOptions.add(pluginValue);
      GWT.log("String_Node_Str" + value);
    }
    pluginLabel.addStyleName("String_Node_Str");
    pluginValue.addStyleName("String_Node_Str");
  }
}
Program: 188349
Project: 188349
Buggy source:
private void apply(final boolean recursive){
  final Permissions permissions=getPermissions();
  Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    String details){
      if (IndexedAIP.class.getName().equals(objectClass)) {
        List<IndexedAIP> aips=(List<IndexedAIP>)(Object)objects;
        BrowserService.Util.getInstance().updateAIPPermissions(aips,permissions,details,recursive,new LoadingAsyncCallback<Void>(){
          @Override public void onSuccessImpl(          Void result){
            if (recursive) {
              Toast.showInfo(messages.dialogSuccess(),messages.permissionsWillBeChanged());
            }
 else {
              Toast.showInfo(messages.dialogSuccess(),messages.permissionsChanged());
            }
          }
        }
);
      }
 else       if (IndexedDIP.class.getName().equals(objectClass)) {
        List<IndexedDIP> dips=(List<IndexedDIP>)(Object)objects;
        BrowserService.Util.getInstance().updateDIPPermissions(dips,permissions,details,new LoadingAsyncCallback<Void>(){
          @Override public void onSuccessImpl(          Void result){
            Toast.showInfo(messages.dialogSuccess(),messages.permissionsChanged());
          }
        }
);
      }
    }
  }
);
}

Fixed version (ground truth):
private void apply(final boolean recursive){
  final Permissions permissions=getPermissions();
  Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),false,new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    String details){
      if (IndexedAIP.class.getName().equals(objectClass)) {
        List<IndexedAIP> aips=(List<IndexedAIP>)(Object)objects;
        BrowserService.Util.getInstance().updateAIPPermissions(aips,permissions,details,recursive,new LoadingAsyncCallback<Void>(){
          @Override public void onSuccessImpl(          Void result){
            if (recursive) {
              Toast.showInfo(messages.dialogSuccess(),messages.permissionsWillBeChanged());
            }
 else {
              Toast.showInfo(messages.dialogSuccess(),messages.permissionsChanged());
            }
          }
        }
);
      }
 else       if (IndexedDIP.class.getName().equals(objectClass)) {
        List<IndexedDIP> dips=(List<IndexedDIP>)(Object)objects;
        BrowserService.Util.getInstance().updateDIPPermissions(dips,permissions,details,new LoadingAsyncCallback<Void>(){
          @Override public void onSuccessImpl(          Void result){
            Toast.showInfo(messages.dialogSuccess(),messages.permissionsChanged());
          }
        }
);
      }
    }
  }
);
}
Program: 188351
Project: 188351
Buggy source:
@Override public void onValueChange(ValueChangeEvent<IndexedAIP> event){
  final IndexedAIP parentAIP=event.getValue();
  final String parentId=(parentAIP != null) ? parentAIP.getId() : null;
  Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    String details){
      BrowserService.Util.getInstance().moveAIPInHierarchy(selected,parentId,details,new LoadingAsyncCallback<IndexedAIP>(){
        @Override public void onSuccessImpl(        IndexedAIP result){
          Toast.showInfo(messages.runningInBackgroundTitle(),messages.runningInBackgroundDescription());
          if (result != null) {
            HistoryUtils.newHistory(BrowseAIP.RESOLVER,result.getId());
          }
 else {
            HistoryUtils.newHistory(BrowseAIP.RESOLVER);
          }
          callback.onSuccess(ActionImpact.UPDATED);
        }
        @Override public void onFailureImpl(        Throwable caught){
          if (caught instanceof NotFoundException) {
            Toast.showError(messages.moveNoSuchObject(caught.getMessage()));
          }
 else {
            callback.onFailure(caught);
          }
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
@Override public void onValueChange(ValueChangeEvent<IndexedAIP> event){
  final IndexedAIP parentAIP=event.getValue();
  final String parentId=(parentAIP != null) ? parentAIP.getId() : null;
  Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),false,new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    String details){
      BrowserService.Util.getInstance().moveAIPInHierarchy(selected,parentId,details,new LoadingAsyncCallback<IndexedAIP>(){
        @Override public void onSuccessImpl(        IndexedAIP result){
          Toast.showInfo(messages.runningInBackgroundTitle(),messages.runningInBackgroundDescription());
          if (result != null) {
            HistoryUtils.newHistory(BrowseAIP.RESOLVER,result.getId());
          }
 else {
            HistoryUtils.newHistory(BrowseAIP.RESOLVER);
          }
          callback.onSuccess(ActionImpact.UPDATED);
        }
        @Override public void onFailureImpl(        Throwable caught){
          if (caught instanceof NotFoundException) {
            Toast.showError(messages.moveNoSuchObject(caught.getMessage()));
          }
 else {
            callback.onFailure(caught);
          }
        }
      }
);
    }
  }
);
}
Program: 188352
Project: 188352
Buggy source:
private void appraisalReject(final SelectedItems<IndexedAIP> aips,final AsyncCallback<ActionImpact> callback){
  final boolean accept=false;
  Dialogs.showPromptDialog(messages.rejectMessage(),messages.rejectQuestion(),null,null,RegExp.compile("String_Node_Str"),messages.dialogCancel(),messages.dialogOk(),new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    final String rejectReason){
      BrowserService.Util.getInstance().appraisal(aips,accept,rejectReason,LocaleInfo.getCurrentLocale().getLocaleName(),new LoadingAsyncCallback<Void>(){
        @Override public void onSuccessImpl(        Void result){
          Toast.showInfo(messages.dialogDone(),messages.itemWasRejected());
          HistoryUtils.newHistory(IngestAppraisal.RESOLVER);
          callback.onSuccess(ActionImpact.DESTROYED);
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
private void appraisalReject(final SelectedItems<IndexedAIP> aips,final AsyncCallback<ActionImpact> callback){
  final boolean accept=false;
  Dialogs.showPromptDialog(messages.rejectMessage(),messages.rejectQuestion(),null,null,RegExp.compile("String_Node_Str"),messages.dialogCancel(),messages.dialogOk(),true,new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    final String rejectReason){
      BrowserService.Util.getInstance().appraisal(aips,accept,rejectReason,LocaleInfo.getCurrentLocale().getLocaleName(),new LoadingAsyncCallback<Void>(){
        @Override public void onSuccessImpl(        Void result){
          Toast.showInfo(messages.dialogDone(),messages.itemWasRejected());
          HistoryUtils.newHistory(IngestAppraisal.RESOLVER);
          callback.onSuccess(ActionImpact.DESTROYED);
        }
      }
);
    }
  }
);
}
Program: 188354
Project: 188354
Buggy source:
private void addRepresentation(final IndexedAIP aip,final AsyncCallback<ActionImpact> callback){
  Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    String details){
      BrowserService.Util.getInstance().createRepresentation(aip.getId(),details,new LoadingAsyncCallback<String>(){
        @Override public void onSuccessImpl(        String representationId){
          HistoryUtils.newHistory(BrowseRepresentation.RESOLVER,aip.getId(),representationId);
          callback.onSuccess(ActionImpact.UPDATED);
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
private void addRepresentation(final IndexedAIP aip,final AsyncCallback<ActionImpact> callback){
  Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),false,new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    String details){
      BrowserService.Util.getInstance().createRepresentation(aip.getId(),details,new LoadingAsyncCallback<String>(){
        @Override public void onSuccessImpl(        String representationId){
          HistoryUtils.newHistory(BrowseRepresentation.RESOLVER,aip.getId(),representationId);
          callback.onSuccess(ActionImpact.UPDATED);
        }
      }
);
    }
  }
);
}
Program: 188356
Project: 188356
Buggy source:
public void uploadFiles(final IndexedFile file,final AsyncCallback<ActionImpact> callback){
  if (file.isDirectory()) {
    Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),new AsyncCallback<String>(){
      @Override public void onFailure(      Throwable caught){
      }
      @Override public void onSuccess(      String details){
        LastSelectedItemsSingleton selectedItems=LastSelectedItemsSingleton.getInstance();
        selectedItems.setDetailsMessage(details);
        HistoryUtils.openUpload(file);
        callback.onSuccess(ActionImpact.UPDATED);
      }
    }
);
  }
}

Fixed version (ground truth):
public void uploadFiles(final IndexedFile file,final AsyncCallback<ActionImpact> callback){
  if (file.isDirectory()) {
    Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),false,new AsyncCallback<String>(){
      @Override public void onFailure(      Throwable caught){
      }
      @Override public void onSuccess(      String details){
        LastSelectedItemsSingleton selectedItems=LastSelectedItemsSingleton.getInstance();
        selectedItems.setDetailsMessage(details);
        HistoryUtils.openUpload(file);
        callback.onSuccess(ActionImpact.UPDATED);
      }
    }
);
  }
}
Program: 188357
Project: 188357
Buggy source:
@Override public void onValueChange(ValueChangeEvent<IndexedFile> event){
  final IndexedFile toFolder=event.getValue();
  Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    String details){
      BrowserService.Util.getInstance().moveFiles(aipId,representationId,selectedItems,toFolder,details,new LoadingAsyncCallback<Void>(){
        @Override public void onSuccessImpl(        Void nothing){
          Toast.showInfo(messages.runningInBackgroundTitle(),messages.runningInBackgroundDescription());
          Timer timer=new Timer(){
            @Override public void run(){
              if (toFolder != null) {
                HistoryUtils.openBrowse(toFolder);
              }
 else {
                HistoryUtils.openBrowse(aipId,representationId);
              }
              callback.onSuccess(null);
            }
          }
;
          timer.schedule(RodaConstants.ACTION_TIMEOUT);
        }
        @Override public void onFailureImpl(        Throwable caught){
          if (caught instanceof NotFoundException) {
            Toast.showError(messages.moveNoSuchObject(caught.getMessage()));
          }
 else {
            callback.onFailure(caught);
          }
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
@Override public void onValueChange(ValueChangeEvent<IndexedFile> event){
  final IndexedFile toFolder=event.getValue();
  Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),false,new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    String details){
      BrowserService.Util.getInstance().moveFiles(aipId,representationId,selectedItems,toFolder,details,new LoadingAsyncCallback<Void>(){
        @Override public void onSuccessImpl(        Void nothing){
          Toast.showInfo(messages.runningInBackgroundTitle(),messages.runningInBackgroundDescription());
          Timer timer=new Timer(){
            @Override public void run(){
              if (toFolder != null) {
                HistoryUtils.openBrowse(toFolder);
              }
 else {
                HistoryUtils.openBrowse(aipId,representationId);
              }
              callback.onSuccess(null);
            }
          }
;
          timer.schedule(RodaConstants.ACTION_TIMEOUT);
        }
        @Override public void onFailureImpl(        Throwable caught){
          if (caught instanceof NotFoundException) {
            Toast.showError(messages.moveNoSuchObject(caught.getMessage()));
          }
 else {
            callback.onFailure(caught);
          }
        }
      }
);
    }
  }
);
}
Program: 188359
Project: 188359
Buggy source:
public void rename(final IndexedFile file,final AsyncCallback<ActionImpact> callback){
  Dialogs.showPromptDialog(messages.renameItemTitle(),null,file.getId(),null,RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    final String newName){
      Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),new AsyncCallback<String>(){
        @Override public void onFailure(        Throwable caught){
        }
        @Override public void onSuccess(        String details){
          BrowserService.Util.getInstance().renameFolder(file.getUUID(),newName,details,new LoadingAsyncCallback<IndexedFile>(){
            @Override public void onSuccessImpl(            IndexedFile newFolder){
              Toast.showInfo(messages.dialogSuccess(),messages.renameSuccessful());
              HistoryUtils.openBrowse(newFolder);
              callback.onSuccess(ActionImpact.UPDATED);
            }
          }
);
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
public void rename(final IndexedFile file,final AsyncCallback<ActionImpact> callback){
  Dialogs.showPromptDialog(messages.renameItemTitle(),null,file.getId(),null,RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),true,new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    final String newName){
      Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),false,new AsyncCallback<String>(){
        @Override public void onFailure(        Throwable caught){
        }
        @Override public void onSuccess(        String details){
          BrowserService.Util.getInstance().renameFolder(file.getUUID(),newName,details,new LoadingAsyncCallback<IndexedFile>(){
            @Override public void onSuccessImpl(            IndexedFile newFolder){
              Toast.showInfo(messages.dialogSuccess(),messages.renameSuccessful());
              HistoryUtils.openBrowse(newFolder);
              callback.onSuccess(ActionImpact.UPDATED);
            }
          }
);
        }
      }
);
    }
  }
);
}
Program: 188361
Project: 188361
Buggy source:
public void uploadFiles(final IndexedRepresentation representation,final AsyncCallback<ActionImpact> callback){
  Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    String details){
      LastSelectedItemsSingleton selectedItems=LastSelectedItemsSingleton.getInstance();
      selectedItems.setDetailsMessage(details);
      HistoryUtils.openUpload(representation);
      callback.onSuccess(ActionImpact.UPDATED);
    }
  }
);
}

Fixed version (ground truth):
public void uploadFiles(final IndexedRepresentation representation,final AsyncCallback<ActionImpact> callback){
  Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),false,new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    String details){
      LastSelectedItemsSingleton selectedItems=LastSelectedItemsSingleton.getInstance();
      selectedItems.setDetailsMessage(details);
      HistoryUtils.openUpload(representation);
      callback.onSuccess(ActionImpact.UPDATED);
    }
  }
);
}
Program: 188362
Project: 188362
Buggy source:
public void changeType(final SelectedItems<IndexedRepresentation> representations,final AsyncCallback<ActionImpact> callback){
  SearchSuggestBox<IndexedRepresentation> suggestBox=new SearchSuggestBox<>(IndexedRepresentation.class,RodaConstants.REPRESENTATION_TYPE,true);
  Dialogs.showPromptDialogSuggest(messages.changeTypeTitle(),null,messages.changeTypePlaceHolder(),messages.cancelButton(),messages.confirmButton(),suggestBox,new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    final String newType){
      Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),new AsyncCallback<String>(){
        @Override public void onFailure(        Throwable caught){
        }
        @Override public void onSuccess(        String details){
          BrowserService.Util.getInstance().changeRepresentationType(representations,newType,details,new LoadingAsyncCallback<Void>(){
            @Override public void onSuccessImpl(            Void nothing){
              Toast.showInfo(messages.dialogSuccess(),messages.changeTypeSuccessful());
              callback.onSuccess(ActionImpact.UPDATED);
            }
          }
);
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
public void changeType(final SelectedItems<IndexedRepresentation> representations,final AsyncCallback<ActionImpact> callback){
  SearchSuggestBox<IndexedRepresentation> suggestBox=new SearchSuggestBox<>(IndexedRepresentation.class,RodaConstants.REPRESENTATION_TYPE,true);
  Dialogs.showPromptDialogSuggest(messages.changeTypeTitle(),null,messages.changeTypePlaceHolder(),messages.cancelButton(),messages.confirmButton(),suggestBox,new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    final String newType){
      Dialogs.showPromptDialog(messages.outcomeDetailTitle(),null,null,messages.outcomeDetailPlaceholder(),RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),false,new AsyncCallback<String>(){
        @Override public void onFailure(        Throwable caught){
        }
        @Override public void onSuccess(        String details){
          BrowserService.Util.getInstance().changeRepresentationType(representations,newType,details,new LoadingAsyncCallback<Void>(){
            @Override public void onSuccessImpl(            Void nothing){
              Toast.showInfo(messages.dialogSuccess(),messages.changeTypeSuccessful());
              callback.onSuccess(ActionImpact.UPDATED);
            }
          }
);
        }
      }
);
    }
  }
);
}
Program: 188366
Project: 188366
Buggy source:
@Override public void onKeyDown(KeyDownEvent event){
  if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
    boolean isValid=validator.test(inputBox.getText());
    if (isValid) {
      dialogBox.hide();
      callback.onSuccess(inputBox.getText());
    }
  }
 else {
    TextBox box=(TextBox)event.getSource();
    confirmButton.setEnabled(validator.test(box.getText()));
  }
}

Fixed version (ground truth):
@Override public void onKeyDown(KeyDownEvent event){
  TextBox box=(TextBox)event.getSource();
  confirmButton.setEnabled(validator.test(box.getText()));
}
Program: 188367
Project: 188367
Buggy source:
@Override public void onKeyUp(KeyUpEvent event){
  if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
    boolean isValid=validator.test(inputBox.getText());
    if (isValid) {
      dialogBox.hide();
      callback.onSuccess(inputBox.getText());
    }
  }
 else {
    TextBox box=(TextBox)event.getSource();
    confirmButton.setEnabled(validator.test(box.getText()));
  }
}

Fixed version (ground truth):
@Override public void onKeyUp(KeyUpEvent event){
  if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
    if (validator.test(inputBox.getText())) {
      dialogBox.hide();
      callback.onSuccess(inputBox.getText());
    }
  }
 else {
    TextBox box=(TextBox)event.getSource();
    confirmButton.setEnabled(validator.test(box.getText()));
  }
}
Program: 188369
Project: 188369
Buggy source:
@UiHandler("String_Node_Str") void buttonCreateFolderHandler(ClickEvent e){
  Dialogs.showPromptDialog(messages.ingestTransferCreateFolderTitle(),messages.ingestTransferCreateFolderMessage(),null,null,RegExp.compile("String_Node_Str"),messages.dialogCancel(),messages.dialogOk(),new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    String folderName){
      String parent=resource != null ? resource.getUUID() : null;
      BrowserService.Util.getInstance().createTransferredResourcesFolder(parent,folderName,true,new AsyncCallback<String>(){
        @Override public void onFailure(        Throwable caught){
          AsyncCallbackUtils.defaultFailureTreatment(caught);
        }
        @Override public void onSuccess(        String newResourceUUID){
          HistoryUtils.newHistory(RESOLVER,newResourceUUID);
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
@UiHandler("String_Node_Str") void buttonCreateFolderHandler(ClickEvent e){
  Dialogs.showPromptDialog(messages.ingestTransferCreateFolderTitle(),messages.ingestTransferCreateFolderMessage(),null,null,RegExp.compile("String_Node_Str"),messages.dialogCancel(),messages.dialogOk(),true,new AsyncCallback<String>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    String folderName){
      String parent=resource != null ? resource.getUUID() : null;
      BrowserService.Util.getInstance().createTransferredResourcesFolder(parent,folderName,true,new AsyncCallback<String>(){
        @Override public void onFailure(        Throwable caught){
          AsyncCallbackUtils.defaultFailureTreatment(caught);
        }
        @Override public void onSuccess(        String newResourceUUID){
          HistoryUtils.newHistory(RESOLVER,newResourceUUID);
        }
      }
);
    }
  }
);
}
Program: 188371
Project: 188371
Buggy source:
@Override public void onKeyDown(KeyDownEvent event){
  if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
    boolean isValid=validator.test(inputBox.getText());
    if (isValid) {
      dialogBox.hide();
      callback.onSuccess(inputBox.getText());
    }
  }
}

Fixed version (ground truth):
@Override public void onKeyDown(KeyDownEvent event){
  if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
    boolean isValid=validator.test(inputBox.getText());
    if (isValid) {
      dialogBox.hide();
      callback.onSuccess(inputBox.getText());
    }
  }
 else {
    TextBox box=(TextBox)event.getSource();
    confirmButton.setEnabled(validator.test(box.getText()));
  }
}
Program: 188372
Project: 188372
Buggy source:
@Override public void onValueChange(ValueChangeEvent<String> event){
  boolean isValid=validator.test(inputBox.getText());
  if (isValid) {
    inputBox.addStyleName("String_Node_Str");
  }
 else {
    inputBox.removeStyleName("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onValueChange(ValueChangeEvent<String> event){
  boolean isValid=validator.test(event.getValue());
  confirmButton.setEnabled(isValid);
  if (isValid) {
    inputBox.removeStyleName("String_Node_Str");
  }
 else {
    inputBox.addStyleName("String_Node_Str");
  }
}
Program: 188373
Project: 188373
Buggy source:
@Override public void onKeyPress(KeyPressEvent event){
  boolean isValid=validator.test(inputBox.getText());
  confirmButton.setEnabled(isValid);
}

Fixed version (ground truth):
@Override public void onKeyPress(KeyPressEvent event){
  TextBox box=(TextBox)event.getSource();
  confirmButton.setEnabled(validator.test(box.getText()));
}
Program: 188376
Project: 188376
Buggy source:
public static String executeAvconv(Path input,Path output,String commandArguments,String outputArguments) throws CommandException, IOException, UnsupportedOperationException {
  String command=RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  command=command.replace("String_Node_Str",input.toString());
  command=command.replace("String_Node_Str",output.toString());
  command=command.replace("String_Node_Str",commandArguments);
  command=command.replace("String_Node_Str",outputArguments);
  List<String> commandList=Arrays.asList(command.split("String_Node_Str"));
  return CommandUtility.execute(commandList);
}

Fixed version (ground truth):
public static String executeAvconv(Path input,Path output,String commandArguments,String outputArguments) throws CommandException, IOException, UnsupportedOperationException {
  String command=RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  command=command.replace("String_Node_Str",output.toString());
  command=command.replace("String_Node_Str",commandArguments);
  command=command.replace("String_Node_Str",outputArguments);
  List<String> commandList=Arrays.asList(command.split("String_Node_Str"));
  for (int i=0; i < commandList.size(); i++) {
    if ("String_Node_Str".equals(commandList.get(i))) {
      commandList.set(i,input.toString());
    }
  }
  return CommandUtility.execute(commandList);
}
Program: 188377
Project: 188377
Buggy source:
public static String executeGS(Path input,Path output,String commandArguments) throws GhostscriptException, IOException, UnsupportedOperationException {
  String command=RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  command=command.replace("String_Node_Str",input.toString());
  command=command.replace("String_Node_Str",output.toString());
  if (commandArguments.length() > 0) {
    command=command.replace("String_Node_Str",commandArguments);
  }
 else {
    command=command.replace("String_Node_Str","String_Node_Str");
  }
  String[] gsArgs=command.split("String_Node_Str");
  Ghostscript gs=Ghostscript.getInstance();
  try {
    gs.initialize(gsArgs);
    gs.exit();
  }
 catch (  GhostscriptException e) {
    throw new GhostscriptException("String_Node_Str",e);
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
public static String executeGS(Path input,Path output,String commandArguments) throws GhostscriptException, IOException, UnsupportedOperationException {
  String command=RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  command=command.replace("String_Node_Str",output.toString());
  if (commandArguments.length() > 0) {
    command=command.replace("String_Node_Str",commandArguments);
  }
 else {
    command=command.replace("String_Node_Str","String_Node_Str");
  }
  String[] gsArgs=command.split("String_Node_Str");
  for (int i=0; i < gsArgs.length; i++) {
    if ("String_Node_Str".equals(gsArgs[i])) {
      gsArgs[i]=input.toString();
    }
  }
  Ghostscript gs=Ghostscript.getInstance();
  try {
    gs.initialize(gsArgs);
    gs.exit();
  }
 catch (  GhostscriptException e) {
    throw new GhostscriptException("String_Node_Str",e);
  }
  return "String_Node_Str";
}
Program: 188378
Project: 188378
Buggy source:
public static String executeImageMagick(Path input,Path output,String outputFormat,String commandArguments) throws CommandException {
  String command=RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  command=command.replace("String_Node_Str",input.toString());
  command=command.replace("String_Node_Str",outputFormat + "String_Node_Str" + output.toString());
  command=command.replace("String_Node_Str",commandArguments);
  return CommandUtility.execute(Arrays.asList(command.split("String_Node_Str")));
}

Fixed version (ground truth):
public static String executeImageMagick(Path input,Path output,String outputFormat,String commandArguments) throws CommandException {
  String command=RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  command=command.replace("String_Node_Str",outputFormat + "String_Node_Str" + output.toString());
  command=command.replace("String_Node_Str",commandArguments);
  List<String> commandList=Arrays.asList(command.split("String_Node_Str"));
  for (int i=0; i < commandList.size(); i++) {
    if ("String_Node_Str".equals(commandList.get(i))) {
      commandList.set(i,input.toString());
    }
  }
  return CommandUtility.execute(commandList);
}
Program: 188379
Project: 188379
Buggy source:
public static String executeSox(Path input,Path output,String commandArguments) throws CommandException, IOException, UnsupportedOperationException {
  String command=RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  command=command.replace("String_Node_Str",input.toString());
  command=command.replace("String_Node_Str",output.toString());
  if (commandArguments.length() > 0) {
    command=command.replace("String_Node_Str",commandArguments);
  }
 else {
    command=command.replace("String_Node_Str","String_Node_Str");
  }
  List<String> commandList=Arrays.asList(command.split("String_Node_Str"));
  return CommandUtility.execute(commandList);
}

Fixed version (ground truth):
public static String executeSox(Path input,Path output,String commandArguments) throws CommandException, IOException, UnsupportedOperationException {
  String command=RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  command=command.replace("String_Node_Str",output.toString());
  if (commandArguments.length() > 0) {
    command=command.replace("String_Node_Str",commandArguments);
  }
 else {
    command=command.replace("String_Node_Str","String_Node_Str");
  }
  List<String> commandList=Arrays.asList(command.split("String_Node_Str"));
  for (int i=0; i < commandList.size(); i++) {
    if ("String_Node_Str".equals(commandList.get(i))) {
      commandList.set(i,input.toString());
    }
  }
  return CommandUtility.execute(commandList);
}
Program: 188380
Project: 188380
Buggy source:
public static String executeUnoconvConvert(Path input,Path output,String outputFormat,String commandArguments) throws CommandException, IOException, UnsupportedOperationException {
  String command=RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  command=command.replace("String_Node_Str",input.toString());
  command=command.replace("String_Node_Str",output.toString());
  command=command.replace("String_Node_Str",outputFormat);
  command=command.replace("String_Node_Str",commandArguments);
  List<String> commandList=Arrays.asList(command.split("String_Node_Str"));
  return CommandUtility.execute(commandList);
}

Fixed version (ground truth):
public static String executeUnoconvConvert(Path input,Path output,String outputFormat,String commandArguments) throws CommandException, IOException, UnsupportedOperationException {
  String command=RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  command=command.replace("String_Node_Str",output.toString());
  command=command.replace("String_Node_Str",outputFormat);
  command=command.replace("String_Node_Str",commandArguments);
  List<String> commandList=Arrays.asList(command.split("String_Node_Str"));
  for (int i=0; i < commandList.size(); i++) {
    if ("String_Node_Str".equals(commandList.get(i))) {
      commandList.set(i,input.toString());
    }
  }
  return CommandUtility.execute(commandList);
}
Program: 188381
Project: 188381
Buggy source:
@Test public void testJobExecutingPluginThatStopsItselfUsingOrchestratorStop() throws RequestNotValidException, GenericException, NotFoundException, AuthorizationDeniedException {
  ModelService modelService=RodaCoreFactory.getModelService();
  List<String> aips=new ArrayList<>();
  try {
    for (int i=0; i < 30; i++) {
      aips.add(modelService.createAIP(null,RodaConstants.REPRESENTATION_TYPE_MIXED,new Permissions(),RodaConstants.ADMIN).getId());
    }
  }
 catch (  AlreadyExistsException e) {
  }
  int originalNumberOfJobWorkers=JobsHelper.getNumberOfJobsWorkers();
  int originalBlockSize=JobsHelper.getBlockSize();
  JobsHelper.setNumberOfJobsWorkers(1);
  JobsHelper.setBlockSize(1);
  TestsHelper.executeJob(PluginThatStopsItself.class,PluginType.MISC,SelectedItemsNone.create(),JOB_STATE.STOPPED);
  JobsHelper.setNumberOfJobsWorkers(originalNumberOfJobWorkers);
  JobsHelper.setBlockSize(originalBlockSize);
}

Fixed version (ground truth):
@Test public void testJobExecutingPluginThatStopsItselfUsingOrchestratorStop() throws RequestNotValidException, GenericException, NotFoundException, AuthorizationDeniedException {
  ModelService modelService=RodaCoreFactory.getModelService();
  List<String> aips=new ArrayList<>();
  try {
    for (int i=0; i < 30; i++) {
      aips.add(modelService.createAIP(null,RodaConstants.REPRESENTATION_TYPE_MIXED,new Permissions(),RodaConstants.ADMIN).getId());
    }
  }
 catch (  AlreadyExistsException e) {
  }
  int originalNumberOfJobWorkers=JobsHelper.getNumberOfJobsWorkers();
  int originalBlockSize=JobsHelper.getBlockSize();
  JobsHelper.setNumberOfJobsWorkers(1);
  JobsHelper.setBlockSize(1);
  TestsHelper.executeJob(PluginThatStopsItself.class,PluginType.MISC,SelectedItemsList.create(AIP.class,aips),JOB_STATE.STOPPED);
  JobsHelper.setNumberOfJobsWorkers(originalNumberOfJobWorkers);
  JobsHelper.setBlockSize(originalBlockSize);
}
Program: 188382
Project: 188382
Buggy source:
@Override public List<Class<Void>> getObjectClasses(){
  return Arrays.asList(Void.class);
}

Fixed version (ground truth):
@Override public List<Class<AIP>> getObjectClasses(){
  return Arrays.asList(AIP.class);
}
Program: 188383
Project: 188383
Buggy source:
@Override public Report execute(IndexService index,ModelService model,StorageService storage,List<LiteOptionalWithCause> list) throws PluginException {
  long sleepTime=ThreadLocalRandom.current().nextLong(1,3 + 1) * 1000;
  LOGGER.info("String_Node_Str",sleepTime);
  try {
    Thread.sleep(sleepTime);
    Job job=PluginHelper.getJob(this,RodaCoreFactory.getModelService());
    RodaCoreFactory.getPluginOrchestrator().stopJob(job);
  }
 catch (  NotFoundException|GenericException|RequestNotValidException|AuthorizationDeniedException|InterruptedException e) {
    LOGGER.error("String_Node_Str",e);
  }
  LOGGER.info("String_Node_Str",sleepTime);
  return null;
}

Fixed version (ground truth):
@Override public Report execute(IndexService index,ModelService model,StorageService storage,List<LiteOptionalWithCause> list) throws PluginException {
  long sleepTime=1000;
  LOGGER.info("String_Node_Str",sleepTime);
  try {
    Thread.sleep(sleepTime);
    Job job=PluginHelper.getJob(this,RodaCoreFactory.getModelService());
    RodaCoreFactory.getPluginOrchestrator().stopJob(job);
  }
 catch (  NotFoundException|GenericException|RequestNotValidException|AuthorizationDeniedException|InterruptedException e) {
    LOGGER.error("String_Node_Str",e);
  }
  LOGGER.info("String_Node_Str",sleepTime);
  return null;
}
Program: 188384
Project: 188384
Buggy source:
@Override public Plugin<Void> cloneMe(){
  return new PluginThatStopsItself();
}

Fixed version (ground truth):
@Override public Plugin<AIP> cloneMe(){
  return new PluginThatStopsItself();
}
Program: 188387
Project: 188387
Buggy source:
public void setUsers(Map<PermissionType,Set<String>> users){
  this.users=users;
}

Fixed version (ground truth):
public void setUsers(EnumMap<PermissionType,Set<String>> users){
  this.users=users;
}
Program: 188388
Project: 188388
Buggy source:
public Map<PermissionType,Set<String>> getUsers(){
  return users;
}

Fixed version (ground truth):
public EnumMap<PermissionType,Set<String>> getUsers(){
  return users;
}
Program: 188389
Project: 188389
Buggy source:
public void setGroups(Map<PermissionType,Set<String>> groups){
  this.groups=groups;
}

Fixed version (ground truth):
public void setGroups(EnumMap<PermissionType,Set<String>> groups){
  this.groups=groups;
}
Program: 188390
Project: 188390
Buggy source:
public Map<PermissionType,Set<String>> getGroups(){
  return groups;
}

Fixed version (ground truth):
public EnumMap<PermissionType,Set<String>> getGroups(){
  return groups;
}