Compare the same data at the same frame

Hello!

I don’t understand why my program record the same value whereas it shouldn’t?

I want to record 3 different datas with 1 different frame each time one of my three value is different.
I think, I compare datas not in a good manner.

Here my fonction record

void record() {

// to STOP record touch @

    if (key == '@'){
    output.flush();
    output.close();
    exit();
          } // if formerCoupling is different but the key and keyCode is the same, output it
  else if (((formerCoupling != coupling)) ||
       
       (((formerKey == int (key)) ||
       (formerKeyCode == int (keyCode))))){
       
         output.println(frameCount + ":" + (int)key + ":" + (int)keyCode + ":" + int (coupling*1000));
      }
      
 // if the tree value are different output them 
        else if (((formerCoupling != coupling)) &&
       
       (((formerKey != int (key)) ||
       (formerKeyCode != int (keyCode))))){   
   output.println(frameCount + ":" + (int)key + ":" + (int)keyCode + ":" + int (coupling*1000));
      }
     // if the value keyCode is different output them 

      else if (((formerCoupling == coupling)) &&
       
       (((formerKey == int (key)) ||
       (formerKeyCode != int (keyCode))))){
        
        
       output.println(frameCount + ":" + (int)key + ":" + (int)keyCode + ":" + int (coupling*1000));
    }   
     // if the value key is different output them 
     else if (((formerCoupling == coupling)) &&
       
       (((formerKey != int (key)) ||
       (formerKeyCode == int (keyCode))))){
        
        
       output.println(frameCount + ":" + (int)key + ":" + (int)keyCode + ":" + int (coupling*1000));
    }   
    
  }

for exemple i have those datas

121:35:18:-2375
121:102:70:-2375

Here you can see that last data int (coupling*1000) is twice the same :persevere: