Robot Code Bug HELP!!

Hello Everyone!

I am having a problem with my sketch. I am trying to get my robot to stop when it sees an object within 15cm from the sonar sensor. Whenever a send a command via Bluetooth like “f” which is supposed to make it go forward and it does but for like a millisecond and the the serial monitor via Bluetooth says “Turning Right”? Why does it do that? Also how can i make the robot just print on serial when i send a command and wait until an obstacle is reached and then say “An obstacle has been reached” after sending the right command or forward or left. Code is posted below.

Thank You So Much
Jordan V.

// D51   >>>  Rx
// D50   >>>  Tx

#include <NewPing.h>
#include <SoftwareSerial.h>// import the serial library
#include <AFMotor.h>

// New Ping Declerations
#define TRIGGER_PIN  22 
#define ECHO_PIN  46
#define MAX_DISTANCE 200

boolean robots;

//Define Safe Distance
#define SAFE_DIST 5

// Motor Declarations
AF_DCMotor motorL(4);
AF_DCMotor motorR(1);

// New Ping Decleration


//Serial Decleration
SoftwareSerial Genotronex(50, 51); // RX, TX

int BluetoothData; // the data given from Computer

void setup() {
  // put your setup code here, to run once:
  Genotronex.println("Bluetooth On..");
  // Set Speed
  // Stop Motors On Start Up;;

void loop() {
unsigned int dist =; 
Genotronex.print("Ping: ");
int cmdist = dist / US_ROUNDTRIP_CM ;

if (cmdist < 15 && cmdist >0){
 boolean robots = true; 
else if (cmdist < 15 && cmdist >0){
 boolean robots = false; 

 if (Genotronex.available()){;
   if (robots == true){;;
   Genotronex.println("Auto Stop: Safe Dist Reached");
   // Go Forward;;
   Genotronex.println("Moving Forward");
  if (BluetoothData=='s'){
   // Stop;;
  if (BluetoothData=='r')
   // Right;;
   Genotronex.println("Turning Right");
    if (BluetoothData=='l'){
   // Left;;
   Genotronex.println("Turning Left");
delay(100);// prepare for next data ...
    if (BluetoothData=='r')
      // Right;;
    Genotronex.println("Turning Right");

Question 1 - how many lines of code will be executed when the if test is true ?
Question 2 - which lines of code will always be executed whether the if test is true or false ?