nus-yam/ex-repair huggingface dataset:
Program: 97205
Project: 97205
Buggy source:
@Before public void setUp() throws Exception {
  assertFalse("String_Node_Str",AtsUtil.isProductionDb());
  if (peerRevArt == null) {
    AtsChangeSet changes=new AtsChangeSet(getClass().getSimpleName());
    peerRevArt=PeerToPeerReviewManager.createNewPeerToPeerReview(AtsClientService.get().getWorkDefinitionAdmin().getDefaultPeerToPeerWorkflowDefinitionMatch().getWorkDefinition(),null,getClass().getName(),"String_Node_Str",changes);
    peerRevArt.setName(getClass().getSimpleName());
    changes.add(peerRevArt);
    changes.execute();
  }
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  assertFalse("String_Node_Str",AtsUtil.isProductionDb());
  if (peerRevArt == null) {
    AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
    AtsChangeSet changes=new AtsChangeSet(getClass().getSimpleName());
    peerRevArt=AtsTestUtil.getOrCreatePeerReview(ReviewBlockType.None,AtsTestUtilState.Analyze,changes);
    changes.execute();
  }
}
Program: 97206
Project: 97206
Buggy source:
public static DecisionReviewArtifact createNewDecisionReview(TeamWorkFlowArtifact teamArt,ReviewBlockType reviewBlockType,String title,String relatedToState,String description,Collection<IAtsDecisionReviewOption> options,List<? extends IAtsUser> assignees,Date createdDate,IAtsUser createdBy,IAtsChangeSet changes) throws OseeCoreException {
  DecisionReviewArtifact decRev=(DecisionReviewArtifact)ArtifactTypeManager.addArtifact(AtsArtifactTypes.DecisionReview,AtsUtilCore.getAtsBranch(),title);
  decRev.initializeNewStateMachine(assignees,createdDate,createdBy,changes);
  teamArt.addRelation(AtsRelationTypes.TeamWorkflowToReview_Review,decRev);
  AtsClientService.get().getUtilService().setAtsId(AtsClientService.get().getSequenceProvider(),decRev,decRev.getParentTeamWorkflow().getTeamDefinition(),changes);
  if (Strings.isValid(relatedToState)) {
    decRev.setSoleAttributeValue(AtsAttributeTypes.RelatedToState,relatedToState);
  }
  if (Strings.isValid(description)) {
    decRev.setSoleAttributeValue(AtsAttributeTypes.Description,description);
  }
  decRev.setSoleAttributeValue(AtsAttributeTypes.DecisionReviewOptions,getDecisionReviewOptionsString(options));
  if (reviewBlockType != null) {
    decRev.setSoleAttributeFromString(AtsAttributeTypes.ReviewBlocks,reviewBlockType.name());
  }
  AtsReviewCache.decache(teamArt);
  changes.add(decRev);
  return decRev;
}

Fixed version (ground truth):
public static DecisionReviewArtifact createNewDecisionReview(TeamWorkFlowArtifact teamArt,ReviewBlockType reviewBlockType,String title,String relatedToState,String description,Collection<IAtsDecisionReviewOption> options,List<? extends IAtsUser> assignees,Date createdDate,IAtsUser createdBy,IAtsChangeSet changes) throws OseeCoreException {
  DecisionReviewArtifact decRev=(DecisionReviewArtifact)ArtifactTypeManager.addArtifact(AtsArtifactTypes.DecisionReview,AtsUtilCore.getAtsBranch(),title);
  teamArt.addRelation(AtsRelationTypes.TeamWorkflowToReview_Review,decRev);
  AtsClientService.get().getUtilService().setAtsId(AtsClientService.get().getSequenceProvider(),decRev,decRev.getParentTeamWorkflow().getTeamDefinition(),changes);
  decRev.initializeNewStateMachine(assignees,createdDate,createdBy,changes);
  if (Strings.isValid(relatedToState)) {
    decRev.setSoleAttributeValue(AtsAttributeTypes.RelatedToState,relatedToState);
  }
  if (Strings.isValid(description)) {
    decRev.setSoleAttributeValue(AtsAttributeTypes.Description,description);
  }
  decRev.setSoleAttributeValue(AtsAttributeTypes.DecisionReviewOptions,getDecisionReviewOptionsString(options));
  if (reviewBlockType != null) {
    decRev.setSoleAttributeFromString(AtsAttributeTypes.ReviewBlocks,reviewBlockType.name());
  }
  AtsReviewCache.decache(teamArt);
  changes.add(decRev);
  return decRev;
}
Program: 97207
Project: 97207
Buggy source:
public static PeerToPeerReviewArtifact createNewPeerToPeerReview(IAtsWorkDefinition workDefinition,TeamWorkFlowArtifact teamArt,String reviewTitle,String againstState,Date createdDate,IAtsUser createdBy,IAtsChangeSet changes) throws OseeCoreException {
  PeerToPeerReviewArtifact peerToPeerRev=(PeerToPeerReviewArtifact)ArtifactTypeManager.addArtifact(AtsArtifactTypes.PeerToPeerReview,AtsUtilCore.getAtsBranch(),reviewTitle == null ? "String_Node_Str" : reviewTitle);
  if (teamArt != null) {
    teamArt.addRelation(AtsRelationTypes.TeamWorkflowToReview_Review,peerToPeerRev);
  }
  peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.WorkflowDefinition,workDefinition.getId());
  peerToPeerRev.initializeNewStateMachine(null,new Date(),createdBy,changes);
  if (teamArt != null && againstState != null) {
    peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.RelatedToState,againstState);
    AtsClientService.get().getUtilService().setAtsId(AtsClientService.get().getSequenceProvider(),peerToPeerRev,teamArt.getParentTeamWorkflow().getTeamDefinition(),changes);
  }
  peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.ReviewBlocks,ReviewBlockType.None.name());
  changes.add(peerToPeerRev);
  AtsReviewCache.decache(teamArt);
  return peerToPeerRev;
}

