nus-yam/ex-repair huggingface dataset:
Program: 96945
Project: 96945
Buggy source:
@DELETE @Path("String_Node_Str") @Consumes({MediaType.APPLICATION_JSON}) @Override public Response deleteWorkPackageItems(@PathParam("String_Node_Str") long workPackageId,JaxWorkPackageData workPackageData){
  IAtsUser asUser=atsServer.getUserService().getUserById(workPackageData.getAsUserId());
  if (asUser == null) {
    throw new OseeArgumentException("String_Node_Str",workPackageData.getAsUserId());
  }
  IAtsChangeSet changes=atsServer.getStoreService().createAtsChangeSet("String_Node_Str",asUser);
  for (  Long workItemUuid : workPackageData.getWorkItemUuids()) {
    IAtsWorkItem workItem=atsServer.getQueryService().createQuery(WorkItemType.WorkItem).andUuids(workItemUuid).getResults().getAtMostOneOrNull();
    if (workItem == null) {
      throw new OseeArgumentException("String_Node_Str",workItemUuid);
    }
    if (atsServer.getAttributeResolver().getSoleAttributeValue(workItem,AtsAttributeTypes.WorkPackageGuid,null) != null) {
      changes.deleteAttributes(workItem,AtsAttributeTypes.WorkPackageGuid);
    }
  }
  if (!changes.isEmpty()) {
    changes.execute();
  }
  return Response.ok().build();
}

Fixed version (ground truth):
@DELETE @Path("String_Node_Str") @Consumes({MediaType.APPLICATION_JSON}) @Override public Response deleteWorkPackageItems(JaxWorkPackageData workPackageData){
  IAtsUser asUser=atsServer.getUserService().getUserById(workPackageData.getAsUserId());
  if (asUser == null) {
    throw new OseeArgumentException("String_Node_Str",workPackageData.getAsUserId());
  }
  IAtsChangeSet changes=atsServer.getStoreService().createAtsChangeSet("String_Node_Str",asUser);
  for (  Long workItemUuid : workPackageData.getWorkItemUuids()) {
    IAtsWorkItem workItem=atsServer.getQueryService().createQuery(WorkItemType.WorkItem).andUuids(workItemUuid).getResults().getAtMostOneOrNull();
    if (workItem == null) {
      throw new OseeArgumentException("String_Node_Str",workItemUuid);
    }
    if (atsServer.getAttributeResolver().getSoleAttributeValue(workItem,AtsAttributeTypes.WorkPackageGuid,null) != null) {
      changes.deleteAttributes(workItem,AtsAttributeTypes.WorkPackageGuid);
    }
  }
  if (!changes.isEmpty()) {
    changes.execute();
  }
  return Response.ok().build();
}
Program: 96946
Project: 96946
Buggy source:
public AtsWorkPackageEndpointImpl(IAtsServer atsServer){
  this.atsServer=atsServer;
  gson=new GsonBuilder().create();
}

Fixed version (ground truth):
public AtsWorkPackageEndpointImpl(IAtsServer atsServer,Log logger){
  this.atsServer=atsServer;
  this.logger=logger;
  gson=new GsonBuilder().create();
}
Program: 96947
Project: 96947
Buggy source:
@PUT @Path("String_Node_Str") @Consumes({MediaType.APPLICATION_JSON}) @Override public Response setWorkPackage(@PathParam("String_Node_Str") long workPackageId,JaxWorkPackageData workPackageData){
  ArtifactReadable workPackageArt=atsServer.getArtifact(workPackageId);
  if (workPackageArt == null) {
    throw new OseeArgumentException("String_Node_Str",workPackageId);
  }
  IAtsUser asUser=atsServer.getUserService().getUserById(workPackageData.getAsUserId());
  if (asUser == null) {
    throw new OseeArgumentException("String_Node_Str",workPackageData.getAsUserId());
  }
  IAtsChangeSet changes=atsServer.getStoreService().createAtsChangeSet("String_Node_Str",asUser);
  for (  Long workItemUuid : workPackageData.getWorkItemUuids()) {
    IAtsWorkItem workItem=atsServer.getQueryService().createQuery(WorkItemType.WorkItem).andUuids(workItemUuid).getResults().getAtMostOneOrNull();
    if (workItem == null) {
      throw new OseeArgumentException("String_Node_Str",workItemUuid);
    }
    if (!workItem.isTask() && !workItem.isTeamWorkflow()) {
      throw new OseeArgumentException("String_Node_Str",workItem.getArtifactTypeName());
    }
    changes.setSoleAttributeValue(workItem,AtsAttributeTypes.WorkPackageGuid,workPackageArt.getGuid());
    autoAddWorkItemToGoalColorTeamGoals(getColorTeams(),workPackageArt,workPackageId,workItem,changes);
  }
  if (!changes.isEmpty()) {
    changes.execute();
  }
  return Response.ok().build();
}

Fixed version (ground truth):
@PUT @Path("String_Node_Str") @Consumes({MediaType.APPLICATION_JSON}) @Override public Response setWorkPackage(@PathParam("String_Node_Str") long workPackageId,JaxWorkPackageData workPackageData){
  ArtifactReadable workPackageArt=atsServer.getArtifact(workPackageId);
  if (workPackageArt == null) {
    throw new OseeArgumentException("String_Node_Str",workPackageId);
  }
  IAtsUser asUser=atsServer.getUserService().getUserById(workPackageData.getAsUserId());
  if (asUser == null) {
    throw new OseeArgumentException("String_Node_Str",workPackageData.getAsUserId());
  }
  IAtsChangeSet changes=atsServer.getStoreService().createAtsChangeSet("String_Node_Str",asUser);
  for (  Long workItemUuid : workPackageData.getWorkItemUuids()) {
    IAtsWorkItem workItem=atsServer.getQueryService().createQuery(WorkItemType.WorkItem).andUuids(workItemUuid).getResults().getAtMostOneOrNull();
    if (workItem == null) {
      throw new OseeArgumentException("String_Node_Str",workItemUuid);
    }
    if (!workItem.isTask() && !workItem.isTeamWorkflow()) {
      throw new OseeArgumentException("String_Node_Str",workItem.getArtifactTypeName());
    }
    changes.setSoleAttributeValue(workItem,AtsAttributeTypes.WorkPackageGuid,workPackageArt.getGuid());
    autoAddWorkItemToColorTeamGoals(getColorTeams(),workPackageArt,workPackageId,workItem,changes);
  }
  if (!changes.isEmpty()) {
    changes.execute();
  }
  return Response.ok().build();
}
Program: 96948
Project: 96948
Buggy source:
private ColorTeams getColorTeams(){
  String colorTeamStr=atsServer.getConfigValue(COLOR_TEAM_KEY);
  ColorTeams teams=null;
  if (Strings.isValid(colorTeamStr)) {
    teams=gson.fromJson(colorTeamStr,ColorTeams.class);
  }
 else {
    teams=new ColorTeams();
  }
  return teams;
}

