Wiegand inconsistancies

Try changing

 int serialNumber=(reader1 >> 1) & 0x3fff;

to

 long serialNumber=(reader1 >> 1) & 0x3fff;

An int is only 16 bits long and you are trying to put a much longer number into it.