nus-yam/ex-repair huggingface dataset:
Program: 188167
Project: 188167
Buggy source:
public String listRoutes(){
  List<String> allRoutes=new LinkedList<String>();
  for (  Map<String,Route> routeEntries : routes.values()) {
    allRoutes.addAll(routeEntries.keySet());
  }
  allRoutes=list(allRoutes);
  Collections.sort(allRoutes);
  StringBuilder sb=new StringBuilder();
  for (  String route : allRoutes) {
    for (    RouteType routeType : RouteType.all()) {
      Map<String,Route> routesForType=routes.get(routeType);
      if (routesForType.containsKey(route)) {
        sb.append(String.format(routeDisplayFormat,routesForType.get(route)));
      }
    }
  }
  return sb.toString();
}

Fixed version (ground truth):
public String listRoutes(){
  Set<String> allRoutes=new HashSet<String>();
  for (  Map<String,Route> routeEntries : routes.values()) {
    allRoutes.addAll(routeEntries.keySet());
  }
  List<String> allRouteNames=list(allRoutes);
  Collections.sort(allRouteNames);
  StringBuilder sb=new StringBuilder();
  for (  String route : allRouteNames) {
    for (    RouteType routeType : RouteType.all()) {
      Map<String,Route> routesForType=routes.get(routeType);
      if (routesForType.containsKey(route)) {
        sb.append(String.format(routeDisplayFormat,routesForType.get(route)));
      }
    }
  }
  return sb.toString();
}
Program: 188168
Project: 188168
Buggy source:
@SuppressWarnings("String_Node_Str") private StringOutputStream createOutputStream(){
  sos=new StringOutputStream(characterEncoding){
    @Override public void flush() throws IOException {
      committed=true;
      super.flush();
    }
    @Override public void close(){
    }
  }
;
  return sos;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private StringOutputStream createOutputStream(){
  contentTypeOnWrite=contentType;
  sos=new StringOutputStream(characterEncoding){
    @Override public void flush() throws IOException {
      committed=true;
      super.flush();
    }
    @Override public void close(){
    }
  }
;
  return sos;
}
Program: 188169
Project: 188169
Buggy source:
@Override public String getContentType(){
  return contentType;
}

Fixed version (ground truth):
/** 
 * @deprecated Use #getContentTypeOnWrite() to get the content type at the time data the output stream is created.
 */
@Override public String getContentType(){
  return contentType;
}
Program: 188170
Project: 188170
Buggy source:
@Override public void resolve(HttpServletRequest req,HttpServletResponse resp,JsonView viewResult){
  Object output=viewResult.getOutput();
  try {
    Gson create=gsonBuilder.create();
    String json=create.toJson(output);
    resp.getWriter().write(json);
    resp.setContentType(MimeTypes.MIME_APPLICATION_JSON);
    resp.setContentLength(json.getBytes().length);
    resp.setStatus(HttpServletResponse.SC_OK);
  }
 catch (  Exception e) {
    throw new ViewResolutionException(e,"String_Node_Str",output.toString(),e.getMessage());
  }
}

Fixed version (ground truth):
@Override public void resolve(HttpServletRequest req,HttpServletResponse resp,JsonView viewResult){
  Object output=viewResult.getOutput();
  try {
    Gson create=gsonBuilder.create();
    String json=create.toJson(output);
    resp.setContentType(MimeTypes.MIME_APPLICATION_JSON);
    resp.setContentLength(json.getBytes().length);
    resp.setStatus(HttpServletResponse.SC_OK);
    resp.getWriter().write(json);
  }
 catch (  Exception e) {
    throw new ViewResolutionException(e,"String_Node_Str",output.toString(),e.getMessage());
  }
}
Program: 188171
Project: 188171
Buggy source:
/** 
 * Finds a random shard for the given counter and increments it by the specified amount. This method grows the number of shards as needed. Shard count is doubled when the number of concurrent accesses is equal to the number of shards.
 * @param counterType
 * @param association
 * @param by
 * @return
 */
protected long incrementCount(String counterType,String association,long by){
  String memcacheKey=memcacheKey(counterType,association);
  String concurrentIncrementKey=memcacheKey + "String_Node_Str";
  long numShards=shardCount(counterType,association);
  try {
    long currentAccesses=memcacheService.increment(concurrentIncrementKey,1,0L);
    if (currentAccesses > numShards) {
      numShards=addShardsToShardedCounter(numShards,counterType,association);
    }
    long shardNum=generator.nextInt((int)numShards);
    String counterKind=kindName(counterType);
    String name=association == null ? Long.toString(shardNum) : String.format("String_Node_Str",association,shardNum);
    Key shardKey=createKey(counterKind,name);
    incrementCounter(shardKey,association,by,by);
    memcacheService.increment(memcacheKey,by);
    return getCount(counterType,association);
  }
  finally {
    memcacheService.increment(concurrentIncrementKey,-1,0L);
  }
}

Fixed version (ground truth):
/** 
 * Finds a random shard for the given counter and increments it by the specified amount. This method grows the number of shards as needed. Shard count is doubled when the number of concurrent accesses is equal to the number of shards.
 * @param counterType
 * @param association
 * @param by
 * @return
 */
protected long incrementCount(String counterType,String association,long by){
  String memcacheKey=memcacheKey(counterType,association);
  String concurrentIncrementKey=memcacheKey + "String_Node_Str";
  long numShards=shardCount(counterType,association);
  try {
    long currentAccesses=memcacheService.increment(concurrentIncrementKey,1,0L);
    if (currentAccesses > numShards) {
      numShards=addShardsToShardedCounter(numShards,counterType,association);
    }
    long shardNum=generator.nextInt((int)numShards + 1);
    String counterKind=kindName(counterType);
    String name=association == null ? Long.toString(shardNum) : String.format("String_Node_Str",association,shardNum);
    Key shardKey=createKey(counterKind,name);
    incrementCounter(shardKey,association,by,by);
    memcacheService.increment(memcacheKey,by);
    return getCount(counterType,association);
  }
  finally {
    memcacheService.increment(concurrentIncrementKey,-1,0L);
  }
}
Program: 188172
Project: 188172
Buggy source:
public Object bind(ParameterBinderSet binders,ParameterDescription parameterDescription,HttpPostDataMap pathMap){
  Map<String,String[]> stringMap=pathMap.toStringMap(parameterDescription.name());
  if (!stringMap.isEmpty()) {
    try {
      Object bean=parameterDescription.classType().newInstance();
      BeanTool.load(bean,stringMap);
      return bean;
    }
 catch (    Exception e) {
      throw new BindException(e,"String_Node_Str",parameterDescription.classType(),e.getMessage());
    }
  }
  return null;
}

Fixed version (ground truth):
public Object bind(ParameterBinderSet binders,ParameterDescription parameterDescription,HttpPostDataMap pathMap){
  Map<String,Object> stringMap=pathMap.toStringMap(parameterDescription.name());
  if (!stringMap.isEmpty()) {
    try {
      Object bean=parameterDescription.classType().newInstance();
      BeanTool.load(bean,stringMap);
      return bean;
    }
 catch (    Exception e) {
      throw new BindException(e,"String_Node_Str",parameterDescription.classType(),e.getMessage());
    }
  }
  return null;
}
Program: 188173
Project: 188173
Buggy source:
public void initializeFrom(ILaunchConfiguration config){
  projectText.setText(getAttributeFromConfig(config,ATTR_PROJECT_NAME,"String_Node_Str"));
  String testClass=getAttributeFromConfig(config,ATTR_MAIN_TYPE_NAME,"String_Node_Str");
  String containerId=getAttributeFromConfig(config,ATTR_TEST_CONTAINER,"String_Node_Str");
  testClassText.setText(testClass);
  if (testClass.length() == 0 && containerId.length() > 0) {
    testClassText.setText("String_Node_Str");
    IJavaElement containerElement=JavaCore.create(containerId);
    testDirText.setText(new JavaElementLabelProvider().getText(containerElement));
    testClassRadioButton.setSelection(false);
    testDirectoryRadioButton.setSelection(true);
  }
 else {
    testClassText.setText(testClass);
    testDirText.setText("String_Node_Str");
    testClassRadioButton.setSelection(true);
    testDirectoryRadioButton.setSelection(false);
  }
  testModeChanged();
}

Fixed version (ground truth):
public void initializeFrom(ILaunchConfiguration config){
  projectText.setText(getAttributeFromConfig(config,ATTR_PROJECT_NAME,"String_Node_Str"));
  String testClass=getAttributeFromConfig(config,ATTR_MAIN_TYPE_NAME,"String_Node_Str");
  containerId=getAttributeFromConfig(config,ATTR_TEST_CONTAINER,"String_Node_Str");
  testClassText.setText(testClass);
  if (testClass.length() == 0 && containerId.length() > 0) {
    testClassText.setText("String_Node_Str");
    IJavaElement containerElement=JavaCore.create(containerId);
    testDirText.setText(new JavaElementLabelProvider().getText(containerElement));
    testClassRadioButton.setSelection(false);
    testDirectoryRadioButton.setSelection(true);
  }
 else {
    testClassText.setText(testClass);
    testDirText.setText("String_Node_Str");
    testClassRadioButton.setSelection(true);
    testDirectoryRadioButton.setSelection(false);
  }
  testModeChanged();
}
Program: 188174
Project: 188174
Buggy source:
public void performApply(ILaunchConfigurationWorkingCopy workingCopy){
  workingCopy.setAttribute(ATTR_PROJECT_NAME,projectText.getText().trim());
  if (testClassRadioButton.getSelection()) {
    workingCopy.setAttribute(ATTR_MAIN_TYPE_NAME,testClassText.getText().trim());
    workingCopy.setAttribute(ATTR_TEST_CONTAINER,"String_Node_Str");
  }
 else {
    workingCopy.setAttribute(ATTR_MAIN_TYPE_NAME,"String_Node_Str");
    workingCopy.setAttribute(ATTR_TEST_CONTAINER,testDirText.getText().trim());
  }
  try {
    PitMigrationDelegate.mapResources(workingCopy);
  }
 catch (  CoreException ce) {
    setErrorMessage(ce.getStatus().getMessage());
  }
}

Fixed version (ground truth):
public void performApply(ILaunchConfigurationWorkingCopy workingCopy){
  workingCopy.setAttribute(ATTR_PROJECT_NAME,projectText.getText().trim());
  if (testClassRadioButton.getSelection()) {
    workingCopy.setAttribute(ATTR_MAIN_TYPE_NAME,testClassText.getText().trim());
    workingCopy.setAttribute(ATTR_TEST_CONTAINER,"String_Node_Str");
  }
 else {
    workingCopy.setAttribute(ATTR_MAIN_TYPE_NAME,"String_Node_Str");
    workingCopy.setAttribute(ATTR_TEST_CONTAINER,containerId);
  }
  try {
    PitMigrationDelegate.mapResources(workingCopy);
  }
 catch (  CoreException ce) {
    setErrorMessage(ce.getStatus().getMessage());
  }
}
Program: 188175
Project: 188175
Buggy source:
private List<File> getSourceDirsForProject(IJavaProject javaProject) throws CoreException {
  Builder<File> sourceDirBuilder=ImmutableSet.builder();
  URI location=getProjectLocation(javaProject.getProject());
  IPackageFragmentRoot[] packageRoots=javaProject.getPackageFragmentRoots();
  File workspaceRoot=new File(location).getParentFile();
  for (  IPackageFragmentRoot packageRoot : packageRoots) {
    if (!packageRoot.isArchive()) {
      sourceDirBuilder.add(new File(workspaceRoot,packageRoot.getPath().toString()));
    }
  }
  return ImmutableList.copyOf(sourceDirBuilder.build());
}

Fixed version (ground truth):
private List<File> getSourceDirsForProject(IJavaProject javaProject) throws CoreException {
  Builder<File> sourceDirBuilder=ImmutableSet.builder();
  URI location=getProjectLocation(javaProject.getProject());
  IPackageFragmentRoot[] packageRoots=javaProject.getPackageFragmentRoots();
  File projectRoot=new File(location);
  for (  IPackageFragmentRoot packageRoot : packageRoots) {
    if (!packageRoot.isArchive()) {
      File packagePath=removeProjectFromPackagePath(javaProject,packageRoot.getPath());
      sourceDirBuilder.add(new File(projectRoot,packagePath.toString()));
    }
  }
  return ImmutableList.copyOf(sourceDirBuilder.build());
}
Program: 188176
Project: 188176
Buggy source:
@Override public void createPartControl(Composite parent){
  try {
    browser=new Browser(parent,SWT.NONE);
  }
 catch (  SWTError e) {
    MessageBox messageBox=new MessageBox(parent.getShell(),SWT.ICON_ERROR | SWT.OK);
    messageBox.setMessage("String_Node_Str");
    messageBox.setText("String_Node_Str");
    messageBox.open();
  }
}

Fixed version (ground truth):
@Override public void createPartControl(Composite parent){
  try {
    browser=new Browser(parent,SWT.NONE);
  }
 catch (  SWTError e) {
    MessageBox messageBox=new MessageBox(parent.getShell(),SWT.ICON_ERROR | SWT.OK);
    messageBox.setMessage("String_Node_Str");
    messageBox.setText("String_Node_Str");
    messageBox.open();
    System.exit(-1);
  }
}
Program: 188177
Project: 188177
Buggy source:
@Override public void createPartControl(Composite parent){
  try {
    browser=new Browser(parent,SWT.NONE);
  }
 catch (  SWTError e) {
    MessageBox messageBox=new MessageBox(parent.getShell(),SWT.ICON_ERROR | SWT.OK);
    messageBox.setMessage("String_Node_Str");
    messageBox.setText("String_Node_Str");
    messageBox.open();
    System.exit(-1);
  }
}

Fixed version (ground truth):
@Override public void createPartControl(Composite parent){
  try {
    browser=new Browser(parent,SWT.NONE);
  }
 catch (  SWTError e) {
    MessageBox messageBox=new MessageBox(parent.getShell(),SWT.ICON_ERROR | SWT.OK);
    messageBox.setMessage("String_Node_Str");
    messageBox.setText("String_Node_Str");
    messageBox.open();
  }
}
Program: 188178
Project: 188178
Buggy source:
private File findResultFile(File reportDir){
  for (  File file : reportDir.listFiles()) {
    if (file.isDirectory()) {
      File result=findResultFile(file);
      if (null != result) {
        return result;
      }
    }
    if ("String_Node_Str".equals(file.getName())) {
      return file;
    }
  }
  return null;
}

Fixed version (ground truth):
private File findResultFile(File reportDir){
  for (  File file : reportDir.listFiles()) {
    if (!file.isDirectory()) {
      if ("String_Node_Str".equals(file.getName())) {
        return file;
      }
    }
  }
  for (  File file : reportDir.listFiles()) {
    if (file.isDirectory()) {
      File result=findResultFile(file);
      if (null != result) {
        return result;
      }
    }
  }
  return null;
}
Program: 188179
Project: 188179
Buggy source:
@Override public String getProgramArguments(ILaunchConfiguration launchConfig) throws CoreException {
  List<String> classPath=ImmutableList.copyOf(getClassesForProject(launchConfig.getAttribute(PIT_PROJECT,"String_Node_Str")));
  List<File> sourceDirs=ImmutableList.copyOf(getSourceDirsForProject(launchConfig.getAttribute(PIT_PROJECT,"String_Node_Str")));
  PITOptions options=new PITOptionsBuilder().withClassUnderTest(launchConfig.getAttribute(PIT_TEST_CLASS,"String_Node_Str")).withClassesToMutate(classPath).withSourceDirectory(sourceDirs.get(0)).build();
  return new StringBuilder(super.getProgramArguments(launchConfig)).append(options.toCLIArgs()).toString();
}

Fixed version (ground truth):
@Override public String getProgramArguments(ILaunchConfiguration launchConfig) throws CoreException {
  List<String> classPath=ImmutableList.copyOf(getClassesForProject(launchConfig.getAttribute(PIT_PROJECT,"String_Node_Str")));
  List<File> sourceDirs=ImmutableList.copyOf(getSourceDirsForProject(launchConfig.getAttribute(PIT_PROJECT,"String_Node_Str")));
  PITOptions options=new PITOptionsBuilder().withClassUnderTest(launchConfig.getAttribute(PIT_TEST_CLASS,"String_Node_Str")).withClassesToMutate(classPath).withSourceDirectory(sourceDirs.get(0)).build();
  return new StringBuilder(super.getProgramArguments(launchConfig)).append(options.toCLIArgsAsString()).toString();
}
Program: 188180
Project: 188180
Buggy source:
private void clearDown(File directory){
  if (null != directory) {
    for (    File file : directory.listFiles()) {
      if (file.isDirectory()) {
        clearDown(directory);
      }
      file.delete();
    }
  }
}

Fixed version (ground truth):
private void clearDown(File directory){
  if (null != directory) {
    for (    File file : directory.listFiles()) {
      if (file.isDirectory()) {
        clearDown(file);
      }
      file.delete();
    }
  }
}
Program: 188181
Project: 188181
Buggy source:
@Override public void onSelectionChange(SelectionChangeEvent event){
  ListSelectionState<T> selectionState=list.getListSelectionState();
  if (selectionState != null) {
    save(selectionState);
    HistoryUtils.resolve(selectionState.getSelected());
  }
}

Fixed version (ground truth):
@Override public void onSelectionChange(SelectionChangeEvent event){
  ListSelectionState<T> selectionState=list.getListSelectionState();
  if (selectionState != null) {
    save(selectionState);
    list.getSelectionModel().clear();
    HistoryUtils.resolve(selectionState.getSelected());
  }
}
Program: 188182
Project: 188182
Buggy source:
public static <T extends IsIndexed>void bindBrowseOpener(final AsyncTableCell<T,?> list){
  list.getSelectionModel().addSelectionChangeHandler(new Handler(){
    @Override public void onSelectionChange(    SelectionChangeEvent event){
      ListSelectionState<T> selectionState=list.getListSelectionState();
      if (selectionState != null) {
        save(selectionState);
        HistoryUtils.resolve(selectionState.getSelected());
      }
    }
  }
);
}

Fixed version (ground truth):
public static <T extends IsIndexed>void bindBrowseOpener(final AsyncTableCell<T,?> list){
  list.getSelectionModel().addSelectionChangeHandler(new Handler(){
    @Override public void onSelectionChange(    SelectionChangeEvent event){
      ListSelectionState<T> selectionState=list.getListSelectionState();
      if (selectionState != null) {
        save(selectionState);
        list.getSelectionModel().clear();
        HistoryUtils.resolve(selectionState.getSelected());
      }
    }
  }
);
}
Program: 188183
Project: 188183
Buggy source:
private void createJobsSearchResultPanel(){
  jobsSearchResultPanel=new JobList(jobsListId,filterJobs,messages.searchResults(),true);
  ListSelectionUtils.bindBrowseOpener(jobsSearchResultPanel);
  jobsSearchResultPanel.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler(){
    @Override public void onSelectionChange(    SelectionChangeEvent event){
      Job job=jobsSearchResultPanel.getSelectionModel().getSelectedObject();
      if (job != null) {
        HistoryUtils.newHistory(ShowJob.RESOLVER,job.getId());
      }
    }
  }
);
  jobsSearchResultPanel.autoUpdate(10000);
}

