Back to search

Lethbridge, Alta. : University of Lethbridge, Dept. of Mathematics and Computer Science

Investigating the impact of programming styles to improve code quality using machine learning and sociolinguistic features

Abstract

dc:description.abstract

In this research we investigated whether sociolinguistic factors such as gender, region, and expertise influence programming styles and code quality. We collected and processed over 700,000 C++ programs from GitHub and Codeforces to build data sets for training Random Forest and BERT models to classify programmer groups. While capturing stylistic patterns, experimental results showed that context-based models outperform metrics-based models. To measure code quality, we combined the Maintainability Index and difficulty metrics to label code as compliant or non-compliant. We further fine-tuned the T5 model for code transformation to generate stylistically improved code. However, due to the limitations of encoder–decoder LLMs, the generated code samples were non-executable. To address this, we developed a CodeBERT-based recommendation model that generates targeted, metric-driven guidance to improve code quality. Finally, we implemented a prototype tool that combines classifications, code quality, and improvement suggestions, providing pedagogically meaningful feedback for learners and researchers.

Degree

thesis:*
Level thesis:degree_level
Ph.D
Grantor dc:publisher
Lethbridge, Alta. : University of Lethbridge, Dept. of Mathematics and Computer Science
Year dc:date.issued
2025

Author and committee

dc:creator, dc:contributor.*
Authors dc:creator
  • Abdullah, Deen Mohammad
  • University of Lethbridge. Faculty of Arts and Science
Advisor dc:contributor.supervisor
  • Rice, Jacqueline E.

Subjects

dc:subject × 11

Rights

Language dc:language.iso
en

Identifiers

dc:identifier.*
Handle dc:identifier.uri
https://hdl.handle.net/10133/7296

Chain of custody

source
Harvested from
University of Lethbridge
Base URL
opus.uleth.ca/server/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Abdullah, Deen Mohammad; University of Lethbridge. Faculty of Arts and Science. Investigating the impact of programming styles to improve code quality using machine learning and sociolinguistic features. Ph.D thesis, Lethbridge, Alta. : University of Lethbridge, Dept. of Mathematics and Computer Science, 2025. https://hdl.handle.net/10133/7296