Back to results

University of Lethbridge

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

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.

Author and committee

dc:creator, dc:contributor.*
Authors
  • Abdullah, Deen Mohammad
  • University of Lethbridge. Faculty of Arts and Science

Subjects

dc:subject × 6

Identifiers

dc:identifier.*
Identifier
hdl:10133/7296
OAI identifier oai:identifier
oai:opus.uleth.ca:10133/7296

Chain of custody

source
Harvested from
University of Lethbridge
Base URL
opus.uleth.ca/server/oai/request
Last updated
2026-07-27
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. 2025.