Buggy code:
public class Main { private HashSet < String > excludeProps = new HashSet < String > ( ) ; private StatusSystem status ; private RDFSimpleCon remoteGraph1 ; private RDFSimpleCon remoteGraph2 ; private RDFSimpleCon localStore ; private String project ; private TaskExecuter executer ; private boolean collectPredicateStatistics = false ; private boolean collectClassStatistics = false ; private boolean collectShapePropertyStatistics = false ; private boolean checkPredicateSourceClass = false ; private boolean collectForwardMultiplicity = false ; private boolean collectReverseMultiplicity = false ; private boolean executeSimplify = false ; private boolean treatSubClassOfAsIntanceOf = false ; private boolean removeOWLClasses = false ; private boolean eachThreadOnePort = false ; private boolean useClassPropertyRecoveryPerClass = false ; private int numberOfThreads = 1 ; private HashMap < String , LinkedList < String > > keepUniq = new HashMap < String , LinkedList < String > > ( ) ; public static void main ( String [ ] args ) throws Exception { } public boolean filterPredicate ( String predicate ) { } public void init ( ) throws Exception { } public Main ( ) { } public void run ( ) { try { init ( ) ; <START_BUG> if ( ! ( ( status . stepDone ( "recoveryDone" ) ) || ( status . stepDone ( "1" ) ) ) ) { <END_BUG> System . out . println ( "Getting<seq2seq4repair_space>all<seq2seq4repair_space>predicates<seq2seq4repair_space>present<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>database" ) ; for ( ResultLine item : this . runRemoteQuery ( remoteGraph2 , "getAllPredicates.txt" ) ) { String pred = item . getIRI ( "pred" ) . toString ( ) ; if ( ! ( filterPredicate ( pred ) ) ) { System . out . println ( ( "found<seq2seq4repair_space>predicate:<seq2seq4repair_space>" + pred ) ) ; localStore . add ( pred , "rdf:type" , "rdf:Property" ) ; } } if ( collectPredicateStatistics ) { for ( ResultLine item : this . runLocalQuery ( localStore , true , "getPredicates.txt" ) ) { String pred = item . getIRI ( "pred" ) ; System . out . println ( ( "counting<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>triples<seq2seq4repair_space>with<seq2seq4repair_space>predicate:<seq2seq4repair_space>" + pred ) ) ; for ( ResultLine item2 : this . runRemoteQuery ( remoteGraph2 , "countPredicate.txt" , pred ) ) { int count = item2 . getLitInt ( "count" ) ; System . out . println ( ( "count<seq2seq4repair_space>=<seq2seq4repair_space>" + count ) ) ; localStore . add ( pred , "RDF2Graph:count" , count ) ; } } } if ( checkPredicateSourceClass ) { this . executer . runEachAsTask ( this . runLocalQuery ( localStore , true , "getPredicates.txt" ) , ( ( ResultHandler ) ( ( ResultLine item , int index ) -> { String pred = item . getIRI ( "pred" ) ; System . out . println ( ( "find<seq2seq4repair_space>and<seq2seq4repair_space>count<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>subjects<seq2seq4repair_space>that<seq2seq4repair_space>have<seq2seq4repair_space>no<seq2seq4repair_space>rdf:type<seq2seq4repair_space>defined<seq2seq4repair_space>that<seq2seq4repair_space>are<seq2seq4repair_space>using<seq2seq4repair_space>the<seq2seq4repair_space>predicate:<seq2seq4repair_space>" + pred ) ) ; for ( ResultLine item2 : this . runRemoteQuery ( remoteGraph1 , "testSourceTypesForPredicate.txt" , pred ) ) { int count = item2 . getLitInt ( "count" ) ; System . out . println ( ( "count<seq2seq4repair_space>=<seq2seq4repair_space>" + count ) ) ; if ( count > 0 ) { System . out . println ( "found<seq2seq4repair_space>predicate<seq2seq4repair_space>with<seq2seq4repair_space>source<seq2seq4repair_space>subject<seq2seq4repair_space>that<seq2seq4repair_space>has<seq2seq4repair_space>no<seq2seq4repair_space>type<seq2seq4repair_space>(RDF2Graph<seq2seq4repair_space>process<seq2seq4repair_space>may<seq2seq4repair_space>be<seq2seq4repair_space>incomplete)" ) ; String errorObj = pred + "_error" ; localStore . add ( pred , "RDF2Graph:error" , errorObj ) ; localStore . add ( errorObj , "rdf:type" , "RDF2Graph:SourceNoTypeError" ) ; localStore . add ( errorObj , "RDF2Graph:count" , count ) ; } } } ) ) ) ; } this . executer . finishAllFirst ( ) ; for ( ResultLine item : this . runRemoteQuery ( remoteGraph2 , "getAllClasses.txt" ) ) { String clazz = item . getIRI ( "class" ) ; if ( ( this . treatSubClassOfAsIntanceOf ) && ( ( clazz . equals ( "http:////www.w3.org//2002//07//owl#Class" ) ) || ( clazz . equals ( "http:////www.w3.org//2000//01//rdf-schema#Class" ) ) ) ) continue ; if ( clazz == null ) { System . out . println ( "Skipping<seq2seq4repair_space>class<seq2seq4repair_space>which<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>blank<seq2seq4repair_space>node" ) ; continue ; } System . out . println ( ( "class:<seq2seq4repair_space>" + clazz ) ) ; localStore . add ( clazz , "rdf:type" , "RDF2Graph:Class" ) ; } this . executer . runEachAsTask ( this . runLocalQuery ( localStore , true , "getFoundClasses.txt" ) , ( ( ResultHandler ) ( ( ResultLine item , int index ) -> { String clazz = item . getIRI ( "class" ) ; reconstructClass ( clazz ) ; } ) ) ) ; if ( ! ( useClassPropertyRecoveryPerClass ) ) { System . out . println ( "get<seq2seq4repair_space>properties<seq2seq4repair_space>for<seq2seq4repair_space>all<seq2seq4repair_space>classes<seq2seq4repair_space>" ) ; this . executer . runEachAsTask ( this . runRemoteQuery ( remoteGraph1 , "getClassAllShapeProperties.txt" ) , ( ( ResultHandler ) ( ( ResultLine item , int index ) -> { String clazz = item . getIRI ( "type" ) ; String pred = item . getIRI ( "pred" ) ; if ( this . filterPredicate ( pred ) ) { return ; } if ( clazz == null ) { System . out . println ( "Skipping<seq2seq4repair_space>proper<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>class<seq2seq4repair_space>which<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>blank<seq2seq4repair_space>node" ) ; return ; } reconstructClassProperty ( clazz , pred ) ; } ) ) ) ; } this . executer . finishAllFirst ( ) ; System . out . println ( "Loading<seq2seq4repair_space>all<seq2seq4repair_space>subClass<seq2seq4repair_space>of<seq2seq4repair_space>relationships" ) ; for ( ResultLine item : this . runRemoteQuery ( remoteGraph1 , "getAllSubClassOf.txt" ) ) { String child = item . getIRI ( "child" ) ; String parent = item . getIRI ( "parent" ) ; localStore . add ( child , "rdfs:subClassOf" , parent ) ; } System . out . println ( "Loaded:<seq2seq4repair_space>all<seq2seq4repair_space>subClass<seq2seq4repair_space>of<seq2seq4repair_space>relationships" ) ; status . setStepDone ( "recoveryDone" ) ; } cleanOWL ( ) ; this . includeStaticDefs ( ) ; runUpdateQueryOnce ( localStore , "clean2_project1.txt" ) ; runUpdateQueryOnce ( localStore , "clean2_project2.txt" ) ; runUpdateQueryOnce ( localStore , "clean8_insertConceptClasses1.txt" ) ; runUpdateQueryOnce ( localStore , "clean8_insertConceptClasses2.txt" ) ; if ( ( executeSimplify ) && ( ! ( status . stepDone ( "executeSimplify" ) ) ) ) { this . simplify ( ) ; cleanOWL ( ) ; status . setStepDone ( "executeSimplify" ) ; } if ( this . status . hasPredAsClassDetected ( ) ) System . out . println ( "Class<seq2seq4repair_space>as<seq2seq4repair_space>Predicate<seq2seq4repair_space>detected,<seq2seq4repair_space>note<seq2seq4repair_space>that<seq2seq4repair_space>the<seq2seq4repair_space>results<seq2seq4repair_space>might<seq2seq4repair_space>be<seq2seq4repair_space>invalid" ) ;

Fix:
if ( ( status . stepDone ( "recoveryDone" ) ) || ( status . stepDone ( "1" ) ) ) {