Abstract

The growing popularity of computing applications has sparked the interest of students in computer programming languages. Minor mistakes are prevalent while writing small code blocks due to the coder’s lack of knowledge and carelessness. Instead of merely providing syntax warnings, it would be better to offer developers with an Integrated Development Environment (IDE) that can automatically correct short code blocks containing mistakes. This makes code composition easier and more time-efficient, thus improving the efficacy of large-scale development environments. Because Python is becoming more popular, the goal of our study is to enhance the efficiency of writing Python code by offering an automatic code-correcting approach. Furthermore, automatic program evaluation has been performed to assist in the debugging of small code blocks, which will ultimately be employed in the creation of real-time computer applications. The proposed technique would be useful for new learners who wish to create small Python code blocks for ease of writing and debugging on online platforms (like edX, Coursera, and Udacity). One of the major contributions of the project is to create an erroneous dataset of Python coding that contains all potential forms of probable syntax errors. The dataset induces variety through the use of multiple coding templates and is used to train deep learning models. We used the state-of-the-art text-to-text T5 transformer network model to automatically repair and evaluate the incorrect code. The outcomes of auto-correction are examined using the ROUGE and BLEU scores, as well as accuracy. The model corrects Python code with single, double, and the multiple number of errors with greater than 80% accuracy. Similarly, the performance of the basic T5 transformer network for program auto-evaluation with and without mistakes has been examined, and the model achieves greater than 65% accuracy in both cases. The proposed T5 base transformer outperforms the SOTA auto-correction models in terms of accuracy, according to a comparison study of the proposed method with the earlier techniques for auto-correcting codes.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call