Fixed version (ground truth):
private void createJobsSearchResultPanel(){
  jobsSearchResultPanel=new JobList(jobsListId,filterJobs,messages.searchResults(),true);
  ListSelectionUtils.bindBrowseOpener(jobsSearchResultPanel);
  jobsSearchResultPanel.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler(){
    @Override public void onSelectionChange(    SelectionChangeEvent event){
      Job job=jobsSearchResultPanel.getSelectionModel().getSelectedObject();
      if (job != null) {
        jobsSearchResultPanel.getSelectionModel().clear();
        HistoryUtils.newHistory(ShowJob.RESOLVER,job.getId());
      }
    }
  }
);
  jobsSearchResultPanel.autoUpdate(10000);
}
Program: 188184
Project: 188184
Buggy source:
@Override public void onSelectionChange(SelectionChangeEvent event){
  Job job=jobsSearchResultPanel.getSelectionModel().getSelectedObject();
  if (job != null) {
    HistoryUtils.newHistory(ShowJob.RESOLVER,job.getId());
  }
}

Fixed version (ground truth):
@Override public void onSelectionChange(SelectionChangeEvent event){
  Job job=jobsSearchResultPanel.getSelectionModel().getSelectedObject();
  if (job != null) {
    jobsSearchResultPanel.getSelectionModel().clear();
    HistoryUtils.newHistory(ShowJob.RESOLVER,job.getId());
  }
}
Program: 188185
Project: 188185
Buggy source:
@NotNull @Override public Iterator iterator(){
  return groups.iterator();
}

