Result (@NotNull String line, int entireLength) { this.line = line; this.lineStart = entireLength - line.length(); this.links = new ArrayList<>(); String trimLine = line.trim(); if (!(trimLine.contains("Run with --") && (trimLine.endsWith("option to get the stack trace.") || trimLine.endsWith("option to get more log output.") || trimLine.endsWith("to get full insights.")))) { return null; } addLinkIfMatch("Run with --stacktrace", "--stacktrace"); addLinkIfMatch("Run with --info", "--info"); addLinkIfMatch("Run with --debug option", "--debug"); addLinkIfMatch("--debug option", "--debug"); addLinkIfMatch("Run with --scan", "--scan"); if (links.isEmpty()) { return null; } return new Result(links); }