Buggy code:
public abstract class RDFRendererBase { @ Nonnull private static final String ANNOTATION_PROPERTIES_BANNER_TEXT = "Annotation<seq2seq4repair_space>properties" ; @ Nonnull private static final String DATATYPES_BANNER_TEXT = "Datatypes" ; @ Nonnull private static final String OBJECT_PROPERTIES_BANNER_TEXT = "Object<seq2seq4repair_space>Properties" ; @ Nonnull private static final String DATA_PROPERTIES_BANNER_TEXT = "Data<seq2seq4repair_space>properties" ; @ Nonnull private static final String CLASSES_BANNER_TEXT = "Classes" ; @ Nonnull private static final String INDIVIDUALS_BANNER_TEXT = "Individuals" ; @ Nonnull private static final String ANNOTATED_IRIS_BANNER_TEXT = "Annotations" ; @ Nonnull private static final String GENERAL_AXIOMS_BANNER_TEXT = "General<seq2seq4repair_space>axioms" ; @ Nonnull private static final String RULES_BANNER_TEXT = "Rules" ; @ Nonnull protected final OWLOntology ontology ; protected final OWLDataFactory df ; protected RDFGraph graph ; @ Nonnull protected final Set < IRI > prettyPrintedTypes = asUnorderedSet ( Stream . of ( OWL_CLASS , OWL_OBJECT_PROPERTY , OWL_DATA_PROPERTY , OWL_ANNOTATION_PROPERTY , OWL_RESTRICTION , OWL_THING , OWL_NOTHING , OWL_ONTOLOGY , OWL_ANNOTATION_PROPERTY , OWL_NAMED_INDIVIDUAL , RDFS_DATATYPE , OWL_AXIOM , OWL_ANNOTATION ) . map ( ( a ) -> a . getIRI ( ) ) ) ; private final OWLDocumentFormat format ; private Set < IRI > punned ; protected final IndividualAppearance occurrences ; protected final AxiomAppearance axiomOccurrences ; private AtomicInteger nextBlankNodeId = new AtomicInteger ( 1 ) ; private TObjectIntCustomHashMap < Object > blankNodeMap = new TObjectIntCustomHashMap < > ( new IdentityHashingStrategy < > ( ) ) ; protected final OWLOntologyWriterConfiguration config ; public RDFRendererBase ( OWLOntology ontology ) { } protected RDFRendererBase ( OWLOntology ontology , OWLDocumentFormat format , OWLOntologyWriterConfiguration config ) { } protected abstract void beginDocument ( ) { } protected abstract void endDocument ( ) { } protected void beginObject ( ) { } protected void endObject ( ) { } protected abstract void writeAnnotationPropertyComment ( OWLAnnotationProperty prop ) { } protected abstract void writeDataPropertyComment ( OWLDataProperty prop ) { } protected abstract void writeObjectPropertyComment ( OWLObjectProperty prop ) { } protected abstract void writeClassComment ( OWLClass cls ) { } protected abstract void writeDatatypeComment ( OWLDatatype datatype ) { } protected abstract void writeIndividualComments ( OWLNamedIndividual ind ) { } public void render ( ) { } private void renderOntologyComponents ( ) { } private void renderInOntologySignatureEntities ( Collection < IRI > illegalPuns ) { } private void renderEntities ( Stream < ? extends OWLEntity > entities , String bannerText , Collection < IRI > illegalPuns ) { } private void render ( OWLEntity entity , AtomicBoolean firstRendering , String bannerText ) { } private void renderEntity ( OWLEntity entity ) { } private void writeEntityComment ( OWLEntity entity ) { } private void addIfUntyped ( OWLAnnotationSubject o , Collection < IRI > set ) { } private void renderUntypedIRIAnnotationAssertions ( ) { } protected void renderIRI ( IRI iri ) { } private void renderAnonymousIndividuals ( ) { } protected void renderAnon ( OWLAnonymousIndividual anonInd ) { } protected boolean shouldNotRender ( OWLAnonymousIndividual anonInd , List < OWLAxiom > axioms , OWLAxiom ax ) { } private void renderSWRLRules ( ) { } private void renderGeneralAxioms ( ) { } protected void renderGeneral ( AtomicBoolean haveWrittenBanner , OWLAxiom axiom ) { } private List < OWLAxiom > getGeneralAxioms ( ) { } protected void renderOntologyHeader ( ) { } private RDFResource createOntologyHeaderNode ( RDFTranslator translator ) { } private void addVersionIRIToOntologyHeader ( RDFResource ontologyHeaderNode , RDFTranslator translator ) { } private void addImportsDeclarationsToOntologyHeader ( RDFResource ontologyHeaderNode , RDFTranslator translator ) { } private void addAnnotationsToOntologyHeader ( RDFResource ontologyHeaderNode , RDFTranslator translator ) { } private boolean createGraph ( OWLEntity entity , Collection < IRI > illegalPuns ) { } protected boolean shouldInsertDeclarations ( ) { } protected RDFResourceBlankNode getBlankNodeFor ( Object key , boolean isIndividual , boolean needId ) { } static final class GraphVisitor implements OWLEntityVisitor { private final List < OWLAxiom > axioms ; private OWLOntology ontology ; private Consumer < Stream < OWLAxiom > > graphCreation ; GraphVisitor ( OWLOntology ontology , List < OWLAxiom > axioms , Consumer < Stream < OWLAxiom > > graphCreation ) { } @ Override public void visit ( OWLClass cls ) { } @ Override public void visit ( OWLDatatype datatype ) { } @ Override public void visit ( OWLNamedIndividual individual ) { } @ Override public void visit ( OWLDataProperty property ) { } @ Override public void visit ( OWLObjectProperty property ) { } @ Override public void visit ( OWLAnnotationProperty property ) { } boolean threewayDisjoint ( OWLAxiom ax ) { } static boolean inverse ( OWLAxiom ax , OWLNamedIndividual i ) { } boolean threewayDisjointData ( OWLAxiom ax ) { } boolean threewayDisjointObject ( OWLAxiom ax ) { } } private class SequentialBlankNodeRDFTranslator extends RDFTranslator { public SequentialBlankNodeRDFTranslator ( ) { } @ Override protected RDFResourceBlankNode getAnonymousNode ( Object key ) { checkNotNull ( key , "key<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; boolean isIndividual = key instanceof OWLAnonymousIndividual ; boolean needId = false ; if ( isIndividual ) { OWLAnonymousIndividual anonymousIndividual = ( ( OWLAnonymousIndividual ) ( key ) ) ; needId = multipleOccurrences . appearsMultipleTimes ( anonymousIndividual ) ; return getBlankNodeFor ( anonymousIndividual . getID ( ) . getID ( ) , isIndividual , needId ) ; } else if ( key instanceof OWLAxiom ) { <START_BUG> isIndividual = true ; <END_BUG> needId = axiomOccurrences . appearsMultipleTimes ( ( ( OWLAxiom ) ( key ) ) ) ; } return getBlankNodeFor ( key , isIndividual , needId ) ; } } protected void createGraph ( Stream < ? extends OWLObject > objects ) { } protected void createGraph ( OWLObject o ) { } protected abstract void writeBanner ( String name ) { } public void renderAnonRoots ( ) { } public abstract void render ( RDFResource node ) { } protected boolean isObjectList ( RDFResource node ) { } protected void toJavaList ( RDFNode n , List < RDFNode > list ) { } }

Fix:
isIndividual = false ;