nus-yam/ex-repair huggingface dataset:
Program: 97160
Project: 97160
Buggy source:
public void saveState(IMemento memento){
  for (  String option : optionsMap.keySet()) {
    memento.putString(OPTIONS_KEY_ID + option.replaceAll("String_Node_Str","String_Node_Str"),optionsMap.get(option).toString());
  }
  for (  Entry<String,IOptionConfigurationHandler<?>> entry : configurableOptionSet.entrySet()) {
    IOptionConfigurationHandler<?> handler=entry.getValue();
    String[] config=handler.toStore();
    if (config != null && config.length > 0) {
      memento.putString(OPTION_CONFIGS_KEY_ID + entry.getKey().replaceAll("String_Node_Str","String_Node_Str"),StringUtils.join(config,ENTRY_SEPARATOR));
    }
  }
}

Fixed version (ground truth):
public void saveState(IMemento memento){
  for (  SearchOption option : optionsMap.keySet()) {
    memento.putString(OPTIONS_KEY_ID + option.name(),optionsMap.get(option).toString());
  }
  for (  Entry<SearchOption,IOptionConfigurationHandler<?>> entry : configurableOptionSet.entrySet()) {
    IOptionConfigurationHandler<?> handler=entry.getValue();
    String[] config=handler.toStore();
    if (config != null && config.length > 0) {
      memento.putString(OPTION_CONFIGS_KEY_ID + entry.getKey().name(),StringUtils.join(config,ENTRY_SEPARATOR));
    }
  }
}
Program: 97161
Project: 97161
Buggy source:
public boolean isArtifactTypeFilterEnabled(){
  return isOptionSelected(SearchOption.Artifact_Types.asLabel());
}

Fixed version (ground truth):
public boolean isArtifactTypeFilterEnabled(){
  return isOptionSelected(SearchOption.Artifact_Types);
}
Program: 97162
Project: 97162
Buggy source:
public static Map<String,IOptionConfigurationHandler<?>> getConfigurableOptions(){
  if (configurable == null) {
    configurable=new HashMap<String,IOptionConfigurationHandler<?>>();
    for (    SearchOption option : SearchOption.values()) {
      if (option.isConfigurable()) {
        configurable.put(option.asLabel(),option.getConfigHandler());
      }
    }
  }
  return configurable;
}

Fixed version (ground truth):
public static Map<SearchOption,IOptionConfigurationHandler<?>> getConfigurableOptions(){
  if (configurable == null) {
    configurable=new HashMap<SearchOption,IOptionConfigurationHandler<?>>();
    for (    SearchOption option : SearchOption.values()) {
      if (option.isConfigurable()) {
        configurable.put(option,option.getConfigHandler());
      }
    }
  }
  return configurable;
}
Program: 97163
Project: 97163
Buggy source:
public boolean isAttributeTypeFilterEnabled(){
  return isOptionSelected(SearchOption.Attribute_Types.asLabel());
}

Fixed version (ground truth):
public boolean isAttributeTypeFilterEnabled(){
  return isOptionSelected(SearchOption.Attribute_Types);
}
Program: 97164
Project: 97164
Buggy source:
private void updateExactMatchOptions(){
  Button caseBtn=optionsButtons.get(SearchOption.Case_Sensitive.asLabel());
  Button mwoBtn=optionsButtons.get(SearchOption.Match_Word_Order.asLabel());
  boolean exactMatch=isExactMatchEnabled();
  caseBtn.setEnabled(!exactMatch);
  mwoBtn.setEnabled(!exactMatch);
}

Fixed version (ground truth):
private void updateExactMatchOptions(){
  Button caseBtn=optionsButtons.get(SearchOption.Case_Sensitive);
  Button mwoBtn=optionsButtons.get(SearchOption.Match_Word_Order);
  boolean exactMatch=isExactMatchEnabled();
  caseBtn.setEnabled(!exactMatch);
  mwoBtn.setEnabled(!exactMatch);
}
Program: 97165
Project: 97165
Buggy source:
public QuickSearchOptionComposite(Composite parent,int style){
  super(parent,style);
  this.optionsButtons=new LinkedHashMap<String,Button>();
  this.textAreas=new HashMap<String,Text>();
  this.optionsMap=new LinkedHashMap<String,Boolean>();
  this.configurableOptionSet=new HashMap<String,IOptionConfigurationHandler<?>>();
  for (  String option : SearchOption.asLabels()) {
    this.optionsMap.put(option,false);
  }
  for (  String option : SearchOption.getConfigurableOptions().keySet()) {
    this.optionsMap.put(option,false);
    this.configurableOptionSet.put(option,SearchOption.getConfigurableOptions().get(option));
  }
  createControl(this);
}

Fixed version (ground truth):
public QuickSearchOptionComposite(Composite parent,int style){
  super(parent,style);
  this.optionsButtons=new LinkedHashMap<SearchOption,Button>();
  this.textAreas=new HashMap<SearchOption,Text>();
  this.optionsMap=new LinkedHashMap<SearchOption,Boolean>();
  this.configurableOptionSet=new HashMap<SearchOption,IOptionConfigurationHandler<?>>();
  for (  SearchOption option : SearchOption.values()) {
    this.optionsMap.put(option,false);
  }
  for (  SearchOption option : SearchOption.getConfigurableOptions().keySet()) {
    this.optionsMap.put(option,false);
    this.configurableOptionSet.put(option,SearchOption.getConfigurableOptions().get(option));
  }
  createControl(this);
}
Program: 97166
Project: 97166
Buggy source:
public IOptionConfigurationHandler<?> getConfiguration(String key){
  return this.configurableOptionSet.get(key);
}

Fixed version (ground truth):
public IOptionConfigurationHandler<?> getConfiguration(SearchOption option){
  return this.configurableOptionSet.get(option);
}
Program: 97167
Project: 97167
Buggy source:
public IArtifactType[] getArtifactTypeFilter(){
  IOptionConfigurationHandler<?> handler=getConfiguration(SearchOption.Artifact_Types.asLabel());
  IArtifactType[] types=(IArtifactType[])handler.getConfigData();
  return isArtifactTypeFilterEnabled() ? types : new IArtifactType[0];
}

Fixed version (ground truth):
public IArtifactType[] getArtifactTypeFilter(){
  IOptionConfigurationHandler<?> handler=getConfiguration(SearchOption.Artifact_Types);
  IArtifactType[] types=(IArtifactType[])handler.getConfigData();
  return isArtifactTypeFilterEnabled() ? types : new IArtifactType[0];
}
Program: 97168
Project: 97168
Buggy source:
public IAttributeType[] getAttributeTypeFilter(){
  IOptionConfigurationHandler<?> handler=getConfiguration(SearchOption.Attribute_Types.asLabel());
  IAttributeType[] types=(IAttributeType[])handler.getConfigData();
  return isAttributeTypeFilterEnabled() ? types : new IAttributeType[0];
}

