Buggy code:
public class GameWorld implements Disposable { private World physWorld ; private Array < Body > physBodies ; private Array < Body > physBodiesToRemove ; private long worldTime = 0L ; private TiledMap tiledMap ; private float tiledMapUnitScale ; private String name ; private int [ ] powerUps ; public float width ; public float height ; private int coins ; private int points ; private int pointsForKraken ; private EntityPlayer player ; private EntityPirateBase pirateBase ; private SeaCreaturePath firstPath ; public final Random random = new Random ( ) ; public GameWorld ( ) { } public void update ( ) { } public void spawnWorldBoundaries ( ) { } public long getWorldTime ( ) { } public String getName ( ) { } public void setName ( String name ) { } public float getWidth ( ) { } public void setWidth ( float width ) { } public float getHeight ( ) { } public void setHeight ( float height ) { } public TiledMap getTiledMap ( ) { } public void setTiledMap ( TiledMap tiledMap ) { } public float getTiledMapUnitScale ( ) { } public void setTiledMapUnitScale ( float tiledMapUnitScale ) { } @ Override public void dispose ( ) { } @ Override public String toString ( ) { } public World getPhysWorld ( ) { } public Array < Body > getPhysBodies ( ) { } public void removeEntity ( Entity entity ) { } public int getPoints ( ) { } public void addPoints ( int points ) { } public int getPointsForKraken ( ) { } public void setPointsForKraken ( int pointsForKraken ) { } public int getCoins ( ) { } public void addCoins ( int coins ) { } public boolean removeCoins ( int cost ) { } public EntityPlayer getPlayer ( ) { } public void setPlayer ( EntityPlayer entityPlayer ) { } public EntityPirateBase getPirateBase ( ) { } public void setPirateBase ( EntityPirateBase entityPirateBase ) { } public int getPowerUps ( EntityPowerUp . Ability type ) { } public void addPowerUps ( EntityPowerUp . Ability type , int amount ) { } public SeaCreaturePath getFirstPath ( ) { } public void setFirstPath ( SeaCreaturePath firstPath ) { } public < E extends Entity > E getClosestTarget ( Entity source , Class < E > targetType ) { } public < E extends Entity > E getClosestTarget ( Entity source , Class < E > targetType , float range , boolean useLineOfSight ) { E target = null ; Array < E > targets = new Array < E > ( ) ; for ( Body body : this . physBodies ) { Object object = body . getUserData ( ) ; if ( object instanceof Entity ) { Entity ent = ( ( Entity ) ( object ) ) ; float distance = source . getPos ( ) . dst ( ent . getPos ( ) ) ; <START_BUG> short collisionBits = ( COL_ALL ) ^ ( ( ( ( ( ( COL_SEA_CREATURE ) | ( COL_PIRATE ) ) | ( COL_SEA_CREATURE ) ) | ( COL_PIRATE_PROJECTILE ) ) | ( COL_PLAYER ) ) | ( COL_POWERUP ) ) ; <END_BUG> if ( targetType . isAssignableFrom ( ent . getClass ( ) ) ) if ( distance < range ) { if ( useLineOfSight ) { if ( this . hasLineOfSight ( source . getPos ( ) , ent . getPos ( ) , collisionBits ) ) targets . add ( ( ( E ) ( ent ) ) ) ; } else targets . add ( ( ( E ) ( ent ) ) ) ; } } } try { targets . sort ( new releasethekraken . util . EntityDistanceComparator < E > ( source ) ) ; } catch ( Exception e ) { app . error ( "GameWorld" , "Error<seq2seq4repair_space>sorting<seq2seq4repair_space>targets:<seq2seq4repair_space>" , e ) ; } if ( ( ( targets . size ) > 0 ) && ( ( targets . get ( 0 ) ) != null ) ) target = targets . get ( 0 ) ; return target ; } public boolean hasLineOfSight ( final Vector2 pos1 , final Vector2 pos2 , final short collisionBits ) { } public Vector2 getPathTargetPos ( EntitySeaCreature entity ) { } }

Fix:
short collisionBits = ( COL_ALL ) ^ ( ( ( ( ( ( ( COL_SEA_CREATURE ) | ( COL_PIRATE ) ) | ( COL_SEA_CREATURE ) ) | ( COL_SEA_PROJECTILE ) ) | ( COL_PIRATE_PROJECTILE ) ) | ( COL_PLAYER ) ) | ( COL_POWERUP ) ) ;