Java code refactoring one to six chapters