Fixed version (ground truth):
public IAttributeType[] getAttributeTypeFilter(){
  IOptionConfigurationHandler<?> handler=getConfiguration(SearchOption.Attribute_Types);
  IAttributeType[] types=(IAttributeType[])handler.getConfigData();
  return isAttributeTypeFilterEnabled() ? types : new IAttributeType[0];
}
Program: 97170
Project: 97170
Buggy source:
private void initializeOptions(Map<String,Boolean> options){
  for (  String option : options.keySet()) {
    Boolean isSelected=options.get(option);
    Button button=getOrCreateOptionsButton(option);
    button.setSelection(isSelected);
    this.optionsMap.put(option,isSelected);
  }
  updateExactMatchOptions();
}

Fixed version (ground truth):
private void initializeOptions(Map<SearchOption,Boolean> options){
  for (  SearchOption option : options.keySet()) {
    Boolean isSelected=options.get(option);
    Button button=getOrCreateOptionsButton(option);
    button.setSelection(isSelected);
    this.optionsMap.put(option,isSelected);
  }
  updateExactMatchOptions();
}
Program: 97171
Project: 97171
Buggy source:
private void setHelpContextForOption(String optionId,HelpContext helpContext){
  Control control=getOrCreateOptionsButton(optionId);
  if (Widgets.isAccessible(control)) {
    HelpUtil.setHelp(control,helpContext);
  }
}

Fixed version (ground truth):
private void setHelpContextForOption(SearchOption option,HelpContext helpContext){
  Control control=getOrCreateOptionsButton(option);
  if (Widgets.isAccessible(control)) {
    HelpUtil.setHelp(control,helpContext);
  }
}
Program: 97172
Project: 97172
Buggy source:
private void createControl(Composite parent){
  this.optionGroup=new Group(parent,SWT.NONE);
  this.optionGroup.setLayout(new GridLayout());
  this.optionGroup.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
  this.optionGroup.setText("String_Node_Str");
  initializeOptions(optionsMap);
  for (  SearchOption option : SearchOption.values()) {
    setHelpContextForOption(option.asLabel(),option.getHelpContext());
    setToolTipForOption(option.asLabel(),option.getToolTip());
  }
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(ALayout.getZeroMarginLayout());
  composite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
}

Fixed version (ground truth):
private void createControl(Composite parent){
  this.optionGroup=new Group(parent,SWT.NONE);
  this.optionGroup.setLayout(new GridLayout());
  this.optionGroup.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
  this.optionGroup.setText("String_Node_Str");
  initializeOptions(optionsMap);
  for (  SearchOption option : SearchOption.values()) {
    setHelpContextForOption(option,option.getHelpContext());
    setToolTipForOption(option,option.getToolTip());
  }
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(ALayout.getZeroMarginLayout());
  composite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
}
Program: 97173
Project: 97173
Buggy source:
public boolean isExactMatchEnabled(){
  return isOptionSelected(SearchOption.Exact_Match.asLabel());
}

Fixed version (ground truth):
public boolean isExactMatchEnabled(){
  return isOptionSelected(SearchOption.Exact_Match);
}
Program: 97174
Project: 97174
Buggy source:
public void loadState(IMemento memento){
  Map<String,String[]> configs=new HashMap<String,String[]>();
  Map<String,Boolean> options=new HashMap<String,Boolean>();
  for (  SearchOption option : SearchOption.values()) {
    options.put(option.asLabel(),new Boolean(memento.getString(OPTIONS_KEY_ID + option.name())));
    if (option.isConfigurable()) {
      String configuration=memento.getString(OPTION_CONFIGS_KEY_ID + option.name());
      if (Strings.isValid(configuration)) {
        String[] values=configuration.split(ENTRY_SEPARATOR);
        configs.put(option.asLabel(),values);
      }
    }
  }
  initializeOptions(options);
  initializeConfigurations(configs);
}

Fixed version (ground truth):
public void loadState(IMemento memento){
  Map<SearchOption,String[]> configs=new HashMap<SearchOption,String[]>();
  Map<SearchOption,Boolean> options=new HashMap<SearchOption,Boolean>();
  for (  SearchOption option : SearchOption.values()) {
    options.put(option,new Boolean(memento.getString(OPTIONS_KEY_ID + option.name())));
    if (option.isConfigurable()) {
      String configuration=memento.getString(OPTION_CONFIGS_KEY_ID + option.name());
      if (Strings.isValid(configuration)) {
        String[] values=configuration.split(ENTRY_SEPARATOR);
        configs.put(option,values);
      }
    }
  }
  initializeOptions(options);
  initializeConfigurations(configs);
}
Program: 97175
Project: 97175
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  configHandler.configure();
  searchText.setText(configHandler.toString());
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  configHandler.configure();
  if (option.equals(SearchOption.Attribute_Types)) {
    attributeSearchText.setText(configHandler.toString());
  }
 else   if (option.equals(SearchOption.Artifact_Types)) {
    artifactSearchText.setText(configHandler.toString());
  }
}
Program: 97176
Project: 97176
Buggy source:
private Button getOrCreateOptionsButton(String option){
  Button toReturn=this.optionsButtons.get(option);
  if (toReturn == null) {
    toReturn=createButton(this.optionGroup,option);
    this.optionsButtons.put(option,toReturn);
  }
  return toReturn;
}

Fixed version (ground truth):
private Button getOrCreateOptionsButton(SearchOption option){
  Button toReturn=this.optionsButtons.get(option);
  if (toReturn == null) {
    toReturn=createButton(this.optionGroup,option);
    this.optionsButtons.put(option,toReturn);
  }
  return toReturn;
}
Program: 97177
Project: 97177
Buggy source:
public boolean isOptionSelected(String key){
  Boolean value=optionsMap.get(key);
  return value != null ? value.booleanValue() : false;
}

Fixed version (ground truth):
public boolean isOptionSelected(SearchOption option){
  Boolean value=optionsMap.get(option);
  return value != null ? value.booleanValue() : false;
}
Program: 97178
Project: 97178
Buggy source:
private void setToolTipForOption(String optionId,String toolTip){
  Control control=getOrCreateOptionsButton(optionId);
  if (Widgets.isAccessible(control)) {
    control.setToolTipText(toolTip);
  }
}

