Buggy code:
public class GitblitUserService implements IUserService { protected IUserService serviceImpl ; private final Logger logger = LoggerFactory . getLogger ( GitblitUserService . class ) ; public GitblitUserService ( ) { } @ Override public void setup ( IStoredSettings settings ) { } @ SuppressWarnings ( "deprecation" ) protected IUserService createUserService ( File realmFile ) { IUserService service = null ; if ( realmFile . getName ( ) . toLowerCase ( ) . endsWith ( ".properties" ) ) { service = new FileUserService ( realmFile ) ; } else if ( realmFile . getName ( ) . toLowerCase ( ) . endsWith ( ".conf" ) ) { service = new ConfigUserService ( realmFile ) ; } assert service != null ; <START_BUG> if ( realmFile . exists ( ) ) { <END_BUG> try { realmFile . createNewFile ( ) ; } catch ( IOException x ) { logger . error ( MessageFormat . format ( "COULD<seq2seq4repair_space>NOT<seq2seq4repair_space>CREATE<seq2seq4repair_space>REALM<seq2seq4repair_space>FILE<seq2seq4repair_space>{0}!" , realmFile ) , x ) ; } UserModel admin = new UserModel ( "admin" ) ; admin . password = "admin" ; admin . canAdmin = true ; admin . excludeFromFederation = true ; service . updateUserModel ( admin ) ; } if ( service instanceof FileUserService ) { File usersConfig = new File ( realmFile . getParentFile ( ) , "users.conf" ) ; if ( ! ( usersConfig . exists ( ) ) ) { logger . info ( MessageFormat . format ( "Automatically<seq2seq4repair_space>creating<seq2seq4repair_space>{0}<seq2seq4repair_space>based<seq2seq4repair_space>on<seq2seq4repair_space>{1}" , usersConfig . getAbsolutePath ( ) , realmFile . getAbsolutePath ( ) ) ) ; ConfigUserService configService = new ConfigUserService ( usersConfig ) ; for ( String username : serviceImpl . getAllUsernames ( ) ) { UserModel userModel = serviceImpl . getUserModel ( username ) ; configService . updateUserModel ( userModel ) ; } } logger . warn ( "Please<seq2seq4repair_space>consider<seq2seq4repair_space>using<seq2seq4repair_space>\"users.conf\"<seq2seq4repair_space>instead<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>deprecated<seq2seq4repair_space>\"users.properties\"<seq2seq4repair_space>file" ) ; } return service ; } @ Override public boolean supportsCookies ( ) { } @ Override public char [ ] getCookie ( UserModel model ) { } @ Override public UserModel authenticate ( char [ ] cookie ) { } @ Override public UserModel authenticate ( String username , char [ ] password ) { } @ Override public UserModel getUserModel ( String username ) { } @ Override public boolean updateUserModel ( UserModel model ) { } @ Override public boolean updateUserModel ( String username , UserModel model ) { } @ Override public boolean deleteUserModel ( UserModel model ) { } @ Override public boolean deleteUser ( String username ) { } @ Override public List < String > getAllUsernames ( ) { } @ Override public List < String > getAllTeamNames ( ) { } @ Override public List < String > getTeamnamesForRepositoryRole ( String role ) { } @ Override public boolean setTeamnamesForRepositoryRole ( String role , List < String > teamnames ) { } @ Override public TeamModel getTeamModel ( String teamname ) { } @ Override public boolean updateTeamModel ( TeamModel model ) { } @ Override public boolean updateTeamModel ( String teamname , TeamModel model ) { } @ Override public boolean deleteTeamModel ( TeamModel model ) { } @ Override public boolean deleteTeam ( String teamname ) { } @ Override public List < String > getUsernamesForRepositoryRole ( String role ) { } @ Override public boolean setUsernamesForRepositoryRole ( String role , List < String > usernames ) { } @ Override public boolean renameRepositoryRole ( String oldRole , String newRole ) { } @ Override public boolean deleteRepositoryRole ( String role ) { } }

Fix:
if ( ! ( realmFile . exists ( ) ) ) {