{"id":22957808,"url":"https://github.com/parvezmrobin/bugsplorer-replication-package","last_synced_at":"2025-09-02T22:44:59.131Z","repository":{"id":190113159,"uuid":"667574044","full_name":"parvezmrobin/bugsplorer-replication-package","owner":"parvezmrobin","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-17T20:27:46.000Z","size":22,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T16:43:42.290Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parvezmrobin.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-17T20:26:50.000Z","updated_at":"2023-07-17T20:27:52.000Z","dependencies_parsed_at":"2023-08-23T09:26:01.684Z","dependency_job_id":null,"html_url":"https://github.com/parvezmrobin/bugsplorer-replication-package","commit_stats":null,"previous_names":["parvezmrobin/bugsplorer-replication-package"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvezmrobin%2Fbugsplorer-replication-package","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvezmrobin%2Fbugsplorer-replication-package/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvezmrobin%2Fbugsplorer-replication-package/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvezmrobin%2Fbugsplorer-replication-package/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parvezmrobin","download_url":"https://codeload.github.com/parvezmrobin/bugsplorer-replication-package/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246741185,"owners_count":20826063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-14T17:20:43.490Z","updated_at":"2025-04-02T01:46:18.348Z","avatar_url":"https://github.com/parvezmrobin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bugsplorer Replication Package\n\n## Environment Setup\n\nFirst, make sure you have CUDA 11.6 and Python 3.10 installed.\nThen, install the required packages by running the following command:\n```shell\npip install -r requirements.txt\n```\n\n## Download and Prepare the Dataset\nDownload the Defectors dataset from [here](https://zenodo.org/record/7708984#.ZEYdOXbMJD8)\nand LineDP dataset from [here](https://github.com/awsm-research/line-level-defect-prediction/tree/master/Dataset).\nPut both of them inside the `dataset` folder.\nThen, run the `preprocess_data.py` script inside the `script` folder to prepare the dataset.\n\n## Run the Experiments\n\n### Train A Model\nTo train a model, run the following command:\n```shell\npython -m src.bug_prediction.BugPredictorTrainer \\\n--model_type=roberta \\\n--config_name=huggingface/CodeBERTa-small-v1 \\\n--tokenizer_name=huggingface/CodeBERTa-small-v1 \\\n--encoder_type=line \\\n--dataset_path=dataset/defectors/line_bug_prediction_splits/random \\\n--batch_size=16 \\\n--num_epoch=20 \\\n--cache_dir=cache/roberta-defectors-line-random \\\n--checkpoint_dir=checkpoints/roberta-defectors-line-random \\\n--class_weight=100 \n```\n\n### Test the Trained Model\nTo test the trained model, run the following command:\n```shell\npython -m src.bug_prediction.BugPredictionTester \\\n--model_type=roberta \\\n--config_name=huggingface/CodeBERTa-small-v1 \\\n--tokenizer_name=huggingface/CodeBERTa-small-v1 \\\n--model_name=checkpoints/103.train-bugsplorer-linedp-line-time-w_100-gpu_2-b_16 \\\n--encoder_type=line \\\n--dataset_path=dataset/defectors/line_bug_prediction_splits/random \\\n--batch_size=16 \\\n--cache_dir=cache/roberta-defectors-line-random \\\n--checkpoint_dir=checkpoints/roberta-defectors-line-random \\\n--output_path=outputs/roberta-defectors-line-random \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparvezmrobin%2Fbugsplorer-replication-package","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparvezmrobin%2Fbugsplorer-replication-package","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparvezmrobin%2Fbugsplorer-replication-package/lists"}