Fixed version (ground truth):
private void setToolTipForOption(SearchOption option,String toolTip){
  Control control=getOrCreateOptionsButton(option);
  if (Widgets.isAccessible(control)) {
    control.setToolTipText(toolTip);
  }
}
Program: 97179
Project: 97179
Buggy source:
public boolean isMatchWordOrderEnabled(){
  return isOptionSelected(SearchOption.Match_Word_Order.asLabel());
}

Fixed version (ground truth):
public boolean isMatchWordOrderEnabled(){
  return isOptionSelected(SearchOption.Match_Word_Order);
}
Program: 97180
Project: 97180
Buggy source:
public boolean isCaseSensitiveEnabled(){
  return isOptionSelected(SearchOption.Case_Sensitive.asLabel());
}

Fixed version (ground truth):
public boolean isCaseSensitiveEnabled(){
  return isOptionSelected(SearchOption.Case_Sensitive);
}
Program: 97181
Project: 97181
Buggy source:
private void initializeConfigurations(Map<String,String[]> items){
  for (  String key : items.keySet()) {
    IOptionConfigurationHandler<?> handler=configurableOptionSet.get(key);
    if (handler != null) {
      handler.loadFrom(items.get(key));
      Text text=textAreas.get(key);
      if (text != null) {
        text.setText(handler.toString());
      }
    }
  }
}

Fixed version (ground truth):
private void initializeConfigurations(Map<SearchOption,String[]> items){
  for (  SearchOption option : items.keySet()) {
    IOptionConfigurationHandler<?> handler=configurableOptionSet.get(option);
    if (handler != null) {
      handler.loadFrom(items.get(option));
      Text text=textAreas.get(option);
      if (text != null) {
        text.setText(handler.toString());
      }
    }
  }
}
Program: 97182
Project: 97182
Buggy source:
private void diff(List<Change> changes,Collection<Artifact> endArtifacts,String diffPrefix,TransactionDelta txDelta) throws OseeCoreException {
  Collection<ArtifactDelta> artifactDeltas=new ArrayList<ArtifactDelta>();
  Set<Integer> addedIds=new HashSet<Integer>();
  Set<Integer> changeIds=new HashSet<Integer>(changes.size());
  for (  Change change : changes) {
    changeIds.add(change.getArtId());
  }
  for (  Artifact art : endArtifacts) {
    Integer artId=art.getArtId();
    if (changeIds.contains(artId)) {
      Change newChange=findChange(artId,changes);
      if (newChange != null && !(newChange.getChangeItem() instanceof RelationChangeItem) && !addedIds.contains(artId)) {
        artifactDeltas.add(newChange.getDelta());
        addedIds.add(artId);
      }
    }
 else {
      Artifact wasArt=ArtifactQuery.getArtifactFromId(artId,txDelta.getEndTx().getBranch());
      artifactDeltas.add(new ArtifactDelta(txDelta,wasArt,wasArt,wasArt));
      addedIds.add(artId);
    }
  }
  if (!artifactDeltas.isEmpty()) {
    RendererManager.diffWithRenderer(artifactDeltas,diffPrefix,renderer,renderer.getValues());
  }
}

Fixed version (ground truth):
private void diff(List<Change> changes,Collection<Artifact> endArtifacts,String diffPrefix,TransactionDelta txDelta) throws OseeCoreException {
  Collection<ArtifactDelta> artifactDeltas=new ArrayList<ArtifactDelta>();
  Set<Integer> addedIds=new HashSet<Integer>();
  Set<Integer> changeIds=new HashSet<Integer>(changes.size());
  for (  Change change : changes) {
    changeIds.add(change.getArtId());
  }
  IOseeBranch endBranch=txDelta.getEndTx().getBranch();
  for (  Artifact art : endArtifacts) {
    Integer artId=art.getArtId();
    if (changeIds.contains(artId)) {
      Change newChange=findChange(artId,changes);
      if (newChange != null && !(newChange.getChangeItem() instanceof RelationChangeItem) && !addedIds.contains(artId)) {
        artifactDeltas.add(newChange.getDelta());
        addedIds.add(artId);
      }
    }
 else     if (ArtifactQuery.checkArtifactFromId(artId,endBranch,DeletionFlag.EXCLUDE_DELETED) == null) {
      artifactDeltas.add(new ArtifactDelta(txDelta,null,art));
      addedIds.add(artId);
    }
 else {
      Artifact wasArt=ArtifactQuery.getArtifactFromId(artId,endBranch);
      artifactDeltas.add(new ArtifactDelta(txDelta,wasArt,wasArt,wasArt));
      addedIds.add(artId);
    }
  }
  if (!artifactDeltas.isEmpty()) {
    RendererManager.diffWithRenderer(artifactDeltas,diffPrefix,renderer,renderer.getValues());
  }
}
Program: 97183
Project: 97183
Buggy source:
@Override protected Control createDialogArea(Composite container){
  Control c=super.createDialogArea(container);
  getTreeViewer().setSorter(new ViewerSorter(){
    @SuppressWarnings("String_Node_Str") @Override public int compare(    Viewer viewer,    Object e1,    Object e2){
      User user1=(User)e1;
      User user2=(User)e2;
      try {
        if (UserManager.getUser().equals(user1)) {
          return -1;
        }
        if (UserManager.getUser().equals(user2)) {
          return 1;
        }
        Collection<? extends Object> initialSel=getInitialSelections();
        if (initialSel != null) {
          if (initialSel.contains(user1) && initialSel.contains(user2)) {
            return getComparator().compare(user1.getName(),user2.getName());
          }
          if (initialSel.contains(user1)) {
            return -1;
          }
          if (initialSel.contains(user2)) {
            return 1;
          }
        }
        if (teamMembers != null) {
          if (teamMembers.contains(user1) && teamMembers.contains(user2)) {
            return getComparator().compare(user1.getName(),user2.getName());
          }
          if (teamMembers.contains(user1)) {
            return -1;
          }
          if (teamMembers.contains(user2)) {
            return 1;
          }
        }
        return getComparator().compare(user1.getName(),user2.getName());
      }
 catch (      OseeCoreException ex) {
        return -1;
      }
    }
  }
);
  return c;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite container){
  Control c=super.createDialogArea(container);
  if (teamMembers != null) {
    ((UserCheckTreeLabelProvider)getTreeViewer().getViewer().getLabelProvider()).setTeamMembers(teamMembers);
  }
  getTreeViewer().setSorter(new ViewerSorter(){
    @SuppressWarnings("String_Node_Str") @Override public int compare(    Viewer viewer,    Object e1,    Object e2){
      User user1=(User)e1;
      User user2=(User)e2;
      try {
        if (UserManager.getUser().equals(user1)) {
          return -1;
        }
        if (UserManager.getUser().equals(user2)) {
          return 1;
        }
        Collection<? extends Object> initialSel=getInitialSelections();
        if (initialSel != null) {
          if (initialSel.contains(user1) && initialSel.contains(user2)) {
            return getComparator().compare(user1.getName(),user2.getName());
          }
          if (initialSel.contains(user1)) {
            return -1;
          }
          if (initialSel.contains(user2)) {
            return 1;
          }
        }
        if (teamMembers != null) {
          if (teamMembers.contains(user1) && teamMembers.contains(user2)) {
            return getComparator().compare(user1.getName(),user2.getName());
          }
          if (teamMembers.contains(user1)) {
            return -1;
          }
          if (teamMembers.contains(user2)) {
            return 1;
          }
        }
        return getComparator().compare(user1.getName(),user2.getName());
      }
 catch (      OseeCoreException ex) {
        return -1;
      }
    }
  }
);
  return c;
}
Program: 97185
Project: 97185
Buggy source:
public final T get() throws OseeCoreException {
  T object=instanceReference.get();
  if (object == null) {
    FutureTask<T> task;
synchronized (lock) {
      if (lastLoader != null) {
        task=lastLoader;
      }
 else {
        task=createLoaderTask();
        lastLoader=task;
        task.run();
      }
    }
    try {
      object=task.get();
      instanceReference.set(object);
    }
 catch (    Exception ex) {
      throw new OseeCoreException(ex);
    }
  }
  return object;
}

