Couple<String> (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); }