Fixed version (ground truth):
@Override @GET @Path("String_Node_Str") @Produces({MediaType.APPLICATION_JSON}) public ColorTeams getColorTeams(){
  String colorTeamStr=atsServer.getConfigValue(COLOR_TEAM_KEY);
  ColorTeams teams=null;
  if (Strings.isValid(colorTeamStr)) {
    teams=gson.fromJson(colorTeamStr,ColorTeams.class);
  }
 else {
    teams=new ColorTeams();
  }
  return teams;
}
Program: 96949
Project: 96949
Buggy source:
private void validateActionAtEnd(Artifact actionArt) throws OseeCoreException {
  resultData.log("String_Node_Str");
  if (!OseeEventManager.isEventManagerConnected()) {
    resultData.error("String_Node_Str");
    return;
  }
  resultData.log("String_Node_Str");
  TeamWorkFlowArtifact teamArt=ActionManager.getFirstTeam(actionArt);
  testEquals("String_Node_Str","String_Node_Str",teamArt.getSoleAttributeValue(AtsAttributeTypes.Description,null));
  testEquals("String_Node_Str",ChangeType.Support,ChangeTypeUtil.getChangeType(teamArt));
  testEquals("String_Node_Str","String_Node_Str",teamArt.getSoleAttributeValue(AtsAttributeTypes.PriorityType,null));
  testEquals("String_Node_Str","String_Node_Str",String.valueOf(teamArt.getSoleAttributeValue(AtsAttributeTypes.ValidationRequired,null)));
  IAtsVersion verArt=AtsClientService.get().getVersionService().getTargetedVersion(teamArt);
  String expectedTargetedVersion;
  if (verArt != null) {
    expectedTargetedVersion=verArt.toString();
  }
 else {
    expectedTargetedVersion="String_Node_Str";
  }
  testEquals("String_Node_Str",expectedTargetedVersion,"String_Node_Str");
  testEquals("String_Node_Str",TeamState.Analyze.getName(),teamArt.getStateMgr().getCurrentStateName());
}

Fixed version (ground truth):
private void validateActionAtEnd(Artifact actionArt) throws OseeCoreException {
  resultData.log("String_Node_Str");
  if (!OseeEventManager.isEventManagerConnected()) {
    resultData.error("String_Node_Str");
    return;
  }
  resultData.log("String_Node_Str");
  TeamWorkFlowArtifact teamArt=ActionManager.getFirstTeam(actionArt);
  testEquals("String_Node_Str","String_Node_Str",teamArt.getSoleAttributeValue(AtsAttributeTypes.Description,null));
  testEquals("String_Node_Str",ChangeType.Support,ChangeTypeUtil.getChangeType(teamArt));
  testEquals("String_Node_Str","String_Node_Str",teamArt.getSoleAttributeValue(AtsAttributeTypes.PriorityType,null));
  testEquals("String_Node_Str",false,teamArt.getSoleAttributeValue(AtsAttributeTypes.ValidationRequired,null));
  IAtsVersion verArt=AtsClientService.get().getVersionService().getTargetedVersion(teamArt);
  String expectedTargetedVersion;
  if (verArt != null) {
    expectedTargetedVersion=verArt.toString();
  }
 else {
    expectedTargetedVersion="String_Node_Str";
  }
  testEquals("String_Node_Str",expectedTargetedVersion,"String_Node_Str");
  testEquals("String_Node_Str",TeamState.Analyze.getName(),teamArt.getStateMgr().getCurrentStateName());
}
Program: 96950
Project: 96950
Buggy source:
public void explore(Artifact artifact) throws OseeCoreException {
  if (artifact == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  setPartName("String_Node_Str" + artifact.getBranchToken().getShortName());
  if (branch != null && branch != artifact.getBranch()) {
    explore(Arrays.asList(artifact));
    return;
  }
  explorerRoot=artifact;
  branch=artifact.getBranchToken();
  if (dragAndDropWorker != null) {
    dragAndDropWorker.updateBranch(branch);
  }
  refreshBranchWarning();
  initializeSelectionBox();
  if (treeViewer != null) {
    Object objects[]=treeViewer.getExpandedElements();
    treeViewer.setInput(explorerRoot);
    artifactExplorerMenu.setupPopupMenu();
    artifactExplorerToolbar.updateEnablement();
    treeViewer.setExpandedElements(objects);
  }
}

Fixed version (ground truth):
public void explore(Artifact artifact) throws OseeCoreException {
  if (artifact == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  setPartName("String_Node_Str" + artifact.getBranchToken().getShortName());
  if (branch != null && artifact.getBranch().equals(branch)) {
    explore(Arrays.asList(artifact));
    return;
  }
  explorerRoot=artifact;
  branch=artifact.getBranchToken();
  if (dragAndDropWorker != null) {
    dragAndDropWorker.updateBranch(branch);
  }
  refreshBranchWarning();
  initializeSelectionBox();
  if (treeViewer != null) {
    Object objects[]=treeViewer.getExpandedElements();
    treeViewer.setInput(explorerRoot);
    artifactExplorerMenu.setupPopupMenu();
    artifactExplorerToolbar.updateEnablement();
    treeViewer.setExpandedElements(objects);
  }
}
Program: 96951
Project: 96951
Buggy source:
public Artifact getStored() throws OseeCoreException {
  Artifact stored=null;
  Integer uuid=artifact.getSoleAttributeValue(attributeType,0);
  if (uuid > 0) {
    stored=ArtifactQuery.getArtifactFromId(uuid,artifact.getBranch());
  }
  return stored;
}

Fixed version (ground truth):
public Artifact getStored() throws OseeCoreException {
  Artifact stored=null;
  if (artifact != null) {
    Integer uuid=artifact.getSoleAttributeValue(attributeType,0);
    if (uuid > 0) {
      stored=ArtifactQuery.getArtifactFromId(uuid,artifact.getBranch());
    }
  }
  return stored;
}
Program: 96952
Project: 96952
Buggy source:
@Override public Result isDirty(){
  if (isEditable()) {
    try {
      Artifact storedArt=getStored();
      Artifact widgetArt=getSelection();
      if (!storedArt.equals(widgetArt)) {
        return new Result(true,getAttributeType() + "String_Node_Str");
      }
    }
 catch (    OseeCoreException ex) {
    }
  }
  return Result.FalseResult;
}

Fixed version (ground truth):
@Override public Result isDirty(){
  if (isEditable()) {
    try {
      Artifact storedArt=getStored();
      Artifact widgetArt=getSelection();
      if (storedArt == null && widgetArt == null) {
        return Result.FalseResult;
      }
 else       if (storedArt != null && widgetArt == null) {
        return new Result(true,getAttributeType() + "String_Node_Str");
      }
 else       if (storedArt == null && widgetArt != null) {
        return new Result(true,getAttributeType() + "String_Node_Str");
      }
 else       if (!storedArt.equals(widgetArt)) {
        return new Result(true,getAttributeType() + "String_Node_Str");
      }
    }
 catch (    OseeCoreException ex) {
    }
  }
  return Result.FalseResult;
}
Program: 96954
Project: 96954
Buggy source:
private void updateCheckWidget(){
  validate();
}

Fixed version (ground truth):
protected void updateCheckWidget(){
  validate();
}
Program: 96955
Project: 96955
Buggy source:
private void updateCheckWidget(){
  if (checkButton != null && !checkButton.isDisposed()) {
    checkButton.setSelection(selected);
  }
  validate();
}

Fixed version (ground truth):
@Override protected void updateCheckWidget(){
  if (checkButton != null && !checkButton.isDisposed()) {
    checkButton.setSelection(selected);
  }
  validate();
}
Program: 96956
Project: 96956
Buggy source:
private void createWordPreviewMenuItem(Menu parentMenu){
  wordPreviewItem=new MenuItem(parentMenu,SWT.PUSH);
  wordPreviewItem.setText("String_Node_Str");
  needSelectedArtifactListener.add(wordPreviewItem);
  wordPreviewItem.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      openWordViewer((IStructuredSelection)treeViewer.getSelection());
    }
  }
);
}