Fixed version (ground truth):
private static PeerToPeerReviewArtifact createNewPeerToPeerReview(IAtsWorkDefinition workDefinition,TeamWorkFlowArtifact teamArt,IAtsTeamDefinition teamDef,String reviewTitle,String againstState,Date createdDate,IAtsUser createdBy,IAtsChangeSet changes) throws OseeCoreException {
  PeerToPeerReviewArtifact peerToPeerRev=(PeerToPeerReviewArtifact)ArtifactTypeManager.addArtifact(AtsArtifactTypes.PeerToPeerReview,AtsUtilCore.getAtsBranch(),reviewTitle == null ? "String_Node_Str" : reviewTitle);
  if (teamArt != null) {
    teamArt.addRelation(AtsRelationTypes.TeamWorkflowToReview_Review,peerToPeerRev);
  }
  AtsClientService.get().getUtilService().setAtsId(AtsClientService.get().getSequenceProvider(),peerToPeerRev,teamDef,changes);
  peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.WorkflowDefinition,workDefinition.getId());
  peerToPeerRev.initializeNewStateMachine(null,new Date(),createdBy,changes);
  if (teamArt != null && againstState != null) {
    peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.RelatedToState,againstState);
  }
  peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.ReviewBlocks,ReviewBlockType.None.name());
  changes.add(peerToPeerRev);
  AtsReviewCache.decache(teamArt);
  return peerToPeerRev;
}
Program: 97208
Project: 97208
Buggy source:
public TaskArtifact createNewTask(List<? extends IAtsUser> assignees,String title,Date createdDate,IAtsUser createdBy,String relatedToState,IAtsChangeSet changes) throws OseeCoreException {
  TaskArtifact taskArt=null;
  taskArt=(TaskArtifact)ArtifactTypeManager.addArtifact(AtsArtifactTypes.Task,AtsUtilCore.getAtsBranch(),title);
  addRelation(AtsRelationTypes.TeamWfToTask_Task,taskArt);
  taskArt.initializeNewStateMachine(assignees,new Date(),(createdBy == null ? AtsClientService.get().getUserService().getCurrentUser() : createdBy),changes);
  AtsClientService.get().getUtilService().setAtsId(AtsClientService.get().getSequenceProvider(),taskArt,getParentTeamWorkflow().getTeamDefinition(),changes);
  if (Strings.isValid(relatedToState)) {
    taskArt.setSoleAttributeValue(AtsAttributeTypes.RelatedToState,relatedToState);
  }
  AtsTaskCache.decache(this);
  changes.add(taskArt);
  return taskArt;
}

Fixed version (ground truth):
public TaskArtifact createNewTask(List<? extends IAtsUser> assignees,String title,Date createdDate,IAtsUser createdBy,String relatedToState,IAtsChangeSet changes) throws OseeCoreException {
  TaskArtifact taskArt=null;
  taskArt=(TaskArtifact)ArtifactTypeManager.addArtifact(AtsArtifactTypes.Task,AtsUtilCore.getAtsBranch(),title);
  AtsClientService.get().getUtilService().setAtsId(AtsClientService.get().getSequenceProvider(),taskArt,getParentTeamWorkflow().getTeamDefinition(),changes);
  addRelation(AtsRelationTypes.TeamWfToTask_Task,taskArt);
  taskArt.initializeNewStateMachine(assignees,new Date(),(createdBy == null ? AtsClientService.get().getUserService().getCurrentUser() : createdBy),changes);
  if (Strings.isValid(relatedToState)) {
    taskArt.setSoleAttributeValue(AtsAttributeTypes.RelatedToState,relatedToState);
  }
  AtsTaskCache.decache(this);
  changes.add(taskArt);
  return taskArt;
}
Program: 97210
Project: 97210
Buggy source:
public static GoalArtifact createGoal(String title,IAtsChangeSet changes) throws OseeCoreException {
  GoalArtifact goalArt=(GoalArtifact)ArtifactTypeManager.addArtifact(AtsArtifactTypes.Goal,AtsUtilCore.getAtsBranch(),title);
  goalArt.initializeNewStateMachine(Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()),new Date(),AtsClientService.get().getUserService().getCurrentUser(),changes);
  AtsClientService.get().getUtilService().setAtsId(AtsClientService.get().getSequenceProvider(),goalArt,TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getConfig()),changes);
  changes.add(goalArt);
  return goalArt;
}

Fixed version (ground truth):
public static GoalArtifact createGoal(String title,IAtsChangeSet changes) throws OseeCoreException {
  GoalArtifact goalArt=(GoalArtifact)ArtifactTypeManager.addArtifact(AtsArtifactTypes.Goal,AtsUtilCore.getAtsBranch(),title);
  AtsClientService.get().getUtilService().setAtsId(AtsClientService.get().getSequenceProvider(),goalArt,TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getConfig()),changes);
  goalArt.initializeNewStateMachine(Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()),new Date(),AtsClientService.get().getUserService().getCurrentUser(),changes);
  changes.add(goalArt);
  return goalArt;
}
Program: 97211
Project: 97211
Buggy source:
private void testArtifactIds(Collection<Artifact> artifacts){
  Date date=new Date();
  for (  Artifact artifact : artifacts) {
    try {
      if (artifact.isDeleted()) {
        continue;
      }
      if (artifact.isOfType(AtsArtifactTypes.TeamWorkflow)) {
        TeamWorkFlowArtifact teamWf=(TeamWorkFlowArtifact)artifact;
        String legacyPcrId=artifact.getSoleAttributeValueAsString(AtsAttributeTypes.LegacyPcrId,null);
        if (legacyPcrId != null) {
          String parentActionId=teamWf.getParentActionArtifact().getAtsId();
          String storedParentActionId=legacyPcrIdToParentId.get(legacyPcrId);
          if (storedParentActionId != null) {
            if (!storedParentActionId.equals(parentActionId)) {
              String errorStr=String.format("String_Node_Str",legacyPcrId,teamWf.toStringWithId(),parentActionId,storedParentActionId);
              results.log(artifact,"String_Node_Str",errorStr);
            }
          }
 else {
            legacyPcrIdToParentId.put(legacyPcrId,parentActionId);
          }
        }
      }
    }
 catch (    Exception ex) {
      results.log(artifact,"String_Node_Str","String_Node_Str" + artifact.getArtifactTypeName() + "String_Node_Str"+ ex.getLocalizedMessage());
    }
  }
  results.logTestTimeSpent(date,"String_Node_Str");
}

