Program: 96884
Project: 96884
Buggy source:
@Override protected void doWork(IProgressMonitor monitor) throws Exception {
  logf("String_Node_Str",teamArt.getName());
  List<AbstractValidationRule> rulesSorted=new ArrayList<>(rules);
  Collections.sort(rulesSorted,new ValidationRuleComparator());
  for (  AbstractValidationRule rule : rulesSorted) {
    log(rule.getRuleDescription());
  }
  log("String_Node_Str");
  try {
    ChangeData changeData=AtsBranchManager.getChangeDataFromEarliestTransactionId(teamArt);
    Collection<Artifact> changedArtifacts=changeData.getArtifacts(KindType.ArtifactOrRelation,ModificationType.NEW,ModificationType.MODIFIED);
    checkForCancelledStatus(monitor);
    double total=changedArtifacts.size() + rules.size();
    if (total > 0) {
      Collection<String> warnings=new ArrayList<>();
      int workAmount=calculateWork(1 / total);
      String lastTitle="String_Node_Str";
      int ruleIndex=1;
      for (      AbstractValidationRule rule : rulesSorted) {
        checkForCancelledStatus(monitor);
        String currentTitle=rule.getRuleTitle();
        if (!lastTitle.equals(currentTitle)) {
          logf("String_Node_Str",currentTitle);
          lastTitle=currentTitle;
        }
        int artIndex=1;
        for (        Artifact art : changedArtifacts) {
          monitor.setTaskName(String.format("String_Node_Str",ruleIndex,rules.size(),artIndex,changedArtifacts.size()));
          checkForCancelledStatus(monitor);
          ValidationResult result=rule.validate(art,monitor);
          if (!result.didValidationPass()) {
            for (            String errorMsg : result.getErrorMessages()) {
              if (art.isOfType(CoreArtifactTypes.DirectSoftwareRequirement)) {
                logf("String_Node_Str",errorMsg);
              }
 else {
                warnings.add(String.format("String_Node_Str",errorMsg));
              }
            }
          }
          monitor.worked(workAmount);
          artIndex++;
        }
        ruleIndex++;
      }
      for (      String warning : warnings) {
        log(warning);
      }
    }
    log("String_Node_Str");
  }
 catch (  Exception ex) {
    OseeLog.log(Activator.class,Level.SEVERE,ex);
    logf("String_Node_Str",ex.getLocalizedMessage());
  }
}

Fixed version (ground truth):
@Override protected void doWork(IProgressMonitor monitor) throws Exception {
  logf("String_Node_Str",teamArt.getName());
  List<AbstractValidationRule> rulesSorted=new ArrayList<>(rules);
  Collections.sort(rulesSorted,new ValidationRuleComparator());
  for (  AbstractValidationRule rule : rulesSorted) {
    log(rule.getRuleDescription());
  }
  log("String_Node_Str");
  try {
    ChangeData changeData=AtsBranchManager.getChangeDataFromEarliestTransactionId(teamArt);
    Collection<Artifact> changedArtifacts=changeData.getArtifacts(KindType.ArtifactOrRelation,ModificationType.NEW,ModificationType.MODIFIED);
    checkForCancelledStatus(monitor);
    double total=changedArtifacts.size() + rules.size();
    if (total > 0) {
      Collection<String> warnings=new ArrayList<>();
      int workAmount=calculateWork(1 / total);
      String lastTitle="String_Node_Str";
      int ruleIndex=1;
      for (      AbstractValidationRule rule : rulesSorted) {
        checkForCancelledStatus(monitor);
        String currentTitle=rule.getRuleTitle();
        if (!lastTitle.equals(currentTitle)) {
          logf("String_Node_Str",currentTitle);
          lastTitle=currentTitle;
        }
        if (isSkipRelationCheck(rule.getRuleTitle())) {
          logf("String_Node_Str");
        }
 else {
          int artIndex=1;
          for (          Artifact art : changedArtifacts) {
            monitor.setTaskName(String.format("String_Node_Str",ruleIndex,rules.size(),artIndex,changedArtifacts.size()));
            checkForCancelledStatus(monitor);
            ValidationResult result=rule.validate(art,monitor);
            if (!result.didValidationPass()) {
              for (              String errorMsg : result.getErrorMessages()) {
                if (art.isOfType(CoreArtifactTypes.DirectSoftwareRequirement)) {
                  logf("String_Node_Str",errorMsg);
                }
 else {
                  warnings.add(String.format("String_Node_Str",errorMsg));
                }
              }
            }
            monitor.worked(workAmount);
            artIndex++;
          }
        }
        ruleIndex++;
      }
      for (      String warning : warnings) {
        log(warning);
      }
    }
    log("String_Node_Str");
  }
 catch (  Exception ex) {
    OseeLog.log(Activator.class,Level.SEVERE,ex);
    logf("String_Node_Str",ex.getLocalizedMessage());
  }
}