Buggy code:
@ NotNull public static Map < VirtualFile , List < VirtualFile > > sortFilesByGitRoot ( @ NotNull Collection < VirtualFile > virtualFiles ) throws VcsException { } public static Map < VirtualFile , List < VirtualFile > > sortFilesByGitRoot ( Collection < VirtualFile > virtualFiles , boolean ignoreNonGit ) throws VcsException { } public static Map < VirtualFile , List < FilePath > > sortFilePathsByGitRoot ( final Collection < FilePath > files ) throws VcsException { } @ NotNull public static Map < VirtualFile , List < FilePath > > sortFilePathsByGitRoot ( @ NotNull Collection < FilePath > files , boolean ignoreNonGit ) throws VcsException { } private static Date parseTimestamp ( String value ) { } public static Date parseTimestampWithNFEReport ( String value , GitHandler handler , String gitOutput ) { } public static Set < VirtualFile > gitRootsForPaths ( final Collection < VirtualFile > roots ) { } public static VirtualFile getGitRoot ( @ NotNull FilePath filePath ) throws VcsException { } @ Deprecated @ Nullable public static VirtualFile getGitRootOrNull ( @ NotNull final FilePath filePath ) { } public static boolean isGitRoot ( final File file ) { } @ Deprecated @ Nullable public static VirtualFile getGitRootOrNull ( final File file ) { } public static VirtualFile getGitRoot ( @ NotNull final VirtualFile file ) throws VcsException { } @ Nullable public static VirtualFile gitRootOrNull ( final VirtualFile file ) { } @ NotNull public static List < VirtualFile > getGitRoots ( Project project , GitVcs vcs ) throws VcsException { } public static boolean isUnderGit ( final VirtualFile vFile ) { } public static String adjustAuthorName ( final String authorName , String committerName ) { } public static boolean isUnderGit ( final FilePath path ) { } public static Set < VirtualFile > gitRoots ( final Collection < FilePath > filePaths ) { } public static String gitTime ( Date time ) { } public static String formatLongRev ( long rev ) { } public static void getLocalCommittedChanges ( final Project project , final VirtualFile root , final Consumer < GitSimpleHandler > parametersSpecifier , final Consumer < GitCommittedChangeList > consumer , boolean skipDiffsForMerge ) throws VcsException { } public static List < GitCommittedChangeList > getLocalCommittedChanges ( final Project project , final VirtualFile root , final Consumer < GitSimpleHandler > parametersSpecifier ) throws VcsException { } @ NotNull public static String unescapePath ( @ NotNull String path ) throws VcsException { } public static boolean justOneGitRepository ( Project project ) { } @ Nullable public static GitRemote findRemoteByName ( @ NotNull GitRepository repository , @ NotNull final String name ) { } @ Nullable public static GitRemote findRemoteByName ( Collection < GitRemote > remotes , @ NotNull final String name ) { } @ Nullable public static GitRemoteBranch findRemoteBranch ( @ NotNull GitRepository repository , @ NotNull final GitRemote remote , @ NotNull final String nameAtRemote ) { } @ NotNull public static GitRemoteBranch findOrCreateRemoteBranch ( @ NotNull GitRepository repository , @ NotNull GitRemote remote , @ NotNull String branchName ) { } @ Nullable public static GitRemote findOrigin ( Collection < GitRemote > remotes ) { } @ NotNull public static Collection < VirtualFile > getRootsFromRepositories ( @ NotNull Collection < GitRepository > repositories ) { } @ NotNull public static Collection < GitRepository > getRepositoriesFromRoots ( @ NotNull GitRepositoryManager repositoryManager , @ NotNull Collection < VirtualFile > roots ) { } @ NotNull public static Collection < String > getPathsDiffBetweenRefs ( @ NotNull Git git , @ NotNull GitRepository repository , @ NotNull String beforeRef , @ NotNull String afterRef ) throws VcsException { } @ NotNull public static GitRepositoryManager getRepositoryManager ( @ NotNull Project project ) { } @ Nullable public static GitRepository getRepositoryForRootOrLogError ( @ NotNull Project project , @ NotNull VirtualFile root ) { } @ NotNull public static String getPrintableRemotes ( @ NotNull Collection < GitRemote > remotes ) { } @ NotNull public static String fileOrFolder ( @ NotNull VirtualFile file ) { } public static void showSubmittedFiles ( final Project project , final String revision , final VirtualFile file , final boolean local , final boolean revertable ) { } @ Nullable public static GitBranchTrackInfo getTrackInfoForCurrentBranch ( @ NotNull GitRepository repository ) { } @ NotNull public static Collection < GitRepository > getRepositoriesForFiles ( @ NotNull Project project , @ NotNull Collection < VirtualFile > files ) { } @ NotNull public static Map < VirtualFile , List < VirtualFile > > sortFilesByGitRootsIgnoringOthers ( @ NotNull Collection < VirtualFile > files ) { } public static boolean hasLocalChanges ( boolean staged , Project project , VirtualFile root ) throws VcsException { } @ Nullable public static VirtualFile findRefreshFileOrLog ( @ NotNull String absolutePath ) { } @ NotNull public static String toAbsolute ( @ NotNull VirtualFile root , @ NotNull String relativePath ) { } @ NotNull public static Collection < String > toAbsolute ( @ NotNull final VirtualFile root , @ NotNull Collection < String > relativePaths ) { } @ NotNull public static List < Change > findLocalChangesForPaths ( @ NotNull Project project , @ NotNull VirtualFile root , @ NotNull Collection < String > affectedPaths , boolean relativePaths ) { } public static void showPathsInDialog ( @ NotNull Project project , @ NotNull Collection < String > absolutePaths , @ NotNull String title , @ Nullable String description ) { } @ NotNull public static String cleanupErrorPrefixes ( @ NotNull String msg ) { final String [ ] PREFIXES = new String [ ] { "fatal:" , "error:" } ; msg = msg . trim ( ) ; for ( String prefix : PREFIXES ) { if ( msg . startsWith ( prefix ) ) { <START_BUG> return msg . substring ( prefix . length ( ) ) . trim ( ) ; <END_BUG> } } return msg ; } @ Nullable public static GitRemote getDefaultRemote ( @ NotNull Collection < GitRemote > remotes ) { } }

Fix:
msg = msg . substring ( prefix . length ( ) ) . trim ( ) ;