public boolean removeByInstance(@Nonnull Problem problem) {
		List<Problem> list;
		synchronized (problems) {list = problems.get(problem.line());}
		if (list != null) {
			boolean updated = list.removeIf(p -> p == problem);
			if (updated)
				Unchecked.checkedForEach(listeners, ProblemInvalidationListener::onProblemInvalidation,
						(listener, t) -> logger.error("Exception thrown when removing problem from tracking", t));
			// if list empty, remove the entry
			if (list.isEmpty())
				problems.remove(problem.line());
			return updated;
		}
		return false;
	}
@param problem
		Exact instance of a problem to remove.

@return {@code true} when the problem was removed.
{@code false} when the problem instance was not contained in the problems map.
recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/problem/ProblemTracking.java