int (PackageEntry[] entries, int b1, int b2) { int start = Math.min(b1, b2); int end = Math.max(b1, b2); if (start == -1) return 0; int max = 0; int cur = 0; for (int i = start; i < end; i++) { if (entries[i] == PackageEntry.BLANK_LINE_ENTRY) { cur++; } else { max = Math.max(max, cur); cur = 0; } } max = Math.max(max, cur); return max; }