These changes are driven by the CucumberJVM JUnit runner.

The modification to org.gradle.api.plugins.JavaBasePlugin relates
to http://issues.gradle.org/browse/GRADLE-2765 and
http://issues.gradle.org/browse/GRADLE-2739, where the test-results/binary
directory ends up with filenames with unescaped "/" characters.
Cucumber scenario and step defintions can contain "/" characters
which should be escaped before forming the undelrying report filename.

The modification to org.gradle.api.internal.tasks.testing.junit.report.TestResult and
org.gradle.api.internal.tasks.testing.junit.result.TestReportDataCollector relate to how
classic JUnit treats test class names and test names vs. how the CucumberJVM runner treats
the same.  The change to org.gradle.api.internal.tasks.testing.junit.result.TestReportDataCollector is
trivial:  instead of this

   boolean isClassLevelOutput = name.equals(className)

use this

   boolean isClassLevelOutput = className.equals(name);

where we have simply swapped one operand for the other to avoid an
NPE when the effective value of testDescriptor.getName() is null
for Cucumber Scenario clauses of step defs.

The change to org.gradle.api.internal.tasks.testing.junit.report.TestResult
is similar in spirit, but a little more subtle.  On line 88, neither operand
in java.lang.String.compareTo() can be null

        diff = name.compareTo(testResult.name);

Therefore, in the constructor
org.gradle.api.internal.tasks.testing.junit.report.TestResult#TestResult
for this class, set name == "" if name is passed in as a null value.