Submitted:
01 June 2023
Posted:
02 June 2023
You are already at the latest version
Abstract
Keywords:
1. Introduction
- The grammar-concept understanding problem (GUP) requests to answer the important words in the given source code, such as reserved words and common libraries in the programming language, by giving the questions that describe their concepts [3].
- The value trace problem (VTP) requests to the current values of the important variables and the output messages in the given source code [4].
- The element fill-in-blank problem (EFP) requests to fill in the blank elements in the given source code so that the original source code is gained [5].
- The code completion problem (CCP) requests to correct and complete the given source code that has several blank elements and incorrect ones [6].
- The code writing problem (CWP) requests to write a source code that will pass the tests in the given test code [7].
2. Related Works in Literature
3. Overview of Code Writing Problem
3.1. Code Writing Problem
- To prepare the problem statement and the input data for the new assignment,
- To prepare the model source code as the answer code of this assignment,
- To obtain the expected output data by running the model source code,
- To write the test code using the input data and output data for test cases, and describing the necessary information to implement the source code, and
- To register the statement and the test code for the new assignment.
3.2. JUnit
3.3. Test Code
- The bubbleSort object of the BubbleSort class in the source code is generated in the test code.
- The sort method of the bubbleSort object is called with the arguments for the input data.
- The result of the sort method at codeOutput is compared with the expOutput data using the assertEquals method.
3.4. CWP Answer Platform
4. Answer Code Validation Program
4.1. Folder Structure in File System
4.2. Answer Code Validation Procedure
- The folder containing the source codes for each assignment using one test code is downloaded as a zip file. It is noted that a teacher usually uses an e-learning system such as Moodle in his/her programming course.
- The zip file is unzipped and stored in the corresponding folder under the “student_codes” folder inside the this project path.
- The corresponding test code is stored in “addon/test” folder.
- The program reads the test code.
- The program reads each source code in the “student_codes” folder, runs the test code with the source code on JUnit, and saves the test result in the text file in the “output” folder. This process is repeated until all the source codes in the folder are tested.
- The program makes the summary of the test results for all the source codes by the CSV file and saves it in the “csv” folder.
4.3. Example of Answer Code Validation
5. Test Data Generation Algorithm and Intermediate State Testing
5.1. Limitation of Current Test Code
5.1.1. Fixed Data Output
5.1.2. Library Use
5.1.3. Implementation of Different Logic or Algorithm
5.2. Test Data Generation Algorithm
- 1
- Read the input data from the test code with the standard format.
- 2
- Detect the input data by codeInput1 and find the data type.
- 3
-
Generates the new input data according to the following procedure:
- For int, an integer number between 2 and 10 is randomly selected.
- For double and float, a real number between 2.0 and 10.0 is randomly selected.
- For int[], the array size between 5 and 10 is randomly selected at first and an integer number between -99 and 99 is randomly selected.
- For double[] and float[], the array size between 5 and 10 is randomly selected at first and a real number between -99 and 99 is randomly selected.
- For the String and String[], an English full name is randomly selected by using names library. The array size between 5 and 10 is randomly selected for String[]. The other data type will be considered in our future works.
- 4
- Replace the input data for codeInput1 in the test code by the newly generated input data.
- 5
- Run the newly generated test code with the correct source code on JUnit, where the correct source code needs to be prepared for each assignment.
- 6
- Find the expected output data from the JUnit log.
- 7
- Replace the expected output data for expOutput in the test code by this expected output data.
5.3. Intermediate State Testing for Logic and Algorithms
6. Evaluation
6.1. CWP Assignments
6.2. Results of Individual Assignments
6.3. Results of Individual Students
6.4. Teacher Load Reduction
7. Conclusions
References
- Node.js. Available online: https://nodejs.org/en.
- Aung, S. T.; Funabiki, N.; Aung, L.H.; Htet, H.; Kyaw, H. H. S.; Sugawara, S. An implementation of Java programming learning assistant system platform using Node.js. In Proceedings of the International Conference on Information and Education Technology, Matsue, Japan, 9-11 April 2022; pp. 47–52. [Google Scholar]
- Aung, S. T.; Funabiki, N; Syaifudin, Y. W.; Kyaw, H. H. S.; Aung, S. L.; Dim, N. K.; Kao, W.-C. A proposal of grammar-concept understanding problem in Java programming learning assistant system. J. Adv. Inform. Tech. 2021, 12, 342–350.
- Zaw, K. K.; Funabiki, N; Kao, W.-C. A proposal of value trace problem for algorithm code reading in Java programming learning assistant system. Inf. Eng. Express. 2015, 1(3), 9–18. [CrossRef]
- Funabiki, N; Tana; Zaw, K. K.; Ishihara, N.; Kao, W.-C. A graph-based blank element selection algorithm for fill-in-blank problems in Java programming learning assistant system. IAENG Int. J. Comput. Sci. 2017, 44, 247–260.
- Kyaw, H. H. S.; Wint, S. S.; Funabiki, N; Kao, W.-C. A code completion problem in Java programming learning assistant system. IAENG Int. J. Comput. Sci. 2020, 47, 350–359.
- Funabiki, N; Matsushima, Y.; Nakanishi, T.; Amano, N. A Java programming learning assistant system using test-driven development method. IAENG Int. J. Comput. Sci. 2013, 40, 38–46.
- JUnit. Available online: http://www.junit.org/.
- Ala-Mutka, K. Problems in Learning and Teaching Programming. A literature study for developing visualizations in the Codewitz-Minerva project. 2004; pp. 1-13.
- Konecki, M. Problems in programming education and means of their improvement. DAAAM Int. Sci. Book 2014, 459–470. [Google Scholar]
- Queiros, R. A.; Peixoto, L.; Paulo, J. PETCHA - a programming exercises teaching assistant. Proceedings of ACM annual conference on Innovation and technology in computer science education, Haifa, Israel, 3-5 July 2012; pp. 192–197. [Google Scholar]
- Carbone, A.; Mitchell, I.; Hurst, J.; Gunstone, D. An exploration of internal factors influencing student learning of programming. Proceedings of Australasian Computing Education Conference, Wellington, New Zealand; 2009; pp. 25–34. [Google Scholar]
- Ihantola, P.; Ahoniemi, T.; Karavirta, V.; Seppälä, O. Review of recent systems for automatic assessment of programming assignments. Proceedings of Koli Calling; 2010; pp. 86–93. [Google Scholar]
- Denny, P.; Luxton-Reilly, A.; Tempero, E.; Hendrickx, J. CodeWrite: supporting student-driven practice of Java. Proceedings of ACM Technical Symposium on Computer Science Education, Dallas, USA, 2011, 9-12 March; pp. 471–476.
- Li, F. W.-B.; Watson, C. Game-based concept visualization for learning programming. Proceedings of ACM workshop on Multimedia technologies for distance learning, Scottsdale Arizona, USA, 1 December 2011; pp. 37–42. [Google Scholar]
- Shamsi, F. A.; Elnagar, A. An intelligent assessment tool for student’s Java submission in introductory programming courses. J. Intelli. Learn. Syst. Appl. 2012, 4, 59–69. [Google Scholar]
- Mei, H.; Hao, D.; Zhang, L.; Zhou, J.; Rothermel, G. A static approach to prioritizing JUnit test cases. IEEE Trans. Soft. Eng. 2012, 38, 1258–1275. [Google Scholar] [CrossRef]
- Kitaya, H.; Inoue, U. An online automated scoring system for Java programming assignments. Int. J. Infrom. Edu. Tech. 2016, 6, 275–279. [Google Scholar] [CrossRef]
- Ünal, E.; Çakir, H. Students’ views about the problem based collaborative learning environment supported by dynamic web technologies. Malaysian Online J. Edu. Tech. 2017, 5, 1–19. [Google Scholar]
- Szab, M.; Nehz, K. Grading Java code submissions in MeMOOC. Proceedings of International Multidisciplinary Scientific Conference, 5-6 September 2018. [Google Scholar]
- Zinovieva, I. S.; Artemchuk, V. O.; Iatsyshyn, A. V.; Popov, O. O.; Kovach, V. O.; Iatsyshyn, A. V.; Romanenko, Y. O.; Radchenko, O. V. The use of online coding platforms as additional distance tools in programming education. J. Phys.: Conf. Ser. 2021, 1840. [Google Scholar] [CrossRef]
- Bubble Sort. Available online: https://www.javatpoint.com/bubble-sort-in-java.












