Integer () { List<Integer> list = ContainerUtil.sorted(myLines.keySet()); int size = list.size(); final LineData data = getLineData(myLineNumber); final int currentStatus = data != null ? data.getStatus() : LineCoverage.NONE; int idx = list.indexOf(myNewToOldConverter != null ? myNewToOldConverter.fun(myLineNumber).intValue() : myLineNumber); if (idx < 0) { return null; } while (true) { final int index = next(idx, size); Integer key = list.get(index); if (key == myLineNumber) return null; final LineData lineData = getLineData(key); idx = index; if (lineData != null && lineData.getStatus() != currentStatus) { final Integer line = list.get(idx); if (myOldToNewConverter != null) { final int newLine = myOldToNewConverter.fun(line).intValue(); if (newLine != 0) return newLine; } else { return line; } } } }