automatic code same generation