Fixed version (ground truth):
public final T get() throws OseeCoreException {
  T object=instanceReference.get();
  if (object == null) {
    FutureTask<T> task;
synchronized (lock) {
      if (lastLoader != null) {
        task=lastLoader;
      }
 else {
        task=createLoaderTask();
        lastLoader=task;
        task.run();
      }
    }
    try {
      object=task.get();
      instanceReference.set(object);
    }
 catch (    Exception ex) {
      Throwable cause=ex.getCause();
      if (cause == null) {
        cause=ex;
      }
      throw new OseeCoreException(cause);
    }
  }
  return object;
}
Program: 97186
Project: 97186
Buggy source:
@Override public ITaskEditorProvider getTaskEditorProviderCopy(){
  return new ITaskEditorProvider(){
    @Override public void setTableLoadOptions(    TableLoadOption... tableLoadOptions){
    }
    @Override public void setCustomizeData(    CustomizeData customizeData){
    }
    @Override public Collection<? extends Artifact> getTaskEditorTaskArtifacts() throws OseeCoreException {
      AtsChangeSet changes=new AtsChangeSet(getClass().getSimpleName());
      Set<TaskArtifact> arts=Collections.singleton(AtsTestUtil.getOrCreateTaskOffTeamWf1(changes));
      changes.execute();
      return arts;
    }
    @Override public String getTaskEditorLabel(    SearchType searchType){
      return "String_Node_Str";
    }
    @Override public Collection<TableLoadOption> getTableLoadOptions(){
      return Collections.singleton(TableLoadOption.NoUI);
    }
    @Override public String getName(){
      return "String_Node_Str";
    }
    @Override public ITaskEditorProvider copyProvider(){
      return null;
    }
  }
;
}

Fixed version (ground truth):
@Override public ITaskEditorProvider getTaskEditorProviderCopy(){
  return new ITaskEditorProvider(){
    @Override public void setTableLoadOptions(    TableLoadOption... tableLoadOptions){
    }
    @Override public void setCustomizeData(    CustomizeData customizeData){
    }
    @Override public Collection<? extends Artifact> getTaskEditorTaskArtifacts() throws OseeCoreException {
      AtsChangeSet changes=new AtsChangeSet(OpenNewAtsTaskEditorActionTest.class.getName());
      Set<TaskArtifact> arts=Collections.singleton(AtsTestUtil.getOrCreateTaskOffTeamWf1(changes));
      changes.execute();
      return arts;
    }
    @Override public String getTaskEditorLabel(    SearchType searchType){
      return "String_Node_Str";
    }
    @Override public Collection<TableLoadOption> getTableLoadOptions(){
      return Collections.singleton(TableLoadOption.NoUI);
    }
    @Override public String getName(){
      return "String_Node_Str";
    }
    @Override public ITaskEditorProvider copyProvider(){
      return null;
    }
  }
;
}
Program: 97187
Project: 97187
Buggy source:
@Override public Collection<? extends Artifact> getTaskEditorTaskArtifacts() throws OseeCoreException {
  AtsChangeSet changes=new AtsChangeSet(getClass().getSimpleName());
  Set<TaskArtifact> arts=Collections.singleton(AtsTestUtil.getOrCreateTaskOffTeamWf1(changes));
  changes.execute();
  return arts;
}

Fixed version (ground truth):
@Override public Collection<? extends Artifact> getTaskEditorTaskArtifacts() throws OseeCoreException {
  AtsChangeSet changes=new AtsChangeSet(OpenNewAtsTaskEditorActionTest.class.getName());
  Set<TaskArtifact> arts=Collections.singleton(AtsTestUtil.getOrCreateTaskOffTeamWf1(changes));
  changes.execute();
  return arts;
}
Program: 97188
Project: 97188
Buggy source:
@Override public Action createAction(){
  return new OpenNewAtsTaskEditorAction(new IOpenNewAtsTaskEditorHandler(){
    @Override public ITaskEditorProvider getTaskEditorProviderCopy(){
      return new ITaskEditorProvider(){
        @Override public void setTableLoadOptions(        TableLoadOption... tableLoadOptions){
        }
        @Override public void setCustomizeData(        CustomizeData customizeData){
        }
        @Override public Collection<? extends Artifact> getTaskEditorTaskArtifacts() throws OseeCoreException {
          AtsChangeSet changes=new AtsChangeSet(getClass().getSimpleName());
          Set<TaskArtifact> arts=Collections.singleton(AtsTestUtil.getOrCreateTaskOffTeamWf1(changes));
          changes.execute();
          return arts;
        }
        @Override public String getTaskEditorLabel(        SearchType searchType){
          return "String_Node_Str";
        }
        @Override public Collection<TableLoadOption> getTableLoadOptions(){
          return Collections.singleton(TableLoadOption.NoUI);
        }
        @Override public String getName(){
          return "String_Node_Str";
        }
        @Override public ITaskEditorProvider copyProvider(){
          return null;
        }
      }
;
    }
    @Override public CustomizeData getCustomizeDataCopy(){
      return null;
    }
  }
);
}