Fixed version (ground truth):
private void createWordPreviewMenuItem(Menu parentMenu){
  wordPreviewItem=new MenuItem(parentMenu,SWT.PUSH);
  wordPreviewItem.setText("String_Node_Str");
  needSelectedArtifactListener.addArtifactEnabled(wordPreviewItem);
  wordPreviewItem.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      openWordViewer((IStructuredSelection)treeViewer.getSelection());
    }
  }
);
}
Program: 96957
Project: 96957
Buggy source:
private void createOpenMenuItem(Menu parentMenu){
  openMenuItem=new MenuItem(parentMenu,SWT.PUSH);
  openMenuItem.setText("String_Node_Str");
  needSelectedArtifactListener.add(openMenuItem);
  openMenuItem.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      openViewer((IStructuredSelection)treeViewer.getSelection());
    }
  }
);
}

Fixed version (ground truth):
private void createOpenMenuItem(Menu parentMenu){
  openMenuItem=new MenuItem(parentMenu,SWT.PUSH);
  openMenuItem.setText("String_Node_Str");
  needSelectedArtifactListener.addArtifactEnabled(openMenuItem);
  openMenuItem.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      openViewer((IStructuredSelection)treeViewer.getSelection());
    }
  }
);
}
Program: 96958
Project: 96958
Buggy source:
private void createRevealInArtifactExplorerMenuItem(final Menu parentMenu){
  revealInArtifactExporerMenuItem=new MenuItem(parentMenu,SWT.CASCADE);
  revealInArtifactExporerMenuItem.setText("String_Node_Str");
  revealInArtifactExporerMenuItem.setImage(ImageManager.getImage(FrameworkImage.MAGNIFY));
  needSelectedArtifactListener.add(revealInArtifactExporerMenuItem);
  final RelationsComposite fRelComp=this;
  revealInArtifactExporerMenuItem.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      new RevealInExplorerAction(fRelComp).run();
    }
  }
);
  revealInArtifactExporerMenuItem.setEnabled(true);
}

Fixed version (ground truth):
private void createRevealInArtifactExplorerMenuItem(final Menu parentMenu){
  revealInArtifactExporerMenuItem=new MenuItem(parentMenu,SWT.CASCADE);
  revealInArtifactExporerMenuItem.setText("String_Node_Str");
  revealInArtifactExporerMenuItem.setImage(ImageManager.getImage(FrameworkImage.MAGNIFY));
  needSelectedArtifactListener.addArtifactEnabled(revealInArtifactExporerMenuItem);
  final RelationsComposite fRelComp=this;
  revealInArtifactExporerMenuItem.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      new RevealInExplorerAction(fRelComp).run();
    }
  }
);
  revealInArtifactExporerMenuItem.setEnabled(true);
}
Program: 96959
Project: 96959
Buggy source:
@Override public void menuShown(MenuEvent e){
  IStructuredSelection selection=(IStructuredSelection)treeViewer.getSelection();
  boolean valid=selection.getFirstElement() instanceof WrapperForRelationLink;
  if (selection.getFirstElement() instanceof WrapperForRelationLink) {
    WrapperForRelationLink data=(WrapperForRelationLink)selection.getFirstElement();
    AccessPolicy policyHandlerService;
    try {
      policyHandlerService=ServiceUtil.getAccessPolicy();
      RelationTypeSide rts=new RelationTypeSide(data.getRelationType(),data.getRelationSide());
      valid=policyHandlerService.canRelationBeModified(artifact,java.util.Collections.singleton(data.getArtifactA().equals(artifact) ? data.getArtifactB() : data.getArtifactA()),rts,Level.INFO).matched();
    }
 catch (    OseeCoreException ex) {
      OseeLog.log(Activator.class,OseeLevel.SEVERE_POPUP,ex);
    }
  }
  for (  MenuItem item : accessControlitems) {
    item.setEnabled(valid);
  }
  for (  MenuItem item : artEnabledOnlyitems) {
    item.setEnabled(true);
  }
}

