Palash Ranjan Roy

Home / Publications

Publications

All peer-reviewed papers and posters by Palash Ranjan Roy (published as Palash Roy / Palash R. Roy, ORCID 0000-0001-9470-4233), and his thesis. Each paper page has the abstract, links to the DOI, arXiv, code and artifacts, and BibTeX.

Jump to: By year · By theme

All publications by year

2026

Palash Ranjan Roy, Banani Roy, Kevin A. Schneider, Chanchal K. Roy
ASE 2026 · CORE A*
Role: Led the study; designed and ran all experiments; drafted the paper.
  • Code Clones
  • Task Arithmetic (TIES, DARE)
  • OOD Generalization
  • Multi-Task Learning
Abstract

The growing diversity of code clone types, from syntactic copies to cross-language semantic clones to AI-generated duplicates, has created a fragmentation crisis in clone detection. Current deep learning detectors are domain specialists that degrade significantly outside their training distribution. In our evaluation, F1 drops exceed 70% across domains. Deploying multiple specialized models is impractical, yet training a single cross-domain detector requires simultaneous access to all training data. To address this, we investigate model merging, a family of post-hoc techniques that operate solely on trained checkpoints. We systematically evaluate parameter merging with five task-vector methods (Task Arithmetic, TIES, DARE-TIES, WUDI, PCB), architecture merging via greedy layer stitching, and cross-tokenizer alignment. Our study spans four pre-trained code models, three benchmarks, and twelve merging configurations. Same-base TIES merging creates effective cross-domain detectors, validated across two model families and three random seeds. It reaches 0.865 combined F1 on UniXcoder, 93% of multi-task training performance without any training data at the merging step. WUDI achieves the highest in-distribution combined F1 at 0.899, but TIES generalizes better to unseen AI-generated clones. We therefore recommend TIES for the practical recipe. Cross-base merging yields only marginal and high-variance gains across all five methods. This indicates that task vector compatibility through a shared pre-trained base is the binding factor for effective merging in our setting. Merged encoder-based detectors also outperform zero-shot instruction-tuned code LLMs on GPTCloneBench (0.609 vs. 0.454 F1 for the strongest LLM baseline) at substantially lower per-pair inference cost. They also generalize up to 4× better than multi-task training to unseen AI-generated clones, suggesting a trade-off between in-domain performance and OOD robustness. This work provides one of the first systematic empirical studies of model merging for software engineering and a practical recipe for building cross-domain code clone detectors.

Palash Ranjan Roy, Banani Roy, Kevin A. Schneider, Chanchal K. Roy
ASE 2026 Tool Track · CORE A*
Role: Designed and implemented the tool.
  • OOD Generalization
  • Task Arithmetic (TIES, DARE)
  • Multi-Task Learning
  • Hugging Face Tooling
Abstract

Fine-tuned code models often behave as domain specialists and can degrade sharply under distribution shift: in our clone-detection setting, a model trained on same-language clones drops 71% F1 on cross-language clones, while multi-task training falls to 0.151 F1 on unseen AI-generated clones. Our companion study shows that post-hoc model merging can address this fragmentation, achieving 93% of multi-task performance without training data while generalizing 4× better to unseen clone types. However, no practical tool exists that lets SE researchers diagnose checkpoint compatibility, merge specialists, validate results on SE benchmarks, and export models for deployment. We present MergeSE, an open-source CLI and web tool for training-free model merging of HuggingFace encoder checkpoints. While motivated by OOD generalization in clone detection, MergeSE supports SE classification workflows more broadly through a built-in registry of nine task types, including vulnerability detection, defect prediction, and code-smell detection. MergeSE provides five operations: tasks, inspect, merge, evaluate, and export. It supports five merging algorithms, including TIES, DARE-TIES, Wudi, PCB, and averaging; detects cross-task classification-head mismatches; produces seedable deterministic outputs; and includes bundled benchmark samples for smoke-test reproduction. A full merge of two 124M-parameter checkpoints completes in under 5 seconds on CPU. End-to-end validation confirms that MergeSE-produced checkpoints match reference implementations and recover cross-domain performance from domain-specific specialists. The tool is available online at https://mergese.usask.ca, and the development repository is at https://github.com/srlabUsask/MergeSE.