Fixed version (ground truth):
private void testArtifactIds(Collection<Artifact> artifacts){
  Date date=new Date();
  for (  Artifact artifact : artifacts) {
    try {
      if (artifact.isDeleted()) {
        continue;
      }
      if (artifact.isOfType(AtsArtifactTypes.TeamWorkflow)) {
        TeamWorkFlowArtifact teamWf=(TeamWorkFlowArtifact)artifact;
        String legacyPcrId=artifact.getSoleAttributeValueAsString(AtsAttributeTypes.LegacyPcrId,null);
        if (legacyPcrId != null) {
          String parentActionId=teamWf.getParentActionArtifact().getAtsId();
          String storedParentActionId=legacyPcrIdToParentId.get(legacyPcrId);
          if (storedParentActionId != null) {
            if (!storedParentActionId.equals(parentActionId)) {
              String errorStr=String.format("String_Node_Str",legacyPcrId,teamWf.toStringWithId(),parentActionId,storedParentActionId);
              results.log(artifact,"String_Node_Str",errorStr);
            }
          }
 else {
            legacyPcrIdToParentId.put(legacyPcrId,parentActionId);
          }
        }
      }
      if (artifact instanceof IAtsWorkItem) {
        if (artifact.getSoleAttributeValue(AtsAttributeTypes.AtsId,null) == null) {
          String errorStr=String.format("String_Node_Str",artifact.toStringWithId());
          results.log(artifact,"String_Node_Str",errorStr);
        }
      }
    }
 catch (    Exception ex) {
      results.log(artifact,"String_Node_Str","String_Node_Str" + artifact.getArtifactTypeName() + "String_Node_Str"+ ex.getLocalizedMessage());
    }
  }
  results.logTestTimeSpent(date,"String_Node_Str");
}
Program: 97212
Project: 97212
Buggy source:
private void checkPrimeItemDiagram(RoughArtifact artifact){
  List<String> actualTypes=new ArrayList<String>(artifact.getAttributeTypeNames());
  assertEquals("String_Node_Str",ATTRIBUTE_TYPE_LIST.length,actualTypes.size());
  for (int index=0; index < ATTRIBUTE_TYPE_LIST.length; index++) {
    String expectedTypeName=ATTRIBUTE_TYPE_LIST[index];
    String typeName=actualTypes.get(index);
    assertEquals("String_Node_Str",expectedTypeName,typeName);
    if (IMAGE_CONTENT.equals(typeName)) {
      Collection<URI> theURIs=artifact.getURIAttributes();
      assertEquals("String_Node_Str",2,theURIs.size());
      Iterator<URI> iter=theURIs.iterator();
      URI uri1=iter.next();
      URI uri2=iter.next();
      assertEquals("String_Node_Str",THIS_IS_A_JPEG_IMAGE_JPG,getName(uri1));
      assertEquals("String_Node_Str",THIS_IS_A_PNG_IMAGE_PNG,getName(uri2));
    }
  }
}

Fixed version (ground truth):
private void checkPrimeItemDiagram(RoughArtifact artifact){
  Set<String> attributeTypeNames=artifact.getAttributeTypeNames();
  assertEquals("String_Node_Str",ATTRIBUTE_TYPE_LIST.length,attributeTypeNames.size());
  Iterator<String> iterator=attributeTypeNames.iterator();
  for (  String expectedTypeName : ATTRIBUTE_TYPE_LIST) {
    String typeName=iterator.next();
    assertEquals("String_Node_Str",expectedTypeName,typeName);
    if (IMAGE_CONTENT.equals(typeName)) {
      Collection<URI> theURIs=artifact.getURIAttributes();
      assertEquals("String_Node_Str",2,theURIs.size());
      Iterator<URI> iter=theURIs.iterator();
      URI uri1=iter.next();
      URI uri2=iter.next();
      assertEquals("String_Node_Str",THIS_IS_A_JPEG_IMAGE_JPG,getName(uri1));
      assertEquals("String_Node_Str",THIS_IS_A_PNG_IMAGE_PNG,getName(uri2));
    }
  }
}
Program: 97213
Project: 97213
Buggy source:
public Set<String> getAttributeTypeNames(){
  Set<String> typeNames=new HashSet<String>();
  for (  CharSequence attrTypeName : attributes.keySet()) {
    typeNames.add(attrTypeName.toString());
  }
  return typeNames;
}

Fixed version (ground truth):
public Set<String> getAttributeTypeNames(){
  Set<String> typeNames=new LinkedHashSet<String>();
  for (  CharSequence attrTypeName : attributes.keySet()) {
    typeNames.add(attrTypeName.toString());
  }
  return typeNames;
}
Program: 97215
Project: 97215
Buggy source:
public void add(Object value){
  returnValue=value.toString();
}

Fixed version (ground truth):
public void add(Object value){
  returnValue=value == null ? "String_Node_Str" : value.toString();
}
Program: 97216
Project: 97216
Buggy source:
@Override public void toXml(XMLStreamWriter writer) throws XMLStreamException {
  String toLog=returnValue != null ? XmlSupport.format(returnValue) : "String_Node_Str";
  XMLStreamWriterUtil.writeElement(writer,"String_Node_Str",toLog);
}

Fixed version (ground truth):
@Override public void toXml(XMLStreamWriter writer) throws XMLStreamException {
  if (returnValue != null) {
    XMLStreamWriterUtil.writeElement(writer,"String_Node_Str",XmlSupport.format(returnValue));
  }
}
Program: 97218
Project: 97218
Buggy source:
/** 
 * gets this element's current value. Does logging
 */
public T get(ITestEnvironmentAccessor accessor){
  accessor.getLogger().methodCalled(accessor,new MethodFormatter());
  T v=getValue();
  ReturnFormatter returnFormatter=new ReturnFormatter();
  returnFormatter.add(v);
  accessor.getLogger().methodEnded(accessor,returnFormatter);
  return v;
}

Fixed version (ground truth):
/** 
 * gets this element's current value. Does logging
 */
public T get(ITestEnvironmentAccessor accessor){
  if (accessor != null) {
    accessor.getLogger().methodCalledOnObject(accessor,this.getFullName(),new MethodFormatter(),getMessage());
  }
  T v=getValue();
  ReturnFormatter returnFormatter=new ReturnFormatter();
  returnFormatter.add(v);
  if (accessor != null) {
    accessor.getLogger().methodEnded(accessor,returnFormatter);
  }
  return v;
}
Program: 97219
Project: 97219
Buggy source:
private CancelledByColumn(){
  super(WorldXViewerFactory.COLUMN_NAMESPACE + "String_Node_Str","String_Node_Str",80,SWT.LEFT,false,SortDataType.Date,false,"String_Node_Str");
}

Fixed version (ground truth):
private CancelledByColumn(){
  super(WorldXViewerFactory.COLUMN_NAMESPACE + "String_Node_Str","String_Node_Str",80,SWT.LEFT,false,SortDataType.String,false,"String_Node_Str");
}
Program: 97220
Project: 97220
Buggy source:
private CompletedByColumn(){
  super(WorldXViewerFactory.COLUMN_NAMESPACE + "String_Node_Str","String_Node_Str",80,SWT.LEFT,false,SortDataType.Date,false,"String_Node_Str");
}

Fixed version (ground truth):
private CompletedByColumn(){
  super(WorldXViewerFactory.COLUMN_NAMESPACE + "String_Node_Str","String_Node_Str",80,SWT.LEFT,false,SortDataType.String,false,"String_Node_Str");
}
Program: 97221
Project: 97221
Buggy source:
/** 
 * @return Html representation of branche(s) that match UUID. Although it's not expected, no exception thrown ifmultiple branches found.
 */
