Add cutting stock problem in Java