AbstractGenerator myGen = (AbstractGenerator) gen; if (GeneratorChain.customGenerators.contains(gen) || GeneratorChain.replacers.contains(gen)) { newGroup = addPredicsToExisting(rul, myGen.getConditions()); myGen.setConditions(newGroup); } else { if(GeneratorChain.thirdPartyGenerators.containsKey(gen)){ AbstractGenerator myGen = GeneratorChain.thirdPartyGenerators.get(gen); GenPredicGroup newGroup = addPredicsToExisting(rul, myGen.getConditions()); myGen.setConditions(newGroup); GeneratorChain.thirdPartyGenerators.put(gen, myGen);