Program: 84691
Project: 84691
Buggy source:
private void updateRunning(List<TouchEvent> touchEvents,float deltaTime){
  Graphics g=game.getGraphics();
  int len=touchEvents.size();
  for (int i=0; i < len; i++) {
    TouchEvent event=touchEvents.get(i);
    if (event.type == TouchEvent.TOUCH_UP) {
      if (event.x < Assets.BUTTON_WIDTH && event.y < Assets.BUTTON_HEIGHT) {
        if (Settings.soundEnabled)         Assets.click.play(1);
        state=GameState.Paused;
        return;
      }
    }
    if (event.type == TouchEvent.TOUCH_DOWN) {
      if (inBounds(event,g.getWidth() - 3 * Assets.BUTTON_WIDTH,g.getHeight() - Assets.BUTTON_HEIGHT - Assets.BUTTON_HEIGHT / 2 - 32 / 2,Assets.BUTTON_WIDTH,Assets.BUTTON_HEIGHT)) {
        if (!world.snake.already_turned)         world.snake.turnLeft();
      }
      if (inBounds(event,g.getWidth() - Assets.BUTTON_WIDTH,g.getHeight() - Assets.BUTTON_HEIGHT - Assets.BUTTON_HEIGHT / 2 - 32 / 2,Assets.BUTTON_WIDTH,Assets.BUTTON_HEIGHT)) {
        if (!world.snake.already_turned)         world.snake.turnRight();
      }
      if (inBounds(event,g.getWidth() - 2 * Assets.BUTTON_WIDTH,g.getHeight() - 2 * Assets.BUTTON_HEIGHT - 32,Assets.BUTTON_WIDTH,Assets.BUTTON_HEIGHT)) {
        if (!world.snake.already_turned)         world.snake.turnUp();
      }
      if (inBounds(event,g.getWidth() - 2 * Assets.BUTTON_WIDTH,g.getHeight() - Assets.BUTTON_HEIGHT,Assets.BUTTON_WIDTH,Assets.BUTTON_HEIGHT)) {
        if (!world.snake.already_turned)         world.snake.turnDown();
      }
    }
  }
  world.update(deltaTime);
  if (world.gameOver) {
    if (Settings.soundEnabled)     Assets.bitten.play(1);
    state=GameState.GameOver;
  }
  if (oldScore != world.score) {
    oldScore=world.score;
    score="String_Node_Str" + oldScore;
    if (Settings.soundEnabled)     Assets.eat.play(1);
  }
}

Fixed version (ground truth):
private void updateRunning(List<TouchEvent> touchEvents,List<Input.KeyEvent> keyEvents,float deltaTime){
  Graphics g=game.getGraphics();
  int len=touchEvents.size();
  for (int i=0; i < len; i++) {
    TouchEvent event=touchEvents.get(i);
    if (event.type == TouchEvent.TOUCH_UP) {
      if (event.x < Assets.BUTTON_WIDTH && event.y < Assets.BUTTON_HEIGHT) {
        if (Settings.soundEnabled)         Assets.click.play(1);
        state=GameState.Paused;
        return;
      }
    }
    if (event.type == TouchEvent.TOUCH_DOWN) {
      if (inBounds(event,g.getWidth() - 3 * Assets.BUTTON_WIDTH,g.getHeight() - Assets.BUTTON_HEIGHT - Assets.BUTTON_HEIGHT / 2 - 32 / 2,Assets.BUTTON_WIDTH,Assets.BUTTON_HEIGHT)) {
        if (!world.snake.already_turned)         world.snake.turnLeft();
      }
      if (inBounds(event,g.getWidth() - Assets.BUTTON_WIDTH,g.getHeight() - Assets.BUTTON_HEIGHT - Assets.BUTTON_HEIGHT / 2 - 32 / 2,Assets.BUTTON_WIDTH,Assets.BUTTON_HEIGHT)) {
        if (!world.snake.already_turned)         world.snake.turnRight();
      }
      if (inBounds(event,g.getWidth() - 2 * Assets.BUTTON_WIDTH,g.getHeight() - 2 * Assets.BUTTON_HEIGHT - 32,Assets.BUTTON_WIDTH,Assets.BUTTON_HEIGHT)) {
        if (!world.snake.already_turned)         world.snake.turnUp();
      }
      if (inBounds(event,g.getWidth() - 2 * Assets.BUTTON_WIDTH,g.getHeight() - Assets.BUTTON_HEIGHT,Assets.BUTTON_WIDTH,Assets.BUTTON_HEIGHT)) {
        if (!world.snake.already_turned)         world.snake.turnDown();
      }
    }
  }
  len=keyEvents.size();
  for (int i=0; i < len; i++) {
    KeyEvent kevent=keyEvents.get(i);
switch (kevent.keyCode) {
case android.view.KeyEvent.KEYCODE_DPAD_LEFT:
      if (!world.snake.already_turned)       world.snake.turnLeft();
    break;
case android.view.KeyEvent.KEYCODE_DPAD_RIGHT:
  if (!world.snake.already_turned)   world.snake.turnRight();
break;
case android.view.KeyEvent.KEYCODE_DPAD_UP:
if (!world.snake.already_turned) world.snake.turnUp();
break;
case android.view.KeyEvent.KEYCODE_DPAD_DOWN:
if (!world.snake.already_turned) world.snake.turnDown();
break;
}
}
world.update(deltaTime);
if (world.gameOver) {
if (Settings.soundEnabled) Assets.bitten.play(1);
state=GameState.GameOver;
}
if (oldScore != world.score) {
oldScore=world.score;
score="String_Node_Str" + oldScore;
if (Settings.soundEnabled) Assets.eat.play(1);
}
}