Fixed version (ground truth):
@Override public void menuShown(MenuEvent e){
  IStructuredSelection selection=(IStructuredSelection)treeViewer.getSelection();
  boolean isRelationType=false;
  if (selection.getFirstElement() instanceof RelationTypeSide || selection.getFirstElement() instanceof RelationType) {
    isRelationType=true;
  }
  boolean valid=selection.getFirstElement() instanceof WrapperForRelationLink;
  if (selection.getFirstElement() instanceof WrapperForRelationLink) {
    WrapperForRelationLink data=(WrapperForRelationLink)selection.getFirstElement();
    AccessPolicy policyHandlerService;
    try {
      policyHandlerService=ServiceUtil.getAccessPolicy();
      RelationTypeSide rts=new RelationTypeSide(data.getRelationType(),data.getRelationSide());
      valid=policyHandlerService.canRelationBeModified(artifact,java.util.Collections.singleton(data.getArtifactA().equals(artifact) ? data.getArtifactB() : data.getArtifactA()),rts,Level.INFO).matched();
    }
 catch (    OseeCoreException ex) {
      OseeLog.log(Activator.class,OseeLevel.SEVERE_POPUP,ex);
    }
  }
  for (  MenuItem item : accessControlitems) {
    item.setEnabled(valid);
  }
  for (  MenuItem item : artEnabledOnlyitems) {
    item.setEnabled(!isRelationType);
  }
}
Program: 96960
Project: 96960
Buggy source:
@Override public Collection<IAtsVersion> getVersions(IAtsProgram program){
  return services.getProgramService().getTeamDefHoldingVersions(program).getVersions();
}

Fixed version (ground truth):
@Override public Collection<IAtsVersion> getVersions(IAtsProgram program){
  IAtsTeamDefinition teamDefHoldingVersions=services.getProgramService().getTeamDefHoldingVersions(program);
  if (teamDefHoldingVersions != null) {
    return teamDefHoldingVersions.getVersions();
  }
  return java.util.Collections.emptyList();
}
Program: 96961
Project: 96961
Buggy source:
private String getText(IAtsWorkPackage workPackage){
  String result;
  result=String.format("String_Node_Str",workPackage.getActivityId(),workPackage.getActivityName());
  return result;
}

Fixed version (ground truth):
private String getText(IAtsWorkPackage workPackage){
  String result="String_Node_Str";
  if (workPackage != null) {
    String activityId=Strings.isValid(workPackage.getActivityId()) ? workPackage.getActivityId() : "String_Node_Str";
    String activityName=Strings.isValid(workPackage.getActivityName()) ? workPackage.getActivityName() : "String_Node_Str";
    result=String.format("String_Node_Str",activityId,activityName);
  }
  return result;
}
Program: 96962
Project: 96962
Buggy source:
public DSLTYPE getDslTypeByToken(TOKEN key){
  return tokenToType.get(key);
}

Fixed version (ground truth):
public DSLTYPE getDslTypeByToken(TOKEN key){
  DSLTYPE type=tokenToType.get(key);
  if (type == null) {
    TOKEN tokenByUuid=getTokenByUuid(key.getGuid());
    if (tokenByUuid != null) {
      type=tokenToType.get(tokenByUuid);
    }
  }
  return type;
}
Program: 96963
Project: 96963
Buggy source:
private IRelationType getRelationType(IAtsServer atsServer,String relationTypeName){
  for (  IRelationType relation : atsServer.getOrcsApi().getOrcsTypes().getRelationTypes().getAll()) {
    if (relation.getName().equals(relation.getName())) {
      return relation;
    }
  }
  return null;
}

Fixed version (ground truth):
private IRelationType getRelationType(IAtsServer atsServer,String relationTypeName){
  for (  IRelationType relation : atsServer.getOrcsApi().getOrcsTypes().getRelationTypes().getAll()) {
    if (relation.getName().equals(relationTypeName)) {
      return relation;
    }
  }
  return null;
}
Program: 96966
Project: 96966
Buggy source:
@Override public void modifyText(ModifyEvent e){
  if (masterCombo.get().contains("String_Node_Str")) {
    slaveWidget.setEnabled(true);
    orcsQueryWidget.setEditable(false);
    orcsQueryWidget.set("String_Node_Str");
    artifactsWidget.setEditable(false);
    isSRSPublishing=true;
  }
 else {
    slaveWidget.setEnabled(false);
    slaveWidget.set("String_Node_Str");
    orcsQueryWidget.setEditable(true);
    artifactsWidget.setEditable(true);
    isSRSPublishing=false;
  }
}