Ajmain Inqiad Alam, Palash Ranjan Roy, Chanchal K. Roy, Banani Roy, Kevin A. Schneider
FSE 2026 (PACMSE) · CORE A* · ACM SIGSOFT Distinguished Paper Award
Role: Sustainability framing; carbon and energy analysis; writing.
  • Green & Sustainable SE
  • Model Compression
  • Code Clones
  • Pruning
Abstract

The accelerating adoption of Large Language Models (LLMs) in software engineering (SE) has brought with it a silent crisis: unsustainable computational cost. While these models demonstrate remarkable capabilities in different SE tasks, they are unmanageably large, slow to deploy, memory-intensive, and carbon-heavy. This reality threatens not only the scalability and accessibility of AI-powered SE, but also its long-term environmental sustainability. The research challenge is clear: we must go beyond accuracy and address efficiency and environmental cost as first-class design constraints. To meet this challenge, we introduce Carbon-Taxed Transformers (CTT), a systematic multi-architectural compression principled pipeline ordering inspired by economic carbon taxation principles. Drawing from the economic concept of carbon pricing, CTT operationalizes a computational carbon tax that penalizes architectural inefficiencies and rewards deployment-ready compression. We evaluate CTT across three core SE tasks: code clone detection, code summarization, and code generation, with models spanning encoder-only, encoder-decoder, and decoder-only architecture. Our results show that CTT delivers on inference: (1) up to 49× memory reduction, (2) time reduction up to 8-10× for clone detection, up to 3× for summarization, and 4–7× for generation, (3) up to 81% reduction in CO2 emissions and (4) CTT retains around 98% accuracy on clone detection, around 89% on summarization, and up to 91% (textual metrics) and 68% (pass@1) for generation. Two ablation studies show that pipeline ordering and individual component contributions are both essential, providing empirical justification for CTT’s design and effectiveness. This work establishes a viable path toward responsible AI in SE through aggressive yet performance-preserving compression.

Ajmain Inqiad Alam, Palash Ranjan Roy, Chanchal K. Roy, Banani Roy, Kevin A. Schneider
FSE 2026 Companion (Poster)
  • Green & Sustainable SE
  • Model Compression
  • Code Clones
  • Pruning
Abstract

The growing adoption of Large Language Models in software engineering has introduced unsustainable computational and environmental costs. We propose Carbon-Taxed Transformers (CTT), a compression pipeline inspired by economic carbon taxation, integrating Neural Architecture Search, structured pruning, quantization, and knowledge distillation in a principled sequence. CTT generalizes across encoder-only, encoder-decoder, and decoder-only architectures, and is evaluated on code clone detection, summarization, and generation. Results show up to 49× memory reduction, 10× speedup, and an 81% reduction in CO2 emissions, while retaining 98% accuracy in clone detection, 89% in summarization, and up to 91% in generation. Ablation studies confirm both the pipeline ordering and each component are essential.

2025

Palash Ranjan Roy
ICSME 2025 Doctoral Symposium · CORE A · Best Doctoral Proposal Award
Role: Sole author.
  • Code Clones
  • Refactoring
  • Software Maintenance & Evolution
  • Large Language Models
Abstract

Code clones are a well-known source of technical debt, often degrading software maintainability. Modern AI coding assistants can unintentionally introduce clones or even license-incompatible code, posing maintenance and legal challenges. This research proposes a Large Language Model (LLM)-powered clone refactoring assistant that proactively detects duplicative code during development and suggests high-level refactorings. By bridging traditional clone detection with LLM-driven code generation or transformation, the approach aims to remove redundancies early while ensuring changes remain behavior preserving and legally compliant. The assistant will integrate into development workflows to prevent clone propagation, flag potential intellectual property risks, and incorporate developer feedback for explainable, trustworthy operation. We will evaluate its impact on code quality and developer productivity, and assess how AI enhancements influence long-term maintenance efforts.

Ajmain Inqiad Alam, Palash Ranjan Roy, Farouq Al-Omari, Chanchal K. Roy, Banani Roy, Kevin A. Schneider
ICSME 2025 · CORE A
Role: Validation; expert interviews; writing.
  • Code Clones
  • LLM-Generated Code
  • Software Maintenance & Evolution
  • Empirical SE
