code: private Collection<TreeWitnessGenerator> getTreeWitnessGenerators(QueryFolding qf) {
  		Collection<TreeWitnessGenerator> twg = null;
  		log.debug("CHECKING WHETHER THE FOLDING {} CAN BE GENERATED: ", qf); 
  		for (TreeWitnessGenerator g : allTWgenerators) {
  			Intersection<ObjectPropertyExpression> subp = qf.getProperties();
  			if (!subp.subsumes(g.getProperty())) {
  				log.debug("      NEGATIVE PROPERTY CHECK {}", g.getProperty());
  				continue;
  			}
  			else
  				log.debug("      POSITIVE PROPERTY CHECK {}", g.getProperty());
  
  			Intersection<ClassExpression> subc = qf.getInternalRootConcepts();
  			if (!g.endPointEntailsAnyOf(subc)) {
  				 log.debug("        ENDTYPE TOO SPECIFIC: {} FOR {}", subc, g);
  				 continue;			
  			}
  			else
  				 log.debug("        ENDTYPE IS FINE: TOP FOR {}", g);
  
  			boolean failed = false;
  			for (TreeWitness tw : qf.getInteriorTreeWitnesses()) 
  				if (!g.endPointEntailsAnyOf(tw.getGeneratorSubConcepts())) { 
  					log.debug("        ENDTYPE TOO SPECIFIC: {} FOR {}", tw, g);
  					failed = true;
  					break;
  				} 
  				else
  					log.debug("        ENDTYPE IS FINE: {} FOR {}", tw, g);
  				
  			if (failed)
  				continue;
  			
  			if (twg == null) 
  				twg = new LinkedList<>();
  			twg.add(g);
  			log.debug("        OK");
  		}
  		return twg;
  	}
docs: can return null if there are no applicable generators!