Skip to content

Replication package for Zero-Shot Cross-Domain Code Search without Fine-Tuning, FSE 2025.

Notifications You must be signed in to change notification settings

ZJU-CTAG/CodeBridge

Repository files navigation

CodeBridge

Replication package for Zero-Shot Cross-Domain Code Search without Fine-Tuning, FSE 2025.

Project Structure

-data # datasets and generated data
    -cross-domain 
    -rapid
-models # base models
-scripts # scripts for data preprocessing and evaluation

Model

We use the following models:

Environment

  • python==3.8.18
  • torch==2.0.1
  • You can install the dependencies by:
pip install -r requirements.txt

Evaluation in Cross-Domain Setting

  • We have provided the generated files in data/. For instructions on generating the code and comments using DeepSeek-Coder-1.3b-Instruct, please refer to generate_code.py and generate_comment.py.
  • To reproduce the result, start by obtaining the embeddings from various models. The embeddings will be stored in the folder vectors. You can modify the dataset name in scripts/get_embedding.sh to get different embeddings.
bash scripts/get_embedding.sh
  • Evaluate the results.
bash scripts/eval.sh

Evaluation in RAPID Setting

  • Get embeddings.
bash scripts/get_embedding_rapid.sh
  • Evaluate the results.
bash scripts/eval_rapid.sh

About

Replication package for Zero-Shot Cross-Domain Code Search without Fine-Tuning, FSE 2025.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published