Fixed version (ground truth):
@Override public Action createAction(){
  return new OpenNewAtsTaskEditorAction(new IOpenNewAtsTaskEditorHandler(){
    @Override public ITaskEditorProvider getTaskEditorProviderCopy(){
      return new ITaskEditorProvider(){
        @Override public void setTableLoadOptions(        TableLoadOption... tableLoadOptions){
        }
        @Override public void setCustomizeData(        CustomizeData customizeData){
        }
        @Override public Collection<? extends Artifact> getTaskEditorTaskArtifacts() throws OseeCoreException {
          AtsChangeSet changes=new AtsChangeSet(OpenNewAtsTaskEditorActionTest.class.getName());
          Set<TaskArtifact> arts=Collections.singleton(AtsTestUtil.getOrCreateTaskOffTeamWf1(changes));
          changes.execute();
          return arts;
        }
        @Override public String getTaskEditorLabel(        SearchType searchType){
          return "String_Node_Str";
        }
        @Override public Collection<TableLoadOption> getTableLoadOptions(){
          return Collections.singleton(TableLoadOption.NoUI);
        }
        @Override public String getName(){
          return "String_Node_Str";
        }
        @Override public ITaskEditorProvider copyProvider(){
          return null;
        }
      }
;
    }
    @Override public CustomizeData getCustomizeDataCopy(){
      return null;
    }
  }
);
}
Program: 97189
Project: 97189
Buggy source:
/** 
 * Cleanup all artifacts and confirm that ArtifactCache has no dirty artifacts. Should be called at beginning at end of each test.
 */
public static void cleanup() throws OseeCoreException {
  WorldEditor.closeAll();
  SMAEditor.closeAll();
  TaskEditor.closeAll();
  AtsChangeSet changes=new AtsChangeSet(AtsTestUtil.class.getSimpleName() + "String_Node_Str");
  delete(changes,peerRevArt);
  delete(changes,decRevArt);
  delete(changes,taskArtWf1);
  delete(changes,taskArtWf2);
  delete(changes,actionArt);
  delete(changes,actionArt2);
  delete(changes,actionArt3);
  delete(changes,actionArt4);
  if (!changes.isEmpty()) {
    changes.execute();
  }
  deleteTeamWf(teamArt);
  deleteTeamWf(teamArt2);
  deleteTeamWf(teamArt3);
  deleteTeamWf(teamArt4);
  SkynetTransaction transaction=TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(),AtsTestUtil.class.getSimpleName() + "String_Node_Str");
  for (  IAtsConfigObject config : Arrays.asList(teamDef,testAi,testAi2,testAi3,testAi4)) {
    if (config != null && config.getStoreObject() instanceof Artifact) {
      Artifact art=(Artifact)config.getStoreObject();
      art.deleteAndPersist(transaction);
    }
  }
  transaction.execute();
  clearCaches();
  AtsTestUtil.validateArtifactCache();
}

Fixed version (ground truth):
/** 
 * Cleanup all artifacts and confirm that ArtifactCache has no dirty artifacts. Should be called at beginning at end of each test.
 */
public static void cleanup() throws OseeCoreException {
  WorldEditor.closeAll();
  SMAEditor.closeAll();
  TaskEditor.closeAll();
  if (teamArt != null) {
    Branch workingBranch=teamArt.getWorkingBranch();
    if (workingBranch != null) {
      BranchManager.deleteBranchAndPend(workingBranch);
    }
  }
  AtsChangeSet changes=new AtsChangeSet(AtsTestUtil.class.getSimpleName() + "String_Node_Str");
  delete(changes,peerRevArt);
  delete(changes,decRevArt);
  delete(changes,taskArtWf1);
  delete(changes,taskArtWf2);
  delete(changes,actionArt);
  delete(changes,actionArt2);
  delete(changes,actionArt3);
  delete(changes,actionArt4);
  if (!changes.isEmpty()) {
    changes.execute();
  }
  deleteTeamWf(teamArt);
  deleteTeamWf(teamArt2);
  deleteTeamWf(teamArt3);
  deleteTeamWf(teamArt4);
  SkynetTransaction transaction=TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(),AtsTestUtil.class.getSimpleName() + "String_Node_Str");
  for (  IAtsConfigObject config : Arrays.asList(teamDef,testAi,testAi2,testAi3,testAi4)) {
    if (config != null && config.getStoreObject() instanceof Artifact) {
      Artifact art=(Artifact)config.getStoreObject();
      art.deleteAndPersist(transaction);
    }
  }
  transaction.execute();
  clearCaches();
  AtsTestUtil.validateArtifactCache();
}
Program: 97190
Project: 97190
Buggy source:
private static List<Integer> getCommonArtifactIds() throws OseeCoreException {
  OseeConnection connection=ConnectionHandler.getConnection();
  IOseeStatement chStmt=ConnectionHandler.getStatement(connection);
  List<Integer> artIds=new ArrayList<Integer>();
  ElapsedTime time=new ElapsedTime("String_Node_Str");
  try {
    chStmt.runPreparedQuery(SELECT_COMMON_ART_IDS,new Object[]{AtsUtilCore.getAtsBranch().getUuid()});
    while (chStmt.next()) {
      artIds.add(chStmt.getInt(1));
    }
  }
  finally {
    chStmt.close();
    connection.close();
  }
  time.end();
  return artIds;
}

Fixed version (ground truth):
private static List<Integer> getCommonArtifactIds(XResultData xResultData) throws OseeCoreException {
  OseeConnection connection=ConnectionHandler.getConnection();
  IOseeStatement chStmt=ConnectionHandler.getStatement(connection);
  List<Integer> artIds=new ArrayList<Integer>();
  xResultData.log(null,"String_Node_Str" + DateUtil.getMMDDYYHHMM());
  try {
    chStmt.runPreparedQuery(SELECT_COMMON_ART_IDS,new Object[]{AtsUtilCore.getAtsBranch().getUuid()});
    while (chStmt.next()) {
      artIds.add(chStmt.getInt(1));
    }
  }
  finally {
    chStmt.close();
    connection.close();
    xResultData.log(null,"String_Node_Str" + DateUtil.getMMDDYYHHMM());
  }
  return artIds;
}
Program: 97191
Project: 97191
Buggy source:
public static List<Collection<Integer>> loadAtsBranchArtifactIds(XResultData xResultData,IProgressMonitor monitor) throws OseeCoreException {
  if (xResultData == null) {
    xResultData=new XResultData();
  }
  xResultData.log(monitor,"String_Node_Str" + DateUtil.getMMDDYYHHMM());
  List<Integer> artIds=getCommonArtifactIds();
  if (artIds.isEmpty()) {
    xResultData.logError("String_Node_Str");
  }
  xResultData.log(monitor,"String_Node_Str" + DateUtil.getMMDDYYHHMM());
  return Collections.subDivide(artIds,4000);
}

