ServiceReference[] references;
for (int i=0; i < length; i++) { ServiceReference reference = references[i];
    public synchronized void open()    {        if (tracked == null)        {            if (DEBUG)            {                System.out.println("ServiceTracker.open: "+filter);            }            tracked = new Tracked(customizer, filter);            ServiceReference[] references;            synchronized (tracked)            {                context.addServiceListener(tracked);                try                {                    references = context.getServiceReferences(null, filter.toString());                }                catch (InvalidSyntaxException e)                {                    throw new RuntimeException("unexpected InvalidSyntaxException");                }            }            /* Call tracked outside of synchronized region */            if (references != null)            {                int size = references.length;                for (int i=0; i < size; i++)                {                    ServiceReference reference = references[i];                    /* if the service is still registered */                    if (reference.getBundle() != null)                    {                        tracked.track(reference);                    }                }            }        }    }