Skip to Content
AlgorithmsAlgorithms
  • Article
  • Open Access

25 November 2026

41 Pages

A Generative AI-Based Feedback Mechanism for Pedagogical Refinement of Code Writing Problem in Java Programming Learning Assistant System

,
,
,
,
,
,
,
and
1
Department of Information and Communication Systems, Okayama University, Okayama 700-8530, Japan
2
Department of Informatics Engineering, Universitas Brawijaya, Malang 65145, Indonesia
3
Department of Information Technology, Politeknik Negeri Malang, Malang 65141, Indonesia
*
Author to whom correspondence should be addressed.

Abstract

Java programming is an important skill for IT students to master object-oriented programming (OOP) concepts. Programming exercises help students develop their conceptual understanding and implementation skills. Previously, we implemented the Java Programming Learning Assistant System (JPLAS) for self-study. It includes the Code Writing Problem (CWP) that asks students to implement source code that is evaluated using JUnit test code. However, the current JUnit-based evaluation provides only a pass/fail outcome and does not offer feedback for identifying students’ misconceptions. As a result, teachers must manually analyze incorrect answer codes and refine corresponding materials. In this paper, we propose a generative AI-based feedback mechanism that integrates the Human-in-the-Loop (HITL) process into the CWP. The AI model accepts incorrect answer codes, teacher-prepared materials, supporting inputs, and JUnit execution results as inputs and generates feedback for student error diagnosis, test code refinement, and guidebook refinement as outputs. Expert teachers validate the generated outputs before material refinement. For the main evaluation, we applied the proposal to four OOP CWP topics in a Java course at the State Polytechnic of Malang (POLINEMA), Indonesia. Three AI model settings generated 72 outputs, which were evaluated and validated by five programming teachers. Overall, 54 of 72 outputs were accepted in the HITL validation. The five teacher validators showed high inter-rater agreement (Fleiss’ κ = 0.850). The mechanism also completed the evaluated teacher-side tasks faster than the manual condition. In a classroom comparison involving 33 and 20 students using the original and refined materials, respectively, the refined material group showed higher CWP pass rates (99.17% vs. 96.30%) and mean final grades (77.95 vs. 74.18).

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.