Fixed version (ground truth):
public static List<Collection<Integer>> loadAtsBranchArtifactIds(XResultData xResultData,IProgressMonitor monitor) throws OseeCoreException {
  if (xResultData == null) {
    xResultData=new XResultData();
  }
  xResultData.log(monitor,"String_Node_Str" + DateUtil.getMMDDYYHHMM());
  List<Integer> artIds=getCommonArtifactIds(xResultData);
  if (artIds.isEmpty()) {
    xResultData.logError("String_Node_Str");
  }
  xResultData.log(monitor,"String_Node_Str" + DateUtil.getMMDDYYHHMM());
  return Collections.subDivide(artIds,4000);
}
Program: 97192
Project: 97192
Buggy source:
@Override protected void doWork(IProgressMonitor monitor) throws Exception {
  Artifact associatedArtifact=null;
  TransactionDelta txDelta=changeData.getTxDelta();
  if (changeData.getCompareType().areSpecificTxs()) {
    TransactionRecord txRecord=txDelta.getEndTx();
    int commitId=txRecord.getCommit();
    if (commitId != 0) {
      associatedArtifact=ArtifactQuery.getArtifactFromId(commitId,BranchManager.getCommonBranch());
    }
  }
 else {
    Branch sourceBranch=txDelta.getStartTx().getFullBranch();
    associatedArtifact=BranchManager.getAssociatedArtifact(sourceBranch);
  }
  monitor.worked(calculateWork(0.80));
  changeData.setAssociatedArtifact(associatedArtifact);
  monitor.worked(calculateWork(0.20));
}

Fixed version (ground truth):
@Override protected void doWork(IProgressMonitor monitor) throws Exception {
  Artifact associatedArtifact=null;
  TransactionDelta txDelta=changeData.getTxDelta();
  if (changeData.getCompareType().areSpecificTxs()) {
    TransactionRecord txRecord=txDelta.getEndTx();
    int commitId=txRecord.getCommit();
    if (commitId != 0) {
      associatedArtifact=ArtifactQuery.getArtifactFromId(commitId,BranchManager.getCommonBranch());
    }
  }
 else {
    Branch sourceBranch=txDelta.getStartTx().getFullBranch();
    if (!sourceBranch.isDeleted()) {
      associatedArtifact=BranchManager.getAssociatedArtifact(sourceBranch);
    }
  }
  monitor.worked(calculateWork(0.80));
  changeData.setAssociatedArtifact(associatedArtifact);
  monitor.worked(calculateWork(0.20));
}
Program: 97193
Project: 97193
Buggy source:
@Test public void testMap(){
  IRelationTypeSide relTypeSide1=create(uuid1,sideA,uuid1 + "String_Node_Str");
  IRelationTypeSide relTypeSide2=create(uuid1,sideB,uuid1 + "String_Node_Str");
  IRelationTypeSide relTypeSide3=create(uuid2,sideA,uuid2 + "String_Node_Str");
  IRelationTypeSide relTypeSide4=create(uuid2,sideB,uuid2 + "String_Node_Str");
  Map<IRelationType,String> data=new HashMap<IRelationType,String>();
  data.put(relTypeSide1,"String_Node_Str");
  data.put(relTypeSide2,"String_Node_Str");
  data.put(relTypeSide3,"String_Node_Str");
  data.put(relTypeSide4,"String_Node_Str");
  Assert.assertEquals(4,data.size());
  Assert.assertEquals("String_Node_Str",data.get(relTypeSide1));
  Assert.assertEquals("String_Node_Str",data.get(relTypeSide2));
  Assert.assertEquals("String_Node_Str",data.get(relTypeSide3));
  Assert.assertEquals("String_Node_Str",data.get(relTypeSide4));
  IRelationType relType1=TokenFactory.createRelationType(uuid1,"String_Node_Str");
  String removed=data.put(relType1,"String_Node_Str");
  Assert.assertEquals("String_Node_Str",removed);
  String value=data.get(relType1);
  Assert.assertEquals("String_Node_Str",value);
  Assert.assertEquals("String_Node_Str",data.get(relTypeSide1));
  Assert.assertEquals(4,data.size());
}

Fixed version (ground truth):
@Test public void testMap(){
  IRelationTypeSide relTypeSide1=create(uuid1,sideA,uuid1 + "String_Node_Str");
  IRelationTypeSide relTypeSide2=create(uuid1,sideB,uuid1 + "String_Node_Str");
  IRelationTypeSide relTypeSide3=create(uuid2,sideA,uuid2 + "String_Node_Str");
  IRelationTypeSide relTypeSide4=create(uuid2,sideB,uuid2 + "String_Node_Str");
  Map<IRelationType,String> data=new HashMap<IRelationType,String>();
  data.put(relTypeSide1,"String_Node_Str");
  data.put(relTypeSide2,"String_Node_Str");
  data.put(relTypeSide3,"String_Node_Str");
  data.put(relTypeSide4,"String_Node_Str");
  Assert.assertEquals(4,data.size());
  Assert.assertEquals("String_Node_Str",data.get(relTypeSide1));
  Assert.assertEquals("String_Node_Str",data.get(relTypeSide2));
  Assert.assertEquals("String_Node_Str",data.get(relTypeSide3));
  Assert.assertEquals("String_Node_Str",data.get(relTypeSide4));
  IRelationType relType1=create(uuid1,sideB,"String_Node_Str");
  String removed=data.put(relType1,"String_Node_Str");
  Assert.assertEquals("String_Node_Str",removed);
  String value=data.get(relType1);
  Assert.assertEquals("String_Node_Str",value);
  Assert.assertEquals("String_Node_Str",data.get(relTypeSide1));
  Assert.assertEquals(4,data.size());
}
Program: 97194
Project: 97194
Buggy source:
@Test public void testMissingArguments(){
  String messageFormat="String_Node_Str";
  Exception ex=new OseeCoreException(messageFormat,1,0);
  Assert.assertEquals("String_Node_Str" + messageFormat + "String_Node_Str",ex.getMessage());
}

