To assist Java programming educations, we have developed a Web-based Java Programming Learning Assistant System (JPLAS). JPLAS provides fill-in-blank problems to let students study Java grammar and basic programming skills by filling the blanked elements in a given Java code. To generate the feasible problems, we have proposed a blank element selection algorithm using the constraint graph to select as many blanks as possible such that they have grammatically correct and unique answers. In this paper, to further increase the number of blanks and control the difficulty of the generated problem, we extend this algorithm by 1) adding operators in conditional expressions for blank candidates, 2) improving the edge generation method in the constraint graph to increase the number of blanks, and 3) introducing two parameters to change the frequency of selecting blanks. To verify the effectiveness, we apply the extended algorithm to 55 Java codes for fundamental data structure or algorithms, and confirm that these extensions can increase the number of blanks and change the problem difficulty.