method to check for one connection if the two polymer ids exist

@param not
ConnectionNotation
@param listPolymerIDs
List of polymer ids
@throws PolymerIDsException
if the polymer ids do not exist
357896
private static void checkPolymerIDSConnection(ConnectionNotation not, List<String> listPolymerIDs)
			throws PolymerIDsException {
		/* the polymer ids have to be there */
		checkExistenceOfPolymerID(not.getSourceId().getId(), listPolymerIDs);
		checkExistenceOfPolymerID(not.getTargetId().getId(), listPolymerIDs);
	}
459278
public static <D> Predicate notInAny(Expression<D> left, Iterable<? extends Collection<? extends D>> lists) {
        BooleanBuilder rv = new BooleanBuilder();
        for (Collection<? extends D> list : lists) {
            rv.and(notIn(left, list));
        }
        return rv;
    }
13720
private static List<String> getNodeIds(StatefulRedisClusterConnection<?, ?> connection) {
        List<String> nodeIds = new ArrayList<>();

        PartitionAccessor partitionAccessor = new PartitionAccessor(connection.getPartitions());
        for (RedisClusterNode redisClusterNode : partitionAccessor.getMasters()) {

            if (connection.getReadFrom() != null) {

                List<RedisNodeDescription> readCandidates = (List) partitionAccessor.getReadCandidates(redisClusterNode);

                List<RedisNodeDescription> selection = connection.getReadFrom().select(new ReadFrom.Nodes() {
                    @Override
                    public List<RedisNodeDescription> getNodes() {
                        return readCandidates;
                    }

                    @Override
                    public Iterator<RedisNodeDescription> iterator() {
                        return readCandidates.iterator();
                    }
                });

                if (!selection.isEmpty()) {
                    RedisClusterNode selectedNode = (RedisClusterNode) selection.get(0);
                    nodeIds.add(selectedNode.getNodeId());
                    continue;
                }
            }
            nodeIds.add(redisClusterNode.getNodeId());
        }
        return nodeIds;
    }
356438
public static List<MonomerNotation> getListOfMonomerNotation(List<PolymerNotation> polymers) {
    List<MonomerNotation> items = new ArrayList<MonomerNotation>();
    for (PolymerNotation polymer : polymers) {
      items.addAll(polymer.getListMonomers());
    }

    return items;

  }
181255
@Override
    public Set<ManagedConnection> getInvalidConnections(@SuppressWarnings("rawtypes") Set connectionSet) throws ResourceException {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); 

        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(this, tc, "getInvalidConnections", connectionSet);

        Set<ManagedConnection> badSet = new HashSet<ManagedConnection>();
        WSRdbManagedConnectionImpl mc = null;

        // Loop through each ManagedConnection in the list, using each connection's
        // preTestSQLString to check validity. Different connections can
        // have different preTestSQLStrings if they were created by different
        // ManagedConnectionFactories.

        for (Iterator<?> it = connectionSet.iterator(); it.hasNext();) {
            mc = (WSRdbManagedConnectionImpl) it.next();
            if (!mc.validate())
                badSet.add(mc);
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(this, tc, "getInvalidConnections", badSet); 
        return badSet;
    }
1098063
public void setVpnConnectionIds(java.util.Collection<String> vpnConnectionIds) {
        if (vpnConnectionIds == null) {
            this.vpnConnectionIds = null;
            return;
        }

        this.vpnConnectionIds = new com.amazonaws.internal.SdkInternalList<String>(vpnConnectionIds);
    }
1081127
@Test
    public void MPJwtNoMpJwtConfig_notInWebXML_notInApp() throws Exception {

        genericLoginConfigVariationTest(
                                        MpJwtFatConstants.LOGINCONFIG_NOT_IN_WEB_XML_SERVLET_NOT_IN_APP_ROOT_CONTEXT,
                                        MpJwtFatConstants.LOGINCONFIG_NOT_IN_WEB_XML_SERVLET_NOT_IN_APP,
                                        MpJwtFatConstants.MPJWT_APP_CLASS_NO_LOGIN_CONFIG,
                                        ExpectedResult.BAD);

    }
1155360
@FFDCIgnore(Exception.class)
    private boolean checkDataSource(DataSource nonTranDataSource)
    {
        boolean fullyFormedDS = false;
        try
        {
            nonTranDataSource = (DataSource) _dataSourceFactory.createResource(null);
            if (tc.isDebugEnabled())
                Tr.debug(tc, "Non Tran dataSource is " + nonTranDataSource);
            Connection conn = nonTranDataSource.getConnection();
            if (tc.isDebugEnabled())
                Tr.debug(tc, "Established connection " + conn);
            DatabaseMetaData mdata = conn.getMetaData();
            String dbName = mdata.getDatabaseProductName();
            if (tc.isDebugEnabled())
                Tr.debug(tc, "Database name " + dbName);
            String dbVersion = mdata.getDatabaseProductVersion();
            if (tc.isDebugEnabled())
                Tr.debug(tc, "Database version " + dbVersion);
            fullyFormedDS = true;
        } catch (Exception e)
        {
            // We will catch an exception if the DataSource is not yet fully formed
            if (tc.isDebugEnabled())
                Tr.debug(tc, "Caught exception: " + e);
        }

        return fullyFormedDS;
    }
