University of Saskatchewan
Exploring Code Version Migration Challenges Through the Lens of Neural Analysis
Abstract
dc:description.abstractThe evolution of programming languages introduces continuous improvements in performance, maintainability, and security. However, this evolution often leads to challenges in version migration, where compatibility issues, syntax changes, and dependency management complexities become significant obstacles. Python, a widely-used language in fields like web development, data science, and machine learning, has seen considerable migration challenges, particularly during the transition from Python 2.x to Python 3.x. Despite the availability of documentation and tools, developers continue to face difficulties due to a lack of systematically categorized resources and real-world insights into migration issues. To address this, we conducted a comprehensive analysis of Python version migration challenges that consists of 1.9 million Python-related Stack Overflow (SO) posts. In this thesis, We have leveraged a multi-step process, starting with topic modeling to find the seven distinct categories and then through manual analysis of 400 random questions to build a version-migration catalogue. We expanded the manually labeled dataset to 6,905 entries through prompt-engineering the Large Language Models (LLMs) that eventually be used to build classifier to complement the catalogue. Additionally, we proposed a retrieval-augmented generation (RAG)-based tool that utilizes a vector database of Stack Overflow Q\&A pairs to assist developers by providing context-aware solutions for migration-related questions. Our contributions in this thesis are three-folds. First, we propose a novel version-migration issue related catalogue using topic modeling and manual analysis. Second, we show that leveraging few-shot prompting with human-evaluation can lead to build models to scale the dataset size further minimizing manual efforts including human-hours. Third, we provide a context-aware domain-specific consistent classifier and a RAG-Based tool that can be used for different domain-specific tasks such as automatic tagging support and provide more relevant answers to domain-specific questions. Our evaluation shows that fine-tuned DeBERTa-based classifiers achieved state-of-the-art performance in this domain with a F1-score of 77\%. Moreover, our findings revealed that library and framework compatibility issues were the most prevalent, with unanswered rates of 22.4\% and 21.8\%, and average resolution delays of 55 and 44 days, respectively. This study provides the first comprehensive exploration of Python version migration challenges by offering a fine-grained dataset, a deeper understanding of migration-related challenges, and foundational work towards practical, scalable automated migration assistance tools.
Degree
thesis:*- Name thesis:degree_name
- Master of Science (M.Sc.)
- Level thesis:degree_level
- Masters
- Discipline thesis:degree_discipline
- Computer Science
- Department thesis:degree_department
- Computer Science
- Grantor
- University of Saskatchewan
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Amin, H M Sadman
- Advisors dc:contributor.advisor
-
- Roy, Dr. Chanchal K
- Deters, Dr. Ralph
- Committee members dc:contributor.committeemember
-
- Roy, Dr. Banani
- Schneider, Dr. Kevin
Subjects
dc:subject × 1Rights
- Language dc:language.iso
- en
Identifiers
dc:identifier.*- Handle dc:identifier.uri
- https://hdl.handle.net/10388/16866