Abstract

The increasing adoption of AI-generated code has reshaped modern software development, introducing syntactic and semantic variations in cloned code. Unlike traditional human-written clones, AI-generated clones exhibit systematic syntactic patterns and semantic differences learned from large-scale training data. This shift presents new challenges for classical code clone detection (CCD) tools, which have historically been validated primarily on human-authored codebases and optimized to detect syntactic (Type 1-3) and limited semantic clones. Given that AI-generated code can produce both syntactic and complex semantic clones, it is essential to evaluate the effectiveness of classical CCD tools within this new paradigm. In this paper, we systematically evaluate nine widely used CCD tools using GPTCloneBench, a benchmark containing GPT-3-generated clones. To contextualize and validate our results, we further test these detectors on established human-authored benchmarks, BigCloneBench and SemanticCloneBench, to measure differences in performance between traditional and AI-generated clones. Our analysis demonstrates that classical CCD tools, particularly those enhanced by effective normalization techniques, retain considerable effectiveness against AI-generated clones, while some exhibit notable performance variation compared to traditional benchmarks. This paper contributes by (1) evaluating classical CCD tools against AI-generated clones, providing critical insights into their current strengths and limitations; (2) highlighting the role of normalization techniques in improving detection accuracy; and (3) delivering detailed scalability and execution-time analyses to support practical CCD tool selection. The research underscores the continued relevance of classical CCD tools and suggests adopting a hybrid approach that combines both classical and AI-based methods to improve clone detection in the modern era.

Palash Ranjan Roy
M.Sc. Thesis, USask
  • Code Clones
  • LLM-Generated Code
  • Program Comprehension
  • AI4SE
Abstract

Code similarity, also referred to as cloned code, involves identifying redundant code fragments, enabling effective refactoring, and promoting code reuse. This, in turn, enhances both the maintainability and scalability of software systems. However, despite advancements in automated tools, detecting and generating clones, particularly across different programming languages and considering semantic variations—remains a significant challenge in software engineering.

With the rise of large language models (LLMs) such as GPT, Gemini, and LLaMA, there is growing interest in leveraging their capabilities to improve clone detection, code generation, and cross-language translation. Despite this interest, research has yet to thoroughly evaluate how these models can be systematically applied to address the challenges in these domains. This thesis aims to bridge that gap by investigating the role of LLMs in three studies: clone generation, code quality assessment of similar codes, and cross-language clone detection, with the goal of advancing software engineering practices.

The first study evaluates the performance of GPT-3 in generating semantic and cross-language code clones (similar codes) using the SemanticCloneBench dataset. Extensive experiments, validated by nine expert judges over 158 hours, show that GPT-3 achieved 62.14% accuracy and a 0.55 BLEU score in semantic clone generation, along with 91.25% accuracy in cross-language clone generation. These results underscore the potential of LLMs, particularly GPT-3, to support code reuse and facilitate migration across programming languages.

The second study assesses the quality of similar code generated through three approaches: human-generated solutions from Stack Overflow, LLM-based code search tools such as CodeBERT and GraphCodeBERT, and AI-powered models including GPT-4, Gemini Pro-1.5, and LLaMA-3-8B. Analyzing 800 programming questions (400 in Python and 400 in Java), the study demonstrates that GPT-4 consistently outperformed other tools in usability, accuracy, and overall code quality, while the code search tools underperformed. These findings offer valuable insights for developers, particularly in selecting reliable tools for high-quality code generation.

In the third study, I developed Lang2Clone, a novel tool that combines zero-shot prompting with GPT for code translation and NiCad for clone detection. Evaluations on the LeetCode and GPTCloneBench datasets showed that Lang2Clone achieved recall rates of 80% and 85%, respectively, with a precision of 95%. Notably, Lang2Clone outperformed state-of-the-art tools like GraphCodeBERT and CLCDSA in cross-language clone detection, particularly when translating between languages with similar programming paradigms.