Fixed version (ground truth):
@Override public void modifyText(ModifyEvent e){
  if (masterCombo.get().contains("String_Node_Str")) {
    slaveWidget.setEnabled(true);
    orcsQueryWidget.setEditable(false);
    orcsQueryWidget.set("String_Node_Str");
    artifactsWidget.setEditable(false);
  }
 else {
    slaveWidget.setEnabled(false);
    slaveWidget.set("String_Node_Str");
    orcsQueryWidget.setEditable(true);
    artifactsWidget.setEditable(true);
  }
}
Program: 96967
Project: 96967
Buggy source:
@Override public String getDescriptionUsage(){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
@Override public String getDescriptionUsage(){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  return sb.toString();
}
Program: 96968
Project: 96968
Buggy source:
@Override public void renderAttribute(IAttributeType attributeType,Artifact artifact,PresentationType presentationType,Producer producer,AttributeElement attributeElement,String footer) throws OseeCoreException {
  WordMLProducer wordMl=(WordMLProducer)producer;
  String format=attributeElement.getFormat();
  boolean allAttrs=getBooleanOption("String_Node_Str");
  wordMl.startParagraph();
  if (allAttrs) {
    if (!attributeType.matches(CoreAttributeTypes.PlainTextContent)) {
      wordMl.addWordMl("String_Node_Str" + Xml.escape(attributeType.getName()) + "String_Node_Str");
    }
 else {
      wordMl.addWordMl("String_Node_Str");
    }
  }
 else {
    wordMl.addWordMl(attributeElement.getLabel());
  }
  if (attributeType.equals(CoreAttributeTypes.RelationOrder)) {
    wordMl.endParagraph();
    String data=renderRelationOrder(artifact);
    wordMl.addWordMl(data);
  }
 else {
    String valueList=artifact.getAttributesToString(attributeType);
    if (attributeElement.getFormat().contains("String_Node_Str")) {
      wordMl.addWordMl(format.replace("String_Node_Str","String_Node_Str" + Xml.escape(valueList).toString() + "String_Node_Str"));
    }
 else {
      wordMl.addTextInsideParagraph(valueList);
    }
    wordMl.endParagraph();
  }
}

Fixed version (ground truth):
@Override public void renderAttribute(IAttributeType attributeType,Artifact artifact,PresentationType presentationType,Producer producer,AttributeElement attributeElement,String footer) throws OseeCoreException {
  WordMLProducer wordMl=(WordMLProducer)producer;
  String format=attributeElement.getFormatPre();
  boolean allAttrs=getBooleanOption("String_Node_Str");
  wordMl.startParagraph();
  if (allAttrs) {
    if (!attributeType.matches(CoreAttributeTypes.PlainTextContent)) {
      wordMl.addWordMl("String_Node_Str" + Xml.escape(attributeType.getName()) + "String_Node_Str");
    }
 else {
      wordMl.addWordMl("String_Node_Str");
    }
  }
 else {
    wordMl.addWordMl(attributeElement.getLabel());
  }
  if (attributeType.equals(CoreAttributeTypes.RelationOrder)) {
    wordMl.endParagraph();
    String data=renderRelationOrder(artifact);
    wordMl.addWordMl(data);
  }
 else {
    String valueList=artifact.getAttributesToString(attributeType);
    if (attributeElement.getFormatPre().contains("String_Node_Str")) {
      wordMl.addWordMl(format.replace("String_Node_Str","String_Node_Str" + Xml.escape(valueList).toString() + "String_Node_Str"));
    }
 else {
      wordMl.addTextInsideParagraph(valueList);
    }
    wordMl.endParagraph();
  }
}
Program: 96970
Project: 96970
Buggy source:
private void parseOutliningOptions(String templateOptions){
  try {
    JSONObject jsonObject=new JSONObject(templateOptions);
    JSONArray optionsArray=jsonObject.getJSONArray("String_Node_Str");
    JSONObject options=optionsArray.getJSONObject(0);
    outlining=options.getBoolean("String_Node_Str");
    recurseChildren=options.getBoolean("String_Node_Str");
    String headingAttrType=options.getString("String_Node_Str");
    headingAttributeType=AttributeTypeManager.getType(headingAttrType);
    outlineNumber=options.getString("String_Node_Str");
    artifactName=options.getString("String_Node_Str");
  }
 catch (  JSONException ex) {
    OseeCoreException.wrapAndThrow(ex);
  }
}

Fixed version (ground truth):
private void parseOutliningOptions(String templateOptions){
  try {
    JSONObject jsonObject=new JSONObject(templateOptions);
    JSONArray optionsArray=jsonObject.getJSONArray("String_Node_Str");
    JSONObject options=optionsArray.getJSONObject(0);
    outlining=options.getBoolean("String_Node_Str");
    recurseChildren=options.getBoolean("String_Node_Str");
    String headingAttrType=options.getString("String_Node_Str");
    headingAttributeType=AttributeTypeManager.getType(headingAttrType);
    artifactName=options.getString("String_Node_Str");
  }
 catch (  JSONException ex) {
    OseeCoreException.wrapAndThrow(ex);
  }
}
Program: 96972
Project: 96972
Buggy source:
@Override public StateType getStateType() throws OseeCoreException {
  return workItem.getStateDefinition().getStateType();
}

Fixed version (ground truth):
@Override public StateType getStateType() throws OseeCoreException {
  IAtsStateDefinition stateDefinition=workItem.getStateDefinition();
  if (stateDefinition == null) {
    return null;
  }
  return stateDefinition.getStateType();
}
Program: 96973
Project: 96973
Buggy source:
@Override public IAtsProgram getProgram(IAtsTeamDefinition teamDef){
  IAtsProgram program=null;
  String programUuid=services.getAttributeResolver().getSoleAttributeValueAsString(teamDef,AtsAttributeTypes.ProgramUuid,null);
  if (Strings.isValid(programUuid)) {
    program=services.getProgramService().getProgram(Long.parseLong(programUuid));
  }
  if (program == null) {
    IAtsTeamDefinition topTeamDef=teamDef.getTeamDefinitionHoldingVersions();
    if (!teamDef.equals(topTeamDef)) {
      program=getProgram(teamDef.getParentTeamDef());
    }
  }
  if (program == null) {
    program=(IAtsProgram)services.getQueryService().createQuery(AtsArtifactTypes.Program).andAttr(AtsAttributeTypes.TeamDefinition,services.getStoreService().getGuid(teamDef)).getResults().getOneOrNull();
  }
  return program;
}

Fixed version (ground truth):
@Override public IAtsProgram getProgram(IAtsTeamDefinition teamDef){
  IAtsProgram program=null;
  Object object=services.getAttributeResolver().getSoleAttributeValue(teamDef,AtsAttributeTypes.ProgramUuid,null);
  if (object instanceof ArtifactId) {
    program=services.getConfigItemFactory().getProgram((ArtifactId)object);
  }
 else   if (object instanceof String && Strings.isNumeric((String)object)) {
    program=services.getProgramService().getProgram(Long.parseLong((String)object));
  }
  if (program == null) {
    IAtsTeamDefinition topTeamDef=teamDef.getTeamDefinitionHoldingVersions();
    if (!teamDef.equals(topTeamDef)) {
      program=getProgram(teamDef.getParentTeamDef());
    }
  }
  if (program == null) {
    program=(IAtsProgram)services.getQueryService().createQuery(AtsArtifactTypes.Program).andAttr(AtsAttributeTypes.TeamDefinition,services.getStoreService().getGuid(teamDef)).getResults().getOneOrNull();
  }
  return program;
}
Program: 96974
Project: 96974
Buggy source:
@Override public IAtsProgram getProgram(IAtsTeamDefinition teamDef){
  IAtsProgram program=null;
  Long programUuid=services.getAttributeResolver().getSoleAttributeValue(teamDef,AtsAttributeTypes.ProgramUuid,null);
  if (programUuid != null) {
    program=services.getProgramService().getProgram(programUuid);
  }
  if (program == null) {
    IAtsTeamDefinition topTeamDef=teamDef.getTeamDefinitionHoldingVersions();
    if (!teamDef.equals(topTeamDef)) {
      program=getProgram(teamDef);
    }
  }
  if (program == null) {
    program=(IAtsProgram)services.getQueryService().createQuery(AtsArtifactTypes.Program).andAttr(AtsAttributeTypes.TeamDefinition,services.getStoreService().getGuid(teamDef)).getResults().getOneOrNull();
  }
  return program;
}

Fixed version (ground truth):
@Override public IAtsProgram getProgram(IAtsTeamDefinition teamDef){
  IAtsProgram program=null;
  String programUuid=services.getAttributeResolver().getSoleAttributeValueAsString(teamDef,AtsAttributeTypes.ProgramUuid,null);
  if (Strings.isValid(programUuid)) {
    program=services.getProgramService().getProgram(Long.parseLong(programUuid));
  }
  if (program == null) {
    IAtsTeamDefinition topTeamDef=teamDef.getTeamDefinitionHoldingVersions();
    if (!teamDef.equals(topTeamDef)) {
      program=getProgram(teamDef);
    }
  }
  if (program == null) {
    program=(IAtsProgram)services.getQueryService().createQuery(AtsArtifactTypes.Program).andAttr(AtsAttributeTypes.TeamDefinition,services.getStoreService().getGuid(teamDef)).getResults().getOneOrNull();
  }
  return program;
}
Program: 96976
Project: 96976
Buggy source:
@Test public void testSetAttributeById_ArtifactId(){
  Attribute<?> staticIdAttr=null;
  for (  Attribute<?> attr : folderArt.getAttributes()) {
    if (attr.getAttributeType().getId() == CoreAttributeTypes.StaticId.getGuid()) {
      staticIdAttr=attr;
      break;
    }
  }
  IAtsChangeSet changes=AtsClientService.get().getStoreService().createAtsChangeSet(getClass().getSimpleName());
  changes.setAttribute(folderArt,staticIdAttr.getId(),"String_Node_Str");
  changes.execute();
  folderArt.reloadAttributesAndRelations();
  Assert.assertEquals("String_Node_Str",folderArt.getSoleAttributeValue(CoreAttributeTypes.StaticId,null));
}

Fixed version (ground truth):
@Test public void testSetAttributeById_ArtifactId(){
  Attribute<?> staticIdAttr=null;
  for (  Attribute<?> attr : folderArt.getAttributes()) {
    if (attr.getAttributeType().getId().equals(CoreAttributeTypes.StaticId.getGuid())) {
      staticIdAttr=attr;
      break;
    }
  }
  IAtsChangeSet changes=AtsClientService.get().getStoreService().createAtsChangeSet(getClass().getSimpleName());
  changes.setAttribute(folderArt,staticIdAttr.getId(),"String_Node_Str");
  changes.execute();
  folderArt.reloadAttributesAndRelations();
  Assert.assertEquals("String_Node_Str",folderArt.getSoleAttributeValue(CoreAttributeTypes.StaticId,null));
}
Program: 96977
Project: 96977
Buggy source:
@Override public IAtsProgram getProgram(IAtsTeamDefinition teamDef){
  IAtsProgram program=null;
  String programUuid=services.getAttributeResolver().getSoleAttributeValueAsString(teamDef,AtsAttributeTypes.ProgramUuid,null);
  if (Strings.isValid(programUuid)) {
    program=services.getProgramService().getProgram(Long.parseLong(programUuid));
  }
  if (program == null) {
    IAtsTeamDefinition topTeamDef=teamDef.getTeamDefinitionHoldingVersions();
    if (!teamDef.equals(topTeamDef)) {
      program=getProgram(teamDef);
    }
  }
  if (program == null) {
    program=(IAtsProgram)services.getQueryService().createQuery(AtsArtifactTypes.Program).andAttr(AtsAttributeTypes.TeamDefinition,services.getStoreService().getGuid(teamDef)).getResults().getOneOrNull();
  }
  return program;
}

Fixed version (ground truth):
@Override public IAtsProgram getProgram(IAtsTeamDefinition teamDef){
  IAtsProgram program=null;
  String programUuid=services.getAttributeResolver().getSoleAttributeValueAsString(teamDef,AtsAttributeTypes.ProgramUuid,null);
  if (Strings.isValid(programUuid)) {
    program=services.getProgramService().getProgram(Long.parseLong(programUuid));
  }
  if (program == null) {
    IAtsTeamDefinition topTeamDef=teamDef.getTeamDefinitionHoldingVersions();
    if (!teamDef.equals(topTeamDef)) {
      program=getProgram(teamDef.getParentTeamDef());
    }
  }
  if (program == null) {
    program=(IAtsProgram)services.getQueryService().createQuery(AtsArtifactTypes.Program).andAttr(AtsAttributeTypes.TeamDefinition,services.getStoreService().getGuid(teamDef)).getResults().getOneOrNull();
  }
  return program;
}
Program: 96978
Project: 96978
Buggy source:
@PUT @Path("String_Node_Str") @PermitAll @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML}) public Response editPreferences(@PathParam("String_Node_Str") String userGuid,@QueryParam("String_Node_Str") String key,@QueryParam("String_Node_Str") String itemId,String newValue){
  return Response.ok().entity(accountOps.editAccountWebPreferencesData(userGuid,key,itemId,newValue)).build();
}

