<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Enhanced Code Comment Relevance Classification Using Domain-Adaptive CodeBERT with Masked Language Modeling</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>L. Simiyon Vinscent Samuel</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sundareswaran Rajaguru</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vijayaraaghavan K. S.</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>A. Vijayalakshmi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science and Engineering, Sri Sivasubramaniya Nadar College of Engineering</institution>
          ,
          <addr-line>Chennai</addr-line>
          ,
          <country country="IN">India</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2026</year>
      </pub-date>
      <abstract>
        <p>We evaluate domain-adaptive pre-training of CodeBERT using masked language modeling (MLM) for binary codecomment relevance classification in the IRSE shared task. We compare CodeBERT+MLM against TF-IDF baselines and study the efect of synthetic and silver-standard augmentation. CodeBERT+MLM attains F 1=0.9193 on the original test split versus 0.7067 for the best TF-IDF baseline (logistic regression). Augmentation (combined data) produces a marginal change (F1=0.9166), highlighting that augmentation quality - not quantity - drives gains. We provide implementation details and practical recommendations for applying domain-adaptive pre-training in software engineering tasks.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;code comment classification</kwd>
        <kwd>CodeBERT</kwd>
        <kwd>domain-adaptive pre-training</kwd>
        <kwd>masked language modeling</kwd>
        <kwd>data augmentation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>2. Related work (condensed)</title>
      <p>
        Transformers adapted for code, such as CodeBERT, enable joint code–text representations useful for
search and summarization [
        <xref ref-type="bibr" rid="ref5 ref8">5, 8</xref>
        ]. DAPT/TAPT improves downstream task fit by continued MLM on
domain/task data [
        <xref ref-type="bibr" rid="ref11 ref7">7, 11</xref>
        ]. Prior IRSE work shows TF–IDF models can be competitive for comment