Collectively, these studies highlight the potential of LLMs to enhance key software engineering tasks, particularly in clone detection and code reuse. The findings also suggest promising avenues for future research, including the application of LLMs to broader challenges such as software maintenance and cross-language code translation, paving the way for more sophisticated and efficient development tools.

2024

Md Mustakim Billah, Palash Ranjan Roy, Zadia Codabux, Banani Roy
ESEM 2024
  • LLM Evaluation
  • Empirical SE
  • AI4SE
  • Large Language Models
Abstract

Background: Competitive programming platforms such as LeetCode, Codeforces, and HackerRank provide challenges to evaluate programming skills. Technical recruiters frequently utilize these platforms as a criterion for screening resumes. With the recent advent of advanced Large Language Models (LLMs) like ChatGPT, Gemini, and Meta AI, there is a need to assess their problem-solving ability on the programming platforms. Aims: This study aims to assess LLMs’ capability to solve diverse programming challenges across programming platforms with varying difficulty levels, providing insights into their performance in real-time and offline scenarios, comparing them to human programmers, and identifying potential threats to established norms in programming platforms. Method: This study utilized 98 problems from LeetCode and 126 from Codeforces, covering 15 categories and varying difficulty levels. Then, we participated in nine online contests from Codeforces and LeetCode. Finally, two certification tests were attempted on HackerRank to gain insights into LLMs’ real-time performance. Prompts were used to guide LLMs in solving problems, and iterative feedback mechanisms were employed. We also tried to find any possible correlation among the LLMs in different scenarios. Results: LLMs generally achieved higher success rates on LeetCode (e.g., ChatGPT at 71.43%) but faced challenges on Codeforces. While excelling in HackerRank certifications, they struggled in virtual contests, especially on Codeforces. Despite diverse performance trends, ChatGPT consistently performed well across categories, yet all LLMs struggled with harder problems and lower acceptance rates. In LeetCode archive problems, LLMs generally outperformed users in time efficiency and memory usage but exhibited moderate performance in live contests, particularly in harder Codeforces contests compared to humans. Conclusions: While not necessarily a threat, the performance of LLMs on programming platforms is indeed a cause for concern. With the prospect of more efficient models emerging in the future, programming platforms need to address this issue promptly.

2023

Ajmain Inqiad Alam (equal contribution), Palash Ranjan Roy (equal contribution), Farouq Al-Omari, Chanchal K. Roy, Banani Roy, Kevin A. Schneider

* Equal contribution (co-first authors)

ICSME 2023 · CORE A
Role: Co-led (equal contribution): conception, methodology, validation, supervision of four undergraduates, writing.
  • Code Clones
  • LLM-Generated Code
  • Benchmarks & Datasets
  • Prompting
Abstract