@GET @Produces(MediaType.TEXT_HTML) public String getAsHtml() throws OseeCoreException {
  BranchQuery query=OrcsApplication.getOrcsApi().getQueryFactory(null).branchQuery();
  ResultSet<BranchReadable> results=query.andUuids(branchUuid).getResults();
  HtmlWriter writer=new HtmlWriter(uriInfo);
  return writer.toHtml(results);
}

Fixed version (ground truth):
/** 
 * @return Html representation of branche(s) that match UUID. Although it's not expected, no exception thrown ifmultiple branches found.
 */
@GET @Produces(MediaType.TEXT_HTML) public String getAsHtml() throws OseeCoreException {
  BranchQuery query=orcsApi.getQueryFactory(null).branchQuery();
  ResultSet<BranchReadable> results=query.andUuids(branchUuid).getResults();
  HtmlWriter writer=new HtmlWriter(uriInfo);
  return writer.toHtml(results);
}
Program: 97222
Project: 97222
Buggy source:
@GET @Produces(MediaType.TEXT_HTML) public String getAsHtml() throws OseeCoreException {
  BranchQuery query=orcsApi.getQueryFactory(null).branchQuery();
  ResultSet<BranchReadable> results=query.andIsOfType(BranchType.BASELINE,BranchType.WORKING).getResults();
  HtmlWriter writer=new HtmlWriter(uriInfo);
  return writer.toHtml(results);
}

Fixed version (ground truth):
@GET @Produces(MediaType.TEXT_HTML) public String getAsHtml() throws OseeCoreException {
  BranchQuery query=OrcsApplication.getOrcsApi().getQueryFactory(null).branchQuery();
  ResultSet<BranchReadable> results=query.andIsOfType(BranchType.BASELINE,BranchType.WORKING).getResults();
  HtmlWriter writer=new HtmlWriter(uriInfo);
  return writer.toHtml(results);
}
Program: 97223
Project: 97223
Buggy source:
@Path("String_Node_Str") public BranchResource getBranch(@PathParam("String_Node_Str") Long id){
  this.orcsApi=OrcsApplication.getOrcsApi();
  return new BranchResource(uriInfo,request,id,orcsApi);
}

Fixed version (ground truth):
@Path("String_Node_Str") public BranchResource getBranch(@PathParam("String_Node_Str") Long id){
  return new BranchResource(uriInfo,request,id,OrcsApplication.getOrcsApi());
}
Program: 97224
Project: 97224
Buggy source:
@GET @Produces(MediaType.TEXT_HTML) public String getAsHtml() throws OseeCoreException {
  QueryFactory queryFactory=OrcsApplication.getOrcsApi().getQueryFactory(null);
  BranchQuery query=queryFactory.branchQuery();
  ResultSet<BranchReadable> results=query.andUuids(branchUuid).getResults();
  BranchReadable branch=results.getExactlyOne();
  TransactionQuery query1=queryFactory.transactionQuery();
  TransactionReadable headTransaction=query1.andIsHead(branch).getResults().getExactlyOne();
  TransactionQuery query2=queryFactory.transactionQuery();
  TransactionReadable baseTransaction=query2.andTxId(branch.getBaseTransaction()).getResults().getExactlyOne();
  HtmlWriter writer=new HtmlWriter(uriInfo);
  return writer.toHtml(Arrays.asList(baseTransaction,headTransaction));
}

Fixed version (ground truth):
@Path("String_Node_Str") @GET @Produces(MediaType.TEXT_HTML) public String getAsHtml(@PathParam("String_Node_Str") int txId) throws OseeCoreException {
  QueryFactory queryFactory=OrcsApplication.getOrcsApi().getQueryFactory(null);
  TransactionQuery query2=queryFactory.transactionQuery();
  TransactionReadable baseTransaction=query2.andTxId(txId).getResults().getExactlyOne();
  HtmlWriter writer=new HtmlWriter(uriInfo);
  return writer.toHtml(Collections.singleton(baseTransaction));
}
Program: 97225
Project: 97225
Buggy source:
public static Set<DecisionOption> getDecisionOptions(String decisionOptions){
  Set<DecisionOption> decOptions=new HashSet<DecisionOption>();
  for (  String decsionOpt : decisionOptions.split("String_Node_Str")) {
    DecisionOption state=new DecisionOption();
    Result result=state.setFromXml(decsionOpt);
    if (result.isFalse()) {
      OseeLog.log(Activator.class,Level.SEVERE,result.getText());
    }
 else {
      decOptions.add(state);
    }
  }
  return decOptions;
}

Fixed version (ground truth):
public static Set<DecisionOption> getDecisionOptions(String decisionOptions){
  Set<DecisionOption> decOptions=new LinkedHashSet<DecisionOption>();
  for (  String decsionOpt : decisionOptions.split("String_Node_Str")) {
    DecisionOption state=new DecisionOption();
    Result result=state.setFromXml(decsionOpt);
    if (result.isFalse()) {
      OseeLog.log(Activator.class,Level.SEVERE,result.getText());
    }
 else {
      decOptions.add(state);
    }
  }
  return decOptions;
}
Program: 97226
Project: 97226
Buggy source:
@Override public void handleColumnMultiEdit(TreeColumn treeColumn,Collection<TreeItem> treeItems){
  Set<AbstractWorkflowArtifact> awas=new HashSet<AbstractWorkflowArtifact>();
  for (  TreeItem item : treeItems) {
    Artifact art=(Artifact)item.getData();
    try {
      if (art instanceof AbstractWorkflowArtifact && art.isAttributeTypeValid(getAttributeType())) {
        awas.add((AbstractWorkflowArtifact)art);
      }
    }
 catch (    OseeCoreException ex) {
      OseeLog.log(Activator.class,Level.SEVERE,ex);
    }
  }
  if (awas.isEmpty()) {
    AWorkbench.popup("String_Node_Str",String.format("String_Node_Str",getAttributeType()));
    return;
  }
  PromptChangeUtil.promptChangeAttribute(awas,getAttributeType(),isPersistViewer(getXViewer()),isMultiLineStringAttribute());
  getXViewer().update(awas.toArray(),null);
}

