CodeLens: A Deterministic, Compiler-Grounded Web Platform for Explaining and Repairing Programming Errors in Python, C, C++ and Java
Programming errors are usually reported in the vocabulary of the compiler, which leaves beginners unsure of what went wrong or how to repair it. This paper describes CodeLens, a web-based learning platform that analyses programs written in Python, C, C++ and Java, explains every mistake in plain English and in technical terms, and builds a corrected program. Unlike many repair tools, it contains no AI model, no language model and no external service. A Flask back end detects the language with a weighted regular-expression score, runs the real parser or compiler (Python ast, GCC, G++ or javac) and classifies each diagnostic into one of 33 reason keys backed by predefined explanation tables. A rule-based fixer then edits the program one error at a time and re-analyses it after every edit, for at most six passes, and declares a program fully fixed only if the real compiler finds no remaining error. The corrected program can be run in a temporary directory with optional input and a 60-second time-out, and the Run and Copy buttons stay locked for 60 seconds after each analysis to encourage reading first. The system was evaluated with 37 automated tests and a battery of 33 programs, nine correct and 24 with one seeded defect each. All 33 languages were detected correctly, all 24 defects were found, none of the nine correct programs was flagged, and 22 of the 24 defective programs (91.7%) were repaired and then compiled and ran. A Python string left open and a Java undeclared variable were not repaired. These results come from a small, self-written battery, so they verify function and do not estimate accuracy on arbitrary student code.
Authors
- Ashrith
- Abdula Mohammed
- Chetan
- Abhijith
- Akshata Prasanna, Kumar
Institutions
- Visvesvaraya Technological University (IN)
Publication Details
- Journal
- International journal of engineering inventions.
- Published
- 2026-11-28
- DOI
- https://doi.org/10.5281/zenodo.24625270
- Primary Topic
- Teaching and Learning Programming
- Type
- article
- Field-Weighted Citation Impact
- 0.00