Fixed version (ground truth):
@Override public Iterator<ActionsGroup<T>> iterator(){
  return groups.iterator();
}
Program: 188186
Project: 188186
Buggy source:
private ReturnWithExceptions<Void,ModelObserver> preservationEventPermissionsUpdated(PreservationMetadata pm,Permissions permissions,AIPState state){
  Map<String,Object> updateFields=new HashMap<>();
  updateFields.putAll(SolrUtils.getPermissionsAsPreCalculatedFields(permissions));
  updateFields.put(RodaConstants.INDEX_STATE,SolrUtils.formatEnum(state));
  updateFields.put(RodaConstants.PRESERVATION_EVENT_AIP_ID,pm.getAipId());
  return SolrUtils.update(index,IndexedPreservationEvent.class,IdUtils.getPreservationId(pm),updateFields,this);
}

Fixed version (ground truth):
private ReturnWithExceptions<Void,ModelObserver> preservationEventPermissionsUpdated(PreservationMetadata pm,Permissions permissions,AIPState state){
  Map<String,Object> updateFields=new HashMap<>();
  updateFields.putAll(SolrUtils.getPermissionsAsPreCalculatedFields(permissions));
  updateFields.put(RodaConstants.INDEX_STATE,SolrUtils.formatEnum(state));
  updateFields.put(RodaConstants.PRESERVATION_EVENT_AIP_ID,pm.getAipId());
  updateFields.put(RodaConstants.PRESERVATION_EVENT_ID,pm.getId());
  return SolrUtils.update(index,IndexedPreservationEvent.class,IdUtils.getPreservationId(pm),updateFields,this);
}
Program: 188187
Project: 188187
Buggy source:
private void showIngestSourceObjects(final SelectedItems<?> selected){
  if (selected != null) {
    selectedList.clear();
    selectedListPanel.setVisible(true);
    if (ClientSelectedItemsUtils.isEmpty(selected) && isJobInFinalState()) {
      Label noSourceLabel=new Label(messages.noItemsToDisplay());
      selectedListPanel.add(noSourceLabel);
    }
 else     if (selected instanceof SelectedItemsList) {
      List<String> ids=((SelectedItemsList<?>)selected).getIds();
      Label filterLabel=new Label(SearchPreFilterUtils.getFilterParameterHTML(new OneOfManyFilterParameter(RodaConstants.INDEX_UUID,ids)).asString());
      selectedList.add(filterLabel);
    }
 else     if (selected instanceof SelectedItemsFilter) {
      Filter filter=((SelectedItemsFilter<?>)selected).getFilter();
      Label filterLabel=new Label(SearchPreFilterUtils.getFilterHTML(filter,selected.getSelectedClass()).asString());
      selectedList.add(filterLabel);
    }
 else {
      selectedListPanel.setVisible(false);
    }
  }
}

