Program: 97420
Project: 97420
Buggy source:
private static ActionArtifact sawBuild2Action3_createNoBranchAction(SkynetTransaction transaction) throws OseeCoreException {
  String title="String_Node_Str";
  Collection<IAtsActionableItem> aias=DemoDbUtil.getActionableItems(new String[]{DemoDbAIs.SAW_Code.getAIName(),DemoDbAIs.SAW_SW_Design.getAIName(),DemoDbAIs.SAW_Requirements.getAIName(),DemoDbAIs.SAW_Test.getAIName()});
  Date createdDate=new Date();
  IAtsUser createdBy=AtsUsersClient.getUser();
  String priority="String_Node_Str";
  ActionArtifact actionArt=ActionManager.createAction(null,title,"String_Node_Str",ChangeType.Problem,priority,false,null,aias,createdDate,createdBy,null,transaction);
  for (  TeamWorkFlowArtifact teamWf : ActionManager.getTeams(actionArt)) {
    boolean isSwDesign=teamWf.getTeamDefinition().getName().contains("String_Node_Str");
    TeamWorkFlowManager dtwm=new TeamWorkFlowManager(teamWf,TransitionOption.OverrideAssigneeCheck);
    if (isSwDesign) {
      Result result=dtwm.transitionTo(TeamState.Analyze,teamWf.getAssignees().iterator().next(),false,transaction);
      if (result.isFalse()) {
        throw new OseeCoreException("String_Node_Str",teamWf.toStringWithId(),toState.getName(),result.getText());
      }
      if (ReviewManager.getReviews(teamWf).size() != 1) {
        throw new OseeCoreException("String_Node_Str" + ReviewManager.getReviews(teamWf).size());
      }
      for (      AbstractReviewArtifact reviewArt : ReviewManager.getReviews(teamWf)) {
        reviewArt.setSoleAttributeValue(AtsAttributeTypes.ReviewBlocks,ReviewBlockType.None.name());
      }
      result=dtwm.transitionTo(TeamState.Authorize,teamWf.getAssignees().iterator().next(),false,transaction);
      if (result.isFalse()) {
        throw new OseeCoreException("String_Node_Str",teamWf.toStringWithId(),toState.getName(),result.getText());
      }
      if (ReviewManager.getReviews(teamWf).size() != 2) {
        throw new OseeCoreException("String_Node_Str" + ReviewManager.getReviews(teamWf).size());
      }
      for (      AbstractReviewArtifact reviewArt : ReviewManager.getReviews(teamWf)) {
        reviewArt.setSoleAttributeValue(AtsAttributeTypes.ReviewBlocks,ReviewBlockType.None.name());
      }
    }
    Result result=dtwm.transitionTo(toState,teamWf.getAssignees().iterator().next(),false,transaction);
    if (result.isFalse()) {
      throw new OseeCoreException("String_Node_Str",teamWf.toStringWithId(),toState.getName(),result.getText());
    }
    if (!teamWf.isCompletedOrCancelled()) {
      teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
    }
    teamWf.persist(transaction);
    AtsVersionService.get().setTargetedVersionAndStore(teamWf,version);
    teamWf.persist(transaction);
  }
  return actionArt;
}

Fixed version (ground truth):
private static ActionArtifact sawBuild2Action3_createNoBranchAction(SkynetTransaction transaction) throws OseeCoreException {
  String title="String_Node_Str";
  Collection<IAtsActionableItem> aias=DemoDbUtil.getActionableItems(new String[]{DemoDbAIs.SAW_Code.getAIName(),DemoDbAIs.SAW_SW_Design.getAIName(),DemoDbAIs.SAW_Requirements.getAIName(),DemoDbAIs.SAW_Test.getAIName()});
  Date createdDate=new Date();
  IAtsUser createdBy=AtsClientService.get().getUserAdmin().getCurrentUser();
  String priority="String_Node_Str";
  ActionArtifact actionArt=ActionManager.createAction(null,title,"String_Node_Str",ChangeType.Problem,priority,false,null,aias,createdDate,createdBy,null,transaction);
  for (  TeamWorkFlowArtifact teamWf : ActionManager.getTeams(actionArt)) {
    boolean isSwDesign=teamWf.getTeamDefinition().getName().contains("String_Node_Str");
    TeamWorkFlowManager dtwm=new TeamWorkFlowManager(teamWf,TransitionOption.OverrideAssigneeCheck);
    if (isSwDesign) {
      Result result=dtwm.transitionTo(TeamState.Analyze,teamWf.getAssignees().iterator().next(),false,transaction);
      if (result.isFalse()) {
        throw new OseeCoreException("String_Node_Str",teamWf.toStringWithId(),toState.getName(),result.getText());
      }
      if (ReviewManager.getReviews(teamWf).size() != 1) {
        throw new OseeCoreException("String_Node_Str" + ReviewManager.getReviews(teamWf).size());
      }
      for (      AbstractReviewArtifact reviewArt : ReviewManager.getReviews(teamWf)) {
        reviewArt.setSoleAttributeValue(AtsAttributeTypes.ReviewBlocks,ReviewBlockType.None.name());
      }
      result=dtwm.transitionTo(TeamState.Authorize,teamWf.getAssignees().iterator().next(),false,transaction);
      if (result.isFalse()) {
        throw new OseeCoreException("String_Node_Str",teamWf.toStringWithId(),toState.getName(),result.getText());
      }
      if (ReviewManager.getReviews(teamWf).size() != 2) {
        throw new OseeCoreException("String_Node_Str" + ReviewManager.getReviews(teamWf).size());
      }
      for (      AbstractReviewArtifact reviewArt : ReviewManager.getReviews(teamWf)) {
        reviewArt.setSoleAttributeValue(AtsAttributeTypes.ReviewBlocks,ReviewBlockType.None.name());
      }
    }
    Result result=dtwm.transitionTo(toState,teamWf.getAssignees().iterator().next(),false,transaction);
    if (result.isFalse()) {
      throw new OseeCoreException("String_Node_Str",teamWf.toStringWithId(),toState.getName(),result.getText());
    }
    if (!teamWf.isCompletedOrCancelled()) {
      teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
    }
    teamWf.persist(transaction);
    AtsVersionService.get().setTargetedVersionAndStore(teamWf,version);
    teamWf.persist(transaction);
  }
  return actionArt;
}