The Online Judge (OJ) system solves many teaching problems of programming course design in traditional teaching modes and enhances teaching quality and learning effectiveness. Most of the OJ systems rate students by compiling and executing their code and then comparing the output with the standard output. However, program code content and students’ ability to program structure cannot be accessed with such design. To improve this shortcoming, we have developed an “automatic structure assessment module” and added it to the existing system. The module functions to check the student program structure, enabling the OJ system to measure code quality. Such extended functionalities enable the OJ system to produce more accurate assessments of programming learning performance. Furthermore, how the program structure can be described in the program structure specification is another challenge. Thus, we have also developed a visual program structure description editor. The teacher can handily specify the program structure specification required by the program structure according to the teaching topic so that the OJ system can execute program structure checking. The functionalities of automatic program structure assessment combined with the visual program structure description editor can be used to rapidly generate many examinations and practice questions that require program structure evaluation, and thus truly achieve the efficiency of automatic program structure assessment as well as enhancing students’ quality of program structure. Finally, in the six-week teaching experiment, there are a total of 61 valid samples. Using our structure comparison system can effectively improve the learning effectiveness of low-score group students in programming.