Fixed version (ground truth):
private void showIngestSourceObjects(final SelectedItems<?> selected){
  if (selected != null) {
    selectedList.clear();
    selectedListPanel.setVisible(true);
    if (ClientSelectedItemsUtils.isEmpty(selected) && isJobInFinalState()) {
      Label noSourceLabel=new Label(messages.noItemsToDisplay());
      selectedListPanel.add(noSourceLabel);
    }
 else     if (selected instanceof SelectedItemsList) {
      List<String> ids=((SelectedItemsList<?>)selected).getIds();
      HTML filterHTML=new HTML(SearchPreFilterUtils.getFilterParameterHTML(new OneOfManyFilterParameter(RodaConstants.INDEX_UUID,ids)));
      selectedList.add(filterHTML);
    }
 else     if (selected instanceof SelectedItemsFilter) {
      Filter filter=((SelectedItemsFilter<?>)selected).getFilter();
      HTML filterHTML=new HTML(SearchPreFilterUtils.getFilterHTML(filter,selected.getSelectedClass()));
      selectedList.add(filterHTML);
    }
 else     if (selected instanceof SelectedItemsAll) {
      Label filterLabel=new Label(messages.allOfAObject(selected.getSelectedClass()));
      filterLabel.addStyleName("String_Node_Str");
      selectedList.add(filterLabel);
    }
 else {
      selectedListPanel.setVisible(false);
    }
  }
}
Program: 188189
Project: 188189
Buggy source:
private void updateFormOrXML(){
  if (selectedBundle != null && selectedBundle.getValues() != null) {
    showXml.setVisible(true);
    if (inXML) {
      updateMetadataXML();
    }
 else {
      if (metadataTextFromForm != null && !metadataXML.getText().equals(metadataTextFromForm)) {
        Dialogs.showConfirmDialog(messages.confirmChangeToFormTitle(),messages.confirmChangeToFormMessage(),messages.dialogCancel(),messages.dialogYes(),new AsyncCallback<Boolean>(){
          @Override public void onFailure(          Throwable caught){
            AsyncCallbackUtils.defaultFailureTreatment(caught);
          }
          @Override public void onSuccess(          Boolean aBoolean){
            if (aBoolean) {
              formOrXML.clear();
              createForm(selectedBundle);
            }
 else {
              setInXML(!inXML);
            }
          }
        }
);
      }
 else {
        formOrXML.clear();
        createForm(selectedBundle);
      }
    }
  }
 else {
    formOrXML.clear();
    if (selectedBundle != null)     metadataXML.setText(selectedBundle.getTemplate());
 else     metadataXML.setText("String_Node_Str");
    formOrXML.add(metadataXML);
    showXml.setVisible(false);
  }
}

