Buggy code:
public class WorldDataHolder { protected String name ; protected GroupsDataHolder groups = new GroupsDataHolder ( ) ; protected UsersDataHolder users = new UsersDataHolder ( ) ; protected AnjoPermissionsHandler permissionsHandler ; public WorldDataHolder ( String worldName ) { } public WorldDataHolder ( String worldName , GroupsDataHolder groups , UsersDataHolder users ) { } public User getUser ( String userName ) { } public void addUser ( User theUser ) { } public boolean removeUser ( String userName ) { } public boolean isUserDeclared ( String userName ) { } public void setDefaultGroup ( Group group ) { } public Group getDefaultGroup ( ) { } public Group getGroup ( String groupName ) { } public boolean groupExists ( String groupName ) { } public void addGroup ( Group groupToAdd ) { } public boolean removeGroup ( String groupName ) { } public User createUser ( String userName ) { if ( getUsers ( ) . containsKey ( userName . toLowerCase ( ) ) ) { return null ; } User newUser = new User ( this , userName ) ; <START_BUG> newUser . setGroup ( groups . getDefaultGroup ( ) ) ; <END_BUG> addUser ( newUser ) ; setUsersChanged ( true ) ; return newUser ; } public Group createGroup ( String groupName ) { } public Collection < Group > getGroupList ( ) { } public Collection < User > getUserList ( ) { } public void reload ( ) { } public void reloadGroups ( ) { } public void reloadUsers ( ) { } public void loadGroups ( File groupsFile ) { } public void loadUsers ( File usersFile ) { } public static WorldDataHolder load ( String worldName , File groupsFile , File usersFile ) throws FileNotFoundException , IOException { } @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) protected static void loadGroups ( WorldDataHolder ph , File groupsFile ) throws FileNotFoundException , IOException { } @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) protected static void loadUsers ( WorldDataHolder ph , File usersFile ) throws FileNotFoundException , IOException { } public static void writeGroups ( WorldDataHolder ph , File groupsFile ) { } public static void writeUsers ( WorldDataHolder ph , File usersFile ) { } @ Deprecated public static void reloadOldPlugins ( Server server ) { } public AnjoPermissionsHandler getPermissionsHandler ( ) { } public void setUsersChanged ( boolean haveUsersChanged ) { } public boolean haveUsersChanged ( ) { } public void setGroupsChanged ( boolean setGroupsChanged ) { } public boolean haveGroupsChanged ( ) { } public void removeUsersChangedFlag ( ) { } public void removeGroupsChangedFlag ( ) { } public File getUsersFile ( ) { } public void setUsersFile ( File file ) { } public File getGroupsFile ( ) { } public void setGroupsFile ( File file ) { } public String getName ( ) { } public void resetGroups ( ) { } public void resetUsers ( ) { } public Map < String , Group > getGroups ( ) { } public Map < String , User > getUsers ( ) { } public GroupsDataHolder getGroupsObject ( ) { } public void setGroupsObject ( GroupsDataHolder groupsDataHolder ) { } public UsersDataHolder getUsersObject ( ) { } public void setUsersObject ( UsersDataHolder usersDataHolder ) { } public long getTimeStampGroups ( ) { } public long getTimeStampUsers ( ) { } protected void setTimeStampGroups ( long timeStampGroups ) { } protected void setTimeStampUsers ( long timeStampUsers ) { } public void setTimeStamps ( ) { } }

Fix:
newUser . setGroup ( groups . getDefaultGroup ( ) , false ) ;