Buggy code:
public class Robot { private Position pos ; private Weapon [ ] weapons ; private int health ; private float imageAngleRad = 0 ; private float imageAngleDeg = 0 ; private Point mousePoint ; private String imageOfBodyAddress ; private Image imageOfBody ; private int [ ] places = new int [ ] { 0 , 0 , 0 , 0 } ; private Image text ; private Animation toUp ; private boolean iskeyUpPressed = false ; private Animation fixState ; private Animation toDown ; private boolean iskeyDownPressed = false ; private Animation toRight ; private boolean isKeyRightPressed = false ; private Animation toLeft ; private boolean isKeyLeftPressed = false ; private Animation toUpRight ; private Animation toDownLeft ; private Animation toUpLeft ; private Animation toDownRight ; public static Robot instance = null ; private GameField field ; private Animation fall ; private Robot ( ) { } public static Robot getRobot ( ) { } public void setActiveField ( GameField field ) { } public void setMousePoint ( Point p ) { } public Position getPos ( ) { } public void setImageAngle ( float r ) { } public String getImageOfBody ( ) { } public void setPos ( Position pos ) { } public void init ( ) { } public Image getText ( ) { } public void draw ( Graphics g ) { } public void update ( GameContainer gc ) { float xPos = this . getPos ( ) . getX ( ) ; float yPos = this . getPos ( ) . getY ( ) ; Input input = gc . getInput ( ) ; if ( ( health ) != 0 ) { if ( ( input . isKeyDown ( KEY_UP ) ) || ( input . isKeyDown ( input . KEY_W ) ) ) { if ( yPos > 25 ) yPos -= 0.25 ; iskeyUpPressed = true ; } else iskeyUpPressed = false ; if ( ( input . isKeyDown ( KEY_DOWN ) ) || ( input . isKeyDown ( input . KEY_S ) ) ) { if ( yPos < 575 ) yPos += 0.25 ; iskeyDownPressed = true ; } else iskeyDownPressed = false ; if ( ( input . isKeyDown ( KEY_RIGHT ) ) || ( input . isKeyDown ( input . KEY_D ) ) ) { if ( xPos < 775 ) xPos += 0.25 ; isKeyRightPressed = true ; } else isKeyRightPressed = false ; if ( ( input . isKeyDown ( KEY_LEFT ) ) || ( input . isKeyDown ( input . KEY_A ) ) ) { if ( xPos > 25 ) xPos -= 0.25 ; isKeyLeftPressed = true ; } else isKeyLeftPressed = false ; xPos -= 28 ; yPos -= 25 ; if ( field . isNounCell ( xPos , yPos ) ) { this . health = 0 ; } xPos += 3 ; yPos += 5 ; if ( field . isValidPos ( new Position ( xPos , yPos ) ) ) { this . setPos ( new Position ( ( xPos += 25 ) , ( yPos += 20 ) ) ) ; } } double dx = ( input . getMouseX ( ) ) - ( this . getPos ( ) . getX ( ) ) ; double dy = ( input . getMouseY ( ) ) - ( this . getPos ( ) . getY ( ) ) ; imageAngleRad = ( ( float ) ( ( Math . atan2 ( dy , dx ) ) - ( ( Math . PI ) // 2 ) ) ) ; imageAngleDeg = ( ( float ) ( ( ( imageAngleRad ) * 180 ) // ( Math . PI ) ) ) ; if ( input . isMouseButtonDown ( 0 ) ) fire ( ) ; for ( Weapon gun : weapons ) { if ( gun != null ) gun . update ( gc ) ; } Item [ ] items = Inventory . getInventory ( ) . getWeaponsItems ( ) ; for ( int i = 0 ; i < 4 ; i ++ ) { if ( ( ( items [ i ] . getAddOne ( ) ) != null ) && ( ( places [ i ] ) == 0 ) ) { ( ( Weapon ) ( items [ i ] . getAddOne ( ) ) ) . setPlace ( i ) ; addGun ( ( ( Weapon ) ( items [ i ] . getAddOne ( ) ) ) , i ) ; } else if ( ( ( items [ i ] . getAddOne ( ) ) == null ) && ( ( places [ i ] ) == 1 ) ) remGun ( i ) ; } <START_BUG> MissilesDatabase . getMissilesDatabase ( ) . explodeArea ( new Position ( ( ( pos . getX ( ) ) - 15 ) , ( ( pos . getY ( ) ) - 15 ) ) , 35 , 35 ) ; <END_BUG> } public void fire ( ) { } public void addGun ( Weapon gun , int place ) { } public void remGun ( int index ) { } private Image [ ] createToUpFrames ( ) { } private Image [ ] createFixStateFrame ( ) { } private Image [ ] createToDownFrames ( ) { } private Image [ ] createToRightFrames ( ) { } private Image [ ] createToLeftFrames ( ) { } private Image [ ] createToUpRightFrames ( ) { } private Image [ ] createToDownLeftFrames ( ) { } private Image [ ] createToDownRightFrames ( ) { } private Image [ ] createToUpLeftFrames ( ) { } private Image [ ] createFallFrames ( ) { } public int getHealth ( ) { } public void setHealth ( int x ) { } }

Fix:
MissilesDatabase . getMissilesDatabase ( ) . explodeAreaForRobot ( new Position ( ( ( pos . getX ( ) ) - 15 ) , ( ( pos . getY ( ) ) - 15 ) ) , 35 , 35 ) ;