Fixed version (ground truth):
private void updateFormOrXML(){
  if (selectedBundle != null && selectedBundle.getValues() != null && !selectedBundle.getValues().isEmpty()) {
    showXml.setVisible(true);
    if (inXML) {
      updateMetadataXML();
    }
 else {
      if (metadataTextFromForm != null && !metadataXML.getText().equals(metadataTextFromForm)) {
        Dialogs.showConfirmDialog(messages.confirmChangeToFormTitle(),messages.confirmChangeToFormMessage(),messages.dialogCancel(),messages.dialogYes(),new AsyncCallback<Boolean>(){
          @Override public void onFailure(          Throwable caught){
            AsyncCallbackUtils.defaultFailureTreatment(caught);
          }
          @Override public void onSuccess(          Boolean aBoolean){
            if (aBoolean) {
              formOrXML.clear();
              createForm(selectedBundle);
            }
 else {
              setInXML(!inXML);
            }
          }
        }
);
      }
 else {
        formOrXML.clear();
        createForm(selectedBundle);
      }
    }
  }
 else {
    formOrXML.clear();
    if (selectedBundle != null) {
      metadataXML.setText(selectedBundle.getTemplate());
    }
 else {
      metadataXML.setText("String_Node_Str");
    }
    formOrXML.add(metadataXML);
    showXml.setVisible(false);
  }
}
Program: 188190
Project: 188190
Buggy source:
public void setInXML(boolean inXML){
  this.inXML=inXML;
  if (inXML) {
    showXmlIconXML.setVisible(false);
    showXmlIconForm.setVisible(true);
  }
 else {
    showXmlIconXML.setVisible(true);
    showXmlIconForm.setVisible(false);
  }
}

