Java rewrite engine

fixing lengthList to size