A federal judge has dismissed a lawsuit from the U.S. Department of Justice seeking Massachusetts' voter rolls.