IntStreamEx (List<Location> locations, PsiFile psiFile) { IntStreamEx stream = StreamEx.of(locations).mapToInt(Location::lineNumber); if (psiFile instanceof PsiCompiledFile) { stream = stream.map(line -> DebuggerUtilsEx.bytecodeToSourceLine(psiFile, line) + 1); } return stream.filter(line -> line > 0); }