{"id":{"repo_id":"uoit","oai_identifier":"oai:ontariotechu.scholaris.ca:10155/1940"},"canonical_url":"https://search.dev.ndltd.org/etd/uoit/oai:ontariotechu.scholaris.ca:10155/1940","repository":{"repo_id":"uoit","name":"Ontario Institute of Technology","base_url":"https://ontariotechu.scholaris.ca/server/oai/request"},"display":{"title":"A retrieval augmented generation fine-tuned LLM model for refactored code recommendations to mitigate Java lock contention performance faults","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.","abstract_html":"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.","abstract_has_math":false,"creators":["Shawon, Ashadullah"],"institution":"University of Ontario Institute of Technology","degree_name":"Master of Applied Science (MASc)","degree_level":null,"degree_discipline":"Electrical and Computer Engineering","degree_department":null,"school":null,"contributors":[],"advisors":["Azim, Akramul","Liscano, Ramiro"],"committee_chairs":[],"committee_members":[],"year":2025,"date_issued":"2025-04-01","date_published":"2025-04-01","updated_at":"2026-07-24T05:35:24Z","subjects":[],"languages":["en"],"rights":[],"rights_urls":[],"identifier_entries":[]},"links":{"outbound_url":"https://hdl.handle.net/10155/1940","outbound_label":"Handle","outbound_source":"dc:identifier.uri"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Azim, Akramul","Liscano, Ramiro"]},{"key":"dc:creator","label":"Author","values":["Shawon, Ashadullah"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2025-04-29T19:07:44Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2025-04-29T19:07:44Z"]},{"key":"dc:date.issued","label":"Date","values":["2025-04-01"]},{"key":"dc:type","label":"Dc Type","values":["Thesis"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Electrical and Computer Engineering"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Applied Science (MASc)"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["University of Ontario Institute of Technology"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/10155/1940"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["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."]},{"key":"dc:title","label":"Title","values":["A retrieval augmented generation fine-tuned LLM model for refactored code recommendations to mitigate Java lock contention performance faults"]}]}],"canonical_facts":{"dc:contributor.advisor":["Azim, Akramul","Liscano, Ramiro"],"dc:creator":["Shawon, Ashadullah"],"dc:date.accessioned":["2025-04-29T19:07:44Z"],"dc:date.available":["2025-04-29T19:07:44Z"],"dc:date.issued":["2025-04-01"],"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."],"dc:identifier.uri":["https://hdl.handle.net/10155/1940"],"dc:language.iso":["en"],"dc:title":["A retrieval augmented generation fine-tuned LLM model for refactored code recommendations to mitigate Java lock contention performance faults"],"dc:type":["Thesis"],"thesis:degree_discipline":["Electrical and Computer Engineering"],"thesis:degree_name":["Master of Applied Science (MASc)"],"thesis:institution_name":["University of Ontario Institute of Technology"]},"updated_at":"2026-07-24T05:35:24Z"}