Buggy code:
public class OWLClassExpressionToSPARQLConverter implements OWLClassExpressionVisitor , OWLDataRangeVisitor , OWLPropertyExpressionVisitor { private static final Logger logger = LoggerFactory . getLogger ( OWLClassExpressionToSPARQLConverter . class ) ; private OWLDataFactory df = new OWLDataFactoryImpl ( ) ; private Multimap < Integer , OWLEntity > properties = HashMultimap . create ( ) ; private Map < Integer , Boolean > intersection ; private Set < ? extends OWLEntity > variableEntities = new HashSet < > ( ) ; private VariablesMapping mapping = new VariablesMapping ( ) ; private OWLClassExpression expr ; private Deque < Integer > naryExpressions = new ArrayDeque < > ( ) ; private OWLClassExpressionMinimizer minimizer = new OWLClassExpressionMinimizer ( df ) ; private boolean ignoreGenericTypeStatements = true ; private boolean needOuterTriplePattern = true ; private boolean useDistinct = true ; private boolean useReasoning = false ; private EqualityRendering equalityRendering = EqualityRendering . TERM_EQUALITY ; private AllQuantorTranslation allQuantorTranslation = AllQuantorTranslation . DOUBLE_NEGATION ; private OWLThingRendering owlThingRendering = OWLThingRendering . GENERIC_TRIPLE_PATTERN ; private String countVar = "?cnt" ; private String sparql = "" ; private String appendix = "" ; private Stack < String > variables = new Stack < > ( ) ; public OWLClassExpressionToSPARQLConverter ( ) { } public OWLClassExpressionToSPARQLConverter ( VariablesMapping mapping ) { } public String convert ( OWLClassExpression ce , String rootVariable , boolean countQuery ) { } public Query asQuery ( OWLClassExpression ce , String rootVariable ) { } public Query asQuery ( String rootVariable , OWLClassExpression ce , boolean countQuery ) { } public Query asQuery ( String rootVariable , OWLClassExpression expr , Set < ? extends OWLEntity > variableEntities ) { } public Query asQuery ( String rootVariable , OWLClassExpression expr , Set < ? extends OWLEntity > variableEntities , boolean countQuery ) { } public String asGroupGraphPattern ( OWLClassExpression ce , String rootVariable ) { } public String asGroupGraphPattern ( OWLClassExpression ce , String rootVariable , boolean needOuterTriplePattern ) { this . needOuterTriplePattern = needOuterTriplePattern ; reset ( ) ; variables . push ( rootVariable ) ; <START_BUG> expr = minimizer . minimizeClone ( expr ) ; <END_BUG> this . expr = ce ; if ( expr . equals ( df . getOWLThing ( ) ) ) { OWLClassExpressionToSPARQLConverter . logger . warn ( "Expression<seq2seq4repair_space>is<seq2seq4repair_space>logically<seq2seq4repair_space>equivalent<seq2seq4repair_space>to<seq2seq4repair_space>owl:Thing,<seq2seq4repair_space>thus,<seq2seq4repair_space>the<seq2seq4repair_space>SPARQL<seq2seq4repair_space>query<seq2seq4repair_space>returns<seq2seq4repair_space>all<seq2seq4repair_space>triples." ) ; } expr . accept ( this ) ; return sparql ; } public void setUseDistinct ( boolean useDistinct ) { } public void setUseReasoning ( boolean useReasoning ) { } public void setEqualityRendering ( EqualityRendering equalityRendering ) { } public void setAllQuantorTranslation ( AllQuantorTranslation allQuantorTranslation ) { } public void setOwlThingRendering ( OWLThingRendering owlThingRendering ) { } public VariablesMapping getVariablesMapping ( ) { } private String createSelectClause ( boolean countQuery ) { } private String createWhereClause ( OWLClassExpression ce ) { } private String createGroupGraphPattern ( OWLClassExpression ce ) { } private String createSolutionModifier ( ) { } private String notExists ( String pattern ) { } private void reset ( ) { } private int modalDepth ( ) { } private boolean containsNonNegationOperand ( OWLObjectIntersectionOf intersection ) { } private boolean inIntersection ( ) { } private void enterIntersection ( ) { } private void leaveIntersection ( ) { } private String triple ( String subject , String predicate , String object ) { } private String triple ( String subject , OWLEntity predicate , OWLEntity object ) { } private String triple ( String subject , OWLEntity predicate , String object ) { } private String triple ( String subject , OWLEntity predicate , OWLLiteral object ) { } private String genericTriplePattern ( ) { } private String typeTriplePattern ( String var , String type ) { } private String equalExpressions ( String expr1 , String expr2 , boolean negated ) { } private String filter ( String expr ) { } private String render ( OWLEntity entity ) { } private String render ( OWLLiteral literal ) { } @ Override public void visit ( OWLObjectProperty property ) { } @ Override public void visit ( OWLObjectInverseOf property ) { } @ Override public void visit ( OWLDataProperty property ) { } @ Override public void visit ( OWLClass ce ) { } @ Override public void visit ( OWLObjectIntersectionOf ce ) { } @ Override public void visit ( OWLObjectUnionOf ce ) { } private boolean inUnion ( ) { } @ Override public void visit ( OWLObjectComplementOf ce ) { } @ Override public void visit ( OWLObjectSomeValuesFrom ce ) { } private boolean isTrivialConcept ( OWLClassExpression ce ) { } @ Override public void visit ( OWLObjectAllValuesFrom ce ) { } @ Override public void visit ( OWLObjectHasValue ce ) { } @ Override public void visit ( OWLObjectMinCardinality ce ) { } @ Override public void visit ( OWLObjectExactCardinality ce ) { } @ Override public void visit ( OWLObjectMaxCardinality ce ) { } @ Override public void visit ( OWLObjectHasSelf ce ) { } @ Override public void visit ( OWLObjectOneOf ce ) { } @ Override public void visit ( OWLDataSomeValuesFrom ce ) { } @ Override public void visit ( OWLDataAllValuesFrom ce ) { } @ Override public void visit ( OWLDataHasValue ce ) { } @ Override public void visit ( OWLDataMinCardinality ce ) { } @ Override public void visit ( OWLDataExactCardinality ce ) { } @ Override public void visit ( OWLDataMaxCardinality ce ) { } @ Override public void visit ( OWLDatatype node ) { } @ Override public void visit ( OWLDataOneOf node ) { } @ Override public void visit ( OWLDataComplementOf node ) { } @ Override public void visit ( OWLDataIntersectionOf node ) { } @ Override public void visit ( OWLDataUnionOf node ) { } @ Override public void visit ( OWLDatatypeRestriction node ) { } public static void main ( String [ ] args ) throws Exception { } No newline ; at end ; of file ; }

Fix:
ce = minimizer . minimizeClone ( ce ) ;