Massive cosmic strings in Bianchi type II