TodoPattern (@NotNull IndexPattern pattern) { for (TodoPattern todoPattern : myTodoPatterns) { if (todoPattern.getIndexPattern() == pattern) { return todoPattern; } } LOG.error("Could not find matching TODO pattern for index pattern " + pattern.getPatternString()); return null; }