Fixed version (ground truth):
public void setInXML(boolean inXML){
  this.inXML=inXML;
  showXmlIconXML.setVisible(!inXML);
  showXmlIconForm.setVisible(inXML);
}
Program: 188191
Project: 188191
Buggy source:
private boolean hasModifiedForm(){
  HashMap<String,MetadataValue> formMap=new HashMap<>();
  for (  MetadataValue mv : supportedBundle.getValues()) {
    formMap.put(mv.getId(),mv);
  }
  HashMap<String,MetadataValue> bundleMap=new HashMap<>();
  for (  MetadataValue mv : bundle.getValues()) {
    bundleMap.put(mv.getId(),mv);
  }
  for (  Entry<String,MetadataValue> entry : formMap.entrySet()) {
    String key=entry.getKey();
    MetadataValue mvForm=entry.getValue();
    String formValue=mvForm != null ? mvForm.get("String_Node_Str") : "String_Node_Str";
    MetadataValue mvBundle=bundleMap.get(key);
    String bundleValue=mvBundle != null ? bundleMap.get(key).get("String_Node_Str") : "String_Node_Str";
    if ((formValue != null && !formValue.equals(bundleValue)) || (formValue == null && bundleValue != null))     return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean hasModifiedForm(){
  HashMap<String,MetadataValue> formMap=new HashMap<>();
  for (  MetadataValue mv : supportedBundle.getValues()) {
    formMap.put(mv.getId(),mv);
  }
  HashMap<String,MetadataValue> bundleMap=new HashMap<>();
  for (  MetadataValue mv : bundle.getValues()) {
    bundleMap.put(mv.getId(),mv);
  }
  for (  Entry<String,MetadataValue> entry : formMap.entrySet()) {
    String key=entry.getKey();
    MetadataValue mvForm=entry.getValue();
    String formValue=mvForm != null ? mvForm.get("String_Node_Str") : "String_Node_Str";
    MetadataValue mvBundle=bundleMap.get(key);
    String bundleValue=mvBundle != null ? bundleMap.get(key).get("String_Node_Str") : "String_Node_Str";
    if ((formValue != null && !formValue.equals(bundleValue)) || (formValue == null && bundleValue != null)) {
      return true;
    }
  }
  return false;
}
Program: 188192
Project: 188192
Buggy source:
@Override public void resolve(List<String> historyTokens,final AsyncCallback<Widget> callback){
  if (historyTokens.size() == 2 || historyTokens.size() == 3) {
    final String aipId=historyTokens.get(0);
    final String representationId=historyTokens.size() == 3 ? historyTokens.get(1) : null;
    final String descriptiveMetadataId=new HTML(historyTokens.get(historyTokens.size() - 1)).getText();
    BrowserService.Util.getInstance().retrieveDescriptiveMetadataEditBundle(aipId,representationId,descriptiveMetadataId,LocaleInfo.getCurrentLocale().getLocaleName(),new AsyncCallback<DescriptiveMetadataEditBundle>(){
      @Override public void onFailure(      Throwable caught){
        callback.onFailure(caught);
      }
      @Override public void onSuccess(      DescriptiveMetadataEditBundle bundle){
        EditDescriptiveMetadata edit=new EditDescriptiveMetadata(aipId,representationId,bundle);
        callback.onSuccess(edit);
      }
    }
);
  }
 else {
    HistoryUtils.newHistory(BrowseAIP.RESOLVER);
    callback.onSuccess(null);
  }
}

Fixed version (ground truth):
@Override public void resolve(List<String> historyTokens,final AsyncCallback<Widget> callback){
  if (historyTokens.size() == 2 || historyTokens.size() == 3) {
    final String aipId=historyTokens.get(0);
    final String representationId=historyTokens.size() == 3 ? historyTokens.get(1) : null;
    final String descriptiveMetadataId=new HTML(historyTokens.get(historyTokens.size() - 1)).getText();
    BrowserService.Util.getInstance().retrieveDescriptiveMetadataEditBundle(aipId,representationId,descriptiveMetadataId,LocaleInfo.getCurrentLocale().getLocaleName(),new AsyncCallback<DescriptiveMetadataEditBundle>(){
      @Override public void onFailure(      Throwable caught){
        callback.onFailure(caught);
      }
      @Override public void onSuccess(      DescriptiveMetadataEditBundle bundle){
        callback.onSuccess(new EditDescriptiveMetadata(aipId,representationId,bundle));
      }
    }
);
  }
 else {
    HistoryUtils.newHistory(BrowseAIP.RESOLVER);
    callback.onSuccess(null);
  }
}
Program: 188193
Project: 188193
Buggy source:
@Override public void onChange(ChangeEvent changeEvent){
  String typeString=null;
  String version=null;
  String value=type.getSelectedValue();
  if (value.contains(RodaConstants.METADATA_VERSION_SEPARATOR) && bundle.getVersion() != null) {
    typeString=value.substring(0,value.lastIndexOf(RodaConstants.METADATA_VERSION_SEPARATOR));
    version=value.substring(value.lastIndexOf(RodaConstants.METADATA_VERSION_SEPARATOR) + 1,value.length());
  }
  if (typeString == null) {
    typeString=value;
  }
  BrowserService.Util.getInstance().retrieveDescriptiveMetadataEditBundle(aipId,representationId,bundle.getId(),typeString,version,LocaleInfo.getCurrentLocale().getLocaleName(),new AsyncCallback<DescriptiveMetadataEditBundle>(){
    @Override public void onFailure(    Throwable caught){
      AsyncCallbackUtils.defaultFailureTreatment(caught);
    }
    @Override public void onSuccess(    DescriptiveMetadataEditBundle editBundle){
      bundle=editBundle;
      Set<MetadataValue> newValues=null;
      if (bundle.getValues() != null) {
        newValues=new TreeSet<>();
        for (        MetadataValue mv : bundle.getValues())         newValues.add(mv.copy());
      }
      supportedBundle=new SupportedMetadataTypeBundle(bundle.getId(),bundle.getType(),bundle.getVersion(),bundle.getId(),bundle.getRawTemplate(),newValues);
      updateFormOrXML();
    }
  }
);
}

Fixed version (ground truth):
@Override public void onChange(ChangeEvent changeEvent){
  setInXML(false);
  String typeString=null;
  String version=null;
  String value=type.getSelectedValue();
  if (value.contains(RodaConstants.METADATA_VERSION_SEPARATOR)) {
    typeString=value.substring(0,value.lastIndexOf(RodaConstants.METADATA_VERSION_SEPARATOR));
    version=value.substring(value.lastIndexOf(RodaConstants.METADATA_VERSION_SEPARATOR) + 1,value.length());
  }
  if (typeString == null) {
    typeString=value;
  }
  BrowserService.Util.getInstance().retrieveDescriptiveMetadataEditBundle(aipId,representationId,bundle.getId(),typeString,version,LocaleInfo.getCurrentLocale().getLocaleName(),new AsyncCallback<DescriptiveMetadataEditBundle>(){
    @Override public void onFailure(    Throwable caught){
      AsyncCallbackUtils.defaultFailureTreatment(caught);
    }
    @Override public void onSuccess(    DescriptiveMetadataEditBundle editBundle){
      bundle=editBundle;
      Set<MetadataValue> newValues=null;
      if (bundle.getValues() != null) {
        newValues=new TreeSet<>();
        for (        MetadataValue mv : bundle.getValues()) {
          newValues.add(mv.copy());
        }
      }
      supportedBundle=new SupportedMetadataTypeBundle(bundle.getId(),bundle.getType(),bundle.getVersion(),bundle.getId(),bundle.getRawTemplate(),newValues);
      updateFormOrXML();
    }
  }
);
}
Program: 188194
Project: 188194
Buggy source:
private void updateFormOrXML(){
  if (bundle != null && bundle.getValues() != null && !bundle.getValues().isEmpty()) {
    if (!bundle.isSimilar()) {
      formSimilarDanger.setVisible(true);
    }
 else {
      formSimilarDanger.setVisible(false);
    }
    showXml.setVisible(true);
    if (inXML) {
      updateMetadataXML();
    }
 else {
      if (metadataTextFromForm != null && !metadataXML.getText().equals(metadataTextFromForm)) {
        Dialogs.showConfirmDialog(messages.confirmChangeToFormTitle(),messages.confirmChangeToFormMessage(),messages.dialogCancel(),messages.dialogYes(),new AsyncCallback<Boolean>(){
          @Override public void onFailure(          Throwable caught){
            AsyncCallbackUtils.defaultFailureTreatment(caught);
          }
          @Override public void onSuccess(          Boolean aBoolean){
            if (aBoolean) {
              formOrXML.clear();
              createForm(supportedBundle);
            }
 else {
              setInXML(!inXML);
            }
          }
        }
);
      }
 else {
        formOrXML.clear();
        createForm(supportedBundle);
      }
    }
  }
 else {
    inXML=true;
    formSimilarDanger.setVisible(false);
    formOrXML.clear();
    if (bundle != null) {
      metadataXML.setText(bundle.getXml());
    }
 else {
      metadataXML.setText("String_Node_Str");
    }
    formOrXML.add(metadataXML);
    showXml.setVisible(false);
    metadataTextFromForm=null;
  }
}

Fixed version (ground truth):
private void updateFormOrXML(){
  if (bundle != null && bundle.getValues() != null && !bundle.getValues().isEmpty()) {
    if (!bundle.isSimilar()) {
      formSimilarDanger.setVisible(true);
    }
 else {
      formSimilarDanger.setVisible(false);
    }
    showXml.setVisible(true);
    if (inXML) {
      updateMetadataXML();
    }
 else {
      if (metadataTextFromForm != null && !metadataXML.getText().equals(metadataTextFromForm)) {
        Dialogs.showConfirmDialog(messages.confirmChangeToFormTitle(),messages.confirmChangeToFormMessage(),messages.dialogCancel(),messages.dialogYes(),new AsyncCallback<Boolean>(){
          @Override public void onFailure(          Throwable caught){
            AsyncCallbackUtils.defaultFailureTreatment(caught);
          }
          @Override public void onSuccess(          Boolean aBoolean){
            if (aBoolean) {
              formOrXML.clear();
              createForm(supportedBundle);
            }
 else {
              setInXML(!inXML);
            }
          }
        }
);
      }
 else {
        formOrXML.clear();
        createForm(supportedBundle);
      }
    }
  }
 else {
    setInXML(true);
    formSimilarDanger.setVisible(false);
    formOrXML.clear();
    if (bundle != null) {
      metadataXML.setText(bundle.getXml());
    }
 else {
      metadataXML.setText("String_Node_Str");
    }
    formOrXML.add(metadataXML);
    showXml.setVisible(false);
    metadataTextFromForm=null;
  }
}
Program: 188196
Project: 188196
Buggy source:
public void setInXML(boolean inXML){
  this.inXML=inXML;
  if (inXML) {
    showXmlIconXML.setVisible(false);
    showXmlIconForm.setVisible(true);
  }
 else {
    showXmlIconXML.setVisible(true);
    showXmlIconForm.setVisible(false);
  }
}

Fixed version (ground truth):
public void setInXML(boolean inXML){
  this.inXML=inXML;
  showXmlIconXML.setVisible(!inXML);
  showXmlIconForm.setVisible(inXML);
}
Program: 188197
Project: 188197
Buggy source:
private void setPermissions(final String name,final Set<String> directRoles,final Set<String> allRoles){
  permissionsPanel.init(new AsyncCallback<Boolean>(){
    @Override public void onSuccess(    Boolean result){
      Set<String> indirectRoles=new HashSet<>(allRoles);
      indirectRoles.removeAll(directRoles);
      permissionsPanel.checkPermissions(directRoles,name.equals(RodaConstants.ADMINISTRATORS));
      permissionsPanel.checkPermissions(indirectRoles,true);
      WCAGUtilities.getInstance().makeAccessible(permissionsSelectPanel.getElement());
    }
    @Override public void onFailure(    Throwable caught){
      AsyncCallbackUtils.defaultFailureTreatment(caught);
      HistoryUtils.newHistory(MemberManagement.RESOLVER);
    }
  }
);
}

Fixed version (ground truth):
private void setPermissions(final String name,final Set<String> directRoles,final Set<String> allRoles){
  permissionsPanel.init(new AsyncCallback<Boolean>(){
    @Override public void onSuccess(    Boolean result){
      Set<String> indirectRoles=new HashSet<>(allRoles);
      indirectRoles.removeAll(directRoles);
      permissionsPanel.checkPermissions(directRoles,RodaConstants.ADMINISTRATORS.equals(name));
      permissionsPanel.checkPermissions(indirectRoles,true);
      WCAGUtilities.getInstance().makeAccessible(permissionsSelectPanel.getElement());
    }
    @Override public void onFailure(    Throwable caught){
      AsyncCallbackUtils.defaultFailureTreatment(caught);
      HistoryUtils.newHistory(MemberManagement.RESOLVER);
    }
  }
);
}
Program: 188198
Project: 188198
Buggy source:
@Override public void onSuccess(Boolean result){
  Set<String> indirectRoles=new HashSet<>(allRoles);
  indirectRoles.removeAll(directRoles);
  permissionsPanel.checkPermissions(directRoles,name.equals(RodaConstants.ADMINISTRATORS));
  permissionsPanel.checkPermissions(indirectRoles,true);
  WCAGUtilities.getInstance().makeAccessible(permissionsSelectPanel.getElement());
}

Fixed version (ground truth):
@Override public void onSuccess(Boolean result){
  Set<String> indirectRoles=new HashSet<>(allRoles);
  indirectRoles.removeAll(directRoles);
  permissionsPanel.checkPermissions(directRoles,RodaConstants.ADMINISTRATORS.equals(name));
  permissionsPanel.checkPermissions(indirectRoles,true);
  WCAGUtilities.getInstance().makeAccessible(permissionsSelectPanel.getElement());
}
Program: 188199
Project: 188199
Buggy source:
@Override public void onClick(ClickEvent event){
  JavascriptUtils.scrollToTop();
}

Fixed version (ground truth):
@Override public void onClick(ClickEvent event){
  if (!relation.getObjectType().equals(RelationObjectType.WEB)) {
    JavascriptUtils.scrollToTop();
  }
}
Program: 188200
Project: 188200
Buggy source:
private Widget createRelationViewer(RepresentationInformationRelation relation){
  Widget widgetToAdd=null;
  String title=StringUtils.isNotBlank(relation.getTitle()) ? relation.getTitle() : relation.getLink();
  if (relation.getObjectType().equals(RelationObjectType.TEXT)) {
    widgetToAdd=new Label(title);
  }
 else {
    Anchor anchor=null;
    if (relation.getObjectType().equals(RelationObjectType.AIP)) {
      anchor=new Anchor(title,HistoryUtils.createHistoryHashLink(HistoryUtils.getHistoryBrowse(relation.getLink())));
    }
 else     if (relation.getObjectType().equals(RelationObjectType.REPRESENTATION_INFORMATION)) {
      List<String> history=new ArrayList<>();
      history.addAll(ShowRepresentationInformation.RESOLVER.getHistoryPath());
      history.add(relation.getLink());
      anchor=new Anchor(title,HistoryUtils.createHistoryHashLink(history));
    }
 else     if (relation.getObjectType().equals(RelationObjectType.WEB)) {
      anchor=new Anchor(title,relation.getLink());
    }
    if (anchor != null) {
      anchor.addClickHandler(new ClickHandler(){
        @Override public void onClick(        ClickEvent event){
          JavascriptUtils.scrollToTop();
        }
      }
);
      widgetToAdd=anchor;
    }
  }
  return widgetToAdd;
}

Fixed version (ground truth):
private Widget createRelationViewer(RepresentationInformationRelation relation){
  Widget widgetToAdd=null;
  String title=StringUtils.isNotBlank(relation.getTitle()) ? relation.getTitle() : relation.getLink();
  if (relation.getObjectType().equals(RelationObjectType.TEXT)) {
    widgetToAdd=new Label(title);
  }
 else {
    Anchor anchor=null;
    if (relation.getObjectType().equals(RelationObjectType.AIP)) {
      anchor=new Anchor(title,HistoryUtils.createHistoryHashLink(HistoryUtils.getHistoryBrowse(relation.getLink())));
    }
 else     if (relation.getObjectType().equals(RelationObjectType.REPRESENTATION_INFORMATION)) {
      List<String> history=new ArrayList<>();
      history.addAll(ShowRepresentationInformation.RESOLVER.getHistoryPath());
      history.add(relation.getLink());
      anchor=new Anchor(title,HistoryUtils.createHistoryHashLink(history));
    }
 else     if (relation.getObjectType().equals(RelationObjectType.WEB)) {
      anchor=new Anchor(title,relation.getLink());
      anchor.getElement().setAttribute("String_Node_Str","String_Node_Str");
    }
    if (anchor != null) {
      anchor.addClickHandler(new ClickHandler(){
        @Override public void onClick(        ClickEvent event){
          if (!relation.getObjectType().equals(RelationObjectType.WEB)) {
            JavascriptUtils.scrollToTop();
          }
        }
      }
);
      widgetToAdd=anchor;
    }
  }
  return widgetToAdd;
}
Program: 188203
Project: 188203
Buggy source:
public void resolve(List<String> historyTokens,AsyncCallback<Widget> callback){
  gettingFilterResults=true;
  createPanel.setVisible(false);
  resultsPanel.setVisible(false);
  if (historyTokens.size() == 2) {
    Filter filter=createFilterAndSubtitleFromHistoryTokens(historyTokens);
    String[] parts=RepresentationInformationUtils.breakFilterIntoParts(historyTokens.get(1));
    createPanelTitle.setHTML(messages.representationInformationNoAssociations(parts[0],parts[1],parts[2]));
    resultsPanelTitle.setHTML(messages.representationInformationAssociatedWith(parts[0],parts[1],parts[2]));
    description.setHTML(messages.representationInformationAssociatedWithDescription(parts[0],parts[1],parts[2]));
    addWithAssociationDialogTitle=messages.representationInformationAssociateWith(parts[0],parts[1],parts[2]);
    searchPanel.setDefaultFilter(filter,true);
    representationInformationList.setFilter(filter);
    searchPanel.clearSearchInputBox();
    callback.onSuccess(this);
  }
 else {
    HistoryUtils.newHistory(RESOLVER);
    callback.onSuccess(null);
  }
}

Fixed version (ground truth):
public void resolve(List<String> historyTokens,AsyncCallback<Widget> callback){
  gettingFilterResults=true;
  createPanel.setVisible(false);
  resultsPanel.setVisible(false);
  if (historyTokens.size() == 2) {
    Filter filter=createFilterFromHistoryTokens(historyTokens);
    String[] parts=RepresentationInformationUtils.breakFilterIntoParts(historyTokens.get(1));
    createPanelTitle.setHTML(messages.representationInformationNoAssociations(parts[0],parts[1],parts[2]));
    resultsPanelTitle.setHTML(messages.representationInformationAssociatedWith(parts[0],parts[1],parts[2]));
    description.setHTML(messages.representationInformationAssociatedWithDescription(parts[0],parts[1],parts[2]));
    addWithAssociationDialogTitle=messages.representationInformationAssociateWith(parts[0],parts[1],parts[2]);
    searchPanel.setDefaultFilter(filter,true);
    representationInformationList.setFilter(filter);
    searchPanel.clearSearchInputBox();
    callback.onSuccess(this);
  }
 else {
    HistoryUtils.newHistory(RESOLVER);
    callback.onSuccess(null);
  }
}
Program: 188204
Project: 188204
Buggy source:
public void resolve(List<String> historyTokens,AsyncCallback<Widget> callback){
  if (historyTokens.isEmpty()) {
    searchPanel.setDefaultFilter(filter,true);
    representationInformationList.setFilter(filter);
    searchPanel.clearSearchInputBox();
    callback.onSuccess(this);
  }
 else {
    String basePage=historyTokens.remove(0);
    if (ShowRepresentationInformation.RESOLVER.getHistoryToken().equals(basePage)) {
      ShowRepresentationInformation.RESOLVER.resolve(historyTokens,callback);
    }
 else     if (CreateRepresentationInformation.RESOLVER.getHistoryToken().equals(basePage)) {
      CreateRepresentationInformation.RESOLVER.resolve(historyTokens,callback);
    }
 else     if (EditRepresentationInformation.RESOLVER.getHistoryToken().equals(basePage)) {
      EditRepresentationInformation.RESOLVER.resolve(historyTokens,callback);
    }
 else     if (RepresentationInformationAssociations.RESOLVER.getHistoryToken().equals(basePage)) {
      RepresentationInformationAssociations.RESOLVER.resolve(historyTokens,callback);
    }
 else {
      HistoryUtils.newHistory(RESOLVER);
      callback.onSuccess(null);
    }
  }
}

Fixed version (ground truth):
public void resolve(List<String> historyTokens,AsyncCallback<Widget> callback){
  if (historyTokens.isEmpty()) {
    filter.setParameters(new ArrayList<>());
    searchPanel.setDefaultFilter(filter,true);
    representationInformationList.setFilter(filter);
    searchPanel.clearSearchInputBox();
    callback.onSuccess(this);
  }
 else {
    String basePage=historyTokens.remove(0);
    if (ShowRepresentationInformation.RESOLVER.getHistoryToken().equals(basePage)) {
      ShowRepresentationInformation.RESOLVER.resolve(historyTokens,callback);
    }
 else     if (CreateRepresentationInformation.RESOLVER.getHistoryToken().equals(basePage)) {
      CreateRepresentationInformation.RESOLVER.resolve(historyTokens,callback);
    }
 else     if (EditRepresentationInformation.RESOLVER.getHistoryToken().equals(basePage)) {
      EditRepresentationInformation.RESOLVER.resolve(historyTokens,callback);
    }
 else     if (RepresentationInformationAssociations.RESOLVER.getHistoryToken().equals(basePage)) {
      RepresentationInformationAssociations.RESOLVER.resolve(historyTokens,callback);
    }
 else     if (Search.RESOLVER.getHistoryToken().equals(basePage)) {
      setFilterFromHistoryTokens(historyTokens);
      searchPanel.setDefaultFilter(filter,true);
      representationInformationList.setFilter(filter);
      searchPanel.clearSearchInputBox();
      callback.onSuccess(this);
    }
 else {
      HistoryUtils.newHistory(RESOLVER);
      callback.onSuccess(null);
    }
  }
}
Program: 188206
Project: 188206
Buggy source:
String ingestTransferItemInfo(Date creationDate,String readableFileSize);

Fixed version (ground truth):
String ingestTransferItemInfo(String creationDate,String readableFileSize);