Source:
<code>protected void run() throws Exception { if (localName != null && gitdir != null) throw die(CLIText.get().conflictingUsageOf_git_dir_andArguments); final URIish uri = new URIish(sourceUri); File localNameF; if (localName == null) { try { <START> localName = uri.getHumanishName() + (isBare ? Constants.DOT_GIT_EXT : ""); END> localNameF = new File(SystemReader.getInstance().getProperty( Constants.OS_USER_DIR), localName); } catch (IllegalArgumentException e) { throw die(MessageFormat.format( CLIText.get().cannotGuessLocalNameFrom, sourceUri)); } } else localNameF = new File(localName); if (branch == null) branch = Constants.HEAD; CloneCommand command = Git.cloneRepository(); command.setURI(sourceUri).setRemote(remoteName).setBare(isBare) .setNoCheckout(noCheckout).setBranch(branch) .setCloneSubmodules(cloneSubmodules); command.setGitDir(gitdir == null ? null : new File(gitdir)); command.setDirectory(localNameF); boolean msgs = quiet == null || !quiet.booleanValue(); if (msgs) { command.setProgressMonitor(new TextProgressMonitor(errw)) .setCallback(this); outw.println(MessageFormat.format( CLIText.get().cloningInto, localName)); outw.flush(); } try { db = command.call().getRepository(); if (msgs && db.resolve(Constants.HEAD) == null) outw.println(CLIText.get().clonedEmptyRepository); } catch (InvalidRemoteException e) { throw die(MessageFormat.format(CLIText.get().doesNotExist, sourceUri)); } finally { if (db != null) db.close(); } if (msgs) { outw.println(); outw.flush(); } }</code><technical_language>optional: avoid NON-NLS suppression if-block instead of ternary expression. localName = uri.getHumanishName(); if (isBare) { localName = localName + Constants.DOT_GIT_EXT; }</technical_language>

Target:
protected void run() throws Exception { if (localName != null && gitdir != null) throw die(CLIText.get().conflictingUsageOf_git_dir_andArguments); final URIish uri = new URIish(sourceUri); File localNameF; if (localName == null) { try { localName = uri.getHumanishName(); if (isBare) { localName = localName + Constants.DOT_GIT_EXT; } localNameF = new File(SystemReader.getInstance().getProperty( Constants.OS_USER_DIR), localName); } catch (IllegalArgumentException e) { throw die(MessageFormat.format( CLIText.get().cannotGuessLocalNameFrom, sourceUri)); } } else localNameF = new File(localName); if (branch == null) branch = Constants.HEAD; CloneCommand command = Git.cloneRepository(); command.setURI(sourceUri).setRemote(remoteName).setBare(isBare) .setNoCheckout(noCheckout).setBranch(branch) .setCloneSubmodules(cloneSubmodules); command.setGitDir(gitdir == null ? null : new File(gitdir)); command.setDirectory(localNameF); boolean msgs = quiet == null || !quiet.booleanValue(); if (msgs) { command.setProgressMonitor(new TextProgressMonitor(errw)) .setCallback(this); outw.println(MessageFormat.format( CLIText.get().cloningInto, localName)); outw.flush(); } try { db = command.call().getRepository(); if (msgs && db.resolve(Constants.HEAD) == null) outw.println(CLIText.get().clonedEmptyRepository); } catch (InvalidRemoteException e) { throw die(MessageFormat.format(CLIText.get().doesNotExist, sourceUri)); } finally { if (db != null) db.close(); } if (msgs) { outw.println(); outw.flush(); } }