Fixed version (ground truth):
@Override public void handleColumnMultiEdit(TreeColumn treeColumn,Collection<TreeItem> treeItems){
  Set<AbstractWorkflowArtifact> awas=new LinkedHashSet<AbstractWorkflowArtifact>();
  for (  TreeItem item : treeItems) {
    Artifact art=(Artifact)item.getData();
    try {
      if (art instanceof AbstractWorkflowArtifact && art.isAttributeTypeValid(getAttributeType())) {
        awas.add((AbstractWorkflowArtifact)art);
      }
    }
 catch (    OseeCoreException ex) {
      OseeLog.log(Activator.class,Level.SEVERE,ex);
    }
  }
  if (awas.isEmpty()) {
    AWorkbench.popup("String_Node_Str",String.format("String_Node_Str",getAttributeType()));
    return;
  }
  PromptChangeUtil.promptChangeAttribute(awas,getAttributeType(),isPersistViewer(getXViewer()),isMultiLineStringAttribute());
  getXViewer().update(awas.toArray(),null);
}
Program: 97227
Project: 97227
Buggy source:
@Override public String getColumnText(Object element,XViewerColumn column,int columnIndex){
  try {
    if (element instanceof AbstractWorkflowArtifact) {
      return ((AbstractWorkflowArtifact)element).getAttributesToStringUnique(getAttributeType(),"String_Node_Str");
    }
    if (Artifacts.isOfType(element,AtsArtifactTypes.Action)) {
      Set<String> strs=new HashSet<String>();
      for (      TeamWorkFlowArtifact team : ActionManager.getTeams(element)) {
        String str=getColumnText(team,column,columnIndex);
        if (Strings.isValid(str)) {
          strs.add(str);
        }
      }
      return Collections.toString("String_Node_Str",strs);
    }
  }
 catch (  Exception ex) {
    return LogUtil.getCellExceptionString(ex);
  }
  return null;
}

Fixed version (ground truth):
@Override public String getColumnText(Object element,XViewerColumn column,int columnIndex){
  try {
    if (element instanceof AbstractWorkflowArtifact) {
      return ((AbstractWorkflowArtifact)element).getAttributesToStringUnique(getAttributeType(),"String_Node_Str");
    }
    if (Artifacts.isOfType(element,AtsArtifactTypes.Action)) {
      Set<String> strs=new LinkedHashSet<String>();
      for (      TeamWorkFlowArtifact team : ActionManager.getTeams(element)) {
        String str=getColumnText(team,column,columnIndex);
        if (Strings.isValid(str)) {
          strs.add(str);
        }
      }
      return Collections.toString("String_Node_Str",strs);
    }
  }
 catch (  Exception ex) {
    return LogUtil.getCellExceptionString(ex);
  }
  return null;
}
Program: 97228
Project: 97228
Buggy source:
@Override protected BranchReadable innerCall() throws Exception {
  Conditions.checkNotNull(branchData,"String_Node_Str");
  Conditions.checkNotNull(branchData.getUuid(),"String_Node_Str");
  Conditions.checkNotNull(branchData.getName(),"String_Node_Str");
  Conditions.checkNotNull(branchData.getBranchType(),"String_Node_Str");
  ITransaction txData=branchData.getFromTransaction();
  Conditions.checkNotNull(txData,"String_Node_Str");
  Callable<?> callable;
  if (branchData.isTxCopyBranchType()) {
    callable=getBranchStore().createBranchCopyTx(getSession(),branchData);
  }
 else {
    callable=getBranchStore().createBranch(getSession(),branchData);
  }
  callAndCheckForCancel(callable);
  return queryFactory.branchQuery().andUuids(branchData.getUuid()).getResults().getExactlyOne();
}

