We experience NullPointerExceptions when Build Failure Analyzer Plugin tries to analyze failures of non-existent downstream builds.
To reproduce this error, create a job with a downstream project (a Parameterized Trigger Plugin build step will do as well). Let the downstream project fail (for example with "Shell execute -> exit 1").
Start the job which triggers the failing job and then delete the build of the triggered, now failed job. Browse to the overview of the trigger job and it should look something like this:
The relevant part of the stacktrace (which is also attached) is this:
The error occurs, because the triggered downstream build is missing and therefore null in the list returned by dbf.getDownstreamBuilds(build) in the code of FailureCauseBuildAction.
Subsequently the TreeSet.addAll() method tries to compare this null value to another entry and this results in the NullPointerException.
I have already created a quick and dirty fix for that, where the null values are filtered out in the FailureCauseBuildAction.getDownstreamBuilds() method. But a probably better way to fix this, would be to not add the null values in CoreDBF.getDownstreamBuilds() in the first place.
Nevertheless I will provide my fix as a pull request.
By the way: This error is mainly caused by the fact that we discard old builds. A workaround for that would be to increase the kept builds or not throwing away the builds of downstream projects.