| group topic | ID | program name | # of test cases |
|---|---|---|---|
| 1 | CodeCorrection1 | 3 | |
| 2 | CodeCorrection2 | 3 | |
| basic grammar | 3 | MaxItem | 6 |
| 4 | MinItem | 7 | |
| 5 | ReturnAndBreak | 3 | |
| 6 | BinarySearch | 9 | |
| 7 | BinSort | 5 | |
| 8 | BubbleSort | 4 | |
| 9 | Divide | 4 | |
| fundamental algorithms | 10 | GCD | 5 |
| 11 | HeapSort | 4 | |
| 12 | InsertionSort | 4 | |
| 13 | LCM | 5 | |
| 14 | QuickSort | 5 | |
| 15 | ShellSort | 4 |
| group topic | ID | program name | ave. pass rate by original (%) |
ave. pass rate by proposal (%) |
|---|---|---|---|---|
| basic grammar | 1 | CodeCorrection1 | 96.43 | 96.43 |
| 2 | CodeCorrection2 | 96.43 | 96.43 | |
| 3 | MaxItem | 92.86 | 92.86 | |
| 4 | MinItem | 96.43 | 96.43 | |
| 5 | ReturnAndBreak | 96.43 | 96.43 | |
| fundamental algorithms | 6 | BinarySearch | 100 | 99.07 |
| 7 | BinSort | 81.67 | 80 | |
| 8 | BubbleSort | 91.67 | 89.58 | |
| 9 | Divide | 91.67 | 91.67 | |
| 10 | GCD | 91.67 | 91.67 | |
| 11 | HeapSort | 75 | 72.92 | |
| 12 | InsertionSort | 83.33 | 83.33 | |
| 13 | LCM | 91.67 | 91.67 | |
| 14 | QuickSort | 66.67 | 66.67 | |
| 15 | ShellSort | 75 | 75 |
| basic grammar | fundamental algorithms | ||||
|---|---|---|---|---|---|
| student | ave. pass rate | ave. pass rate | student | ave. pass rate | ave. pass rate |
| ID | by original (%) | by proposal (%) | ID | by original (%) | by proposal (%) |
| 1 | 100 | 100 | 1 | 100 | 100 |
| 2 | 100 | 100 | 2 | 100 | 100 |
| 3 | 100 | 100 | 3 | 100 | 100 |
| 4 | 100 | 100 | 4 | 66.67 | 62.50 |
| 5 | 100 | 100 | 5 | 100 | 100 |
| 6 | 100 | 100 | 6 | 72.92 | 72.92 |
| 7 | 100 | 100 | 7 | 100 | 100 |
| 8 | 100 | 100 | 8 | 100 | 100 |
| 9 | 100 | 100 | 9 | 83.33 | 81.25 |
| 10 | 0 | 0 | 10 | 18.75 | 18.75 |
| 11 | 100 | 100 | 11 | 97.92 | 95.83 |
| 12 | 100 | 100 | 12 | 100 | 100 |
| 13 | 72.73 | 72.73 | |||
| 14 | 100 | 100 | |||
| 15 | 100 | 100 | |||
| 16 | 100 | 100 | |||
| 17 | 100 | 100 | |||
| 18 | 100 | 100 | |||
| 19 | 100 | 100 | |||
| 20 | 100 | 100 | |||
| 21 | 100 | 100 | |||
| 22 | 100 | 100 | |||
| 23 | 100 | 100 | |||
| 24 | 100 | 100 | |||
| 25 | 100 | 100 | |||
| 26 | 100 | 100 | |||
| 27 | 100 | 100 | |||
| 28 | 100 | 100 | |||
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).