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

NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);

//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.begin(9600);
  Genotronex.println("Bluetooth On..");
  
  // Set Speed
  motorL.setSpeed(255);
  motorR.setSpeed(255);
  
  // Stop Motors On Start Up
  motorL.run(RELEASE);
  motorR.run(RELEASE);
}

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

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

 if (Genotronex.available()){
   BluetoothData=Genotronex.read();
   
   if (robots == true){
   motorL.run(RELEASE);
   motorR.run(RELEASE);
   Genotronex.println("Auto Stop: Safe Dist Reached");
   }
   
   if(BluetoothData=='f'){  
   // Go Forward
   motorL.run(FORWARD);
   motorR.run(BACKWARD);
   Genotronex.println("Moving Forward");
   }
  if (BluetoothData=='s'){
   // Stop
   motorL.run(RELEASE);
   motorR.run(RELEASE);
   Genotronex.println("Stopping");
  }
  if (BluetoothData=='r')
   // Right
   motorL.run(FORWARD);
   motorR.run(RELEASE);
   Genotronex.println("Turning Right");
  }
    if (BluetoothData=='l'){
   // Left
   motorL.run(RELEASE);
   motorR.run(BACKWARD);
   Genotronex.println("Turning Left");
  }
delay(100);// prepare for next data ...
}
    if (BluetoothData=='r')
      // Right
      motorL.run(FORWARD);
    motorR.run(RELEASE);
    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 ?