Fixed version (ground truth):
@PUT @Path("String_Node_Str") @PermitAll @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML}) public Response editPreferences(@PathParam("String_Node_Str") String userUuid,@QueryParam("String_Node_Str") String key,@QueryParam("String_Node_Str") String itemId,String newValue){
  return Response.ok().entity(accountOps.editAccountWebPreferencesData(userUuid,key,itemId,newValue)).build();
}
Program: 96979
Project: 96979
Buggy source:
@Override public ServerAccessToken getPreauthorizedToken(Client client,List<String> requestedScopes,UserSubject subject,String grantType){
  long clientId=getClientId(client);
  long subjectId=getSubjectId(subject);
  OAuthToken accessToken=storage.getPreauthorizedToken(clientId,subjectId,grantType);
  ServerAccessToken token=null;
  if (accessToken != null) {
switch (accessToken.getType()) {
case BEARER_TOKEN:
case HAWK_TOKEN:
      token=serializer.decryptAccessToken(this,accessToken.getTokenKey(),getSecretKey());
    break;
case REFRESH_TOKEN:
  Iterable<OAuthToken> accessTokens=storage.getAccessTokensByRefreshToken(accessToken.getTokenKey());
for (OAuthToken entry : accessTokens) {
  boolean isExpired=OAuthUtils.isExpired(entry.getIssuedAt(),entry.getExpiresIn());
  if (!isExpired && entry.getGrantType().equals(grantType)) {
    token=serializer.decryptAccessToken(this,entry.getTokenKey(),getSecretKey());
  }
 else   if (isExpired) {
    revokeToken(client,entry.getTokenKey(),entry.getTokenType());
  }
  break;
}
break;
default :
break;
}
}
if (token != null) {
boolean isRolesOutdated=isRolesOutdated(subject,token);
if (isRolesOutdated) {
revokeAllTokens(client,subjectId,grantType);
token=null;
}
}
return token;
}

Fixed version (ground truth):
@Override public ServerAccessToken getPreauthorizedToken(Client client,List<String> requestedScopes,UserSubject subject,String grantType){
  long clientId=getClientId(client);
  long subjectId=getSubjectId(subject);
  OAuthToken accessToken=storage.getPreauthorizedToken(clientId,subjectId,grantType);
  ServerAccessToken token=null;
  boolean isExpired=false;
  if (accessToken != null) {
    isExpired=OAuthUtils.isExpired(accessToken.getIssuedAt(),accessToken.getExpiresIn());
    if (isExpired) {
      revokeToken(client,accessToken.getTokenKey(),accessToken.getTokenType());
    }
 else {
      token=getTokenHelper(client,grantType,accessToken,token);
    }
  }
  if (token != null) {
    boolean isRolesOutdated=isRolesOutdated(subject,token);
    if (isRolesOutdated) {
      revokeAllTokens(client,subjectId,grantType);
      token=null;
    }
  }
  return token;
}
Program: 96980
Project: 96980
Buggy source:
@Override public String getGuid(IAtsObject atsObject){
  return ((Artifact)atsObject).getGuid();
}

