Source:
static Set<Property> evalAxiomStatements(final BranchContext context, final boolean groupedRelationshipsOnly, final Collection<String> sourceIds, final Collection<String> typeIds, final Collection<String> destinationIds) { try { ExpressionBuilder axiomFilter = Expressions.builder(); if (typeIds != null) { axiomFilter.filter(typeIds(typeIds)); } if (destinationIds != null) { axiomFilter.filter(destinationIds(destinationIds)); } if (groupedRelationshipsOnly) { axiomFilter.filter(group(1, Integer.MAX_VALUE)); } ExpressionBuilder activeOwlAxiomMemberQuery = Expressions.builder() .filter(active()) .filter(Expressions.nestedMatch(SnomedRefSetMemberIndexEntry.Fields.CLASS_AXIOM_RELATIONSHIP, axiomFilter.build())); if (sourceIds != null) { activeOwlAxiomMemberQuery.filter(SnomedRefSetMemberIndexEntry.Expressions.referencedComponentIds(sourceIds)); } final Query<SnomedRefSetMemberIndexEntry> activeAxiomISARelationshipsQuery = Query.select(SnomedRefSetMemberIndexEntry.class) .where(activeOwlAxiomMemberQuery.build()) .limit(Integer.MAX_VALUE) .build(); return context.service(RevisionSearcher.class).search(activeAxiomISARelationshipsQuery) .stream() .filter(owlMember -> !CompareUtils.isEmpty(owlMember.getClassAxiomRelationships())) .flatMap(owlMember -> { return owlMember.getClassAxiomRelationships().stream() .filter(classAxiom -> { return (typeIds == null || typeIds.contains(classAxiom.getTypeId())) && (destinationIds == null || destinationIds.contains(classAxiom.getDestinationId())) && (!groupedRelationshipsOnly || classAxiom.getGroup() >= 1); }) .map(classAxiom -> { return new Property(owlMember.getReferencedComponentId(), classAxiom.getTypeId(), classAxiom.getDestinationId(), classAxiom.getGroup()); }); }) .collect(Collectors.toSet()); } catch (IOException e) { throw new SnowowlRuntimeException(e); } }

Target:
static Set<Property> evalAxiomStatements(final BranchContext context, final boolean groupedRelationshipsOnly, final Collection<String> sourceIds, final Collection<String> typeIds, final Collection<String> destinationIds) { try { ExpressionBuilder axiomFilter = Expressions.builder(); if (typeIds != null) { axiomFilter.filter(typeIds(typeIds)); } if (destinationIds != null) { axiomFilter.filter(destinationIds(destinationIds)); } if (groupedRelationshipsOnly) { axiomFilter.filter(group(1, Integer.MAX_VALUE)); } ExpressionBuilder activeOwlAxiomMemberQuery = Expressions.builder() .filter(active()) .filter(Expressions.nestedMatch(SnomedRefSetMemberIndexEntry.Fields.CLASS_AXIOM_RELATIONSHIP, axiomFilter.build())); if (sourceIds != null) { activeOwlAxiomMemberQuery.filter(SnomedRefSetMemberIndexEntry.Expressions.referencedComponentIds(sourceIds)); } final Query<SnomedRefSetMemberIndexEntry> activeAxiomStatementsQuery = Query.select(SnomedRefSetMemberIndexEntry.class) .where(activeOwlAxiomMemberQuery.build()) .limit(Integer.MAX_VALUE) .build(); return context.service(RevisionSearcher.class).search(activeAxiomStatementsQuery) .stream() .filter(owlMember -> !CompareUtils.isEmpty(owlMember.getClassAxiomRelationships())) .flatMap(owlMember -> { return owlMember.getClassAxiomRelationships().stream() .filter(classAxiom -> { return (typeIds == null || typeIds.contains(classAxiom.getTypeId())) && (destinationIds == null || destinationIds.contains(classAxiom.getDestinationId())) && (!groupedRelationshipsOnly || classAxiom.getGroup() >= 1); }) .map(classAxiom -> { return new Property(owlMember.getReferencedComponentId(), classAxiom.getTypeId(), classAxiom.getDestinationId(), classAxiom.getGroup()); }); }) .collect(Collectors.toSet()); } catch (IOException e) { throw new SnowowlRuntimeException(e); } }