private Breakpoint setLineBreakpointImpl(int ignoreCount, Object key, int line, boolean oneShot) throws IOException { Breakpoint breakpoint = breakpointPerLocation.get(new BreakpointLocation(key, line)); if (breakpoint != null) { if (ignoreCount == breakpoint.getIgnoreCount()) { throw new IOException("Breakpoint already set for " + key + " line: " + line); } breakpoint.setIgnoreCount(ignoreCount); return breakpoint; } Breakpoint.Builder builder; if (key instanceof Source) { builder = Breakpoint.newBuilder((Source) key); } else { assert key instanceof URI; builder = Breakpoint.newBuilder((URI) key); } builder.lineIs(line); if (oneShot) { builder.oneShot(); } breakpoint = builder.build(); breakpointPerLocation.put(breakpoint.getLocationKey(), breakpoint); getLegacySession().install(breakpoint); return breakpoint; }