Help Pls

My code for a Car indicator works but unfortunately, the 2 sets of light cannot be worked independently. Is there something wrong in the code?

 const int red1 = 10;
const int yellow1 = 9;
const int green1 = 8;
const int button1 = 12;
const int red2 = 6;
const int green2 = 7;
const int yellow2 = 5;
const int button2 = 13;
const int buttonState1 = 0;
const int buttonState2 = 0;

// Variables will change:
int red1State = HIGH;
int yellow1State = HIGH;
int green1State = HIGH;
int red2State = HIGH;
int yellow2State = HIGH;
int green2State = HIGH; // the current state of the output pin
int button1State;
int button2State;
int lastButtonState = LOW;
int lastButtonState1 = LOW;
// the previous reading from the input pin

// the following variables are long's because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long lastDebounceTime = 0;  // the last time the output pin was toggled
long debounceDelay = 50;    // the debounce time; increase if the output flickers

void setup() {
  pinMode(red1, OUTPUT);
  pinMode(yellow1, OUTPUT);
  pinMode(green1, OUTPUT);
  pinMode(button1, INPUT);
  pinMode(button2, INPUT);
  pinMode(red2, OUTPUT);
  pinMode(green2, OUTPUT);
  pinMode(yellow2, OUTPUT);

  // set initial LED state
  digitalWrite(red1, red1State);
  digitalWrite(yellow1, yellow1State);
  digitalWrite(green1, green1State);
  digitalWrite(red2, red2State);
  digitalWrite(yellow2, yellow2State);
  digitalWrite(green2, green2State);
}

void loop() {
  // read the state of the switch into a local variable:
  int reading = digitalRead(button1);

  // check to see if you just pressed the button
  // (i.e. the input went from LOW to HIGH),  and you've waited
  // long enough since the last press to ignore any noise:

  // If the switch changed, due to noise or pressing:
  if (reading != lastButtonState1) {
    // reset the debouncing timer
    lastDebounceTime = millis();
  }

  if ((millis() - lastDebounceTime) > debounceDelay) {
    // whatever the reading is at, it's been there for longer
    // than the debounce delay, so take it as the actual current state:

    // if the button state has changed:
    if (reading != button1State) {
      button1State = reading;

      // only toggle the LED if the new button state is HIGH
      if (button1State == HIGH) {
        red1State = !red1State;
        yellow1State = !yellow1State;
        green1State = !green1State;
      }
    }
  }

  // set the LED:
  digitalWrite(red1, red1State);
  digitalWrite(yellow1, yellow1State);
  digitalWrite(green1, green1State);

  // save the reading.  Next time through the loop,
  // it'll be the lastButtonState:
  lastButtonState1 = reading;

 // read the state of the switch into a local variable:
  int reading1 = digitalRead(button2);

  // check to see if you just pressed the button
  // (i.e. the input went from LOW to HIGH),  and you've waited
  // long enough since the last press to ignore any noise:

  // If the switch changed, due to noise or pressing:
  if (reading1 != lastButtonState1) {
    // reset the debouncing timer
    lastDebounceTime = millis();
  }

  if ((millis() - lastDebounceTime) > debounceDelay) {
    // whatever the reading is at, it's been there for longer
    // than the debounce delay, so take it as the actual current state:

    // if the button state has changed:
    if (reading1 != button2State) {
      button2State = reading;

      // only toggle the LED if the new button state is HIGH
      if (button2State == HIGH) {
        red2State = !red2State;
        yellow2State = !yellow2State;
        green2State = !green2State;
      }
    }
  }

  // set the LED:
  digitalWrite(red2, red2State);
  digitalWrite(yellow2, yellow2State);
  digitalWrite(green2, green2State);

  // save the reading.  Next time through the loop,
  // it'll be the lastButtonState:
  lastButtonState1 = reading;

}

Go back through that and check all the 1's and 2's. It looks like you copy pasted part of the program but didn't change them all.