Professional Experience

  • Present 2020

    Senior Lecturer

    Department of Computer science & Engineering, University of Moratuwa,
    Sri Lanka

  • 2021 2020

    Research Fellow

    LIRNEasia,
    Sri Lanka

  • 2020 2014

    Graduate Research/Teaching Fellow

    University of Oregon, Department of Computer and Information Science,
    USA.

  • 2018 2018

    Givens Associate

    Argonne National Laboratory,
    USA.

  • 2020 2011

    Lecturer

    Department of Computer science & Engineering, University of Moratuwa,
    Sri Lanka

  • 2014 2013

    Researcher

    LIRNEasia,
    Sri Lanka

  • 2014 2013

    Visiting Lecturer

    Northshore College of Business and Technology,
    Sri Lanka

Education

  • Ph.D. 2020

    Ph.D. in Computer & Information Science

    University of Oregon, USA

  • MS 2016

    MS in Computer & Information Science

    University of Oregon, USA

  • BSc2011

    B.Sc Engineering (Hons)in Computer Science & Engineering

    University of Moratuwa, Sri Lanka

Featured Research

Generating Natural Language Explanations for Automated Program Repair Generated Patches


H. Sankaja, R. Sandeeptha, R. Ranasingha, S. Wickramanayake, and N. de Silva

International Conference of Sabaragamuwa University of Sri Lanka, 2025, pp. 61,

Automated Program Repair (APR) has emerged as a transformative technology in software engineering, promising to reduce debugging time and improve software reliability through automatic bug fixing. However, developers remain hesitant to adopt APR tools due to a lack of transparency in generated patches, creating a critical gap between technical capability and practical adoption. This study aimed to develop FIXPLAIN, an explainable APR framework that simultaneously generates code patches and human-readable natural language explanations using intermediate decoder embeddings. A dataset of 34,640 Java bug-fix pairs was curated from the MegaDiff corpus, and explanations were generated using GPT-4o and Claude with consensus-based filtering for quality assurance. FIXPLAIN employs a lightweight adapter mechanism with cross-attention and gating to integrate APR model embeddings into explanation generation, using LoRA-based fine-tuning while preserving repair model quality. Three evaluation approaches were used for validation: automated metrics (BLEU, ROUGE, METEOR), comparison with baseline models (CodeT5, LLaMA-Instruct), and human evaluation with professional Java developers. The framework significantly outperformed baseline models across all automated metrics, achieving BLEU scores of 17.98 compared to 3.33 for LLaMA-Instruct and METEOR scores of 0.36. Human evaluation with ten professional Java developers confirmed that FIXPLAIN explanations substantially improve developer trust, perceived patch correctness, and understanding of automated fixes. The explanations effectively clarify bug root causes and repair logic, with particular effectiveness for complex logic errors where traditional code comparison provides insufficient insight. FIXPLAIN successfully bridges the gap between automated program repair capabilities and developer acceptance through transparent, trustworthy explanations. The parameter-efficient design enables practical deployment while maintaining repair quality, opening new avenues for multi-task APR systems and developer-centric tooling that could transform automated program repair integration in software development workflows.