Seems like an invalid input issue to me. Take a look at:
the parameter PATCHES_TO_BUILD was passed a literal "$PATCHES_TO_BUILD" which is not valid input for this job and the error message "fatal: remote error: $PATCHES_TO_BUILD unavailable" makes it seem like it's trying to fetch literally the string $PATCHES_TO_BUILD rather than actual git patches.
I'd expect to see for example: genius=32/53632/9,netvirt:59/50259/47
This job is failing due to "The JAVA_HOME environment variable is not defined correctly" which sounds like an environment problem.
Anil, is this something you can help us out with?
P.S : we need GERRIT_TOPIC
parameter in sandbox also, it is present only in releng.
I'm not familiar with this one and I don't see it in the parameters list on releng. Where are you expecting to see this?
If it's a parameter input then as long as you are rebased against latest master in releng/builder then I'd expect the job to be in sync.