With the emergence of Machine Learning, there has been a surge in leveraging its capabilities for problem-solving across various domains. In the code clone realm, the identification of type-4 or semantic clones has emerged as a crucial yet challenging task. Researchers aim to utilize Machine Learning to tackle this challenge, often relying on the Big-CloneBench dataset. However, it’s worth noting that BigCloneBench, originally not designed for semantic clone detection, presents several limitations that hinder its suitability as a comprehensive training dataset for this specific purpose. Furthermore, CLCDSA dataset suffers from a lack of reusable examples aligning with real-world software systems, rendering it inadequate for cross-language clone detection approaches. In this work, we present a comprehensive semantic clone and cross-language clone benchmark, GPTCloneBench by exploiting SemanticCloneBench and OpenAI’s GPT-3 model. In particular, using code fragments from SemanticCloneBench as sample inputs along with appropriate prompt engineering for GPT-3 model, we generate semantic and cross-language clones for these specific fragments and then conduct a combination of extensive manual analysis, tool-assisted filtering, functionality testing and automated validation in building the benchmark. From 79,928 clone pairs of GPT-3 output, we created a benchmark with 37,149 true semantic clone pairs, 19,288 false semantic pairs(Type-1/Type-2), and 20,770 cross-language clones across four languages (Java, C, C#, and Python). Our benchmark is 15-fold larger than SemanticCloneBench, has more functional code examples for software systems and programming language support than CLCDSA, and overcomes BigCloneBench’s qualities, quantification, and language variety limitations. GPTCloneBench is available at https://doi.org/10.5281/zenodo.8259987.

Palash Ranjan Roy (equal contribution), Ajmain Inqiad Alam (equal contribution), Farouq Al-Omari, Banani Roy, Chanchal K. Roy, Kevin A. Schneider

* Equal contribution (co-first authors)

IWSC 2023 · People's Choice Best Paper Award (IWSC 2023)
Role: Co-led (equal contribution): conception, methodology, validation, writing.
  • Code Clones
  • LLM-Generated Code
  • Prompting (Few-Shot)
  • Program Comprehension
Summary · PDF · arXiv · Slides · DOI · BibTeX
Abstract

Semantic and Cross-language code clone generation may be useful for code reuse, code comprehension, refactoring and benchmarking. OpenAI's GPT model has potential in such clone generation as GPT is used for text generation. When developers copy/paste codes from Stack Overflow (SO) or within a system, there might be inconsistent changes leading to unexpected behaviours. Similarly, if someone possesses a code snippet in a particular programming language but seeks equivalent functionality in a different language, a semantic cross-language code clone generation approach could provide valuable assistance. In this study, using SemanticCloneBench as a vehicle, we evaluated how well the GPT-3 model could help generate semantic and cross-language clone variants for a given fragment. We have comprised a diverse set of code fragments and assessed GPT-3's performance in generating code variants. Through extensive experimentation and analysis, where 9 judges spent 158 hours to validate, we investigate the model's ability to produce accurate and semantically correct variants. Our findings shed light on GPT-3's strengths in code generation, offering insights into the potential applications and challenges of using advanced language models in software development. Our quantitative analysis yields compelling results. In the realm of semantic clones, GPT-3 attains an impressive accuracy of 62.14% and 0.55 BLEU score, achieved through few-shot prompt engineering. Furthermore, the model shines in transcending linguistic confines, boasting an exceptional 91.25% accuracy in generating cross-language clones.

2022

Palash Ranjan Roy, Md. Noushin Islam, Labiba Tasfiya Jeba, Md. Adnanul Haq, Iffat Afsara Prome, Mohammad Kaykobad, Tanvir Kaykobad
ICISET 2022
  • Scientometrics
Abstract

As the number of journal issues, conferences and the overall scientific literature have been increasing at an exponential rate, it has become challenging for researchers to find appropriate and useful papers from the vast literature available to them. To solve this issue citation count, h-index, i10-index are used to rank authors. In 1998, Brin and Page introduced the algorithm PageRank which is also used in the scientific community for ranking research papers and authors. However, each of these metrics has its own drawbacks. We hypothesize that papers unveiling deeper truth are often not as well cited as those that are more challenging for a wider number of authors to assimilate and appreciate their works. So a simple count of the number of citations may fail to capture the essence of the quality of a paper. With a view to addressing this issue, we have introduced a new algorithm that also takes into account the quality of the researcher citing an article, and considers it in ranking. We have carried out experiments. While the experiments are not as comprehensive, results have been incorporated. They look promising in ranking authors and papers that are not cited too often due to difficulty in understanding them.

By theme

Each paper is listed under its themes here and in full, with links and abstract, by year above.

Code clones in the LLM era

Model merging for software engineering

Efficient, sustainable code models

Just-in-time clone refactoring

Other work

Index by research area and AI/ML topic

Every publication under each of its topics. The filter above shows the same lists.

Research areas

Software Maintenance & Evolution

Program Comprehension

Code Clones

Refactoring

Empirical Software Engineering (Empirical SE)

AI for Software Engineering (AI4SE)

Software Engineering for AI (SE4AI)

Green & Sustainable SE

Model Merging

Out-of-Distribution Generalization (OOD Generalization)

Benchmark

Tool

Scientometrics

AI/ML topics

Model Merging

Task Arithmetic (TIES, DARE)

Out-of-Distribution Generalization

Multi-Task Learning

Code Language Models

Hugging Face Tooling

Model Compression

Pruning

Quantization

Knowledge Distillation

Efficient & Green LLMs

LLM-Generated Code

Large Language Models

LLM Evaluation

Benchmarks & Datasets

Prompting

Prompting (Few-Shot)

Markdown version