Fixed version (ground truth):
@Test public void testMissingArguments(){
  String messageFormat="String_Node_Str";
  Exception ex=new OseeCoreException(messageFormat,1,0);
  Assert.assertTrue(ex.getMessage(),ex.getMessage().contains("String_Node_Str" + messageFormat + "String_Node_Str"));
}
Program: 97195
Project: 97195
Buggy source:
public String toXml(RelationOrderData data) throws OseeArgumentException {
  if (data == null) {
    throw new OseeArgumentException("String_Node_Str");
  }
  StringBuilder sb=new StringBuilder();
  openRoot(sb);
  for (  Entry<Pair<String,String>,Pair<String,List<String>>> entry : data.entrySet()) {
    writeEntry(sb,entry);
    sb.append("String_Node_Str");
  }
  closeRoot(sb);
  return sb.toString();
}

Fixed version (ground truth):
public String toXml(RelationOrderData data) throws OseeArgumentException {
  if (data == null) {
    throw new OseeArgumentException("String_Node_Str");
  }
  StringBuilder sb=new StringBuilder();
  openRoot(sb);
  for (  Entry<Pair<String,String>,Pair<String,List<String>>> entry : data.getOrderedEntrySet()) {
    writeEntry(sb,entry);
    sb.append("String_Node_Str");
  }
  closeRoot(sb);
  return sb.toString();
}
Program: 97196
Project: 97196
Buggy source:
@Test public void testHandleRelationTypeSideMultiples() throws OseeCoreException {
  ExistsTypePredicateHandler handler=new ExistsTypePredicateHandler();
  List<String> typeParameters=Collections.singletonList("String_Node_Str");
  String relationValue1="String_Node_Str";
  String relationValue2="String_Node_Str";
  List<String> values=Arrays.asList(relationValue1,relationValue2);
  Predicate testPredicate=new Predicate(SearchMethod.EXISTS_TYPE,typeParameters,values);
  handler.handle(builder,testPredicate);
  verify(builder,times(2)).andExists(relationTypeCaptor.capture());
  Assert.assertEquals(2,relationTypeCaptor.getAllValues().size());
  IRelationType type=relationTypeCaptor.getAllValues().get(0);
  Assert.assertTrue(34567L == type.getGuid());
  type=relationTypeCaptor.getAllValues().get(1);
  Assert.assertTrue(12345L == type.getGuid());
}

Fixed version (ground truth):
@Test public void testHandleRelationTypeSideMultiples() throws OseeCoreException {
  ExistsTypePredicateHandler handler=new ExistsTypePredicateHandler();
  List<String> typeParameters=Collections.singletonList("String_Node_Str");
  String relationValue1="String_Node_Str";
  String relationValue2="String_Node_Str";
  List<String> values=Arrays.asList(relationValue1,relationValue2);
  Predicate testPredicate=new Predicate(SearchMethod.EXISTS_TYPE,typeParameters,values);
  handler.handle(builder,testPredicate);
  verify(builder,times(2)).andExists(relationTypeCaptor.capture());
  Assert.assertEquals(2,relationTypeCaptor.getAllValues().size());
  IRelationType type=relationTypeCaptor.getAllValues().get(0);
  Assert.assertTrue(12345L == type.getGuid());
  type=relationTypeCaptor.getAllValues().get(1);
  Assert.assertTrue(34567L == type.getGuid());
}
Program: 97197
Project: 97197
Buggy source:
@Test public void testHandleAttrTypeMultiple() throws OseeCoreException {
  ExistsTypePredicateHandler handler=new ExistsTypePredicateHandler();
  List<String> typeParameters=Collections.singletonList("String_Node_Str");
  String attrType1="String_Node_Str";
  String attrType2="String_Node_Str";
  List<String> values=Arrays.asList(attrType1,attrType2);
  Predicate testPredicate=new Predicate(SearchMethod.EXISTS_TYPE,typeParameters,values,QueryOption.TOKEN_DELIMITER__ANY);
  handler.handle(builder,testPredicate);
  verify(builder).andExists(attrTypeSideCaptor.capture());
  Assert.assertEquals(1,attrTypeSideCaptor.getAllValues().size());
  List<IAttributeType> attrTypes=new ArrayList<IAttributeType>(attrTypeSideCaptor.getValue());
  Assert.assertTrue(34567L == attrTypes.get(0).getGuid());
  Assert.assertTrue(12345L == attrTypes.get(1).getGuid());
}

Fixed version (ground truth):
@Test public void testHandleAttrTypeMultiple() throws OseeCoreException {
  ExistsTypePredicateHandler handler=new ExistsTypePredicateHandler();
  List<String> typeParameters=Collections.singletonList("String_Node_Str");
  String attrType1="String_Node_Str";
  String attrType2="String_Node_Str";
  List<String> values=Arrays.asList(attrType1,attrType2);
  Predicate testPredicate=new Predicate(SearchMethod.EXISTS_TYPE,typeParameters,values,QueryOption.TOKEN_DELIMITER__ANY);
  handler.handle(builder,testPredicate);
  verify(builder).andExists(attrTypeSideCaptor.capture());
  Assert.assertEquals(1,attrTypeSideCaptor.getAllValues().size());
  Iterator<IAttributeType> iterator=attrTypeSideCaptor.getValue().iterator();
  Assert.assertEquals(Long.valueOf(12345L),iterator.next().getGuid());
  Assert.assertEquals(Long.valueOf(34567L),iterator.next().getGuid());
}
Program: 97198
Project: 97198
Buggy source:
@Test public void testHandleMultiple() throws OseeCoreException {
  IsOfTypePredicateHandler handler=new IsOfTypePredicateHandler();
  String id1="String_Node_Str";
  String id2="String_Node_Str";
  List<String> values=Arrays.asList(id1,id2);
  Predicate testPredicate=new Predicate(SearchMethod.IS_OF_TYPE,null,values);
  handler.handle(builder,testPredicate);
  verify(builder).andIsOfType(artifactTypesCaptor.capture());
  Assert.assertEquals(2,artifactTypesCaptor.getValue().size());
  List<IArtifactType> types=new LinkedList<IArtifactType>(artifactTypesCaptor.getValue());
  Assert.assertEquals(id2,types.get(0).getGuid().toString());
  Assert.assertEquals(id1,types.get(1).getGuid().toString());
}

