Back to results

University of Ontario Institute of Technology

A retrieval augmented generation fine-tuned LLM model for refactored code recommendations to mitigate Java lock contention performance faults

Abstract

dc:description.abstract

Lock contention performance faults can lead to degradation in the performance of software applications. Unlike software bugs, performance faults do not lead to failures and application crashes but surface as a degradation in the response and execution of an application and can surface fairly late in the deployment life of an application. Tools exist for the identification and detection of lock performance faults but there is a lack of an effective code refactoring recommendation system for developers to mitigate the performance degradation caused by lock contention. Recent advances in Large Language Models (LLMs) have demonstrated positive results in code refactoring for fixing software bugs and mitigating runtime faults. However, traditional LLM-based approaches often suffer from wrong output and incorrect recommendations, where the generated code may not accurately reflect the context of the project or the existing codebase. This thesis presents a novel approach that combines Retrieval Augmented Generation (RAG) with a fine-tuned LLM model for refactored code recommendation aimed at reducing lock-contention performance faults in Java applications. The RAG-based fine-tuned model combines the strengths of contextual understanding from LLMs with the precision of retrieval-based systems, thereby ensuring that the generated recommendations are relevant, accurate, and domain-specific. Semantic and syntactic metrics of the recommendations generated by the combined RAG and LLM model show an accuracy of approximately 90% compared to an accuracy of approximately 25% when a baseline LLM model is used.

Degree

thesis:*
Name thesis:degree_name
Master of Applied Science (MASc)
Discipline thesis:degree_discipline
Electrical and Computer Engineering
Grantor
University of Ontario Institute of Technology
Year dc:date.issued
2025

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Shawon, Ashadullah
Advisors dc:contributor.advisor
  • Azim, Akramul
  • Liscano, Ramiro

Rights

Language dc:language.iso
en

Identifiers

dc:identifier.*
Handle dc:identifier.uri
https://hdl.handle.net/10155/1940
OAI identifier oai:identifier
oai:ontariotechu.scholaris.ca:10155/1940

Chain of custody

source
Harvested from
Ontario Institute of Technology
Base URL
ontariotechu.scholaris.ca/server/oai/request
Last updated
2026-07-24
Source record
OAI-PMH GetRecord
related terms
citation

Shawon, Ashadullah. A retrieval augmented generation fine-tuned LLM model for refactored code recommendations to mitigate Java lock contention performance faults. University of Ontario Institute of Technology, 2025. https://hdl.handle.net/10155/1940