for (int i = 0; i < list.size(); i++)
int i = 0; while (i < list.size())
    private Set createCrossCertificatePairs(List list,                                            X509CertPairStoreSelector xselector) throws StoreException    {        Set certPairSet = new HashSet();        for (int i = 0; i < list.size(); i++)        {            X509CertificatePair pair;            try            {                // first try to decode it as certificate pair                try                {                    X509CertPairParser parser = new X509CertPairParser();                    parser.engineInit(new ByteArrayInputStream(                        (byte[])list.get(i)));                    pair = (X509CertificatePair)parser.engineRead();                }                catch (StreamParsingException e)                {                    // now try it to construct it the forward and reverse                    // certificate                    byte[] forward = (byte[])list.get(i);                    byte[] reverse = (byte[])list.get(i + 1);                    pair = new X509CertificatePair(new CertificatePair(                        X509CertificateStructure                            .getInstance(new ASN1InputStream(                            forward).readObject()),                        X509CertificateStructure                            .getInstance(new ASN1InputStream(                            reverse).readObject())));                    i++;                }                if (xselector.match((Object)pair))                {                    certPairSet.add(pair);                }            }            catch (IOException e)            {                // try next            }        }        return certPairSet;    }