relevance, motivating careful empirical comparison [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Data augmentation (rule-based or model-based)
helps low-resource settings but can introduce label noise in domain-specific tasks lacking automatic
verification [
        <xref ref-type="bibr" rid="ref12">12, 13</xref>
        ]. [20, 21, 22] have similar ideas for the task.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Datasets and experimental setup</title>
      <sec id="sec-3-1">
        <title>3.1. Corpora and silver-standard creation</title>
        <p>We use the IRSE/FIRE seed dataset (11,452 code–comment pairs extracted from C projects). After
cleaning malformed or unlabeled entries we obtain 8,326 training samples (“Original”). To expand data
we used two augmentation sources:
1. Rule-based synthetic: 500 examples generated by templated paraphrasing (synonym
substitution, sentence restructuring) derived from existing comments to increase stylistic diversity while
preserving labels.
2. HumanEval-derived silver standard: 1,640 examples extracted from human-eval.jsonl. We
parsed each example to extract function docstrings and surrounding comments (mostly Python),
then used an OpenRouter “fast-grok” free model as a preprocessing / normalization step to:
• split function-level docstrings into candidate comment sentences,
• canonicalize parameter and return descriptions,
• filter out non-descriptive or placeholder docstrings (e.g., single-word comments).
The normalized candidates were programmatically labeled using heuristics (presence of
functionlevel description, param/return mentions, and overlap with code identifiers). These heuristics
produce silver-standard labels (higher noise than human annotation but useful signal).</p>
        <p>We then combined the C-based Original training set with Python-derived silver-standard and
rulebased synthetic examples to form the Combined training set (8,826 samples). Table 1 summarizes
composition.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Preprocessing and labeling notes</title>
        <p>Code and comment texts were concatenated with a separator token. Tokenization uses CodeBERT’s
fast BPE tokenizer with a maximum sequence length of 512. For silver-standard examples we applied
two lightweight filters: (1) minimum token length (3 words) and (2) presence of at least one verb or
function-related identifier, to reduce trivial or metadata-only docstrings. The silver-standard labeling
heuristics prioritize precision (favoring conservative "useful" labels) but inevitably inject label noise;
we therefore treat these examples as complementary rather than authoritative.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Models and training</title>
        <p>We continued MLM from microsoft/codebert-base-mlm on the Original (C) training corpus prior
to supervised fine-tuning (15% mask, batch size 16, lr 5e-5, max 7 epochs, AdamW). After DAPT we
replace the MLM head with a classification layer (dropout 0.1) and fine-tune on the binary task (batch
size 32, lr 2e-5, up to 10 epochs, linear warmup 10% steps). Baselines use TF–IDF features with: logistic
regression (L2), linear SVM, multinomial NB, and random forest (100 trees). Baselines use 10-fold CV
for hyperparameter tuning.</p>
      </sec>
      <sec id="sec-3-4">
        <title>3.4. Evaluation</title>
        <p>Metrics: accuracy, precision, recall, weighted F1. Experimental configurations: (A) train Original → test
Original; (B) train Combined → test Combined; (C) Original → Combined; (D) Combined → Original.
Results are reported on held-out test splits not used during validation.</p>
      </sec>
      <sec id="sec-3-5">
        <title>3.5. Why MLM trained on C still helps after mixing Python silver data</title>
        <p>Although silver examples derive from Python docstrings, the MLM DAPT step was performed primarily
on C code and comments (Original corpus). Two reasons explain why DAPT remained efective after
adding Python silver examples for classification:
1. Cross-language lexical overlap: many identifier names, API-style phrases, and comment
conventions (e.g., “returns”, “params”, “compute”) are shared across languages; the C-trained
MLM learns these patterns and applies them when encoding Python-derived comments.
2. Representation robustness: MLM adapts CodeBERT’s token and contextual embeddings
to code/comment distributions (punctuation, identifier tokens, inline code snippets). These
representational improvements transfer to mixed-language fine-tuning because the downstream
classifier primarily relies on semantic patterns rather than language-specific syntax.</p>
        <p>Empirically, mixing Python silver data produced only a slight drop in peak F1 (0.9193 → 0.9166),
indicating that distributional mismatch is limited and quality/noise in silver labels is the larger contributor
to performance change.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Results</title>
      <sec id="sec-4-1">
        <title>4.1. CodeBERT+MLM performance</title>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Baselines and dynamics</title>
      </sec>
      <sec id="sec-4-3">
        <title>4.3. Comparison with previous IRSE / FIRE submissions</title>
        <p>We compare our best performance against published IRSE-relevant works (table below uses provided
summary metadata). This contextualizes gains from DAPT+MLM.</p>
        <p>Our CodeBERT+MLM result (F1=0.9193) exceeds many classical/ML+LLM-augmented submissions
while remaining below reported very large LLM one-of results (T7-9/T7-10) that use generative LMs
as primary models. The comparison suggests DAPT is a practical and efective middle ground: much
better than TF–IDF baselines and less resource-intensive than training or prompting very large LLMs
end-to-end.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Discussion</title>
      <p>Domain-adaptive MLM significantly improves CodeBERT representations for comment relevance.
Crossevaluation shows training on Original and testing on Combined drops F1 by only 0.52pp, indicating
robust transfer. The small degradation with augmentation confirms that label quality and distribution
alignment matter: silver-standard Python-derived examples add vocabulary and diversity, but their
programmatic labels and stylistic diferences introduce noise that slightly ofsets gains.</p>
      <p>Limitations: single-language (C) focus in DAPT, binary relevance label space, and the computational
cost for continued pretraining. Future work: multi-task DAPT, curriculum strategies that gradually
introduce silver examples, active human verification of synthetic examples, and interpretability analyses
to surface tokens driving decisions.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion</title>
      <p>We show CodeBERT with domain-adaptive MLM attains strong results on comment relevance
classification, outperforming TF–IDF baselines by a wide margin. Silver-standard augmentation from
HumanEval (processed via OpenRouter fast-grok + heuristics) provides additional data but must be
quality controlled to benefit high-capacity transformers. DAPT is a practical, resource-eficient strategy
to improve specialized SE NLP tasks.</p>
    </sec>
    <sec id="sec-7">
      <title>Declaration on Generative AI</title>
      <p>In the course of preparing this manuscript, the author(s) employed the generative AI tool ChatGPT. Its
use was limited to performing checks for grammar and spelling. Following this, the author(s) conducted
a thorough review and revision of the text and assume full responsibility for the final published content.
[13] Feng, S.Y., et al.: A survey of data augmentation approaches for NLP. In: ACL Findings, pp. 968–988
(2021). https://doi.org/10.18653/v1/2021.findings-acl.84
[14] Majumdar, S., et al.: Overview of the Information Retrieval in Software Engineering Track at FIRE
2023. In: CEUR Workshop Proceedings, vol. 3681 (2023). https://ceur-ws.org/Vol-3681/T7-1.pdf
[15] Arumugam, R., Deborah, A.: Enhancing binary code comment quality classification: Integrating
generative AI for improved accuracy. In: CEUR Workshop Proceedings, vol. 3681 (2023). https:
//ceur-ws.org/Vol-3681/T7-6.pdf
[16] Binary classification of source code comments using machine learning. In: CEUR Workshop</p>
      <p>Proceedings, vol. 3681 (2023). https://ceur-ws.org/Vol-3681/T7-7.pdf
[17] Majumdar, S., Deshpande, A., Das, P.P., Chakrabarti, P.P.: Comprehending C Codes with LLMs:
Efective Comment Generation through Retrieval and Reasoning. Pattern Recognition Letters
(2025). Elsevier.
[18] Paul, S., Majumdar, S., Shah, R., Das, S., Ghosh, M., Ganguly, D., Calikli, G., Sanyal, D., Das, P.P.,
Clough, P.D., et al.: Overview of the “Information Retrieval in Software Engineering”(IRSE) track
at Forum for Information Retrieval 2024. In: Proceedings of the 16th Annual Meeting of the Forum
for Information Retrieval Evaluation, pp. 18–21 (2024).
[19] Paul, S., Majumdar, S., Bandyopadhyay, A., Dave, B., Chattopadhyay, S., Das, P., Clough, P.D.,
Majumder, P.: Eficiency of Large Language Models to scale up Ground Truth: Overview of the
IRSE Track at Forum for Information Retrieval 2023. In: Proceedings of the 15th Annual Meeting
of the Forum for Information Retrieval Evaluation, pp. 16–18 (2023).
[20] A. Deshpande, A. Maji, D. Mondol, P. P. Das, P. D. Clough, and S. Majumdar, “The Code–LLM
Handshake: Smarter Maintenance Through AI,” in Proceedings of the 17th Annual Meeting of the
Forum for Information Retrieval Evaluation, pp. 9–12, 2025.
[21] A. Mitra, S. Majumdar, A. Mukhopadhyay, P. P. Das, P. D. Clough, and P. P. Chakrabarti,
“Operationalizing Large Language Models with Design-Aware Contexts for Code Comment Generation,”
arXiv preprint arXiv:2510.22338, 2025.
[22] S. Majumdar and P. P. Das, “Smart Knowledge Transfer using Google-like Search,” arXiv preprint
arXiv:2308.06653, 2023.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Rani</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Panichella</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leuenberger</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghafari</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nierstrasz</surname>
            ,
            <given-names>O.:</given-names>
          </string-name>
          <article-title>A decade of code comment quality assessment: A systematic literature review</article-title>
          .
          <source>J. Syst. Softw</source>
          .
          <volume>196</volume>
          ,
          <issue>111515</issue>
          (
          <year>2023</year>
          ). https://doi. org/10.1016/j.jss.
          <year>2022</year>
          .111515
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Majumdar</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liang</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ripley</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mody</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dalal</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Automated evaluation of comments to aid software maintenance</article-title>
          .
          <source>Empir. Softw. Eng</source>
          .
          <volume>27</volume>
          (
          <issue>5</issue>
          ) (
          <year>2022</year>
          ). https://doi.org/10.1007/ s10664-022-10171-5
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <article-title>[3] Forum for Information Retrieval Evaluation (FIRE)</article-title>
          . https://fire.irsi.org.in (
          <year>2024</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Majumdar</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paul</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paul</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bandyopadhyay</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chattopadhyay</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Das</surname>
            ,
            <given-names>P.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Clough</surname>
            ,
            <given-names>P.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Majumder</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Generative AI for software metadata: Overview of the Information Retrieval in Software Engineering Track at FIRE 2023</article-title>
          . arXiv:
          <volume>2311</volume>
          .03374 (
          <year>2023</year>
          ). https://arxiv.org/abs/2311.03374
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Feng</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tang</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Duan</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Feng</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gong</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shou</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Qin</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jiang</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhou</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>CodeBERT: A pre-trained model for programming and natural languages</article-title>
          .
          <source>In: Findings of EMNLP</source>
          , pp.
          <fpage>1536</fpage>
          -
          <lpage>1547</lpage>
          (
          <year>2020</year>
          ). https://doi.org/10.18653/v1/
          <year>2020</year>
          .findings-emnlp.
          <fpage>139</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Basu</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sruthi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Identification of the relevance of comments in codes using bag of words and transformer based models</article-title>
          .
          <source>arXiv:2308.06144</source>
          (
          <year>2023</year>
          ). https://arxiv.org/abs/2308.06144
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Gururangan</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Marasović</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Swayamdipta</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lo</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Beltagy</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Downey</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Smith</surname>
            ,
            <given-names>N.A.</given-names>
          </string-name>
          :
          <article-title>Don't stop pretraining: Adapt language models to domains and tasks</article-title>
          .
          <source>In: Proceedings of ACL</source>
          , pp.
          <fpage>8342</fpage>
          -
          <lpage>8360</lpage>
          (
          <year>2020</year>
          ). https://doi.org/10.18653/v1/
          <year>2020</year>
          .acl-main.
          <fpage>740</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bissyandé</surname>
            ,
            <given-names>T.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yoo</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Le Traon</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Better exploiting CodeBERT to support source code-related tasks</article-title>
          .
          <source>In: ACM International Conference on Mining Software Repositories (MSR)</source>
          , pp.
          <fpage>545</fpage>
          -
          <lpage>549</lpage>
          (
          <year>2022</year>
          ). https://doi.org/10.1145/3545258.3545260
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Mohammadkhani</surname>
            ,
            <given-names>A.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Panichella</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsa</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Explaining transformer-based code models: How do they learn code syntax and semantics?</article-title>
          <source>In: IEEE International Conference on Software Maintenance and Evolution (ICSME)</source>
          , pp.
          <fpage>519</fpage>
          -
          <lpage>523</lpage>
          (
          <year>2022</year>
          ). https://doi.org/10.1109/ICSME58945.
          <year>2022</year>
          . 00058
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          , et al.:
          <article-title>Enhancing source code classification efectiveness via prompt engineering</article-title>
          .
          <source>Nat. Sci. Rep</source>
          .
          <volume>14</volume>
          ,
          <issue>69402</issue>
          (
          <year>2024</year>
          ). https://doi.org/10.1038/s41598-024-69402-7
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Park</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Subset selection for domain adaptive pre-training of language model</article-title>
          .
          <source>Nat. Sci. Rep</source>
          .
          <volume>15</volume>
          ,
          <issue>94085</issue>
          (
          <year>2025</year>
          ). https://doi.org/10.1038/s41598-025-94085-z
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zheng</surname>
            ,
            <given-names>Q.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yang</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gao</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Synthetic data generation with large language models for text classification</article-title>
          .
          <source>arXiv:2310.11467</source>
          (
          <year>2023</year>
          ). https://arxiv.org/abs/2310.11467
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>