From a3f19971913af31616e6a8764d4c9e0c871e2dad Mon Sep 17 00:00:00 2001 From: islem-esi Date: Wed, 10 Jul 2024 15:01:25 +0200 Subject: [PATCH 1/7] added instruction on setting up the system before starting the installation process + fixed bug in bug.py:info (Python was complaining about backslash in f-string) --- README.md | 50 +++++++++++++++++++++++++++++++++++--------------- gitbug/bug.py | 4 ++-- 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 0999345..58cf895 100644 --- a/README.md +++ b/README.md @@ -7,25 +7,45 @@ GitBug-Java is a reproducible Java benchmark of recent bugs. ## Setup GitBug-Java Requirements: -- Python -- Poetry -- Docker +- Python (Recommended 3.11) +- Poetry (Recommended 1.8 and higher) +- Docker (v20 or higher) +- If you are on Ubuntu/Debian, choose a system with GLIBC 2.32 or 2.34 as some of the dependencies require these versions(A docker image wouldn't be suitable as it would require DinD). + + For example you can create a virtual machine of ubuntu 21.10 (glibc 2.32). Here is a quick setup of an ubuntu VM: + - Install multipass (allows to quickly create ubuntu VMs and works on Linux/Mac/Windows). Follow instructions here: https://multipass.run/docs/install-multipass. + - create an ubuntu image (e.g, 280G in disk space, 16G in memory and 2 cpus): + ```bash + multipass launch 21.10 --disk 280G --memory 16G --cpus 2 + ``` + - login the newly created VM + ```bash + multipass shell VM-NAME-PRINTED-LAST-STEP + ``` + - install docker within the image and the user to the docker group + +Once the above requirements are satisfied within your system or the created VM machine, clone this repository and execute the following steps: 1. Setup Python environment -```bash -poetry shell -poetry install --no-root -``` + ```bash + poetry shell + poetry install --no-root + ``` -2. Add GitBug-Java and custom Act version to path -```bash -export PATH="$(pwd):$(pwd)/bin:$PATH" -``` + **Note:** Poetry shell will attempt to create a new virtual environement. + However, if you are already inside a virtual environement, poetry will use the that environement. + In such case, the subsequent commands would only work with a Python3.11 environement. -3. Run Setup (Installs Docker Image ~50GiB, downloads required dependencies ~80GiB) -```bash -gitbug-java setup -``` +2. Add GitBug-Java and custom Act version to path + ```bash + export PATH="$(pwd):$(pwd)/bin:$PATH" + ``` + **Note:** The above command needs to be executed on every new shell instance + +3. Run Setup (Installs Docker Image ~50GiB, downloads required dependencies ~80GiB).The downloadable data size is around 130GB. However, after unzipping files, the space taken would go up to 240GB (it will go down after deleting zipped files). + ```bash + gitbug-java setup + ``` **NOTE: Ensure that all `gitbug-java` commands are executed without using `sudo` to guarantee correct functionality.** diff --git a/gitbug/bug.py b/gitbug/bug.py index c1aab15..136afbf 100644 --- a/gitbug/bug.py +++ b/gitbug/bug.py @@ -338,8 +338,8 @@ def info(self) -> str: ``` ### Failing Tests -{"".join(f"- {test['classname']}#{test['name']}\n\t- {test["results"][0]['type']}\n\t- {test["results"][0]['message']}" for test in failing_tests)} -""" +""" + "\n".join(f"- {test['classname']}#{test['name']}\n\t- {test['results'][0]['type']}\n\t- {test['results'][0]['message']}" for test in failing_tests) + def __str__(self) -> str: return self.bid From b90802bd96fb9148714f6e8de636f145080dfc3c Mon Sep 17 00:00:00 2001 From: Nuno Saavedra <32967989+Nfsaavedra@users.noreply.github.com> Date: Wed, 10 Jul 2024 18:35:42 +0100 Subject: [PATCH 2/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 58cf895..1e5f72c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Requirements: - Python (Recommended 3.11) - Poetry (Recommended 1.8 and higher) - Docker (v20 or higher) -- If you are on Ubuntu/Debian, choose a system with GLIBC 2.32 or 2.34 as some of the dependencies require these versions(A docker image wouldn't be suitable as it would require DinD). +- If you are on Ubuntu/Debian, choose a system with GLIBC 2.32 or 2.34 as some of the dependencies require these versions (A docker image wouldn't be suitable as it would require DinD). For example you can create a virtual machine of ubuntu 21.10 (glibc 2.32). Here is a quick setup of an ubuntu VM: - Install multipass (allows to quickly create ubuntu VMs and works on Linux/Mac/Windows). Follow instructions here: https://multipass.run/docs/install-multipass. From 04d484996351aeb7df3be533b759278e9d94f096 Mon Sep 17 00:00:00 2001 From: Nuno Saavedra <32967989+Nfsaavedra@users.noreply.github.com> Date: Wed, 10 Jul 2024 18:35:49 +0100 Subject: [PATCH 3/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1e5f72c..2bd8ffa 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Requirements: ```bash multipass shell VM-NAME-PRINTED-LAST-STEP ``` - - install docker within the image and the user to the docker group + - install docker within the image and add the user to the docker group Once the above requirements are satisfied within your system or the created VM machine, clone this repository and execute the following steps: From 30a54294f69c3b466c4b3bf4dfdcd9ffd1e7baec Mon Sep 17 00:00:00 2001 From: Nuno Saavedra <32967989+Nfsaavedra@users.noreply.github.com> Date: Wed, 10 Jul 2024 18:35:56 +0100 Subject: [PATCH 4/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2bd8ffa..a785029 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Requirements: ``` - install docker within the image and add the user to the docker group -Once the above requirements are satisfied within your system or the created VM machine, clone this repository and execute the following steps: +Once the above requirements are satisfied within your system or the VM machine is created, clone this repository and execute the following steps: 1. Setup Python environment ```bash From 023f5a9a6b54201219bbd49f80bfc65bff8e3331 Mon Sep 17 00:00:00 2001 From: Nuno Saavedra <32967989+Nfsaavedra@users.noreply.github.com> Date: Wed, 10 Jul 2024 18:36:04 +0100 Subject: [PATCH 5/7] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a785029..a75294b 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,9 @@ Once the above requirements are satisfied within your system or the VM machine i poetry install --no-root ``` - **Note:** Poetry shell will attempt to create a new virtual environement. - However, if you are already inside a virtual environement, poetry will use the that environement. - In such case, the subsequent commands would only work with a Python3.11 environement. + **Note:** Poetry shell will attempt to create a new virtual environment. + However, if you are already inside a virtual environment, poetry will use the that environment. + In such case, the subsequent commands would only work with a Python3.11 environment. 2. Add GitBug-Java and custom Act version to path ```bash From bc96e2e4559426c92eebb98585fa5c6fdcf051fc Mon Sep 17 00:00:00 2001 From: Nuno Saavedra <32967989+Nfsaavedra@users.noreply.github.com> Date: Wed, 10 Jul 2024 18:36:16 +0100 Subject: [PATCH 6/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a75294b..22c3ee7 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Once the above requirements are satisfied within your system or the VM machine i ``` **Note:** The above command needs to be executed on every new shell instance -3. Run Setup (Installs Docker Image ~50GiB, downloads required dependencies ~80GiB).The downloadable data size is around 130GB. However, after unzipping files, the space taken would go up to 240GB (it will go down after deleting zipped files). +3. Run Setup (Installs Docker Image ~50GiB, downloads required dependencies ~80GiB). The downloadable data size is around 130GB. However, after unzipping files, the space taken goes up to 240GB (it goes down after deleting the zipped files). ```bash gitbug-java setup ``` From 328ba82afadcf0db5bdfc479025cb31407b015d6 Mon Sep 17 00:00:00 2001 From: Nuno Saavedra <32967989+Nfsaavedra@users.noreply.github.com> Date: Wed, 10 Jul 2024 18:38:07 +0100 Subject: [PATCH 7/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 22c3ee7..e5880ac 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Requirements: - Python (Recommended 3.11) - Poetry (Recommended 1.8 and higher) - Docker (v20 or higher) -- If you are on Ubuntu/Debian, choose a system with GLIBC 2.32 or 2.34 as some of the dependencies require these versions (A docker image wouldn't be suitable as it would require DinD). +- If you are on Ubuntu/Debian, choose a system with GLIBC 2.32 or 2.34 as some of the dependencies require these versions (A docker image would not be suitable as it would require DinD). For example you can create a virtual machine of ubuntu 21.10 (glibc 2.32). Here is a quick setup of an ubuntu VM: - Install multipass (allows to quickly create ubuntu VMs and works on Linux/Mac/Windows). Follow instructions here: https://multipass.run/docs/install-multipass.