Fixed version (ground truth):
@Override protected BranchReadable innerCall() throws Exception {
  Conditions.checkNotNull(branchData,"String_Node_Str");
  Conditions.checkNotNull(branchData.getUuid(),"String_Node_Str");
  Conditions.checkNotNull(branchData.getName(),"String_Node_Str");
  Conditions.checkNotNull(branchData.getBranchType(),"String_Node_Str");
  ITransaction txData=branchData.getFromTransaction();
  Conditions.checkNotNull(txData,"String_Node_Str");
  Callable<?> callable;
  if (branchData.isTxCopyBranchType()) {
    TransactionQuery txQuery=queryFactory.transactionQuery();
    ITransaction givenTx=branchData.getFromTransaction();
    Conditions.checkNotNull(givenTx,"String_Node_Str");
    branchData.setSavedTransaction(givenTx);
    TransactionReadable priorTx=txQuery.andIsPriorTx(givenTx.getGuid()).getResults().getExactlyOne();
    branchData.setFromTransaction(priorTx);
    callable=getBranchStore().createBranchCopyTx(getSession(),branchData);
  }
 else {
    callable=getBranchStore().createBranch(getSession(),branchData);
  }
  callAndCheckForCancel(callable);
  return queryFactory.branchQuery().andUuids(branchData.getUuid()).getResults().getExactlyOne();
}
Program: 97229
Project: 97229
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public Void handleTxWork(OseeConnection connection) throws OseeCoreException {
  int sourceTx=branchData.getFromTransaction().getGuid();
  int priorTransactionId=getDatabaseService().runPreparedQueryFetchObject(-1,GET_PRIOR_TRANSACTION,branchData.getUuid(),sourceTx);
  ITransaction priorTx=TokenFactory.createTransaction(priorTransactionId);
  branchData.setFromTransaction(priorTx);
  Callable<Void> callable=new CreateBranchDatabaseTxCallable(getLogger(),getSession(),getDatabaseService(),branchData);
  try {
    callable.call();
    Timestamp timestamp=GlobalTime.GreenwichMeanTimestamp();
    int nextTransactionId=getDatabaseService().getSequence().getNextTransactionId();
    String creationComment=branchData.getCreationComment() + "String_Node_Str" + sourceTx;
    getDatabaseService().runPreparedUpdate(connection,INSERT_TX_DETAILS,branchData.getUuid(),nextTransactionId,creationComment,timestamp,branchData.getUserArtifactId(),TransactionDetailsType.NonBaselined.getId());
    populateTransaction(0.30,connection,nextTransactionId,branchData.getParentBranchUuid(),sourceTx);
    UpdatePreviousTxCurrent updater=new UpdatePreviousTxCurrent(getDatabaseService(),connection,branchData.getUuid());
    updater.updateTxNotCurrentsFromTx(nextTransactionId);
  }
 catch (  Exception ex) {
    OseeExceptions.wrapAndThrow(ex);
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public Void handleTxWork(OseeConnection connection) throws OseeCoreException {
  Callable<Void> callable=new CreateBranchDatabaseTxCallable(getLogger(),getSession(),getDatabaseService(),branchData);
  try {
    callable.call();
    Timestamp timestamp=GlobalTime.GreenwichMeanTimestamp();
    int nextTransactionId=getDatabaseService().getSequence().getNextTransactionId();
    String creationComment=branchData.getCreationComment();
    getDatabaseService().runPreparedUpdate(connection,INSERT_TX_DETAILS,branchData.getUuid(),nextTransactionId,creationComment,timestamp,branchData.getUserArtifactId(),TransactionDetailsType.NonBaselined.getId());
    populateTransaction(0.30,connection,nextTransactionId,branchData.getParentBranchUuid(),branchData.getSavedTransaction().getGuid());
    UpdatePreviousTxCurrent updater=new UpdatePreviousTxCurrent(getDatabaseService(),connection,branchData.getUuid());
    updater.updateTxNotCurrentsFromTx(nextTransactionId);
  }
 catch (  Exception ex) {
    OseeExceptions.wrapAndThrow(ex);
  }
  return null;
}
Program: 97230
Project: 97230
Buggy source:
public static PeerToPeerReviewArtifact getOrCreatePeerReview(ReviewBlockType reviewBlockType,AtsTestUtilState relatedToState,IAtsChangeSet changes) throws OseeCoreException {
  ensureLoaded();
  try {
    if (peerRevArt == null) {
      peerRevArt=PeerToPeerReviewManager.createNewPeerToPeerReview(AtsClientService.get().getWorkDefinitionAdmin().getDefaultPeerToPeerWorkflowDefinitionMatch().getWorkDefinition(),teamArt,AtsTestUtil.class.getSimpleName() + "String_Node_Str",relatedToState.getName(),changes);
    }
  }
 catch (  OseeCoreException ex) {
    throw new OseeWrappedException(ex);
  }
  return peerRevArt;
}

Fixed version (ground truth):
public static PeerToPeerReviewArtifact getOrCreatePeerReview(ReviewBlockType reviewBlockType,AtsTestUtilState relatedToState,IAtsChangeSet changes) throws OseeCoreException {
  ensureLoaded();
  try {
    if (peerRevArt == null) {
      peerRevArt=PeerToPeerReviewManager.createNewPeerToPeerReview(AtsClientService.get().getWorkDefinitionAdmin().getDefaultPeerToPeerWorkflowDefinitionMatch().getWorkDefinition(),teamArt,AtsTestUtil.class.getSimpleName() + "String_Node_Str",relatedToState.getName(),changes);
      peerRevArt.setSoleAttributeValue(AtsAttributeTypes.ReviewBlocks,reviewBlockType.name());
    }
  }
 catch (  OseeCoreException ex) {
    throw new OseeWrappedException(ex);
  }
  return peerRevArt;
}
Program: 97231
Project: 97231
Buggy source:
private void validateReviewsCancelled(TransitionResults results,IAtsWorkItem workItem,IAtsStateDefinition toStateDef) throws OseeCoreException {
  if (workItem.isTeamWorkflow() && toStateDef.getStateType().isCancelledState()) {
    for (    IAtsAbstractReview review : reviewService.getReviewsFromCurrentState((IAtsTeamWorkflow)workItem)) {
      if (reviewService.getReviewBlockType(review) == ReviewBlockType.Transition && !workItem.getStateMgr().getStateType().isCompletedOrCancelled()) {
        results.addResult(workItem,TransitionResult.CANCEL_REVIEWS_BEFORE_CANCEL);
        break;
      }
    }
  }
}

Fixed version (ground truth):
private void validateReviewsCancelled(TransitionResults results,IAtsWorkItem workItem,IAtsStateDefinition toStateDef) throws OseeCoreException {
  if (workItem.isTeamWorkflow() && toStateDef.getStateType().isCancelledState()) {
    for (    IAtsAbstractReview review : reviewService.getReviewsFromCurrentState((IAtsTeamWorkflow)workItem)) {
      ReviewBlockType reviewBlockType=reviewService.getReviewBlockType(review);
      boolean completedOrCancelled=review.getStateMgr().getStateType().isCompletedOrCancelled();
      if (reviewBlockType == ReviewBlockType.Transition && !completedOrCancelled) {
        results.addResult(workItem,TransitionResult.CANCEL_REVIEWS_BEFORE_CANCEL);
        break;
      }
    }
  }
}
Program: 97232
Project: 97232
Buggy source:
@Override public void doWork() throws Exception {
  URI targetUri=UriBuilder.fromUri(uri).path("String_Node_Str").path("String_Node_Str").queryParam("String_Node_Str",filePath).build();
  Response response=factory.target(targetUri).request(MediaType.APPLICATION_JSON).get();
  if (response.getStatus() == Status.OK.getStatusCode()) {
    InputStream is=(InputStream)response.getEntity();
    FileOutputStream fos=new FileOutputStream(destination);
    try {
      Lib.inputStreamToOutputStream(is,fos);
    }
  finally {
      Lib.close(fos);
    }
  }
 else {
    throw new Exception(response.toString());
  }
}

Fixed version (ground truth):
@Override public void doWork() throws Exception {
  URI targetUri=UriBuilder.fromUri(uri).path("String_Node_Str").path("String_Node_Str").queryParam("String_Node_Str",filePath).build();
  Response response=factory.target(targetUri).request(MediaType.APPLICATION_XML).get();
  if (response.getStatus() == Status.OK.getStatusCode()) {
    InputStream is=(InputStream)response.getEntity();
    FileOutputStream fos=new FileOutputStream(destination);
    try {
      Lib.inputStreamToOutputStream(is,fos);
    }
  finally {
      Lib.close(fos);
    }
  }
 else {
    throw new Exception(response.toString());
  }
}
Program: 97233
Project: 97233
Buggy source:
@GET @Produces(MediaType.APPLICATION_XML) public StreamingOutput getFile(@QueryParam("String_Node_Str") String path) throws OseeCoreException {
  final String myPath=path;
  return new StreamingOutput(){
    public void write(    OutputStream output) throws IOException, WebApplicationException {
      try {
        File file=new File(myPath);
        InputStream is=new FileInputStream(file);
        byte[] bytes=new byte[2048];
        int numRead=0;
        while ((numRead=is.read(bytes)) != -1) {
          output.write(bytes,0,numRead);
        }
        is.close();
      }
 catch (      Exception e) {
        throw new WebApplicationException(e);
      }
    }
  }
;
}

Fixed version (ground truth):
@GET @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML}) public StreamingOutput getFile(@QueryParam("String_Node_Str") String path) throws OseeCoreException {
  final String myPath=path;
  return new StreamingOutput(){
    public void write(    OutputStream output) throws IOException, WebApplicationException {
      try {
        File file=new File(myPath);
        InputStream is=new FileInputStream(file);
        byte[] bytes=new byte[2048];
        int numRead=0;
        while ((numRead=is.read(bytes)) != -1) {
          output.write(bytes,0,numRead);
        }
        is.close();
      }
 catch (      Exception e) {
        throw new WebApplicationException(e);
      }
    }
  }
;
}
Program: 97234
Project: 97234
Buggy source:
private Map<String,DataRight> getClassificationToDataRights(QueryBuilder query){
  Map<String,DataRight> toReturn=new HashMap<String,DataRight>();
  @SuppressWarnings("String_Node_Str") ArtifactReadable footerMappingArt=query.andIds(MAPPING_ARTIFACT).getResults().getExactlyOne();
  List<String> footers=footerMappingArt.getAttributeValues(CoreAttributeTypes.GeneralStringData);
  for (  String footer : footers) {
    String[] enumToFooter=footer.split("String_Node_Str",2);
    if (enumToFooter.length == 2) {
      DataRightId id=new DataRightId();
      id.setId(GUID.create());
      DataRight dataRight=new DataRight();
      dataRight.setId(id);
      dataRight.setContent(enumToFooter[1].trim());
      toReturn.put(enumToFooter[0].trim(),dataRight);
    }
  }
  return toReturn;
}

