nus-yam/ex-repair huggingface dataset:
Program: 96709
Project: 96709
Buggy source:
private void setBranchName(IOseeBranch branch){
  if (branch != null) {
    String branchName=branch.getName();
    String[] currentItems=this.branchSelectCombo.getItems();
    int selectionIndex=-1;
    for (int i=0; i < currentItems.length; i++) {
      if (currentItems[i].equals(branchName)) {
        selectionIndex=i;
      }
    }
    if (selectionIndex < 0) {
      int oldLength=currentItems.length;
      String[] newItems=new String[oldLength + 1];
      System.arraycopy(currentItems,0,newItems,0,oldLength);
      newItems[oldLength]=branchName;
      this.branchSelectCombo.setItems(newItems);
      selectionIndex=oldLength;
      branchSelectCombo.setData(branch.getName(),branch);
      branchSelectCombo.setData(branch.getIdString(),branch);
    }
    this.branchSelectCombo.select(selectionIndex);
  }
}

Fixed version (ground truth):
private void setBranchName(BranchId branch){
  if (branch != null) {
    String branchName=BranchManager.getBranchName(branch);
    String[] currentItems=this.branchSelectCombo.getItems();
    int selectionIndex=-1;
    for (int i=0; i < currentItems.length; i++) {
      if (currentItems[i].equals(branchName)) {
        selectionIndex=i;
      }
    }
    if (selectionIndex < 0) {
      int oldLength=currentItems.length;
      String[] newItems=new String[oldLength + 1];
      System.arraycopy(currentItems,0,newItems,0,oldLength);
      newItems[oldLength]=branchName;
      this.branchSelectCombo.setItems(newItems);
      selectionIndex=oldLength;
      branchSelectCombo.setData(branchName,branch);
      branchSelectCombo.setData(branch.getIdString(),branch);
    }
    this.branchSelectCombo.select(selectionIndex);
  }
}
Program: 96710
Project: 96710
Buggy source:
@Override public void handleDoubleClick(){
  ArrayList<IOseeBranch> branches=xBranchViewer.getSelectedBranches();
  if (branches != null && !branches.isEmpty()) {
    for (    IOseeBranch branch : branches) {
      if (!branch.equals(CoreBranches.SYSTEM_ROOT)) {
        if (!BranchManager.getType(branch).isMergeBranch()) {
          ArtifactExplorer.exploreBranch(branch);
          BranchManager.setLastBranch(branch);
        }
 else {
          if (branch instanceof MergeBranch) {
            MergeBranch mergeBranch=(MergeBranch)branch;
            IOseeBranch source=mergeBranch.getSourceBranch();
            IOseeBranch destination=mergeBranch.getDestinationBranch();
            MergeView.openView(source,destination,BranchManager.getBaseTransaction(source));
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void handleDoubleClick(){
  ArrayList<BranchId> branches=xBranchViewer.getSelectedBranches();
  if (branches != null && !branches.isEmpty()) {
    for (    BranchId branch : branches) {
      if (!branch.equals(CoreBranches.SYSTEM_ROOT)) {
        if (!BranchManager.getType(branch).isMergeBranch()) {
          ArtifactExplorer.exploreBranch(branch);
          BranchManager.setLastBranch(branch);
        }
 else {
          if (branch instanceof MergeBranch) {
            MergeBranch mergeBranch=(MergeBranch)branch;
            IOseeBranch source=mergeBranch.getSourceBranch();
            IOseeBranch destination=mergeBranch.getDestinationBranch();
            MergeView.openView(source,destination,BranchManager.getBaseTransaction(source));
          }
        }
      }
    }
  }
}
Program: 96711
Project: 96711
Buggy source:
public ArrayList<IOseeBranch> getSelectedBranches(){
  ArrayList<IOseeBranch> items=new ArrayList<>();
  if (branchXViewer == null || branchXViewer.getSelection().isEmpty()) {
    return items;
  }
  Iterator<?> i=((IStructuredSelection)branchXViewer.getSelection()).iterator();
  while (i.hasNext()) {
    Object obj=i.next();
    if (obj instanceof IOseeBranch) {
      items.add((IOseeBranch)obj);
    }
  }
  return items;
}

Fixed version (ground truth):
public ArrayList<BranchId> getSelectedBranches(){
  ArrayList<BranchId> items=new ArrayList<>();
  if (branchXViewer == null || branchXViewer.getSelection().isEmpty()) {
    return items;
  }
  Iterator<?> i=((IStructuredSelection)branchXViewer.getSelection()).iterator();
  while (i.hasNext()) {
    Object obj=i.next();
    if (obj instanceof BranchId) {
      items.add((BranchId)obj);
    }
  }
  return items;
}
Program: 96712
Project: 96712
Buggy source:
@Override public void run(){
  User user;
  try {
    user=UserManager.getUser();
    if (user.isSystemUser()) {
      AWorkbench.popup("String_Node_Str");
      return;
    }
    List<IOseeBranch> branches=xBranchViewer.getSelectedBranches();
    if (branches.isEmpty()) {
      AWorkbench.popup("String_Node_Str");
      return;
    }
    if (MessageDialog.openConfirm(Display.getCurrent().getActiveShell(),"String_Node_Str","String_Node_Str" + branches.size() + "String_Node_Str")) {
      for (      BranchId branch : branches) {
        user.toggleFavoriteBranch(branch);
      }
      user.persist("String_Node_Str");
      xBranchViewer.refresh();
    }
  }
 catch (  OseeCoreException ex) {
    OseeLog.log(Activator.class,Level.SEVERE,ex.toString(),ex);
  }
}

Fixed version (ground truth):
@Override public void run(){
  User user;
  try {
    user=UserManager.getUser();
    if (user.isSystemUser()) {
      AWorkbench.popup("String_Node_Str");
      return;
    }
    List<BranchId> branches=xBranchViewer.getSelectedBranches();
    if (branches.isEmpty()) {
      AWorkbench.popup("String_Node_Str");
      return;
    }
    if (MessageDialog.openConfirm(Display.getCurrent().getActiveShell(),"String_Node_Str","String_Node_Str" + branches.size() + "String_Node_Str")) {
      for (      BranchId branch : branches) {
        user.toggleFavoriteBranch(branch);
      }
      user.persist("String_Node_Str");
      xBranchViewer.refresh();
    }
  }
 catch (  OseeCoreException ex) {
    OseeLog.log(Activator.class,Level.SEVERE,ex.toString(),ex);
  }
}
Program: 96713
Project: 96713
Buggy source:
@Override public void add(Object obj) throws OseeCoreException {
  Conditions.checkNotNull(obj,"String_Node_Str");
  if (obj instanceof Collection) {
    for (    Object object : (Collection<?>)obj) {
      add(object);
    }
  }
 else   if (obj instanceof IAtsObject) {
    atsObjects.add((IAtsObject)obj);
  }
 else   if (obj instanceof ArtifactId) {
    artifacts.add((ArtifactId)obj);
  }
 else {
    throw new OseeArgumentException("String_Node_Str" + obj);
  }
}

Fixed version (ground truth):
@Override public void add(Object obj) throws OseeCoreException {
  Conditions.checkNotNull(obj,"String_Node_Str");
  if (obj instanceof Collection) {
    for (    Object object : (Collection<?>)obj) {
      add(object);
    }
  }
 else   if (obj instanceof IAtsObject) {
    atsObjects.add((IAtsObject)obj);
  }
 else   if (obj instanceof ArtifactId) {
    artifacts.add((ArtifactId)obj);
  }
 else   if (obj instanceof AtsRelationChange) {
    relations.add((AtsRelationChange)obj);
  }
 else {
    throw new OseeArgumentException("String_Node_Str" + obj);
  }
}
Program: 96714
Project: 96714
Buggy source:
@Override public void clear(){
  atsObjects.clear();
  artifacts.clear();
  deleteArtifacts.clear();
  deleteAtsObjects.clear();
  listeners.clear();
}

Fixed version (ground truth):
@Override public void clear(){
  relations.clear();
  atsObjects.clear();
  artifacts.clear();
  deleteArtifacts.clear();
  deleteAtsObjects.clear();
  listeners.clear();
}
Program: 96715
Project: 96715
Buggy source:
@Override public boolean isEmpty(){
  return artifacts.isEmpty() && deleteArtifacts.isEmpty() && atsObjects.isEmpty()&& deleteAtsObjects.isEmpty();
}

Fixed version (ground truth):
@Override public boolean isEmpty(){
  return artifacts.isEmpty() && deleteArtifacts.isEmpty() && atsObjects.isEmpty()&& deleteAtsObjects.isEmpty()&& relations.isEmpty();
}
Program: 96716
Project: 96716
Buggy source:
/** 
 * Returns the backing data object for operations like sorting
 */
public Object getBackingData(Object element,XViewerColumn xCol,int columnIndex) throws Exception {
  XViewerAtsColumn xViewerAtsColumn;
  if (xCol.equals(AtsColumnId.CreatedDate.getId())) {
    xViewerAtsColumn=CreatedDateColumnUI.getInstance();
  }
 else   if (xCol.equals(AtsColumnId.ReleaseDate.getId())) {
    xViewerAtsColumn=ReleaseDateColumn.getInstance();
  }
 else   if (xCol.equals(AtsColumnId.CompletedDate.getId())) {
    xViewerAtsColumn=CompletedDateColumnUI.getInstance();
  }
 else   if (xCol.equals(AtsColumnId.CancelledDate.getId())) {
    xViewerAtsColumn=CancelledDateColumnUI.getInstance();
  }
 else {
    return null;
  }
  return xViewerAtsColumn.getBackingData(element,xCol,columnIndex);
}

Fixed version (ground truth):
/** 
 * Returns the backing data object for operations like sorting
 */
public Object getBackingData(Object element,XViewerColumn xCol,int columnIndex) throws Exception {
  XViewerAtsColumn xViewerAtsColumn;
  if (xCol.getId().equals(AtsColumnId.CreatedDate.getId())) {
    xViewerAtsColumn=CreatedDateColumnUI.getInstance();
  }
 else   if (xCol.getId().equals(AtsColumnId.ReleaseDate.getId())) {
    xViewerAtsColumn=ReleaseDateColumn.getInstance();
  }
 else   if (xCol.getId().equals(AtsColumnId.CompletedDate.getId())) {
    xViewerAtsColumn=CompletedDateColumnUI.getInstance();
  }
 else   if (xCol.getId().equals(AtsColumnId.CancelledDate.getId())) {
    xViewerAtsColumn=CancelledDateColumnUI.getInstance();
  }
 else {
    return null;
  }
  return xViewerAtsColumn.getBackingData(element,xCol,columnIndex);
}
Program: 96717
Project: 96717
Buggy source:
private void processSingleResult(String resultPath,Matcher m){
  DispoItemData item=datIdToItem.get(generateDatId(m.group(1),m.group(2)));
  if (item != null) {
    String location=m.group(3);
    String text="String_Node_Str";
    Discrepancy matchingDiscrepancy=matchDiscrepancy(location,item.getDiscrepanciesList());
    if (matchingDiscrepancy != null) {
      text=matchingDiscrepancy.getText();
      Map<String,Discrepancy> discrepancies=item.getDiscrepanciesList();
      discrepancies.remove(matchingDiscrepancy.getId());
      item.setDiscrepanciesList(discrepancies);
      addAnnotationForForCoveredLine(item,location,Test_Unit_Resolution,text,resultPath);
    }
  }
}

Fixed version (ground truth):
private void processSingleResult(String resultPath,Matcher m){
  DispoItemData item=datIdToItem.get(generateDatId(m.group(1),m.group(2)));
  if (item != null) {
    String location=m.group(3);
    String text="String_Node_Str";
    Discrepancy matchingDiscrepancy=matchDiscrepancy(location,item.getDiscrepanciesList());
    if (matchingDiscrepancy != null) {
      text=matchingDiscrepancy.getText();
      Map<String,Discrepancy> discrepancies=item.getDiscrepanciesList();
      discrepancies.remove(matchingDiscrepancy.getId());
      item.setDiscrepanciesList(discrepancies);
      addAnnotationForForCoveredLine(item,location,Test_Unit_Resolution,resultPath,text);
    }
  }
}
Program: 96719
Project: 96719
Buggy source:
private void processExceptionHandled(OperationReport report){
  for (  String datId : datIdsCoveredByException) {
    if (datId.contains("String_Node_Str") || datId.contains("String_Node_Str")) {
      System.out.println();
    }
    Matcher matcher=Pattern.compile("String_Node_Str").matcher(datId);
    matcher.find();
    String itemDatId=matcher.group();
    DispoItemData item=datIdToItem.get(itemDatId);
    String line=datId.replaceAll("String_Node_Str","String_Node_Str");
    line=line.replaceAll("String_Node_Str","String_Node_Str");
    String text="String_Node_Str";
    Discrepancy matchingDiscrepancy=matchDiscrepancy(line,item.getDiscrepanciesList());
    if (matchingDiscrepancy != null) {
      text=matchingDiscrepancy.getText();
      Map<String,Discrepancy> discrepancies=item.getDiscrepanciesList();
      discrepancies.remove(matchingDiscrepancy.getId());
      addAnnotationForForCoveredLine(item,line,Exception_Handling_Resolution,text,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void processExceptionHandled(OperationReport report){
  for (  String datId : datIdsCoveredByException) {
    Matcher matcher=Pattern.compile("String_Node_Str").matcher(datId);
    matcher.find();
    String itemDatId=matcher.group();
    DispoItemData item=datIdToItem.get(itemDatId);
    String line=datId.replaceAll("String_Node_Str","String_Node_Str");
    line=line.replaceAll("String_Node_Str","String_Node_Str");
    String text="String_Node_Str";
    Discrepancy matchingDiscrepancy=matchDiscrepancy(line,item.getDiscrepanciesList());
    if (matchingDiscrepancy != null) {
      text=matchingDiscrepancy.getText();
      Map<String,Discrepancy> discrepancies=item.getDiscrepanciesList();
      discrepancies.remove(matchingDiscrepancy.getId());
      addAnnotationForForCoveredLine(item,line,Exception_Handling_Resolution,"String_Node_Str",text);
    }
  }
}
Program: 96721
Project: 96721
Buggy source:
@Ignore @Test public void test(){
  ChangeItem item;
  if (itemType == ItemType.artifact) {
    item=ChangeItemUtil.newArtifactChange(ArtifactId.valueOf(0),ArtifactTypeId.valueOf(0),GAMMA,ModificationType.MODIFIED,ApplicabilityToken.BASE);
  }
 else {
    item=ChangeItemUtil.newAttributeChange(AttributeId.valueOf(0),AttributeTypeId.valueOf(0),ArtifactId.valueOf(0),GAMMA,ModificationType.MODIFIED,"String_Node_Str",ApplicabilityToken.BASE);
  }
  buildTestCase(GAMMA,item);
  Assert.assertNotNull(testMessage,null);
}

Fixed version (ground truth):
@Ignore @Test public void test(){
  ChangeItem item;
  if (itemType == ItemType.artifact) {
    item=ChangeItemUtil.newArtifactChange(ArtifactId.SENTINEL,ArtifactTypeId.SENTINEL,GAMMA,ModificationType.MODIFIED,ApplicabilityToken.BASE);
  }
 else {
    item=ChangeItemUtil.newAttributeChange(AttributeId.SENTINEL,AttributeTypeId.SENTINEL,ArtifactId.SENTINEL,GAMMA,ModificationType.MODIFIED,"String_Node_Str",ApplicabilityToken.BASE);
  }
  buildTestCase(GAMMA,item);
  Assert.assertNotNull(testMessage,null);
}
Program: 96722
Project: 96722
Buggy source:
/** 
 * create an artifact_deleted attribute who's artifact needs to be introduced deleted
 */
private static Object[] testCase_artifactDeletedAttribute(){
  List<ChangeItem> changes=new LinkedList<>();
  final ArtifactId artId=ArtifactId.valueOf(3);
  HashMap<Long,ApplicabilityToken> applicMap=new HashMap<>();
  applicMap.put(1L,ApplicabilityToken.BASE);
  ChangeItem ci1=ChangeItemUtil.newAttributeChange(AttributeId.valueOf(22),AttributeTypeId.valueOf(2),artId,GammaId.valueOf(4L),ModificationType.ARTIFACT_DELETED,Strings.EMPTY_STRING,ApplicabilityToken.BASE);
  changes.add(ci1);
  List<AttributeData> attrDatas=new LinkedList<>();
  AttributeData attrData1=createAttributeData(artId.getId().intValue(),33,1L,ModificationType.ARTIFACT_DELETED);
  AttributeData attrData2=createAttributeData(artId.getId().intValue(),44 + 1,67L,ModificationType.ARTIFACT_DELETED);
  attrDatas.add(attrData1);
  attrDatas.add(attrData2);
  List<ArtifactData> artData=new LinkedList<>();
  ArtifactData artData1=createArtifactData(artId.getId().intValue(),89L,ModificationType.DELETED);
  artData.add(artData1);
  List<ChangeItem> expected=new LinkedList<>();
  expected.add(createExpected(attrData1));
  expected.add(createExpected(attrData2));
  expected.add(createExpected(artData1));
  return new Object[]{changes,expected,attrDatas,artData,null,null,applicMap};
}

Fixed version (ground truth):
/** 
 * create an artifact_deleted attribute who's artifact needs to be introduced deleted
 */
private static Object[] testCase_artifactDeletedAttribute(){
  List<ChangeItem> changes=new LinkedList<>();
  final ArtifactId artId=ArtifactId.valueOf(3);
  HashMap<Long,ApplicabilityToken> applicMap=new HashMap<>();
  applicMap.put(1L,ApplicabilityToken.BASE);
  ChangeItem ci1=ChangeItemUtil.newAttributeChange(AttributeId.valueOf(22),AttributeTypeId.valueOf(2L),artId,GammaId.valueOf(4L),ModificationType.ARTIFACT_DELETED,Strings.EMPTY_STRING,ApplicabilityToken.BASE);
  changes.add(ci1);
  List<AttributeData> attrDatas=new LinkedList<>();
  AttributeData attrData1=createAttributeData(artId.getId().intValue(),33,1L,ModificationType.ARTIFACT_DELETED);
  AttributeData attrData2=createAttributeData(artId.getId().intValue(),44 + 1,67L,ModificationType.ARTIFACT_DELETED);
  attrDatas.add(attrData1);
  attrDatas.add(attrData2);
  List<ArtifactData> artData=new LinkedList<>();
  ArtifactData artData1=createArtifactData(artId.getId().intValue(),89L,ModificationType.DELETED);
  artData.add(artData1);
  List<ChangeItem> expected=new LinkedList<>();
  expected.add(createExpected(attrData1));
  expected.add(createExpected(attrData2));
  expected.add(createExpected(artData1));
  return new Object[]{changes,expected,attrDatas,artData,null,null,applicMap};
}
Program: 96724
Project: 96724
Buggy source:
private static ChangeItem createExpected(ArtifactData data){
  return ChangeItemUtil.newArtifactChange(ArtifactId.valueOf(data.getLocalId()),ArtifactTypeId.valueOf(0),GammaId.valueOf(data.getVersion().getGammaId()),determineModType(data),ApplicabilityToken.BASE);
}

Fixed version (ground truth):
private static ChangeItem createExpected(ArtifactData data){
  return ChangeItemUtil.newArtifactChange(ArtifactId.valueOf(data.getLocalId()),ArtifactTypeId.SENTINEL,GammaId.valueOf(data.getVersion().getGammaId()),determineModType(data),ApplicabilityToken.BASE);
}
Program: 96725
Project: 96725
Buggy source:
/** 
 * create a deleted attribute who's artifact needs to be introduced
 */
private static Object[] testCase_deletedAttribute(){
  List<ChangeItem> changes=new LinkedList<>();
  final int artId=3;
  HashMap<Long,ApplicabilityToken> applicMap=new HashMap<>();
  applicMap.put(1L,ApplicabilityToken.BASE);
  ChangeItem ci1=ChangeItemUtil.newAttributeChange(AttributeId.valueOf(22),AttributeTypeId.valueOf(2),ArtifactId.valueOf(artId),GammaId.valueOf(4L),ModificationType.DELETED,Strings.EMPTY_STRING,ApplicabilityToken.BASE);
  changes.add(ci1);
  List<AttributeData> attrDatas=new LinkedList<>();
  AttributeData attrData1=createAttributeData(artId,33,1L,ModificationType.MODIFIED);
  AttributeData attrData2=createAttributeData(artId,44 + 1,67L,ModificationType.NEW);
  attrDatas.add(attrData1);
  attrDatas.add(attrData2);
  List<ArtifactData> artData=new LinkedList<>();
  ArtifactData artData1=createArtifactData(artId,89L,ModificationType.NEW);
  artData.add(artData1);
  List<ChangeItem> expected=new LinkedList<>();
  expected.add(createExpected(attrData1));
  expected.add(createExpected(attrData2));
  expected.add(createExpected(artData1));
  return new Object[]{changes,expected,attrDatas,artData,null,null,applicMap};
}

Fixed version (ground truth):
/** 
 * create a deleted attribute who's artifact needs to be introduced
 */
private static Object[] testCase_deletedAttribute(){
  List<ChangeItem> changes=new LinkedList<>();
  final int artId=3;
  HashMap<Long,ApplicabilityToken> applicMap=new HashMap<>();
  applicMap.put(1L,ApplicabilityToken.BASE);
  ChangeItem ci1=ChangeItemUtil.newAttributeChange(AttributeId.valueOf(22),AttributeTypeId.valueOf(2L),ArtifactId.valueOf(artId),GammaId.valueOf(4L),ModificationType.DELETED,Strings.EMPTY_STRING,ApplicabilityToken.BASE);
  changes.add(ci1);
  List<AttributeData> attrDatas=new LinkedList<>();
  AttributeData attrData1=createAttributeData(artId,33,1L,ModificationType.MODIFIED);
  AttributeData attrData2=createAttributeData(artId,44 + 1,67L,ModificationType.NEW);
  attrDatas.add(attrData1);
  attrDatas.add(attrData2);
  List<ArtifactData> artData=new LinkedList<>();
  ArtifactData artData1=createArtifactData(artId,89L,ModificationType.NEW);
  artData.add(artData1);
  List<ChangeItem> expected=new LinkedList<>();
  expected.add(createExpected(attrData1));
  expected.add(createExpected(attrData2));
  expected.add(createExpected(artData1));
  return new Object[]{changes,expected,attrDatas,artData,null,null,applicMap};
}
Program: 96726
Project: 96726
Buggy source:
/** 
 * This tests when a modified attribute causes its artifact and non-modified attribute to be introduced
 */
private static Object[] testCase_missingAttribute(){
  List<ChangeItem> changes=new LinkedList<>();
  final int ci1AttrId=1;
  final int artId=3;
  final long missingGamma=9L;
  long artGamma=7L;
  HashMap<Long,ApplicabilityToken> applicMap=new HashMap<>();
  applicMap.put(1L,ApplicabilityToken.BASE);
  ChangeItem ci1=ChangeItemUtil.newAttributeChange(AttributeId.valueOf(ci1AttrId),AttributeTypeId.valueOf(2),ArtifactId.valueOf(artId),GammaId.valueOf(4L),ModificationType.MODIFIED,Strings.EMPTY_STRING,ApplicabilityToken.BASE);
  changes.add(ci1);
  List<AttributeData> attrDatas=new LinkedList<>();
  AttributeData attrData1=createAttributeData(artId,ci1AttrId,1L,ModificationType.MODIFIED);
  AttributeData attrData2=createAttributeData(artId,ci1AttrId + 1,missingGamma,ModificationType.INTRODUCED);
  attrDatas.add(attrData1);
  attrDatas.add(attrData2);
  List<ArtifactData> artData=new LinkedList<>();
  ArtifactData artData1=createArtifactData(artId,artGamma,ModificationType.NEW);
  artData.add(artData1);
  List<ChangeItem> expected=new LinkedList<>();
  expected.add(createExpected(attrData2));
  expected.add(createExpected(artData1));
  return new Object[]{changes,expected,attrDatas,artData,null,null,applicMap};
}

Fixed version (ground truth):
/** 
 * This tests when a modified attribute causes its artifact and non-modified attribute to be introduced
 */
private static Object[] testCase_missingAttribute(){
  List<ChangeItem> changes=new LinkedList<>();
  final int ci1AttrId=1;
  final int artId=3;
  final long missingGamma=9L;
  long artGamma=7L;
  HashMap<Long,ApplicabilityToken> applicMap=new HashMap<>();
  applicMap.put(1L,ApplicabilityToken.BASE);
  ChangeItem ci1=ChangeItemUtil.newAttributeChange(AttributeId.valueOf(ci1AttrId),AttributeTypeId.valueOf(2L),ArtifactId.valueOf(artId),GammaId.valueOf(4L),ModificationType.MODIFIED,Strings.EMPTY_STRING,ApplicabilityToken.BASE);
  changes.add(ci1);
  List<AttributeData> attrDatas=new LinkedList<>();
  AttributeData attrData1=createAttributeData(artId,ci1AttrId,1L,ModificationType.MODIFIED);
  AttributeData attrData2=createAttributeData(artId,ci1AttrId + 1,missingGamma,ModificationType.INTRODUCED);
  attrDatas.add(attrData1);
  attrDatas.add(attrData2);
  List<ArtifactData> artData=new LinkedList<>();
  ArtifactData artData1=createArtifactData(artId,artGamma,ModificationType.NEW);
  artData.add(artData1);
  List<ChangeItem> expected=new LinkedList<>();
  expected.add(createExpected(attrData2));
  expected.add(createExpected(artData1));
  return new Object[]{changes,expected,attrDatas,artData,null,null,applicMap};
}
Program: 96727
Project: 96727
Buggy source:
public List<ChangeItem> doWork() throws Exception {
  Map<ArtifactId,ChangeItem> artifactChanges=new HashMap<>();
  for (  ChangeItem item : changeItems) {
    if (item.getChangeType().isArtifactChange()) {
      artifactChanges.put(item.getArtId(),item);
    }
  }
  List<ChangeItem> attrItems=new ArrayList<>();
  Map<ArtifactId,ChangeItem> syntheticArtifactChanges=new HashMap<>();
  for (  ChangeItem item : changeItems) {
    if (item.getChangeType().isAttributeChange()) {
      ChangeItem attributeChange=item;
      ArtifactId artIdToCheck=attributeChange.getArtId();
      ChangeItem artifactChange=artifactChanges.get(artIdToCheck);
      if (artifactChange == null) {
        artifactChange=syntheticArtifactChanges.get(artIdToCheck);
        if (artifactChange == null) {
          artifactChange=ChangeItemUtil.newArtifactChange(artIdToCheck,ArtifactTypeId.valueOf(-1),GammaId.valueOf(-1),null,null);
          syntheticArtifactChanges.put(artIdToCheck,artifactChange);
          artifactChange.setSynthetic(true);
        }
        attrItems.add(attributeChange);
        updateArtifactChangeItem(artifactChange,attributeChange);
      }
    }
  }
  for (  ChangeItem change : syntheticArtifactChanges.values()) {
    if (isAllowableChange(change.getIgnoreType())) {
      changeItems.add(change);
    }
  }
  return changeItems;
}

Fixed version (ground truth):
public List<ChangeItem> doWork() throws Exception {
  Map<ArtifactId,ChangeItem> artifactChanges=new HashMap<>();
  for (  ChangeItem item : changeItems) {
    if (item.getChangeType().isArtifactChange()) {
      artifactChanges.put(item.getArtId(),item);
    }
  }
  List<ChangeItem> attrItems=new ArrayList<>();
  Map<ArtifactId,ChangeItem> syntheticArtifactChanges=new HashMap<>();
  for (  ChangeItem item : changeItems) {
    if (item.getChangeType().isAttributeChange()) {
      ChangeItem attributeChange=item;
      ArtifactId artIdToCheck=attributeChange.getArtId();
      ChangeItem artifactChange=artifactChanges.get(artIdToCheck);
      if (artifactChange == null) {
        artifactChange=syntheticArtifactChanges.get(artIdToCheck);
        if (artifactChange == null) {
          artifactChange=ChangeItemUtil.newArtifactChange(artIdToCheck,ArtifactTypeId.SENTINEL,GammaId.valueOf(-1),null,null);
          syntheticArtifactChanges.put(artIdToCheck,artifactChange);
          artifactChange.setSynthetic(true);
        }
        attrItems.add(attributeChange);
        updateArtifactChangeItem(artifactChange,attributeChange);
      }
    }
  }
  for (  ChangeItem change : syntheticArtifactChanges.values()) {
    if (isAllowableChange(change.getIgnoreType())) {
      changeItems.add(change);
    }
  }
  return changeItems;
}
Program: 96728
Project: 96728
Buggy source:
private ChangeItem createRelationChangeItem(RelationData data) throws OseeCoreException {
  ApplicabilityId appId=data.getApplicabilityId();
  return ChangeItemUtil.newRelationChange(RelationId.valueOf(data.getLocalId()),RelationTypeId.valueOf(data.getTypeUuid()),GammaId.valueOf(data.getVersion().getGammaId()),determineModType(data),ArtifactId.valueOf(data.getArtIdA()),ArtifactId.valueOf(data.getArtIdB()),data.getRationale(),getApplicabilityToken(appId));
}

Fixed version (ground truth):
private ChangeItem createRelationChangeItem(RelationData data) throws OseeCoreException {
  ApplicabilityId appId=data.getApplicabilityId();
  return ChangeItemUtil.newRelationChange(RelationId.valueOf(Long.valueOf(data.getLocalId())),RelationTypeId.valueOf(data.getTypeUuid()),GammaId.valueOf(data.getVersion().getGammaId()),determineModType(data),ArtifactId.valueOf(data.getArtIdA()),ArtifactId.valueOf(data.getArtIdB()),data.getRationale(),getApplicabilityToken(appId));
}
Program: 96729
Project: 96729
Buggy source:
public void initDispoItem(DispoItemData itemToInit){
  if (itemToInit.getAnnotationsList() == null) {
    itemToInit.setAnnotationsList(new ArrayList<DispoAnnotationData>());
  }
  if (itemToInit.getDiscrepanciesList() == null) {
    itemToInit.setDiscrepanciesList(new HashMap<String,Discrepancy>());
  }
  if (itemToInit.getDiscrepanciesList().size() == 0) {
    itemToInit.setStatus(DispoStrings.Item_Pass);
  }
 else {
    itemToInit.setStatus(dispoConnector.getItemStatus(itemToInit));
  }
  if (!Strings.isValid(itemToInit.getAssignee())) {
    itemToInit.setAssignee("String_Node_Str");
  }
  itemToInit.setAborted(false);
  itemToInit.setNeedsRerun(false);
  itemToInit.setNeedsReview(false);
}

Fixed version (ground truth):
public void initDispoItem(DispoItemData itemToInit){
  if (itemToInit.getAnnotationsList() == null) {
    itemToInit.setAnnotationsList(new ArrayList<DispoAnnotationData>());
  }
  if (itemToInit.getDiscrepanciesList() == null) {
    itemToInit.setDiscrepanciesList(new HashMap<String,Discrepancy>());
  }
  if (itemToInit.getDiscrepanciesList().size() == 0) {
    itemToInit.setStatus(DispoStrings.Item_Pass);
  }
 else {
    itemToInit.setStatus(dispoConnector.getItemStatus(itemToInit));
  }
  if (!Strings.isValid(itemToInit.getAssignee())) {
    itemToInit.setAssignee("String_Node_Str");
  }
  itemToInit.setNeedsRerun(false);
  itemToInit.setNeedsReview(false);
}
Program: 96730
Project: 96730
Buggy source:
@Override protected Composite createFilterControls(Composite parent){
  ImageDescriptor descriptor=AbstractUIPlugin.imageDescriptorFromPlugin(PlatformUI.PLUGIN_ID,"String_Node_Str");
  if (descriptor == null) {
    descriptor=ImageManager.getImageDescriptor(FrameworkImage.CLEAR_CO);
  }
  if (descriptor != null) {
    JFaceResources.getImageRegistry().put(CLEAR_ICON,descriptor);
  }
  ImageDescriptor descriptor2=AbstractUIPlugin.imageDescriptorFromPlugin(PlatformUI.PLUGIN_ID,"String_Node_Str");
  if (descriptor == null) {
    descriptor2=descriptor;
  }
  if (descriptor2 != null) {
    JFaceResources.getImageRegistry().put(DISABLED_CLEAR_ICON,descriptor2);
  }
  return super.createFilterControls(parent);
}

Fixed version (ground truth):
@Override protected Composite createFilterControls(Composite parent){
  ImageDescriptor descriptor=AbstractUIPlugin.imageDescriptorFromPlugin(PlatformUI.PLUGIN_ID,"String_Node_Str");
  if (descriptor == null) {
    descriptor=ImageManager.getImageDescriptor(FrameworkImage.CLEAR_CO);
  }
  if (descriptor != null) {
    JFaceResources.getImageRegistry().put(CLEAR_ICON,descriptor);
  }
  ImageDescriptor descriptor2=AbstractUIPlugin.imageDescriptorFromPlugin(PlatformUI.PLUGIN_ID,"String_Node_Str");
  if (descriptor2 == null) {
    descriptor2=descriptor;
  }
  if (descriptor2 != null) {
    JFaceResources.getImageRegistry().put(DISABLED_CLEAR_ICON,descriptor2);
  }
  return super.createFilterControls(parent);
}
Program: 96731
Project: 96731
Buggy source:
/** 
 * Performs the deletion functionality
 */
private void performDeleteRelation(IStructuredSelection selection){
  Object[] objects=selection.toArray();
  for (  Object object : objects) {
    if (hasWriteRelationTypePermission(artifact,object)) {
      if (object instanceof WrapperForRelationLink) {
        WrapperForRelationLink wrapper=(WrapperForRelationLink)object;
        try {
          RelationManager.deleteRelation(wrapper.getRelationType(),wrapper.getArtifactA(),wrapper.getArtifactB());
          Object parent=((ITreeContentProvider)treeViewer.getContentProvider()).getParent(object);
          if (parent != null) {
            treeViewer.refresh(parent);
          }
 else {
            treeViewer.refresh();
          }
        }
 catch (        OseeCoreException ex) {
          OseeLog.log(Activator.class,Level.SEVERE,ex);
        }
      }
 else       if (object instanceof RelationTypeSideSorter) {
        RelationTypeSideSorter group=(RelationTypeSideSorter)object;
        try {
          RelationManager.deleteRelations(artifact,group.getRelationType(),group.getSide());
          treeViewer.refresh(group);
        }
 catch (        OseeCoreException ex) {
          OseeLog.log(Activator.class,Level.SEVERE,ex);
        }
      }
    }
  }
  editor.onDirtied();
}

Fixed version (ground truth):
/** 
 * Performs the deletion functionality
 */
private void performDeleteRelation(IStructuredSelection selection){
  Object[] objects=selection.toArray();
  for (  Object object : objects) {
    if (hasWriteRelationTypePermission(artifact,object)) {
      if (object instanceof WrapperForRelationLink) {
        WrapperForRelationLink wrapper=(WrapperForRelationLink)object;
        try {
          RelationManager.deleteRelation(wrapper.getRelationType(),wrapper.getArtifactA(),wrapper.getArtifactB());
          Object parent=((ITreeContentProvider)treeViewer.getContentProvider()).getParent(wrapper);
          refreshParent(parent);
        }
 catch (        OseeCoreException ex) {
          OseeLog.log(Activator.class,Level.SEVERE,ex);
        }
      }
 else       if (object instanceof RelationTypeSideSorter) {
        RelationTypeSideSorter group=(RelationTypeSideSorter)object;
        try {
          RelationManager.deleteRelations(artifact,group.getRelationType(),group.getSide());
          refreshParent(group);
        }
 catch (        OseeCoreException ex) {
          OseeLog.log(Activator.class,Level.SEVERE,ex);
        }
      }
    }
  }
  editor.onDirtied();
}
Program: 96732
Project: 96732
Buggy source:
private void refreshLockImage(){
  boolean noBranch=false, someAccessControlSet=false;
  BranchId branch=null;
  try {
    branch=teamArt.getWorkingBranch();
  }
 catch (  OseeCoreException ex) {
    OseeLog.log(Activator.class,Level.SEVERE,ex);
  }
  if (branch.isInvalid()) {
    noBranch=true;
  }
 else {
    someAccessControlSet=!AccessControlManager.getAccessControlList(branch).isEmpty();
  }
  lockBranchButton.setImage(ImageManager.getImage(noBranch || someAccessControlSet ? FrameworkImage.LOCK_LOCKED : FrameworkImage.LOCK_UNLOCKED));
  lockBranchButton.redraw();
  lockBranchButton.getParent().redraw();
}

Fixed version (ground truth):
private void refreshLockImage(){
  boolean noBranch=false, someAccessControlSet=false;
  BranchId branch=BranchId.SENTINEL;
  try {
    branch=teamArt.getWorkingBranch();
  }
 catch (  OseeCoreException ex) {
    OseeLog.log(Activator.class,Level.SEVERE,ex);
  }
  if (branch.isInvalid()) {
    noBranch=true;
  }
 else {
    someAccessControlSet=!AccessControlManager.getAccessControlList(branch).isEmpty();
  }
  lockBranchButton.setImage(ImageManager.getImage(noBranch || someAccessControlSet ? FrameworkImage.LOCK_LOCKED : FrameworkImage.LOCK_UNLOCKED));
  lockBranchButton.redraw();
  lockBranchButton.getParent().redraw();
}
Program: 96733
Project: 96733
Buggy source:
private void refreshLockImage(Button button){
  boolean noBranch=false, someAccessControlSet=false;
  BranchId branch=null;
  try {
    branch=getTeamArt().getWorkingBranch();
  }
 catch (  OseeCoreException ex) {
    OseeLog.log(Activator.class,Level.SEVERE,ex);
  }
  if (branch.isInvalid()) {
    noBranch=true;
  }
 else {
    someAccessControlSet=!AccessControlManager.getAccessControlList(branch).isEmpty();
  }
  button.setImage(ImageManager.getImage(noBranch || someAccessControlSet ? FrameworkImage.LOCK_LOCKED : FrameworkImage.LOCK_UNLOCKED));
  button.redraw();
  button.getParent().redraw();
}

Fixed version (ground truth):
private void refreshLockImage(Button button){
  boolean noBranch=false, someAccessControlSet=false;
  BranchId branch=BranchId.SENTINEL;
  try {
    branch=getTeamArt().getWorkingBranch();
  }
 catch (  OseeCoreException ex) {
    OseeLog.log(Activator.class,Level.SEVERE,ex);
  }
  if (branch.isInvalid()) {
    noBranch=true;
  }
 else {
    someAccessControlSet=!AccessControlManager.getAccessControlList(branch).isEmpty();
  }
  button.setImage(ImageManager.getImage(noBranch || someAccessControlSet ? FrameworkImage.LOCK_LOCKED : FrameworkImage.LOCK_UNLOCKED));
  button.redraw();
  button.getParent().redraw();
}
Program: 96736
Project: 96736
Buggy source:
public final ApplicabilityGrammarParser.operator_return operator() throws RecognitionException {
  ApplicabilityGrammarParser.operator_return retval=new ApplicabilityGrammarParser.operator_return();
  retval.start=input.LT(1);
  CommonTree root_0=null;
  Token set28=null;
  CommonTree set28_tree=null;
  try {
{
      root_0=(CommonTree)adaptor.nil();
      set28=(Token)input.LT(1);
      if (input.LA(1) == OR || input.LA(1) == AND) {
        input.consume();
        adaptor.addChild(root_0,(CommonTree)adaptor.create(set28));
        state.errorRecovery=false;
      }
 else {
        MismatchedSetException mse=new MismatchedSetException(null,input);
        throw mse;
      }
    }
    retval.stop=input.LT(-1);
    retval.tree=(CommonTree)adaptor.rulePostProcessing(root_0);
    adaptor.setTokenBoundaries(retval.tree,retval.start,retval.stop);
  }
 catch (  RecognitionException re) {
    reportError(re);
    recover(input,re);
    retval.tree=(CommonTree)adaptor.errorNode(input,retval.start,input.LT(-1),re);
  }
 finally {
  }
  return retval;
}

Fixed version (ground truth):
public final ApplicabilityGrammarParser.operator_return operator() throws RecognitionException {
  ApplicabilityGrammarParser.operator_return retval=new ApplicabilityGrammarParser.operator_return();
  retval.start=input.LT(1);
  CommonTree root_0=null;
  Token set28=null;
  CommonTree set28_tree=null;
  try {
{
      root_0=(CommonTree)adaptor.nil();
      set28=input.LT(1);
      if (input.LA(1) == OR || input.LA(1) == AND) {
        input.consume();
        adaptor.addChild(root_0,adaptor.create(set28));
        state.errorRecovery=false;
      }
 else {
        MismatchedSetException mse=new MismatchedSetException(null,input);
        throw mse;
      }
    }
    retval.stop=input.LT(-1);
    retval.tree=(CommonTree)adaptor.rulePostProcessing(root_0);
    adaptor.setTokenBoundaries(retval.tree,retval.start,retval.stop);
  }
 catch (  RecognitionException re) {
    reportError(re);
    recover(input,re);
    retval.tree=(CommonTree)adaptor.errorNode(input,retval.start,input.LT(-1),re);
  }
 finally {
  }
  return retval;
}
Program: 96737
Project: 96737
Buggy source:
public String[] getTokenNames(){
  return ApplicabilityGrammarParser.tokenNames;
}

Fixed version (ground truth):
@Override public String[] getTokenNames(){
  return ApplicabilityGrammarParser.tokenNames;
}
Program: 96738
Project: 96738
Buggy source:
public Object getTree(){
  return tree;
}

Fixed version (ground truth):
@Override public Object getTree(){
  return tree;
}
Program: 96741
Project: 96741
Buggy source:
public String getGrammarFileName(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getGrammarFileName(){
  return "String_Node_Str";
}
Program: 96742
Project: 96742
Buggy source:
public final ApplicabilityGrammarParser.value_return value() throws RecognitionException {
  ApplicabilityGrammarParser.value_return retval=new ApplicabilityGrammarParser.value_return();
  retval.start=input.LT(1);
  CommonTree root_0=null;
  Token ID27=null;
  ApplicabilityGrammarParser.operator_return temp=null;
  CommonTree ID27_tree=null;
  try {
{
      root_0=(CommonTree)adaptor.nil();
      int alt10=2;
      int LA10_0=input.LA(1);
      if ((LA10_0 == OR || LA10_0 == AND)) {
        alt10=1;
      }
switch (alt10) {
case 1:
{
          pushFollow(FOLLOW_operator_in_value359);
          temp=operator();
          state._fsp--;
          adaptor.addChild(root_0,temp.getTree());
        }
      break;
  }
  ID27=(Token)match(input,ID,FOLLOW_ID_in_value362);
  ID27_tree=(CommonTree)adaptor.create(ID27);
  adaptor.addChild(root_0,ID27_tree);
  if ((temp != null ? input.toString(temp.start,temp.stop) : null) != null)   featureId_values_map.get(featureId).add((temp != null ? input.toString(temp.start,temp.stop) : null));
  featureId_values_map.get(featureId).add((ID27 != null ? ID27.getText() : null));
}
retval.stop=input.LT(-1);
retval.tree=(CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree,retval.start,retval.stop);
}
 catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree=(CommonTree)adaptor.errorNode(input,retval.start,input.LT(-1),re);
}
 finally {
}
return retval;
}

Fixed version (ground truth):
public final ApplicabilityGrammarParser.value_return value() throws RecognitionException {
  ApplicabilityGrammarParser.value_return retval=new ApplicabilityGrammarParser.value_return();
  retval.start=input.LT(1);
  CommonTree root_0=null;
  Token ID27=null;
  ApplicabilityGrammarParser.operator_return temp=null;
  CommonTree ID27_tree=null;
  try {
{
      root_0=(CommonTree)adaptor.nil();
      int alt10=2;
      int LA10_0=input.LA(1);
      if ((LA10_0 == OR || LA10_0 == AND)) {
        alt10=1;
      }
switch (alt10) {
case 1:
{
          pushFollow(FOLLOW_operator_in_value359);
          temp=operator();
          state._fsp--;
          adaptor.addChild(root_0,temp.getTree());
        }
      break;
  }
  ID27=(Token)match(input,ID,FOLLOW_ID_in_value362);
  ID27_tree=(CommonTree)adaptor.create(ID27);
  adaptor.addChild(root_0,ID27_tree);
  if ((temp != null ? input.toString(temp.start,temp.stop) : null) != null) {
    featureId_values_map.get(featureId).add((temp != null ? input.toString(temp.start,temp.stop) : null));
  }
  featureId_values_map.get(featureId).add((ID27 != null ? ID27.getText() : null));
}
retval.stop=input.LT(-1);
retval.tree=(CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree,retval.start,retval.stop);
}
 catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree=(CommonTree)adaptor.errorNode(input,retval.start,input.LT(-1),re);
}
 finally {
}
return retval;
}
Program: 96743
Project: 96743
Buggy source:
/** 
 * Adds all of the items in the Collection values to the collection for the specified key.
 * @param key The key to add the values to
 * @param values The values to be added. Null or empty values will insert empty list in map
 * @return The collection for the key, containing all values.
 */
public Collection<V> put(K key,Collection<V> values){
  Collection<V> items=null;
  if (values == null || values.isEmpty()) {
    Collection<V> values2=this.getValues(key);
    if (values2 == null) {
      map.put(key,new LinkedList<>());
    }
  }
  for (  V value : values) {
    if (items == null) {
      items=this.put(key,value);
    }
 else {
      items.add(value);
    }
  }
  return items;
}

Fixed version (ground truth):
/** 
 * Adds all of the items in the Collection values to the collection for the specified key.
 * @param key The key to add the values to
 * @param values The values to be added. Null or empty values will insert empty list in map
 * @return The collection for the key, containing all values.
 */
public Collection<V> put(K key,Collection<V> values){
  Collection<V> items=null;
  if (values == null || values.isEmpty()) {
    if (!map.containsKey(key)) {
      map.put(key,new LinkedList<>());
    }
  }
 else {
    for (    V value : values) {
      if (items == null) {
        items=this.put(key,value);
      }
 else {
        items.add(value);
      }
    }
  }
  return items;
}
Program: 96744
Project: 96744
Buggy source:
public static String getValue(JdbcClient jdbcClient,String key,Long maxStaleness){
  Pair<Long,String> pair=cache.get(key);
  String value;
  if (pair == null || pair.getFirst() + maxStaleness < System.currentTimeMillis()) {
    value=jdbcClient.fetch("String_Node_Str",GET_VALUE_SQL,key);
    cacheValue(key,value);
  }
 else {
    value=pair.getSecond();
  }
  return value;
}

Fixed version (ground truth):
public static String getValue(JdbcClient jdbcClient,String key,String defaultValue,Long maxStaleness){
  Pair<Long,String> pair=cache.get(key);
  String value;
  if (pair == null || pair.getFirst() + maxStaleness < System.currentTimeMillis()) {
    value=jdbcClient.fetch(defaultValue,GET_VALUE_SQL,key);
    cacheValue(key,value);
  }
 else {
    value=pair.getSecond();
  }
  return value;
}
Program: 96746
Project: 96746
Buggy source:
/** 
 * Delete attribute if exactly one exists. Does nothing if attribute does not exist and throw MultipleAttributesExist is more than one instance of the attribute type exsits for this artifact
 */
public final void deleteSoleAttribute(AttributeTypeId attributeType) throws OseeCoreException {
  Attribute<?> attribute=getSoleAttribute(attributeType);
  if (attribute != null) {
    deleteAttribute(attribute);
  }
}

Fixed version (ground truth):
/** 
 * Delete attribute if exactly one exists. Does nothing if attribute does not exist and throw MultipleAttributesExist is more than one instance of the attribute type exists for this artifact
 */
public final void deleteSoleAttribute(AttributeTypeId attributeType) throws OseeCoreException {
  Attribute<?> attribute=getSoleAttribute(attributeType);
  if (attribute != null) {
    deleteAttribute(attribute);
  }
}
Program: 96748
Project: 96748
Buggy source:
private ReleaseDateColumn(){
  super(WorldXViewerFactory.COLUMN_NAMESPACE + "String_Node_Str",AtsAttributeTypes.ReleaseDate);
}

Fixed version (ground truth):
private ReleaseDateColumn(){
  super(AtsColumnId.ReleaseDate.getId(),AtsAttributeTypes.ReleaseDate);
}
Program: 96749
Project: 96749
Buggy source:
/** 
 * Returns the backing data object for operations like sorting
 */
public Object getBackingData(Object element,XViewerColumn xCol,int columnIndex) throws Exception {
  if (xCol.getId().equals(AtsColumnId.CreatedDate.getId())) {
    return CreatedDateColumnUI.getInstance().getBackingData(element,xCol,columnIndex);
  }
 else   if (xCol.getId().equals(ReleaseDateColumn.getInstance().getId())) {
    return ReleaseDateColumn.getInstance().getBackingData(element,xCol,columnIndex);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the backing data object for operations like sorting
 */
public Object getBackingData(Object element,XViewerColumn xCol,int columnIndex) throws Exception {
  XViewerAtsColumn xViewerAtsColumn;
  if (xCol.equals(AtsColumnId.CreatedDate.getId())) {
    xViewerAtsColumn=CreatedDateColumnUI.getInstance();
  }
 else   if (xCol.equals(AtsColumnId.ReleaseDate.getId())) {
    xViewerAtsColumn=ReleaseDateColumn.getInstance();
  }
 else   if (xCol.equals(AtsColumnId.CompletedDate.getId())) {
    xViewerAtsColumn=CompletedDateColumnUI.getInstance();
  }
 else   if (xCol.equals(AtsColumnId.CancelledDate.getId())) {
    xViewerAtsColumn=CancelledDateColumnUI.getInstance();
  }
 else {
    return null;
  }
  return xViewerAtsColumn.getBackingData(element,xCol,columnIndex);
}
Program: 96750
Project: 96750
Buggy source:
@Override public boolean isOfType(IAtsObject atsObject,IArtifactType artifactType){
  return isOfType(atsObject.getStoreObject());
}

Fixed version (ground truth):
@Override public boolean isOfType(IAtsObject atsObject,IArtifactType artifactType){
  return isOfType(atsObject.getStoreObject(),artifactType);
}
Program: 96751
Project: 96751
Buggy source:
@Override public boolean isOfType(IAtsObject atsObject,IArtifactType artifactType){
  return isOfType(atsObject.getStoreObject());
}

Fixed version (ground truth):
@Override public boolean isOfType(IAtsObject atsObject,IArtifactType artifactType){
  return isOfType(atsObject.getStoreObject(),artifactType);
}
Program: 96752
Project: 96752
Buggy source:
public void updateTransitionToAssignees() throws OseeCoreException {
  Collection<IAtsUser> assignees=null;
  for (  IAtsStateItem item : AtsStateItemManager.getStateItems()) {
    String decisionValueIfApplicable=null;
    if (awa.isOfType(AtsArtifactTypes.DecisionReview) && workflowSection.getPage().getLayoutData(AtsAttributeTypes.Decision.getName()) != null) {
      XComboDam xWidget=(XComboDam)workflowSection.getPage().getLayoutData(AtsAttributeTypes.Decision.getName()).getXWidget();
      if (xWidget != null) {
        decisionValueIfApplicable=xWidget.get();
      }
    }
    assignees=item.getOverrideTransitionToAssignees(workflowSection.getSma(),decisionValueIfApplicable);
    if (assignees != null) {
      break;
    }
  }
  if (assignees != null && !awa.getTransitionAssignees().equals(assignees)) {
    awa.setTransitionAssignees(assignees);
    editor.onDirtied();
  }
  refresh();
}

Fixed version (ground truth):
public void updateTransitionToAssignees() throws OseeCoreException {
  Collection<IAtsUser> assignees=null;
  for (  IAtsStateItem item : AtsStateItemManager.getStateItems()) {
    String decisionValueIfApplicable="String_Node_Str";
    if (awa.isOfType(AtsArtifactTypes.DecisionReview) && workflowSection.getPage().getLayoutData(AtsAttributeTypes.Decision.getName()) != null) {
      XComboDam xWidget=(XComboDam)workflowSection.getPage().getLayoutData(AtsAttributeTypes.Decision.getName()).getXWidget();
      if (xWidget != null) {
        decisionValueIfApplicable=xWidget.get();
      }
    }
    assignees=item.getOverrideTransitionToAssignees(workflowSection.getSma(),decisionValueIfApplicable);
    if (assignees != null) {
      break;
    }
  }
  if (assignees != null && !awa.getTransitionAssignees().equals(assignees)) {
    awa.setTransitionAssignees(assignees);
    editor.onDirtied();
  }
  refresh();
}