A Code Completion Problem in Java Programming Learning Assistant System Htoo Htoo Sandi Kyaw, Su Sandy Wint, Nobuo Funabiki, and Wen-Chung Kao Abstract—As an efficient object-oriented programming lan- guage, Java has been extensively used in a variety of applications around the world. To assist Java programming educations, we have developed a Java Programming Learning Assistant System (JPLAS), which provides a great number of programming assignments to cover different levels of learning. For the first learning stage, JPLAS offers the element fill-in-blank problem (EFP) to study Java grammar through code reading. EFP asks students to fill in the blank elements in a given source code. However, EFP can be solved relatively easily, because the choice of the correct answer is limited for each explicit blank. In this paper, we propose a code completion problem (CCP) to overcome this drawback in EFP. To be specific, CCP does not explicitly show the locations of missing elements in the code. Instead, CCP will ask students to complete every statement in the code by filling in the correct elements at the correct locations. When the whole statement becomes equal to the original one, it is regarded as the correct answer. For evaluations, we generated CCP instances in both online/offline JPLAS, and asked university students from Myanmar, Japan, China, Indonesia, and Kenya to solve them. The results confirmed that CCP is harder than EFP, the two-level marking and the hint function are effective in improving solution performances of students, and the difficulty level for EFP is applicable in CCP. Index Terms—Java programming, JPLAS, code completion problem, blank element selection algorithm, hint function, difficulty level I. I NTRODUCTION Nowadays, Java has been widely applied in societies and industries due to its reliability, portability, and scalability. Moreover, Java was selected as the most popular program- ming language in 2019 [1]. Therefore, strong demands have appeared from IT industries in expanding Java programming educations. Correspondingly, a plenty of universities and professional schools are offering Java programming courses to meet this challenge. Generally, a Java programming course consists of grammar instructions and programming exercises. To advance Java programming educations by assisting pro- gramming exercises, we have developed a Java Programming Learning Assistant System (JPLAS). That is, JPLAS provides various programming exercise problems, such as the element fill-in-blank problem (EFP) [2][3], the value trace problem (VTP) [4], the statement fill-in-blank problem (SFP) [5], and the code writing problem (CWP) [6], to support self-studies of Java programming at different learning stages. For any exercise problem in JPLAS, the answer from a student is marked automatically using the program in the system. Manuscript received August 21, 2019; revised April 17, 2020. Htoo Htoo Sandi Kyaw, Su Sandy Wint, and Nobuo Funabiki are with the Department of Electrical and Communication Engineering, Okayama University, Okayama, Japan, e-mail:pxs93q36@s.okayama-u.ac.jp and funabiki@okayama-u.ac.jp. Wen-Chung Kao is with the Department of Electrical En- gineering, National Taiwan Normal University, Taipei, Taiwan, e- mail:jungkao@ntnu.edu.tw. Originally, JPLAS has been implemented as an online Web application system, so that a teacher can easily manage the JPLAS studies while numerous students are using a single database. In this online JPLAS, the JPLAS server adopts Linux for the operating system, Tomcat for the Web application server, JSP/Java for application programs, and MySQL for the database [7]. A student may freely access to any problem in JPLAS and answer the questions using a Web browser. Figure 1 demonstrates the software platform for JPLAS. JPLAS (JSP/Java) Tomcat (Web server) MySQL (Database) Linux (OS) Fig. 1: JPLAS server platform. In addition, the offline answering function has been imple- mented to allow students to answer the problems in JPLAS even if the Internet is unavailable [12]. For solving in this offline JPLAS, the problem assignment delivery and answer submission can be accomplished with a USB. A student can answer the questions in EFP and VTP using a Web browser, and those in SFP and CWP using Eclipse. For the first learning stage, JPLAS offers the element fill- in-blank problem (EFP) to study Java grammar through code reading. In EFP, a Java source code with blank elements is given to students, where the blanks are shown explicitly in the code. Then, the students are requested to fill in the blanks by typing the correct elements. An element represents a least unit in a code, which includes a reserved word, an identifier, and a control symbol. The correctness of each answer from a student is verified through string matching with the corresponding original element in the code. In EFP, the original element in the source code must be the unique correct answer for each blank to avoid causing novice students confusions. Thus, we proposed a graph-based blank element selection algorithm to select such elements most automatically. Nevertheless, in EFP, students will know where the blank elements exist in the code, because they are shown explicitly. Besides, each blank usually has a limited choice of elements for the correct answer. As a result, they may solve EFP without reading the code carefully or entirely understanding the grammar and code structure. In this paper, we propose a code completion problem (CCP) [9] to overcome the drawback of EFP. In contrast to EFP, CCP does not show where the missing elements exist. IAENG International Journal of Computer Science, 47:3, IJCS_47_3_03 Volume 47, Issue 3: September 2020 ______________________________________________________________________________________