private void clean() {
        if (mCleanEntries != null) {
            return;
        }

        // Clean out entries that are incomplete or bogus.

        int size = mEntries.size();
        mCleanEntries = new ArrayList<Entry>(size);
        mRangeCount = 0;

        outer: for (int i=0; i<size; i++) {
            Entry entry = mEntries.get(i);
            LocalVariable localVar = entry.mLocalVar;

            Set<LocationRange> ranges = localVar.getLocationRangeSet();
            if (ranges == null || ranges.size() == 0) {
                continue;
            }

            for (LocationRange range : ranges) {
                Location startLocation = range.getStartLocation();
                Location endLocation = range.getEndLocation();

                if (startLocation == null || endLocation == null) {
                    continue outer;
                }

                int start_pc = startLocation.getLocation();
                int length = endLocation.getLocation() - start_pc - 1;

                if (length < 0) {
                    continue outer;
                }
            }
            
            mCleanEntries.add(entry);
            mRangeCount += entry.getRangeCount();
        }
    }