Source:
private SnomedReferenceSetMembers fetchRefsetMembers(CodeSystemURI uri, BranchContext context, Options search, SnomedDisplayTermType snomedDisplayTermType) { final Integer limit = search.get(OptionKey.LIMIT, Integer.class); final String searchAfter = search.get(OptionKey.AFTER, String.class); final List<ExtendedLocale> locales = search.getList(OptionKey.LOCALES, ExtendedLocale.class); final Collection<String> referencedComponentIds = search.containsKey(OptionKey.REFERENCED_COMPONENT) ? search.getCollection(OptionKey.REFERENCED_COMPONENT, String.class) : null; final ComponentURI componentUri = search.containsKey(OptionKey.COMPONENT_URI) ? search.get(OptionKey.COMPONENT_URI, ComponentURI.class) : null; final Collection<String> mapTargetIds = search.containsKey(OptionKey.MAP_TARGET) ? search.getCollection(OptionKey.MAP_TARGET, String.class) : null; SnomedRefSetMemberSearchRequestBuilder requestBuilder = SnomedRequests.prepareSearchMember(); if (search.containsKey(OptionKey.SET)) { final Collection<String> refsetId = search.getCollection(OptionKey.SET, String.class); requestBuilder.filterByRefSet(refsetId); } return requestBuilder .filterByActive(true) .filterByRefSetType(SnomedRefSetUtil.getMapTypeRefSets()) .filterByReferencedComponent(referencedComponentIds) .filterByComponentUri(componentUri) .filterByProps(OptionsBuilder.newBuilder().put(SnomedRf2Headers.FIELD_MAP_TARGET, mapTargetIds).build()) .setLocales(locales) .setExpand(String.format("referencedComponent(%s)", !Strings.isNullOrEmpty(snomedDisplayTermType.getExpand()) ? "expand(" + snomedDisplayTermType.getExpand() + ")" : "")) .setLimit(limit) .setSearchAfter(searchAfter) .build() .execute(context); }

Target:
private SnomedReferenceSetMembers fetchRefsetMembers(CodeSystemURI uri, BranchContext context, Options search, SnomedDisplayTermType snomedDisplayTermType) { final Integer limit = search.get(OptionKey.LIMIT, Integer.class); final String searchAfter = search.get(OptionKey.AFTER, String.class); final List<ExtendedLocale> locales = search.getList(OptionKey.LOCALES, ExtendedLocale.class); final Collection<String> referencedComponentIds = search.containsKey(OptionKey.REFERENCED_COMPONENT) ? search.getCollection(OptionKey.REFERENCED_COMPONENT, String.class) : null; final Collection<String> componentIds = search.containsKey(OptionKey.COMPONENT) ? search.getCollection(OptionKey.COMPONENT, String.class) : null; final Collection<String> mapTargetIds = search.containsKey(OptionKey.MAP_TARGET) ? search.getCollection(OptionKey.MAP_TARGET, String.class) : null; SnomedRefSetMemberSearchRequestBuilder requestBuilder = SnomedRequests.prepareSearchMember(); if (search.containsKey(OptionKey.SET)) { final Collection<String> refsetId = search.getCollection(OptionKey.SET, String.class); requestBuilder.filterByRefSet(refsetId); } return requestBuilder .filterByActive(true) .filterByRefSetType(SnomedRefSetUtil.getMapTypeRefSets()) .filterByReferencedComponent(referencedComponentIds) .filterByComponentIds(componentIds) .filterByProps(OptionsBuilder.newBuilder().put(SnomedRf2Headers.FIELD_MAP_TARGET, mapTargetIds).build()) .setLocales(locales) .setExpand(String.format("referencedComponent(%s)", !Strings.isNullOrEmpty(snomedDisplayTermType.getExpand()) ? "expand(" + snomedDisplayTermType.getExpand() + ")" : "")) .setLimit(limit) .setSearchAfter(searchAfter) .build() .execute(context); }