1089207
protected boolean checkCitationIds(List<String> citationIds, ItemDataProvider provider) {
		for (String id : citationIds) {
			if (provider.retrieveItem(id) == null) {
				String message = "unknown citation id: " + id;
				
				//find alternatives
				List<String> availableIds = Arrays.asList(provider.getIds());
				if (!availableIds.isEmpty()) {
					Collection<String> mins = Levenshtein.findSimilar(availableIds, id);
					if (mins.size() > 0) {
						if (mins.size() == 1) {
							message += "\n\nDid you mean this?";
						} else {
							message += "\n\nDid you mean one of these?";
						}
						for (String m : mins) {
							message += "\n\t" + m;
						}
					}
				}
				
				error(message);
				
				return false;
			}
		}
		return true;
	}
849226
public static <T /*>>> extends @NonNull Object*/> void checkListElementNotNull(
      List<T> list, @javax.annotation.Nullable Object errorMessage) {
    for (T element : list) {
      if (element == null) {
        throw new NullPointerException(String.valueOf(errorMessage));
      }
    }
  }
961664
public void setConnectionNotificationIds(java.util.Collection<String> connectionNotificationIds) {
        if (connectionNotificationIds == null) {
            this.connectionNotificationIds = null;
            return;
        }

        this.connectionNotificationIds = new com.amazonaws.internal.SdkInternalList<String>(connectionNotificationIds);
    }
236646
public List<Jid> getBlockList()
            throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {

        if (blockListCached == null) {
            BlockListIQ blockListIQ = new BlockListIQ();
            BlockListIQ blockListIQResult = connection().createStanzaCollectorAndSend(blockListIQ).nextResultOrThrow();
            blockListCached = blockListIQResult.getBlockedJidsCopy();
        }

        return Collections.unmodifiableList(blockListCached);
    }
146168
@NonNull
    public ReplicatorConfiguration setDocumentIDs(List<String> documentIDs) {
        if (readonly) { throw new IllegalStateException("ReplicatorConfiguration is readonly mode."); }
        this.documentIDs = documentIDs;
        return getReplicatorConfiguration();
    }
1158239
def listIds(self, exclude=list()):
        
        lst = list(self.aliasesToIds.keys())
        others = set(self.idsToSigners.keys()) - \
            set(self.aliasesToIds.values())
        lst.extend(list(others))
        for x in exclude:
            lst.remove(x)
        return lst
816936
@SuppressWarnings("unchecked")
    public static void validate_ids(StormTopology topology, String topologyId) throws InvalidTopologyException {
        String topologyName = topologyIdToName(topologyId);
        if (!charValidate(topologyName)) {
            throw new InvalidTopologyException(topologyName + " is not a valid topology name. " + nameErrorInfo);
        }

        List<String> list = new ArrayList<>();
        for (StormTopology._Fields field : Thrift.STORM_TOPOLOGY_FIELDS) {
            Object value = topology.getFieldValue(field);
            if (value != null) {
                Map<String, Object> obj_map = (Map<String, Object>) value;
                Set<String> commids = obj_map.keySet();

                for (String id : commids) {
                    if (system_id(id) || !charComponentValidate(id)) {
                        throw new InvalidTopologyException(id + " is not a valid component id. " + compErrorInfo);
                    }
                }

                for (Object obj : obj_map.values()) {
                    validate_component(obj);
                }

                list.addAll(commids);
            }
        }

        List<String> offending = JStormUtils.getRepeat(list);
        if (!offending.isEmpty()) {
            throw new InvalidTopologyException("Duplicate component ids: " + offending);
        }
    }
6303
public static List<PolymerNotation> getListOfPolymersSpecificType(String str, List<PolymerNotation> polymers) {
    List<PolymerNotation> list = new ArrayList<PolymerNotation>();
    for (PolymerNotation polymer : polymers) {
      if (polymer.getPolymerID().getType().equals(str)) {
        list.add(polymer);
      }
    }
    return list;
  }
1125006
private static String setCanonicalHELMSecondSection(Map<String, String> convertsortedIdstoIds, List<ConnectionNotation> connectionNotations) throws HELM1ConverterException {
    StringBuilder notation = new StringBuilder();
    for (ConnectionNotation connectionNotation : connectionNotations) {
      /* canonicalize connection */
      /* change the id's of the polymers to the sorted ids */
      List<String> connections = new ArrayList<String>();
      String source = connectionNotation.getSourceId().getId();
      String target = connectionNotation.getTargetId().getId();

      /* pairs will be not shown */
      if (!(connectionNotation.toHELM().equals(""))) {
        connections.add(convertConnection(connectionNotation.toHELM(), source, target, convertsortedIdstoIds));
        connections.add(convertConnection(connectionNotation.toReverseHELM(), source, target, convertsortedIdstoIds));
        Collections.sort(connections);
        notation.append(connections.get(0) + "|");
      }
    }
    if (notation.length() > 1) {
      notation.setLength(notation.length() - 1);
    }
    return notation.toString();
  }