Vahid Majdinasab

Vahid Majdinasab

Auto-generated profile, based on publicly available information

Vahid Majdinasab

Polytechnique Montréal, Montréal, Québec, Canada

Research Focus & Metrics

Academic Career Length

4Years (2023-Present)

(Calculated once Scilit publication data is synced: current year − year of first publication + 1)

Representative Publications

View All Publications
2 May 2023 in Journal of Systems and Software
Verified
Journal Article
Closed access
ADArghavan Moradi Dakhel
Arghavan Moradi Dakhel
VMVahid Majdinasab
Vahid Majdinasab
ANAmin Nikanjam
Amin Nikanjam
FKFoutse Khomh
Foutse Khomh
MDMichel C. Desmarais
Michel C. Desmarais
ZJZhen Ming (Jack) Jiang
Zhen Ming (Jack) Jiang

6 April 2024 in Information and Software Technology
Verified
Journal Article
Closed access
ADArghavan Moradi Dakhel
Arghavan Moradi Dakhel
ANAmin Nikanjam
Amin Nikanjam
VMVahid Majdinasab
Vahid Majdinasab
FKFoutse Khomh
Foutse Khomh
MDMichel C. Desmarais
Michel C. Desmarais

28 April 2025 in ACM Transactions on Software Engineering and Methodology
Verified
Journal Article
Open access
VMVahid Majdinasab
Vahid Majdinasab
ANAmin Nikanjam
Amin Nikanjam
FKFoutse Khomh
Foutse Khomh
Code auditing ensures that the developed code adheres to standards, regulations, and copyright protection by verifying that it does not contain code from protected sources. The recent advent of Large Language Models (LLMs) as coding assistants in the software development process poses new challenges for code auditing. The dataset for training these models is mainly collected from publicly available sources. This raises the issue of intellectual property infringement as developers’ codes are already included in the dataset. Therefore, auditing code developed using LLMs is challenging, as it is difficult to reliably assert if an LLM used during development has been trained on specific copyrighted codes, given that we do not have access to the training datasets of these models. Given the non-disclosure of the training datasets, traditional approaches such as code clone detection are insufficient for asserting copyright infringement. To address this challenge, we propose a new approach, TraWiC; a model-agnostic and interpretable method based on membership inference for detecting code inclusion in an LLM’s training dataset. We extract syntactic and semantic identifiers unique to each program to train a classifier for detecting code inclusion. In our experiments, we observe that TraWiC is capable of detecting 83.87% of codes that were used to train an LLM. In comparison, the prevalent clone detection tool NiCad is only capable of detecting 47.64%. In addition to its remarkable performance, TraWiC has low resource overhead in contrast to pairwise clone detection that is conducted during the auditing process of tools like CodeWhisperer reference tracker, across thousands of code snippets.

14 April 2023 in arXiv
Verified
Preprint
Open access
PDF file
ADArghavan Moradi Dakhel
Arghavan Moradi Dakhel
VMVahid Majdinasab
Vahid Majdinasab
ANAmin Nikanjam
Amin Nikanjam
FKFoutse Khomh
Foutse Khomh
MDMichel C. Desmarais
Michel C. Desmarais
JJJack Jiang
Jack Jiang
Automatic program synthesis is a long-lasting dream in software engineering. Recently, a promising Deep Learning (DL) based solution, called Copilot, has been proposed by OpenAI and Microsoft as an industrial product. Although some studies evaluate the correctness of Copilot solutions and report its issues, more empirical evaluations are necessary to understand how developers can benefit from it effectively. In this paper, we study the capabilities of Copilot in two different programming tasks: (i) generating (and reproducing) correct and efficient solutions for fundamental algorithmic problems, and (ii) comparing Copilot's proposed solutions with those of human programmers on a set of programming tasks. For the former, we assess the performance and functionality of Copilot in solving selected fundamental problems in computer science, like sorting and implementing data structures. In the latter, a dataset of programming problems with human-provided solutions is used. The results show that Copilot is capable of providing solutions for almost all fundamental algorithmic problems, however, some solutions are buggy and non-reproducible. Moreover, Copilot has some difficulties in combining multiple methods to generate a solution. Comparing Copilot to humans, our results show that the correct ratio of humans' solutions is greater than Copilot's suggestions, while the buggy solutions generated by Copilot require less effort to be repaired.

31 August 2023 in arXiv
Verified
Preprint
Open access
PDF file
ADArghavan Moradi Dakhel
Arghavan Moradi Dakhel
ANAmin Nikanjam
Amin Nikanjam
VMVahid Majdinasab
Vahid Majdinasab
FKFoutse Khomh
Foutse Khomh
MDMichel C. Desmarais
Michel C. Desmarais
One of the critical phases in software development is software testing. Testing helps with identifying potential bugs and reducing maintenance costs. The goal of automated test generation tools is to ease the development of tests by suggesting efficient bug-revealing tests. Recently, researchers have leveraged Large Language Models (LLMs) of code to generate unit tests. While the code coverage of generated tests was usually assessed, the literature has acknowledged that the coverage is weakly correlated with the efficiency of tests in bug detection. To improve over this limitation, in this paper, we introduce MuTAP for improving the effectiveness of test cases generated by LLMs in terms of revealing bugs by leveraging mutation testing. Our goal is achieved by augmenting prompts with surviving mutants, as those mutants highlight the limitations of test cases in detecting bugs. MuTAP is capable of generating effective test cases in the absence of natural language descriptions of the Program Under Test (PUTs). We employ different LLMs within MuTAP and evaluate their performance on different benchmarks. Our results show that our proposed method is able to detect up to 28% more faulty human-written code snippets. Among these, 17% remained undetected by both the current state-of-the-art fully automated test generation tool (i.e., Pynguin) and zero-shot/few-shot learning approaches on LLMs. Furthermore, MuTAP achieves a Mutation Score (MS) of 93.57% on synthetic buggy code, outperforming all other approaches in our evaluation. Our findings suggest that although LLMs can serve as a useful tool to generate test cases, they require specific post-processing steps to enhance the effectiveness of the generated test cases which may suffer from syntactic or functional errors and may be ineffective in detecting certain types of bugs and testing corner cases PUTs.

12 July 2024 in arXiv
Verified
Preprint
Open access
PDF file
VMVahid Majdinasab
Vahid Majdinasab
ANAmin Nikanjam
Amin Nikanjam
FKFoutse Khomh
Foutse Khomh
Machine learning models trained on code and related artifacts offer valuable support for software maintenance but suffer from interpretability issues due to their complex internal variables. These concerns are particularly significant in safety-critical applications where the models' decision-making processes must be reliable. The specific features and representations learned by these models remain unclear, adding to the hesitancy in adopting them widely. To address these challenges, we introduce DeepCodeProbe, a probing approach that examines the syntax and representation learning abilities of ML models designed for software maintenance tasks. Our study applies DeepCodeProbe to state-of-the-art models for code clone detection, code summarization, and comment generation. Findings reveal that while small models capture abstract syntactic representations, their ability to fully grasp programming language syntax is limited. Increasing model capacity improves syntax learning but introduces trade-offs such as increased training time and overfitting. DeepCodeProbe also identifies specific code patterns the models learn from their training data. Additionally, we provide best practices for training models on code to enhance performance and interpretability, supported by an open-source replication package for broader application of DeepCodeProbe in interpreting other code-related models.