Buggy code:
public class ConfigManager { private static Configurable mainConfig = Config . getConfig ( ) ; private static Configurable teamConfig = TeamsConfig . getConfig ( ) ; private static Configurable claimsConfig = ClaimsConfig . getConfig ( ) ; private static Configurable messageConfig = MessageConfig . getConfig ( ) ; public static Set < Object > getTeams ( ) { } public static String getTeam ( UUID playerUUID ) { } public static int getMaxNameLength ( ) { } public static int getMinNameLength ( ) { } public static BigDecimal getBalance ( String teamName ) { } public static void depositToTownBank ( BigDecimal amount , String teamName ) { } public static void withdrawFromTownBank ( BigDecimal amount , String teamName ) { } public static String getHQWorldName ( String teamName ) { } public static double getHQX ( String teamName ) { } public static double getHQY ( String teamName ) { } public static double getHQZ ( String teamName ) { } public static boolean inConfig ( String teamName ) { } public static ArrayList < String > getMembers ( String teamName ) { } public static ArrayList < String > getExecutives ( String teamName ) { } public static ArrayList < String > getExecutiveNames ( String teamName ) { } public static ArrayList < String > getMemberNames ( String teamName ) { } public static void setHQ ( String teamName , Location < World > hqLocation , String worldName ) { } public static ArrayList < String > getAllies ( String teamName ) { } public static ArrayList < String > getEnemies ( String teamName ) { } public static String getLeader ( String teamName ) { } public static boolean areTaxesEnabled ( String teamName ) { } public static void setTaxesEnabled ( String teamName , boolean value ) { } public static int getTaxInterval ( String teamName ) { } public static void setTaxInterval ( String teamName , int interval ) { } public static BigDecimal getTax ( String teamName ) { } public static void setTax ( String teamName , BigDecimal amount ) { } public static void addTeam ( String teamName , String leaderUUID ) { } public static void addTeamMember ( String teamName , String memberUUID ) { } public static void addEnemy ( String teamName , String enemyTeamName , boolean addEnemy ) { } public static void addAlly ( String teamName , String allyTeamName , boolean addAlly ) { } public static void removeMember ( String teamName , String memberUUID ) { } public static void removeExecutive ( String teamName , String executiveUUID ) { } public static void removeEnemy ( String teamName , String enemyName ) { } public static void removeAlly ( String teamName , String allyName ) { } public static void setTeamLeader ( String teamName , String leaderUUID ) { } public static void addTeamExecutive ( String teamName , String executiveUUID ) { } public static void removeTeam ( String teamName ) { } public static void claim ( String teamName , UUID worldUUID , int chunkX , int chunkZ ) { } public static BigDecimal getClaimCost ( ) { } public static boolean displayPrefix ( ) { } public static void setDisplayPrefix ( boolean value ) { } public static Text getUnclaimedNotification ( ) { } public static Text getClaimedNotification ( String teamName ) { } public static Text getLeaderPrefix ( String teamName ) { } public static Text getExecutivePrefix ( String teamName ) { } public static Text getMemberPrefix ( String teamName ) { } public static int getClaims ( String teamName ) { } public static int getClaimCap ( ) { } public static void removeClaims ( String teamName ) { } public static void unclaim ( String teamName , UUID worldUUID , int chunkX , int chunkZ ) { } public static boolean isClaimed ( String teamName , UUID worldUUID , int chunkX , int chunkZ ) { } public static String isClaimed ( Location < World > location ) { } public static String isClaimed ( Vector3i chunk , UUID worldUUID ) { } public static boolean canUseInSafeZone ( String id ) { } public static TextColor getColorTo ( String observerPolis , String polis ) { } public static void addUsableSafeZoneBlock ( String id ) { } public static void removeUsableSafeZoneBlock ( String id ) { } public static ArrayList < String > getAllowedBlocksInSafeZone ( ) { } public static void transferClaimsConfig ( ) { } public static void updatePolisName ( String oldPolisName , String newPolisName ) { ConfigurationNode claimNode = Configs . getConfig ( ConfigManager . claimsConfig ) . getNode ( "claims" , oldPolisName ) ; Configs . setValue ( ConfigManager . claimsConfig , new Object [ ] { "claims" , newPolisName } , claimNode . getValue ( ) ) ; Configs . removeChild ( ConfigManager . claimsConfig , new Object [ ] { "claims" } , oldPolisName ) ; <START_BUG> ConfigurationNode polisNode = Configs . getConfig ( ConfigManager . teamConfig ) . getNode ( "teams" , newPolisName ) ; <END_BUG> Configs . setValue ( ConfigManager . teamConfig , new Object [ ] { "teams" , newPolisName } , polisNode . getValue ( ) ) ; Configs . removeChild ( ConfigManager . teamConfig , new Object [ ] { "teams" } , oldPolisName ) ; } public static BigDecimal getPolisCreateCost ( ) { } }

Fix:
ConfigurationNode polisNode = Configs . getConfig ( ConfigManager . teamConfig ) . getNode ( "teams" , oldPolisName ) ;