private static Couple<String> splitNameOfRemoteBranch(String branchName){
  int firstSlash=branchName.indexOf('/');
  String remoteName=firstSlash > -1 ? branchName.substring(0,firstSlash) : branchName;
  String remoteBranchName=branchName.substring(firstSlash + 1);
  return Couple.of(remoteName,remoteBranchName);
}

private static Couple < String > splitNameOfRemoteBranch ( String branchName ) { int firstSlash = branchName . indexOf ( '/' ) ; String remoteName = firstSlash > - 1 ? branchName . substring ( 0 , firstSlash ) : branchName ; String remoteBranchName = branchName . substring ( firstSlash + 1 ) ; return Couple . of ( remoteName , remoteBranchName ) ; }
returns the remote and the " local " name of a remote branch . expects branch in format " origin / master " , i . e . remote / branch