Fixed version (ground truth):
@Override public String getGuid(IAtsObject atsObject){
  return ((Artifact)atsObject.getStoreObject()).getGuid();
}
Program: 96981
Project: 96981
Buggy source:
public void explore(final Branch sourceBranch,final Branch destBranch,final TransactionRecord transactionId,final TransactionRecord commitTrans,boolean showConflicts){
  this.sourceBranch=sourceBranch;
  this.destBranch=destBranch;
  this.transactionId=transactionId;
  this.commitTrans=commitTrans;
  try {
    mergeBranch=BranchManager.getMergeBranch(sourceBranch,destBranch);
    if (mergeBranch == null) {
      close();
    }
    mergeXWidget.setInputData(sourceBranch,destBranch,transactionId,this,commitTrans,showConflicts);
    if (sourceBranch != null) {
      setPartName("String_Node_Str" + sourceBranch.getShortName() + "String_Node_Str"+ destBranch.getShortName());
    }
 else     if (commitTrans != null) {
      setPartName("String_Node_Str" + commitTrans.getId());
    }
 else {
      setPartName("String_Node_Str");
    }
  }
 catch (  Exception ex) {
    OseeLog.log(Activator.class,OseeLevel.SEVERE_POPUP,ex);
  }
}

Fixed version (ground truth):
public void explore(final Branch sourceBranch,final Branch destBranch,final TransactionRecord transactionId,final TransactionRecord commitTrans,boolean showConflicts){
  this.sourceBranch=sourceBranch;
  this.destBranch=destBranch;
  this.transactionId=transactionId;
  this.commitTrans=commitTrans;
  try {
    mergeBranch=BranchManager.getMergeBranch(sourceBranch,destBranch);
    if (mergeBranch == null) {
      close();
    }
 else {
      mergeXWidget.setInputData(sourceBranch,destBranch,transactionId,this,commitTrans,showConflicts);
      if (sourceBranch != null) {
        setPartName("String_Node_Str" + sourceBranch.getShortName() + "String_Node_Str"+ destBranch.getShortName());
      }
 else       if (commitTrans != null) {
        setPartName("String_Node_Str" + commitTrans.getId());
      }
 else {
        setPartName("String_Node_Str");
      }
    }
  }
 catch (  Exception ex) {
    OseeLog.log(Activator.class,OseeLevel.SEVERE_POPUP,ex);
  }
}
Program: 96982
Project: 96982
Buggy source:
public boolean isSortByTransaction(){
  return xHistoryViewer.getXViewer().getCustomizeMgr().getCurrentCustomizeData().getSortingData().getSortingIds().contains(HistoryXViewerFactory.transaction.getId());
}

Fixed version (ground truth):
public boolean isSortByTransaction(){
  CustomizeData generateCustDataFromTable=xHistoryViewer.getXViewer().getCustomizeMgr().generateCustDataFromTable();
  return generateCustDataFromTable.getSortingData().getSortingIds().contains(HistoryXViewerFactory.transaction.getId());
}
Program: 96984
Project: 96984
Buggy source:
private DispoItemData createNewItemWithCopiedAnnotations(DispoItemData destItem,DispoItem sourceItem,boolean isCoverageCopy,OperationReport report){
  DispoItemData toReturn=null;
  try {
    boolean isSameDiscrepancies=matchAllDiscrepancies(destItem,sourceItem);
    if (isSameDiscrepancies || isCoverageCopy) {
      toReturn=buildNewItem(destItem,sourceItem,isCoverageCopy,report,isSameDiscrepancies);
    }
 else {
      report.addMessageForItem(destItem.getName(),"String_Node_Str",sourceItem.getGuid());
    }
  }
 catch (  JSONException ex) {
    report.addOtherMessage("String_Node_Str",sourceItem.getName(),ex.getMessage());
  }
  return toReturn;
}

Fixed version (ground truth):
private DispoItemData createNewItemWithCopiedAnnotations(DispoItemData destItem,DispoItem sourceItem,boolean isCoverageCopy,OperationReport report){
  DispoItemData toReturn=null;
  try {
    boolean isSameDiscrepancies=matchAllDiscrepancies(destItem,sourceItem);
    if (!isSameDiscrepancies) {
      report.addMessageForItem(destItem.getName(),"String_Node_Str",sourceItem.getGuid());
    }
    toReturn=buildNewItem(destItem,sourceItem,isCoverageCopy,report,isSameDiscrepancies);
  }
 catch (  JSONException ex) {
    report.addOtherMessage("String_Node_Str",sourceItem.getName(),ex.getMessage());
  }
  return toReturn;
}
Program: 96985
Project: 96985
Buggy source:
private List<DispoItem> createItems(Map<String,DispoItem> exisitingItems,OperationReport report){
  List<DispoItem> toReturn;
  Collection<DispoItemData> values=datIdToItem.values();
  for (  DispoItemData item : values) {
    dataFactory.initDispoItem(item);
    item.setTotalPoints(String.valueOf(item.getAnnotationsList().length() + item.getDiscrepanciesList().length()));
  }
  if (!exisitingItems.isEmpty()) {
    DispoSetCopier copier=new DispoSetCopier(dispoConnector);
    List<DispoItemData> itemsFromImport=new ArrayList<>();
    itemsFromImport.addAll(values);
    Map<String,DispoItemData> nameToItem=new HashMap<>();
    for (    DispoItemData item : itemsFromImport) {
      nameToItem.put(item.getName(),item);
    }
    toReturn=copier.copyAllDispositions(nameToItem,exisitingItems.values(),true,report);
  }
 else {
    toReturn=new ArrayList<>();
    toReturn.addAll(values);
  }
  for (  DispoItem item : toReturn) {
    if (item.getStatus().equalsIgnoreCase("String_Node_Str")) {
      createPlaceHolderAnnotations((DispoItemData)item,report);
    }
  }
  return toReturn;
}