Fixed version (ground truth):
private Map<String,DataRight> getClassificationToDataRights(QueryBuilder query){
  Map<String,DataRight> toReturn=new HashMap<String,DataRight>();
  @SuppressWarnings("String_Node_Str") ArtifactReadable footerMappingArt=query.andIds(MAPPING_ARTIFACT).getResults().getOneOrNull();
  if (footerMappingArt != null) {
    List<String> footers=new ArrayList<String>();
    footers=footerMappingArt.getAttributeValues(CoreAttributeTypes.GeneralStringData);
    for (    String footer : footers) {
      String[] enumToFooter=footer.split("String_Node_Str",2);
      if (enumToFooter.length == 2) {
        DataRightId id=new DataRightId();
        id.setId(GUID.create());
        DataRight dataRight=new DataRight();
        dataRight.setId(id);
        dataRight.setContent(enumToFooter[1].trim());
        toReturn.put(enumToFooter[0].trim(),dataRight);
      }
    }
  }
  return toReturn;
}
Program: 97235
Project: 97235
Buggy source:
public static boolean isResurrected(ChangeItem changeItem){
  return changeItem.getBaselineVersion().getModType().isDeleted();
}

Fixed version (ground truth):
public static boolean isResurrected(ChangeItem changeItem){
  return changeItem.getBaselineVersion().isValid() && isDeleted(changeItem.getBaselineVersion());
}
Program: 97236
Project: 97236
Buggy source:
public void shutdown(String dbId){
  Pair<Server,Thread> entry=serverControls.remove(dbId);
  if (entry != null) {
    try {
      entry.getFirst().shutdownWithCatalogs(Database.CLOSEMODE_COMPACT);
      removeShutdownHook(entry.getSecond());
    }
 catch (    Exception e) {
      OseeLog.log(HyperSqlDbServer.class,Level.SEVERE,e.getMessage(),e);
    }
  }
}

Fixed version (ground truth):
public void shutdown(String dbId){
  Pair<Server,Thread> entry=serverControls.remove(dbId);
  if (entry != null) {
    try {
      Thread second=entry.getSecond();
      removeShutdownHook(second);
      Server first=entry.getFirst();
      first.shutdownWithCatalogs(Database.CLOSEMODE_NORMAL);
    }
 catch (    Exception e) {
      OseeLog.log(HyperSqlDbServer.class,Level.SEVERE,e.getMessage(),e);
    }
  }
}
Program: 97237
Project: 97237
Buggy source:
public TestScript(TestEnvironment environment,IUserSession callback,ScriptTypeEnum scriptType,boolean isBatchable){
  constructed.incrementAndGet();
  this.scriptType=scriptType;
  this.isBatchable=isBatchable;
  this.isMpLevel=false;
  promptInitWorker=Executors.newSingleThreadExecutor();
  sciprtResultRecord=new ScriptResultRecord(this);
  if (environment != null) {
    this.environment=environment;
    this.startTime=new Date(0);
    testStation=this.environment.getTestStation();
    GCHelper.getGCHelper().addRefWatch(this);
    instances.add(getClass());
  }
 else {
    throw new TestException("String_Node_Str",Level.SEVERE);
  }
  this.testPointTally=new TestPointTally(this.getClass().getName());
}

Fixed version (ground truth):
public TestScript(TestEnvironment environment,IUserSession callback,ScriptTypeEnum scriptType,boolean isBatchable){
  constructed.incrementAndGet();
  this.scriptType=scriptType;
  this.isBatchable=isBatchable;
  this.isMpLevel=false;
  promptImpl=new TestPromptImpl();
  sciprtResultRecord=new ScriptResultRecord(this);
  if (environment != null) {
    this.environment=environment;
    this.startTime=new Date(0);
    testStation=this.environment.getTestStation();
    GCHelper.getGCHelper().addRefWatch(this);
    instances.add(getClass());
  }
 else {
    throw new TestException("String_Node_Str",Level.SEVERE);
  }
  this.testPointTally=new TestPointTally(this.getClass().getName());
}
Program: 97238
Project: 97238
Buggy source:
public void readKeyValuePairs(InputStream keyValueStream){
  Scanner scanner=new Scanner(keyValueStream,"String_Node_Str");
  scanner.useDelimiter(xmlProcessingInstructionStartOrEnd);
  try {
    String id=null;
    StringBuilder substitution=new StringBuilder(NumOfCharsInTypicalSmallPage);
    boolean isProcessingInstruction=false;
    while (scanner.hasNext()) {
      isProcessingInstruction=scanner.findInLine(xmlProcessingInstructionStart) != null;
      String token=scanner.next();
      if (emptyOrWhitespaceOnly.matcher(token).matches()) {
        continue;
      }
      if (token.startsWith("String_Node_Str")) {
        handleInclude(substitution,token);
        substitution=new StringBuilder(NumOfCharsInTypicalSmallPage);
      }
 else       if (token.startsWith("String_Node_Str")) {
        handleRule(substitution,token);
        substitution=new StringBuilder(NumOfCharsInTypicalSmallPage);
      }
 else {
        if (isProcessingInstruction) {
          if (id != null) {
            addKeyValuePair(id,substitution);
            substitution=new StringBuilder(NumOfCharsInTypicalSmallPage);
          }
          id=token;
        }
 else {
          substitution.append(trimToken(token));
        }
      }
    }
    if (id != null) {
      addKeyValuePair(id,substitution);
    }
  }
 catch (  IOException ex) {
    throw new OseeCoreException(ex);
  }
 finally {
    scanner.close();
  }
}

