Program: 97399
Project: 97399
Buggy source:
private void processObjectArtifact(Artifact artifact,WordMLProducer wordMl,String outlineType,PresentationType presentationType,boolean multipleArtifacts) throws OseeCoreException {
  if (!artifact.isAttributeTypeValid(CoreAttributeTypes.WholeWordContent) && !artifact.isAttributeTypeValid(CoreAttributeTypes.NativeContent)) {
    if (!processedArtifacts.contains(artifact)) {
      boolean ignoreArtifact=excludeFolders && artifact.isOfType(CoreArtifactTypes.Folder);
      boolean publishInline=artifact.getSoleAttributeValue(CoreAttributeTypes.PublishInline,false);
      boolean startedSection=false;
      if (!ignoreArtifact) {
        handleLandscapeArtifactSectionBreak(artifact,wordMl,multipleArtifacts);
        if (outlining) {
          String headingText=artifact.getSoleAttributeValue(headingAttributeType,"String_Node_Str");
          if (!publishInline) {
            paragraphNumber=wordMl.startOutlineSubSection("String_Node_Str",headingText,outlineType);
            startedSection=true;
          }
          if (paragraphNumber == null) {
            paragraphNumber=wordMl.startOutlineSubSection();
            startedSection=true;
          }
          if (renderer.getBooleanOption(WordTemplateRenderer.UPDATE_PARAGRAPH_NUMBER_OPTION) && !publishInline) {
            if (artifact.isAttributeTypeValid(CoreAttributeTypes.ParagraphNumber)) {
              artifact.setSoleAttributeValue(CoreAttributeTypes.ParagraphNumber,paragraphNumber.toString());
              SkynetTransaction transaction=(SkynetTransaction)renderer.getOption(ITemplateRenderer.TRANSACTION_OPTION);
              if (transaction != null) {
                artifact.persist(transaction);
              }
 else {
                artifact.persist(getClass().getSimpleName());
              }
            }
          }
        }
        processAttributes(artifact,wordMl,presentationType,multipleArtifacts,publishInline);
      }
      if (recurseChildren) {
        for (        Artifact childArtifact : artifact.getChildren()) {
          processObjectArtifact(childArtifact,wordMl,outlineType,presentationType,multipleArtifacts);
        }
      }
      if (startedSection) {
        wordMl.endOutlineSubSection();
      }
      processedArtifacts.add(artifact);
    }
  }
 else {
    nonTemplateArtifacts.add(artifact);
  }
}

Fixed version (ground truth):
private void processObjectArtifact(Artifact artifact,WordMLProducer wordMl,String outlineType,PresentationType presentationType,boolean multipleArtifacts) throws OseeCoreException {
  if (!artifact.isAttributeTypeValid(CoreAttributeTypes.WholeWordContent) && !artifact.isAttributeTypeValid(CoreAttributeTypes.NativeContent)) {
    if (!processedArtifacts.contains(artifact)) {
      boolean ignoreArtifact=excludeFolders && artifact.isOfType(CoreArtifactTypes.Folder);
      boolean publishInline=artifact.getSoleAttributeValue(CoreAttributeTypes.PublishInline,false);
      boolean startedSection=false;
      boolean templateOnly=renderer.getBooleanOption("String_Node_Str");
      if (!ignoreArtifact) {
        handleLandscapeArtifactSectionBreak(artifact,wordMl,multipleArtifacts);
        if (outlining && !templateOnly) {
          String headingText=artifact.getSoleAttributeValue(headingAttributeType,"String_Node_Str");
          if (!publishInline && !templateOnly) {
            paragraphNumber=wordMl.startOutlineSubSection("String_Node_Str",headingText,outlineType);
            startedSection=true;
          }
          if (paragraphNumber == null) {
            paragraphNumber=wordMl.startOutlineSubSection();
            startedSection=true;
          }
          if (renderer.getBooleanOption(WordTemplateRenderer.UPDATE_PARAGRAPH_NUMBER_OPTION) && !publishInline) {
            if (artifact.isAttributeTypeValid(CoreAttributeTypes.ParagraphNumber)) {
              artifact.setSoleAttributeValue(CoreAttributeTypes.ParagraphNumber,paragraphNumber.toString());
              SkynetTransaction transaction=(SkynetTransaction)renderer.getOption(ITemplateRenderer.TRANSACTION_OPTION);
              if (transaction != null) {
                artifact.persist(transaction);
              }
 else {
                artifact.persist(getClass().getSimpleName());
              }
            }
          }
        }
        processAttributes(artifact,wordMl,presentationType,multipleArtifacts,publishInline);
      }
      if (recurseChildren) {
        for (        Artifact childArtifact : artifact.getChildren()) {
          processObjectArtifact(childArtifact,wordMl,outlineType,presentationType,multipleArtifacts);
        }
      }
      if (startedSection) {
        wordMl.endOutlineSubSection();
      }
      processedArtifacts.add(artifact);
    }
  }
 else {
    nonTemplateArtifacts.add(artifact);
  }
}