in src/main/java/com/googlesource/gerrit/plugins/batch/Batch.java [103:113]
protected Destination getExistingDestination(BranchNameKey branch) {
if (destinations == null) {
destinations = new ArrayList<>();
}
for (Destination dest : destinations) {
if (dest.project.equals(branch.project().get()) && dest.ref.equals(branch.branch())) {
return dest;
}
}
return null;
}