Source:
public void createProject() throws ProjectCreationFailedException { validateParameters(); final Project.NameKey nameKey = createProjectArgs.getProject(); try { final String head = createProjectArgs.permissionsOnly ? GitRepositoryManager.REF_CONFIG : createProjectArgs.branch.get(0); final Repository repo = repoManager.createRepository(nameKey); try { replication.replicateNewProject(nameKey, head); final RefUpdate u = repo.updateRef(Constants.HEAD); u.disableRefLog(); u.link(head); createProjectConfig(); if (!createProjectArgs.permissionsOnly && createProjectArgs.createEmptyCommit) { createEmptyCommits(repo, nameKey, createProjectArgs.branch); } } finally { repo.close(); } } catch (RepositoryCaseMismatchException e) { throw new ProjectCreationFailedException("Cannot create " + nameKey.get() + " because the name is already occupied by another project." + " The other project has the same name, only spelled in a" + " different case.", e); } catch (RepositoryNotFoundException badName) { throw new ProjectCreationFailedException("Cannot create " + nameKey, badName); } catch (IllegalStateException err) { try { final Repository repo = repoManager.openRepository(nameKey); try { if (repo.getObjectDatabase().exists()) { throw new ProjectCreationFailedException("project \"" + nameKey + "\" exists"); } } finally { repo.close(); } } catch (RepositoryNotFoundException doesNotExist) { final String msg = "Cannot create " + nameKey; log.error(msg, err); throw new ProjectCreationFailedException(msg, err); } } catch (Exception e) { final String msg = "Cannot create " + nameKey; log.error(msg, e); throw new ProjectCreationFailedException(msg, e); } }

Target:
public void createProject() throws ProjectCreationFailedException { validateParameters(); final Project.NameKey nameKey = createProjectArgs.getProject(); try { final String head = createProjectArgs.permissionsOnly ? GitRepositoryManager.REF_CONFIG : createProjectArgs.branch.get(0); final Repository repo = repoManager.createRepository(nameKey); try { replication.replicateNewProject(nameKey, head); final RefUpdate u = repo.updateRef(Constants.HEAD); u.disableRefLog(); u.link(head); createProjectConfig(); if (!createProjectArgs.permissionsOnly && createProjectArgs.createEmptyCommit) { createEmptyCommits(repo, nameKey, createProjectArgs.branch); } } finally { repo.close(); } } catch (RepositoryCaseMismatchException e) { throw new ProjectCreationFailedException("Cannot create " + nameKey.get() + " because the name is already occupied by another project." + " The other project has the same name, only spelled in a" + " different case.", e); } catch (RepositoryNotFoundException badName) { throw new ProjectCreationFailedException("Cannot create " + nameKey, badName); } catch (IllegalStateException err) { try { final Repository repo = repoManager.openRepository(nameKey); try { if (repo.getObjectDatabase().exists()) { throw new ProjectCreationFailedException("project \"" + nameKey + "\" exists"); } } finally { repo.close(); } } catch (IOException ioErr) { final String msg = "Cannot create " + nameKey; log.error(msg, err); throw new ProjectCreationFailedException(msg, ioErr); } } catch (Exception e) { final String msg = "Cannot create " + nameKey; log.error(msg, e); throw new ProjectCreationFailedException(msg, e); } }