Back to search

Michigan Technological University

FINDING ANTIPATTERNS ACROSS LANGUAGES WITH ABSTRACT SYNTAX TREES

Abstract

dc:description.abstract

Finding antipatterns in student code is a difficult task that is useful for helping beginner programmers. Antipatterns are common mistakes that students make while writing code. Code critiquers are tools that find antipatterns and provide rich, immediate feedback to students, even when professors aren’t available. WebTA is a code critiquer that finds antipatterns using regular expressions (regex), error messages, and language-specific abstract syntax trees (ASTs). Each of these tools has obstacles to antipattern searching that are difficult to overcome. Regex is without context, limiting the patterns it can recognize. Additionally, even experienced users have difficulty reading and debugging regex. Error messages and language-specific abstract syntax trees must be implemented for each language. Error messages are also restricted to finding syntax and other error-related antipatterns. Finally, language-specific abstract syntax trees require rebuilding and redeploying in the current design of WebTA for each new or modified antipattern query. This thesis presents two tools and a collection of antipatterns to solve these issues. The first tool, C-Slam, is a multi-language code critic that uses a combination of AST searching and Python scripts to easily find antipatterns. The second, Universal Abstract Syntax Trees (UASTs), creates a rule-based system for converting ASTs into UASTs. This makes antipatterns that are identical between two languages need only one query to be matched. Finally, this collection of antipatterns is used to show the usefulness of UASTs and provide a starting point for the implementation of future code critiquers.

Degree

thesis:*
Name thesis:degree_name
Master of Science in Computer Science (MS)
Level thesis:degree_level
Open Access Master's Thesis
Discipline thesis:degree_discipline
Department of Computer Science

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Masker, Daniel T.
Committee members dc:contributor.committeemember
  • Laura Brown
  • Michelle Jarvie-Eggart
  • Jon Sticklen
Contributors dc:contributor
  • Leo C. Ureel II

Subjects

dc:subject × 7

Rights

Identifiers

dc:identifier.*

Chain of custody

source
Harvested from
Michigan Technological University
Base URL
digitalcommons.mtu.edu/do/oai/
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Masker, Daniel T.. FINDING ANTIPATTERNS ACROSS LANGUAGES WITH ABSTRACT SYNTAX TREES. Open Access Master's Thesis thesis, https://doi.org/10.37099/mtu.dc.etdr/2026