Mainul Hossain
I am a Ph.D. student in Computer Science at George Mason University, where I am advised by and work as a Graduate Teaching Assistant. I research how to make AI coding agents reliable and trustworthy: giving LLM agents the project context they need to repair code, and helping developers oversee what agents produce. Working at the intersection of software engineering, human–computer interaction, and LLMs, I design agents, benchmark them at scale, and run user studies. My publications include a .
I have interned twice at MetroStar’s Innovation Lab, most recently building a retrieval-augmented generation (RAG) pipeline for the company’s in-house AI assistant. Before George Mason, I was a research assistant at the Next Generation Computing (NeC) Lab at Bangladesh University of Engineering and Technology (BUET), where I co-authored papers on survey data integrity, vehicle detection, and rail-track monitoring. I then worked as a software developer at BANBEIS (Bangladesh Bureau of Educational Information and Statistics). I hold an M.Sc. in Computer Science from George Mason University and a B.Sc. in Computer Science and Engineering from BUET.
Outside research, I have an active interest in sports, drama, and travel. I have acted in some short films. I am an amateur cricket and football player and a big basketball fan. I love discovering new places, meeting people from all walks of life, and hearing and collecting their stories: stories of life, success, and failure.
- Oct 2026: Presented in the in Munich, Germany!
- Oct 2026: Our paper (with Thomas D. LaToza) was published in the Proceedings of ASE 2026!
- Summer 2026: Returned to MetroStar’s Innovation Lab as a Software Engineering Intern, building a knowledge-base-first RAG pipeline for Sapphire, the company’s in-house AI assistant!
- Jul 2026: Released the and study data on Zenodo (open access)!
- May 2026: Earned my M.Sc. in Computer Science from George Mason University and received the Distinguished Academic Achievement Award!
- Nov 2025: Our paper on (with Md Sultanul Islam Ovi and Md Badsha Biswas) appeared at the RDM 2025 workshop at IEEE ICDM 2025 in Washington, DC!
- Aug 2025: Our paper on a using multi-sensor fusion and multi-objective optimization was published in Scientific Reports!
- Summer 2025: Joined MetroStar’s Innovation Lab as a Software Engineering Intern and built Falcon, a full-stack MVP for drone mission planning and monitoring!
- Summer 2024: Received the 2024 Summer PhD Research Award for the DesignFix project!
- Aug 2023: Started my Ph.D. in Computer Science at George Mason University and joined the Department of Computer Science as a Graduate Teaching Assistant!
- May 2023: Our paper (a mass-scale survey of 988 pilgrims) was published in Heliyon!
- Sep 2022: Joined BANBEIS (Bangladesh Bureau of Educational Information and Statistics) as a Software Developer!
- Jun 2022: Our paper on in developing countries appeared at ACM ICTD 2022 in Seattle!
- Dec 2021: Our poster on an economical long-range sensing system for real-time rail-track monitoring was named runner-up in the poster presentation at NSysS 2021 in Cox’s Bazar!
- Dec 2021: , our deep learning architecture for detecting vehicles in unstructured traffic with limited computational resources, was published at IEEE ICDM 2021!
- Aug 2021: Our paper on the integrity of human data collectors in a mass-scale Hajj survey was published in IEEE Access!
- Feb 2021: Earned my B.Sc. in Computer Science and Engineering from BUET!
- Feb 2019: Started as a Research Assistant at BUET’s Next Generation Computing (NeC) Lab!
Publications
2026
-
and Thomas D. LaToza. Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering (ASE ’26), Munich, Germany, pp. 1586–1598, 2026. [PDF] [Artifact] [Code] [VS Code extension]
2025
-
Md Sultanul Islam Ovi, , and Md Badsha Biswas. 2025 IEEE International Conference on Data Mining Workshops (ICDMW), RDM 2025 Workshop, Washington, DC, USA, pp. 1802–1811, 2025. [arXiv] [Code] [Dataset] -
Saiful Islam Salim, Adnan Quaium, Uday Kamal, Masfiqur Rahaman, , Nazmul Hasan Sakib, Tarik Reza Toha, and A. B. M. Alim Al Islam. Scientific Reports, vol. 15, article 31728, 2025.
2023
-
, Adnan Quaium, and A. B. M. Alim Al Islam. Proceedings of the Energy Conference 2023: National and Global Issues (ENCON23), BUET, Dhaka, Bangladesh, 2023. -
Adnan Quaium, Najla Abdulrahman Al-Nabhan, Masfiqur Rahaman, Saiful Islam Salim, Tarik Reza Toha, Jannatun Noor, , Nafisa Islam, Aaiyeesha Mostak, Md Shihabul Islam, Md. Masum Mushfiq, Ishrat Jahan, and A. B. M. Alim Al Islam. Heliyon, vol. 9, no. 5, article e15486, 2023.
2022
-
Saiful Islam Salim, Uday Kamal, Adnan Quaium, , Masfiqur Rahaman, Nazmul Hasan Sakib, Md Toki Tahmid, and A. B. M. Alim Al Islam. Proceedings of the 2022 International Conference on Information and Communication Technologies and Development (ICTD 2022), Seattle, WA, USA, pp. 1–9, 2022. [PDF]
2021
-
Tarik Reza Toha, Masfiqur Rahaman, Saiful Islam Salim, , Arif Mohaimin Sadri, and A. B. M. Alim Al Islam. 2021 IEEE International Conference on Data Mining (ICDM), Auckland, New Zealand, pp. 1367–1372, 2021. -
Saiful Islam Salim, Najla Abdulrahman Al-Nabhan, Masfiqur Rahaman, Nafisa Islam, Tarik Reza Toha, Jannatun Noor, Adnan Quaium, Aaiyeesha Mostak, , Md. Masum Mushfiq, and A. B. M. Alim Al Islam. IEEE Access, vol. 9, pp. 112528–112551, 2021. [PDF] -
An Economical Long-Range Sensing System for Real-Time Monitoring of Rail Tracks.
Saiful Islam Salim, Uday Kamal, Adnan Quaium, , Masfiqur Rahaman, Nazmul Hasan Sakib, and A. B. M. Alim Al Islam. Poster, NSysS 2021, Cox’s Bazar, Bangladesh, December 21–23, 2021.
Runner-Up, Poster Presentation
Under Review
-
AgentFlake: An Agentic Framework for Repairing Flaky Tests.
(co-lead author) et al. Full paper under review.
Research
My current research has three themes: reliable AI coding agents, human oversight of AI-generated code, and LLM-based program repair.
Appointments
Research Assistant
NeC is a research group led by that works on diverse topics such as computer networking, security and privacy, quantum computation, and transportation. I worked on a mass-scale survey of Hajj pilgrims, low-cost sensing and networking for real-time rail-track monitoring, and vehicle detection in unstructured traffic, work that led to papers in IEEE Access, Heliyon, ACM ICTD, IEEE ICDM, and Scientific Reports.
Recent Research
DesignFix: Context-Augmented Repair of Design Rule Violations
2024 Summer PhD Research Award
Design rules make a project’s design decisions explicit and checkable; for example, a rule can require every DTO class to have a no-argument constructor. A checker can flag a violation, but developers still have to interpret the rule, find the code that must change, and write a fix that fits the project’s conventions, which is hard in an unfamiliar codebase. I built DesignFix to close that gap inside the IDE. For each violation, it gives an LLM the rule’s description, an example from the same project that already follows the rule, and focused structural context around the violation. A two-step LLM pipeline first reasons about the repair and then extracts a structured edit, and every fix arrives with an explanation and a side-by-side diff, so nothing changes until the developer accepts it.
In 9,450 repair trials comparing seven prompt configurations, the full DesignFix workflow reached up to 90% repair success, 26 percentage points above a baseline prompt. In a controlled study I ran with 14 developers who were new to the codebase, DesignFix cut mean task time by 36% and raised correct repairs from 43% to 93%, compared with a control condition that allowed browser-based LLMs. Developers also reported significantly lower workload with DesignFix. Given the same tasks, the autonomous coding agent Cline inspected the relevant code in every task yet repaired only 3 of the 6 task types, while averaging 12.1× DesignFix’s token use. The results suggest that project-specific design intent has to be supplied to the model; it cannot be derived from the code alone.
AgentFlake: An Agentic Framework for Repairing Flaky Tests
Flaky tests pass or fail on the same code without any change, so a failing test may signal a real regression or just a false alarm, and developers lose time chasing faults that do not exist. Earlier LLM-based repair tools, such as FlakyDoctor and FlakyGuard, run the same fixed pipeline to collect context for every test. AgentFlake, which I co-lead, is the first agentic framework for repairing flaky tests: an LLM agent decides, test by test, what to inspect (test code, production code, error logs, or a repair example for the test’s flakiness category) using read-only tools, checks whether it has enough context, and only then writes a patch. Each patch is compiled and validated with a strategy specific to its flakiness category, and it is accepted only if it passes all 100 validation runs; failures go back to the agent.
We evaluated AgentFlake on 164 flaky tests from 53 open-source Java projects, spanning four flakiness categories: order-dependent, implementation-dependent, non-idempotent-outcome, and timing-dependent. It repaired 158 (96.3%), ahead of FlakyGuard (74.4%), FlakyDoctor (50.0%), and the general-purpose coding agents Claude Code (90.2%) and Codex (79.9%), at 30% lower cost and in 72% less time than FlakyGuard. The 164 tests included 20 previously unrepaired ones with no developer-written fix, and AgentFlake repaired 18 of them, which indicates that it can produce effective patches without a developer fix it could have learned from.
Developer Metacognition, Trust Calibration, and Oversight in LLM-Assisted Software Testing
How well do developers judge the tests that AI assistants write for them? In this mixed-methods study, which I designed and lead, 19 developers used LLM coding assistants (Cursor, Claude Code, and Amazon Q) to write tests and reflected on how confident they were in them. To measure the tests’ real strength, I built a mutation-testing pipeline (StrykerJS and Vitest) and ran it across all 19 participant codebases and their 3,269 test cases. Coverage turned out to be a poor guide to that strength: developers who reported 85–100% branch coverage had suites that caught only 44–82% of the injected faults (mutants), a trust-calibration gap of up to 56 points.
A reflexive thematic analysis produced seven themes on human–AI collaboration, among them that LLM-generated tests can look structurally complete while lacking logical depth, and that a coverage number can act as a psychological signal that the work is done. Automated test-smell detection (2,613 smells of 16 types) added another result: the kinds of smells in a suite predicted its mutation effectiveness better than how many smells it had. The study also produced a taxonomy of six oversight strategies, traced how they shift with task complexity, and found that developers who checked their tests in several ways calibrated their trust better, while those who relied on a single metric, such as coverage, were systematically overconfident.
Quantitative Currency Evaluation for Visually Impaired Users
Currency-recognition tools usually stop at the denomination; they ignore whether a note is too damaged to use or forged, which matters for visually impaired people in low-resource settings, where notes are often checked offline. We built a framework that handles all three questions: lightweight CNNs classify the denomination, a new Unified Currency Damage Index (UCDI) scores a note’s usability from mask loss, color distortion, and structural feature loss, and feature-based template matching detects counterfeits. Our dataset holds more than 82,000 annotated images of Bangladeshi banknotes, and the framework supports real-time, on-device inference. Its 287K-parameter CNN reached an F1 score of 0.9342, and the counterfeit detector achieved 0.99 accuracy.
Earlier Research
Real-Time Rail-Track Monitoring
Derailments are frequent in several developing countries, and preventing them requires detecting uprooted or faulty rail blocks early enough to stop an approaching train. We developed a low-cost, long-range, and highly reliable mobile multi-hop networking scheme that carries data sensed from the rail track to a train about 2,000 m away. By accounting for Fresnel’s region when placing the networking modules, we achieved a delivery ratio above 99% in experiments on a real testbed.
Analyzing Negative Experiences in Hajj Pilgrimage
Mass gatherings such as Hajj and Umrah are often riddled with crowd-related problems, so we ran a mass-scale survey of 988 pilgrims, a substantial part of it through paid human data collectors. We studied the integrity of those data collectors through iterative focus-group discussions, then combined clustering with thematic analysis of the responses to identify 21 types of negative experiences, 20 types of recommendations, and the themes that connect them.
Network Analysis of Hajj Pilgrims’ Experience of Problems
We surveyed nearly 1,000 pilgrims from diverse demographics about the problems they faced and found strong associations among those problems and the pilgrims’ demographics. A lack of hygienic washrooms, transportation difficulties, and getting lost were the most prevalent problems, and pilgrims with less education and limited English proficiency were the most affected.
Hajj Crowd Image Dataset and Vehicle Detection
While preparing a novel, diversified Hajj crowd image dataset for real-time crowd monitoring, I researched and reviewed image-similarity techniques for predicting crowd mobility from images alone instead of video streams. We carried these findings into transportation: detecting vehicles in unstructured road traffic with limited computational resources, published as DhakaNet.
Energy Scavenging for IoT in Harsh Environments
An affordable, lightweight energy-scavenging mechanism that combines solar and kinetic energy to power resource-constrained IoT devices in harsh environments, such as devices supervising rail tracks in long open areas or monitoring oil pipelines in dry deserts.
Experience
Professional
Software Engineering Intern
I worked on Sapphire, MetroStar’s in-house AI assistant. I built its retrieval-augmented generation (RAG) pipeline: Sapphire first searches MetroStar’s internal knowledge base and synthesizes what it finds, and only then draws on the model’s own reasoning and general knowledge. To keep Sapphire focused on targeted, relevant questions, I engineered its prompts and context for GPT as well as for open-weight Llama models that MetroStar runs on its own servers. I kept token use low and added guardrails so that Sapphire turns away questions that could expose sensitive company data, as well as off-topic requests such as planning a vacation.
Software Engineering Intern
Falcon is a full-stack MVP for planning and monitoring drone missions, and I built it end to end. With it, an operator selects a drone, starts from a mission template, plans waypoints on a map, and then runs the mission while following it live. On the front end, I designed modular, reusable form components for takeoff, landing, waypoint, and drone settings, with pop-up and modal dialogs for working through checklists and configuring actions. On the back end, I built the database and services that create and track missions and propagate mission data across components in real time. I also architected and refactored the component and service structure so the product can scale to new drone operations.
Software Developer
The BANBEIS Software Development Project is a government-funded project of the Bangladesh Bureau of Educational Information and Statistics. Supervised by the Department of CSE at BUET, it develops and maintains software for the various phases of Bangladesh’s public examinations. I worked on its web-based examination processing system. In the OMR processing team, I used computer vision to detect handwritten digits on OMR sheets and helped build a system that finds and corrects anomalies caused by human error or natural factors, so that the result-processing team receives accurate data. I also migrated examination records to a centralized server.
Teaching
Graduate Teaching Assistant
I deliver lectures, lead lab sessions, hold office hours, and grade assignments across three courses. Two are undergraduate courses: CS 211 (Object-Oriented Programming), which covers classes, interfaces, inheritance, and polymorphism; and CS 262 (Introduction to Low-Level Programming), which introduces C and operating-system concepts in UNIX. The third, CS 550 (Database Systems), is a graduate course on data modeling, SQL, and database design.
Skills
- Languages
- Python, Java, TypeScript/JavaScript, C++, SQL
- LLMs
- RAG, Prompt & Context Engineering, LLM Agents, Tool Calling, Guardrails, LLM Evaluation, SFT, DPO
- ML/AI
- PyTorch, TensorFlow, Hugging Face Transformers, LoRA/PEFT, Scikit-learn, NLP, Computer Vision
- Web/Backend
- React, Node.js, Django, FastAPI, Firebase, PostgreSQL, Redis, Celery
- Tools
- Docker, Git, AWS, OpenAI API, REST APIs, StrykerJS, Vitest
- Data Analysis
- Pandas, NumPy, Matplotlib, Jupyter, Statistical Analysis (paired t-test, Wilcoxon, McNemar)
- Research
- Mixed-Methods Study Design, Qualitative Coding, Thematic Analysis, Mutation Testing, User Studies
Projects
Recent
Bulk Invoice Download and Export (Stripe App)
A published Stripe Marketplace app that downloads and exports invoice PDFs and credit notes in bulk with one click.
STRIP: Supervised Training with RL for Irrelevant Prompt Removal in Math Reasoning
A two-phase framework that trains an LLM to remove irrelevant sentences from noisy math word problems, producing a cleaned prompt in one inference call. Built on Llama 2 7B with LoRA adapters and 8-bit quantization, it was trained on GSM-IC with supervised fine-tuning (SFT) and then Direct Preference Optimization (DPO), reaching 0.9927 filtering F1 with SFT and 0.9894 with DPO. I designed its multi-component reward function with asymmetric penalties.
KeyNotter: A Teleprompter for People with Public Speaking Anxiety
A desktop teleprompter that lets people with public speaking anxiety present from their script instead of memorizing it. Built with Electron, it shows the script in an always-on-top overlay near the camera, loads .txt and .md files, and has hotkeys for play/pause, speed, and font size.
Earlier
- EmblemBangladesh: A web application that creates Snapchat-like filters of Bangladeshi cricketers to generate a collage photo of the user and their favorite cricketer. HTML/CSS/JS, Bootstrap, PHP/MySQL. [Video] [Code]
- TigerCam: An Android application hosting Snapchat-like filters of Bangladesh cricket team players to generate a collage photo of the user and their favorite player. [Video]
- BUET Automobile Club: An interactive web application for the BUET Automobile Club. Members assign and receive task instructions, communicate with each other, and schedule events and meetings; non-members can write blogs and raise issues about club events. HTML/CSS/JS, Bootstrap, PHP/MySQL. [Code]
- NerdTube: A video streaming platform built on the YouTube API that filters out non-educational videos. HTML/CSS/JS, Bootstrap. [Code]
- GlobeeBD: An e-commerce website for buying and selling medical equipment and products. HTML/CSS/JS, Bootstrap, PHP/MySQL. [Code]
- ComeFlyWithMe: An interactive web application where users upload pictures of their favorite places with descriptions for other users to see.
- Project iSee: An automated door-lock system built with an Arduino, a weight sensor, a camera module, and a Wi-Fi module. When someone stands near the main gate, the owner’s phone receives a notification with their picture, and the owner can open the door or reject the visitor from the phone. [Video]
- POSMaster: GUI-based point-of-sale software with standard security protocols, fault-tolerance schemes, and efficient database transaction algorithms.
- Magic Hand: A glove built on an ATmega32 microcontroller with a flex sensor and a Bluetooth module that lets the wearer switch a room’s light or fan on and off with hand gestures.
- 4-bit PC: A complete PC with 33 working instructions designed in Proteus 8 Professional, with an 8-bit address bus, a 4-bit data bus, and a microprogrammed control unit whose control words were stored in a series of 5 ROMs.
Education
Degrees
Ph.D. in Computer Science
Concentration: HCI, Software Engineering
GPA: 3.95/4.00
Expected graduation: May 2028
M.Sc. in Computer Science
GPA: 3.95/4.00
Distinguished Academic Achievement Award
B.Sc. in Computer Science and Engineering
GPA: 3.35/4.00
Major group: Artificial Intelligence
Thesis: Intrinsic Exploration of Diverse Vibration Signals Generated by a Train Over Railway Tracks for Detection of Missing Rail Blocks and An Approach to Harvest Energy Required
Higher Secondary Certificate (HSC)
GPA: 5.00/5.00
Secondary School Certificate (SSC)
GPA: 5.00/5.00