Fixed version (ground truth):
private List<DispoItem> createItems(Map<String,DispoItem> exisitingItems,OperationReport report){
  List<DispoItem> toReturn;
  Collection<DispoItemData> values=datIdToItem.values();
  for (  DispoItemData item : values) {
    dataFactory.initDispoItem(item);
    item.setTotalPoints(String.valueOf(item.getAnnotationsList().length() + item.getDiscrepanciesList().length()));
  }
  if (!exisitingItems.isEmpty()) {
    DispoSetCopier copier=new DispoSetCopier(dispoConnector);
    List<DispoItemData> itemsFromImport=new ArrayList<>();
    itemsFromImport.addAll(values);
    Map<String,DispoItemData> nameToItem=new HashMap<>();
    for (    DispoItemData item : itemsFromImport) {
      nameToItem.put(item.getName(),item);
    }
    toReturn=copier.copyAllDispositions(nameToItem,exisitingItems.values(),false,report);
  }
 else {
    toReturn=new ArrayList<>();
    toReturn.addAll(values);
  }
  for (  DispoItem item : toReturn) {
    if (item.getStatus().equalsIgnoreCase("String_Node_Str")) {
      createPlaceHolderAnnotations((DispoItemData)item,report);
    }
  }
  return toReturn;
}
Program: 96986
Project: 96986
Buggy source:
@Path("String_Node_Str") @POST @RolesAllowed(DispoRoles.ROLES_ADMINISTRATOR) @Produces(MediaType.APPLICATION_JSON) public Response getDispoSetCopy(@QueryParam("String_Node_Str") String destinationSet,@QueryParam("String_Node_Str") String sourceSet,CopySetParams params){
  Response.Status status;
  final DispoSet destination=dispoApi.getDispoSetById(program,destinationSet);
  final DispoSet source=dispoApi.getDispoSetById(program,sourceSet);
  String reportUrl="String_Node_Str";
  DispoSetData responseSet=new DispoSetData();
  responseSet.setOperationStatus(reportUrl);
  if (Strings.isValid(reportUrl)) {
    status=Status.OK;
  }
 else {
    status=Status.NOT_FOUND;
  }
  return Response.status(status).entity(responseSet).build();
}

Fixed version (ground truth):
@Path("String_Node_Str") @POST @RolesAllowed(DispoRoles.ROLES_ADMINISTRATOR) @Produces(MediaType.APPLICATION_JSON) public Response getDispoSetCopy(@QueryParam("String_Node_Str") String destinationSet,@QueryParam("String_Node_Str") String sourceSet,CopySetParams params){
  Response.Status status;
  final DispoSet destination=dispoApi.getDispoSetById(program,destinationSet);
  final DispoSet source=dispoApi.getDispoSetById(program,sourceSet);
  String reportUrl=dispoApi.copyDispoSet(program,destination,source,params);
  DispoSetData responseSet=new DispoSetData();
  responseSet.setOperationStatus(reportUrl);
  if (Strings.isValid(reportUrl)) {
    status=Status.OK;
  }
 else {
    status=Status.NOT_FOUND;
  }
  return Response.status(status).entity(responseSet).build();
}
Program: 96987
Project: 96987
Buggy source:
@SuppressWarnings("String_Node_Str") public <T>Collection<T> getCollection(Class<T> clazz,String parameterName) throws OseeArgumentException {
  List<T> results=new ArrayList<>();
  for (  Object obj : getValue(Collection.class,parameterName)) {
    if (clazz.isInstance(obj)) {
      results.add((T)obj);
    }
  }
  return results;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public <T>Collection<T> getCollection(Class<T> clazz,String parameterName) throws OseeArgumentException {
  List<T> results=new ArrayList<>();
  Collection<T> collection=getValue(Collection.class,parameterName);
  if (collection != null) {
    for (    Object obj : collection) {
      if (clazz.isInstance(obj)) {
        results.add((T)obj);
      }
    }
  }
  return results;
}
Program: 96988
Project: 96988
Buggy source:
private void moveOutputToNextAvailableSpot(ScriptTask task){
  OutputModel outputModel=task.getScriptModel().getOutputModel();
  File oldFile=outputModel.getFile();
  if (oldFile != null && oldFile.exists() && oldFile.isFile() && oldFile.canRead()) {
    String outputExtension="String_Node_Str" + outputModel.getFileExtension();
    int fileNum=1;
    File destFile=new File(oldFile.getAbsoluteFile().toString().replaceFirst(outputExtension,"String_Node_Str" + fileNum + outputExtension));
    if (destFile.exists()) {
      while (destFile.exists()) {
        fileNum++;
        destFile=new File(oldFile.getAbsoluteFile().toString().replaceFirst(outputExtension,"String_Node_Str" + fileNum + outputExtension));
      }
    }
    try {
      Lib.copyFile(oldFile,destFile);
    }
 catch (    IOException e2) {
      OseeLog.log(TestManagerPlugin.class,Level.SEVERE,"String_Node_Str",e2);
    }
  }
}

Fixed version (ground truth):
private void moveOutputToNextAvailableSpot(ScriptTask task){
  OutputModel outputModel=task.getScriptModel().getOutputModel();
  File oldFile=outputModel.getFile();
  if (oldFile != null && oldFile.exists() && oldFile.isFile() && oldFile.canRead()) {
    String outputExtension="String_Node_Str" + outputModel.getFileExtension();
    String extensionRegex="String_Node_Str" + outputExtension + "String_Node_Str";
    int fileNum=1;
    File destFile=new File(oldFile.getAbsoluteFile().toString().replaceFirst(extensionRegex,"String_Node_Str" + fileNum + outputExtension));
    if (destFile.exists()) {
      while (destFile.exists()) {
        fileNum++;
        destFile=new File(oldFile.getAbsoluteFile().toString().replaceFirst(extensionRegex,"String_Node_Str" + fileNum + outputExtension));
      }
    }
    try {
      Lib.copyFile(oldFile,destFile);
    }
 catch (    IOException e2) {
      OseeLog.log(TestManagerPlugin.class,Level.SEVERE,"String_Node_Str",e2);
    }
  }
}
Program: 96989
Project: 96989
Buggy source:
protected void updateListWidget(){
  if (listViewer != null) {
    listViewer.refresh();
    validate();
  }
}

Fixed version (ground truth):
protected void updateListWidget(){
  if (listViewer == null || listViewer.getTable().isDisposed()) {
    return;
  }
  listViewer.getTable().deselectAll();
  validate();
}
Program: 96990
Project: 96990
Buggy source:
protected void updateListWidget(){
  if (listViewer == null || listViewer.getTable().isDisposed()) {
    return;
  }
  listViewer.getTable().deselectAll();
  validate();
}

Fixed version (ground truth):
protected void updateListWidget(){
  if (listViewer == null || listViewer.getTable().isDisposed()) {
    return;
  }
  validate();
}