Fixed version (ground truth):
public void readKeyValuePairs(InputStream keyValueStream){
  Scanner scanner=new Scanner(keyValueStream,"String_Node_Str");
  scanner.useDelimiter(xmlProcessingInstructionStartOrEnd);
  try {
    String id=null;
    StringBuilder substitution=new StringBuilder(NumOfCharsInTypicalSmallPage);
    boolean isProcessingInstruction=false;
    while (scanner.hasNext()) {
      isProcessingInstruction=scanner.findInLine(xmlProcessingInstructionStart) != null;
      String token=scanner.next();
      if (emptyOrWhitespaceOnly.matcher(token).matches()) {
        continue;
      }
      if (token.startsWith("String_Node_Str")) {
        handleInclude(substitution,token);
        substitution=new StringBuilder(NumOfCharsInTypicalSmallPage);
      }
 else       if (token.startsWith("String_Node_Str")) {
        handleRule(substitution,token);
      }
 else {
        if (isProcessingInstruction) {
          if (id != null) {
            addKeyValuePair(id,substitution);
            substitution=new StringBuilder(NumOfCharsInTypicalSmallPage);
          }
          id=token;
        }
 else {
          substitution.append(trimToken(token));
        }
      }
    }
    if (id != null) {
      addKeyValuePair(id,substitution);
    }
  }
 catch (  IOException ex) {
    throw new OseeCoreException(ex);
  }
 finally {
    scanner.close();
  }
}
Program: 97239
Project: 97239
Buggy source:
public void stop(){
  RuntimeDelegate.setInstance(null);
  if (providers != null) {
    providers.clear();
    providers=null;
  }
  if (features != null) {
    features.clear();
    features=null;
  }
  if (extensionMappings != null) {
    extensionMappings.clear();
    extensionMappings=null;
  }
  properties=null;
}

Fixed version (ground truth):
public void stop(){
  if (providers != null) {
    providers.clear();
    providers=null;
  }
  if (features != null) {
    features.clear();
    features=null;
  }
  if (extensionMappings != null) {
    extensionMappings.clear();
    extensionMappings=null;
  }
  properties=null;
}
Program: 97241
Project: 97241
Buggy source:
private OTEServer createOTEServer(NodeInfo nodeInfo,EnvironmentCreationParameter environmentCreationParameter,PropertyParamter propertyParameter,String uuid) throws NumberFormatException, UnknownHostException {
  OTEServer server=new OTEServer();
  server.setName(environmentCreationParameter.getServerTitle().toString());
  server.setStation(propertyParameter.getStation());
  server.setVersion(propertyParameter.getVersion());
  server.setType(propertyParameter.getType());
  server.setComment(propertyParameter.getComment());
  server.setStartTime(new Date().toString());
  server.setOwner(System.getProperty("String_Node_Str"));
  server.setUUID(uuid);
  server.setOteRestServer(String.format("String_Node_Str",InetAddress.getLocalHost().getHostAddress(),Integer.parseInt(System.getProperty("String_Node_Str"))));
  server.setOteActivemqServer(nodeInfo.getUri().toString());
  return server;
}

Fixed version (ground truth):
private OTEServer createOTEServer(NodeInfo nodeInfo,EnvironmentCreationParameter environmentCreationParameter,PropertyParamter propertyParameter,String uuid) throws NumberFormatException, UnknownHostException {
  OTEServer server=new OTEServer();
  server.setName(environmentCreationParameter.getServerTitle().toString());
  server.setStation(propertyParameter.getStation());
  server.setVersion(propertyParameter.getVersion());
  server.setType(propertyParameter.getType());
  server.setComment(propertyParameter.getComment());
  server.setStartTime(new Date().toString());
  server.setOwner(System.getProperty("String_Node_Str"));
  server.setUUID(uuid);
  if (System.getProperty("String_Node_Str") == null) {
    server.setOteRestServer(String.format("String_Node_Str",InetAddress.getLocalHost().getHostAddress(),80));
  }
 else {
    server.setOteRestServer(String.format("String_Node_Str",InetAddress.getLocalHost().getHostAddress(),Integer.parseInt(System.getProperty("String_Node_Str"))));
  }
  server.setOteActivemqServer(nodeInfo.getUri().toString());
  return server;
}
Program: 97244
Project: 97244
Buggy source:
/** 
 * Return hours spent working all states, reviews and tasks (not children SMAs)
 */
public static double getHoursSpentTotal(IAtsObject atsObject,IStateToken state) throws OseeCoreException {
  double hours=0.0;
  if (atsObject instanceof IAtsWorkItem) {
    IAtsWorkItem workItem=(IAtsWorkItem)atsObject;
    for (    String stateName : workItem.getStateMgr().getVisitedStateNames()) {
      hours+=getHoursSpentStateTotal(workItem,new SimpleTeamState(stateName,StateType.Working));
    }
  }
  return hours;
}

Fixed version (ground truth):
/** 
 * Return hours spent working all states, reviews and tasks (not children SMAs)
 */
public static double getHoursSpentTotal(IAtsObject atsObject,IStateToken state) throws OseeCoreException {
  double hours=0.0;
  if (atsObject instanceof IAtsWorkItem) {
    IAtsWorkItem workItem=(IAtsWorkItem)atsObject;
    hours=getHoursSpentTotalSMAState(hours,workItem) + getHoursSpentFromTasks(atsObject) + getHoursSpentReview(atsObject);
  }
  return hours;
}
Program: 97245
Project: 97245
Buggy source:
private String getEstHoursStr() throws OseeCoreException {
  double awaEst=awa.getSoleAttributeValue(AtsAttributeTypes.EstimatedHours,0.0);
  double totalEst=awa.getEstimatedHoursTotal();
  if (awaEst != totalEst) {
    return String.format("String_Node_Str",AtsUtilCore.doubleToI18nString(awaEst),AtsUtilCore.doubleToI18nString(totalEst));
  }
 else {
    return AtsUtilCore.doubleToI18nString(awaEst);
  }
}

Fixed version (ground truth):
private String getEstHoursStr() throws OseeCoreException {
  double totalEst=0;
  double awaEst=awa.getSoleAttributeValue(AtsAttributeTypes.EstimatedHours,0.0);
  if (awaEst < 0) {
    OseeLog.log(getClass(),OseeLevel.SEVERE_POPUP,"String_Node_Str");
    PromptChangeUtil.promptChangeAttribute(awa,AtsAttributeTypes.EstimatedHours,true,false);
  }
 else {
    totalEst=awa.getEstimatedHoursTotal();
  }
  if (awaEst != totalEst) {
    return String.format("String_Node_Str",AtsUtilCore.doubleToI18nString(awaEst),AtsUtilCore.doubleToI18nString(totalEst));
  }
 else {
    return AtsUtilCore.doubleToI18nString(awaEst);
  }
}