Fixed version (ground truth):
@Test public void testHandleMultiple() throws OseeCoreException {
  IsOfTypePredicateHandler handler=new IsOfTypePredicateHandler();
  String id1="String_Node_Str";
  String id2="String_Node_Str";
  Predicate testPredicate=new Predicate(SearchMethod.IS_OF_TYPE,null,Arrays.asList(id1,id2));
  handler.handle(builder,testPredicate);
  verify(builder).andIsOfType(artifactTypesCaptor.capture());
  Assert.assertEquals(2,artifactTypesCaptor.getValue().size());
  Iterator<IArtifactType> iterator=artifactTypesCaptor.getValue().iterator();
  Assert.assertEquals(id1,iterator.next().getGuid().toString());
  Assert.assertEquals(id2,iterator.next().getGuid().toString());
}
Program: 97199
Project: 97199
Buggy source:
@Test public void testHandleMultiple() throws OseeCoreException {
  String id1="String_Node_Str";
  String id2="String_Node_Str";
  List<String> values=Arrays.asList(id1,id2);
  Predicate testPredicate=new Predicate(SearchMethod.TYPE_EQUALS,null,values);
  handler.handle(builder,testPredicate);
  verify(builder).andTypeEquals(artifactTypesCaptor.capture());
  assertEquals(2,artifactTypesCaptor.getValue().size());
  Iterator<IArtifactType> iterator=artifactTypesCaptor.getValue().iterator();
  assertEquals(id2,iterator.next().getGuid().toString());
  assertEquals(id1,iterator.next().getGuid().toString());
}

Fixed version (ground truth):
@Test public void testHandleMultiple() throws OseeCoreException {
  String id1="String_Node_Str";
  String id2="String_Node_Str";
  List<String> values=Arrays.asList(id1,id2);
  Predicate testPredicate=new Predicate(SearchMethod.TYPE_EQUALS,null,values);
  handler.handle(builder,testPredicate);
  verify(builder).andTypeEquals(artifactTypesCaptor.capture());
  assertEquals(2,artifactTypesCaptor.getValue().size());
  Iterator<IArtifactType> iterator=artifactTypesCaptor.getValue().iterator();
  assertEquals(id1,iterator.next().getGuid().toString());
  assertEquals(id2,iterator.next().getGuid().toString());
}
Program: 97200
Project: 97200
Buggy source:
public static Collection<IRelationType> getIRelationTypes(Collection<String> rels) throws OseeCoreException {
  Collection<IRelationType> types=new HashSet<IRelationType>();
  for (  String value : rels) {
    long longUuid=parseUuid(value);
    if (longUuid != -1L) {
      types.add(TokenFactory.createRelationType(longUuid,"String_Node_Str"));
    }
  }
  return types;
}

Fixed version (ground truth):
public static Collection<IRelationType> getIRelationTypes(Collection<String> rels) throws OseeCoreException {
  Collection<IRelationType> types=new LinkedHashSet<IRelationType>();
  for (  String value : rels) {
    long longUuid=parseUuid(value);
    if (longUuid != -1L) {
      types.add(TokenFactory.createRelationType(longUuid,"String_Node_Str"));
    }
  }
  return types;
}
Program: 97201
Project: 97201
Buggy source:
public static Collection<IAttributeType> getIAttributeTypes(Collection<String> types) throws OseeCoreException {
  Collection<IAttributeType> attrTypes=new HashSet<IAttributeType>();
  for (  String value : types) {
    long uuid=parseUuid(value);
    if (uuid != -1L) {
      attrTypes.add(TokenFactory.createAttributeType(uuid,"String_Node_Str"));
    }
  }
  return attrTypes;
}

Fixed version (ground truth):
public static Collection<IAttributeType> getIAttributeTypes(Collection<String> types) throws OseeCoreException {
  Collection<IAttributeType> attrTypes=new LinkedHashSet<IAttributeType>();
  for (  String value : types) {
    long uuid=parseUuid(value);
    if (uuid != -1L) {
      attrTypes.add(TokenFactory.createAttributeType(uuid,"String_Node_Str"));
    }
  }
  return attrTypes;
}
Program: 97202
Project: 97202
Buggy source:
public static Collection<IArtifactType> getIArtifactTypes(Collection<String> types) throws OseeCoreException {
  Collection<IArtifactType> artTypes=new HashSet<IArtifactType>();
  for (  String value : types) {
    long uuid=parseUuid(value);
    if (uuid != -1L) {
      artTypes.add(TokenFactory.createArtifactType(uuid,"String_Node_Str"));
    }
  }
  return artTypes;
}

Fixed version (ground truth):
public static Collection<IArtifactType> getIArtifactTypes(Collection<String> types) throws OseeCoreException {
  Collection<IArtifactType> artTypes=new LinkedHashSet<IArtifactType>();
  for (  String value : types) {
    long uuid=parseUuid(value);
    if (uuid != -1L) {
      artTypes.add(TokenFactory.createArtifactType(uuid,"String_Node_Str"));
    }
  }
  return artTypes;
}
Program: 97203
Project: 97203
Buggy source:
public static Collection<IRelationTypeSide> getIRelationTypeSides(Collection<String> rels) throws OseeCoreException {
  Collection<IRelationTypeSide> relSides=new HashSet<IRelationTypeSide>();
  for (  String value : rels) {
    char sideChar=value.charAt(0);
    String uuid=value.substring(1);
    RelationSide side=RelationSide.SIDE_A;
    if (sideChar == 'B') {
      side=RelationSide.SIDE_B;
    }
    long longUuid=parseUuid(uuid);
    if (longUuid != -1L) {
      relSides.add(TokenFactory.createRelationTypeSide(side,longUuid,"String_Node_Str"));
    }
  }
  return relSides;
}

Fixed version (ground truth):
public static Collection<IRelationTypeSide> getIRelationTypeSides(Collection<String> rels) throws OseeCoreException {
  Collection<IRelationTypeSide> relSides=new LinkedHashSet<IRelationTypeSide>();
  for (  String value : rels) {
    char sideChar=value.charAt(0);
    String uuid=value.substring(1);
    RelationSide side=RelationSide.SIDE_A;
    if (sideChar == 'B') {
      side=RelationSide.SIDE_B;
    }
    long longUuid=parseUuid(uuid);
    if (longUuid != -1L) {
      relSides.add(TokenFactory.createRelationTypeSide(side,longUuid,"String_Node_Str"));
    }
  }
  return relSides;
}
Program: 97204
Project: 97204
Buggy source:
@BeforeClass @AfterClass public static void testCleanup() throws Exception {
  AtsTestUtil.cleanupSimpleTest(AtsPeerToPeerReviewReviewStateItemTest.class.getSimpleName());
}

Fixed version (ground truth):
@AfterClass public static void testCleanup() throws Exception {
  AtsTestUtil.cleanup();
}