void (@NotNull Document document) { Collection<XLineBreakpointImpl> breakpoints = getDocumentBreakpoints(document); if (breakpoints.isEmpty() || ApplicationManager.getApplication().isUnitTestMode()) { return; } IntSet positions = new IntOpenHashSet(); List<XLineBreakpoint> toRemove = new SmartList<>(); for (XLineBreakpointImpl breakpoint : breakpoints) { breakpoint.updatePosition(); if (!breakpoint.isValid() || !positions.add(XDebuggerUtil.areInlineBreakpointsEnabled() ? breakpoint.getOffset() : breakpoint.getLine())) { toRemove.add(breakpoint); } } removeBreakpoints(toRemove); }