Downloads · 30 days
0
CARLCCI-repo/CARL-CCI
CARL-CCI is a text classification model from CARLCCI-repo. Use it when you need a label for a piece of text.
Code repository for the paper Larger Is Not Always Better: Leveraging Structured Code Diffs for Comment Inconsistency Detection
Downloads · 30 days
0
Access
Public
Updated Nov 18, 2025
Repo size
711 MB
Likes
0
Public
Click a slice to open those files.
.json638 MB · 100%
From the Hugging Face model README
Code repository for the paper Larger Is Not Always Better: Leveraging Structured Code Diffs for Comment Inconsistency Detection
CARCCI consists of two main components:
Diff Representation Formulator:
Uses difflib along with additional heuristics to transform raw code changes into structured diff segments, enabling the model to better capture semantic modifications.
Activity-Aware Representation Learning for CCI:
A CodeT5p-based encoder that learns joint representations of code, comments, and structured diffs to detect code–comment inconsistency.
This project uses two datasets: CCIBench and JITData.
Each dataset contains three folders — Return, Summary, and Param — which store the original unprocessed data.
The script extractStructuredDiff.py serves as the diff constructor.
It reads data from these three folders, computes structured code diffs, and produces the final JSON dataset used for training and evaluation.
CARCCI provides two model types, as defined in the configuration:
Full Model (carlcci_model)
The complete three-stream architecture that encodes:
Ablation Model (carlcci_ablation_no_combo)
A reduced two-stream variant that removes the diff-based combo input and uses multi-head attention between code and comment representations.
With the default configuration, the entire CARCCI pipeline can be executed end-to-end as follows:
Generate structured diff–annotated data from the original dataset folders (Return, Summary, Param) in CCIBench or JITData:
python extractStructuredDiff.py
This will automatically load the constructed JSON dataset, initialize the full CARCCI model, and begin training with the default settings in config.py:
python train.py
To replicate the ablation results, run training with the following configuration:
python train.py \
--model_type carlcci_ablation_no_combo \
--alpha_neg_push 1 \
--warmup_epochs_contrast 2 \
--original_positive_loss \
--contrast_temp 0.09