From 67e2afcb59b6db49ac0aed05a28c1741d7ef3fad Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Sun, 10 Mar 2024 01:17:02 +0000 Subject: [PATCH] Add more metadata and disclaimer --- DISCLAIMER | 18 ++++++++++++++++++ experiments/init_experiment.py | 5 ++++- experiments/metadata/doom/am_map_1.json | 1 + experiments/metadata/doom/am_map_2.json | 1 + experiments/metadata/doom/am_map_3.json | 2 +- experiments/metadata/doom/am_map_4.json | 1 + experiments/metadata/doom/am_map_5.json | 1 + experiments/metadata/doom/am_map_6.json | 2 ++ experiments/metadata/doom/project.json | 4 +++- 9 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 DISCLAIMER diff --git a/DISCLAIMER b/DISCLAIMER new file mode 100644 index 0000000..157fdfd --- /dev/null +++ b/DISCLAIMER @@ -0,0 +1,18 @@ +- The experiments done in this project utilize code snippets from many open-source projects. +- The following concerns apply: + 1. **License Compliance:** The extracted code snippets are subject to the licenses of the respective open-source projects. The users of this project/thesis are responsible for understanding and complying with the terms of these licenses. + 2. **Attribution:** The original authors and contributors of the open-source projects deserve credit for their work. Please refer to the metadata provided for information on the source of each function. + 3. **No Endorsement:** The inclusion of code from open-source projects in this project/thesis does not imply endorsement or support from the original authors or the open-source community. + +- The snippets are included in [snippets folder](/experiments/snippets/) and their only alterations include formatting and removal of some comments which don't add relevant information to the task at hand. + +- The [metadata folder](/experiments/metadata/) includes relevant information on each open-source project (project.json files), namely: + - The project's name + - The project's organization + - Source code repository + - License + +- Each project folder in the [metadata folder](/experiments/metadata/) also includes information on each snippet extracted from that project, namely: + - Hash of the commit where the snippet was extracted + - Function name(s) of the snippets + - Function path(s) of the snippets on the project tree diff --git a/experiments/init_experiment.py b/experiments/init_experiment.py index 50e58e5..3129b55 100644 --- a/experiments/init_experiment.py +++ b/experiments/init_experiment.py @@ -132,7 +132,9 @@ def main(): else: project_metadata = { "org": input("Enter project organization: "), - "project": input("Enter project name: ") + "project": input("Enter project name: "), + "repository": input("Enter project repository: "), + "license": input("Enter project license: ") } os.mkdir(project_path) @@ -154,6 +156,7 @@ def main(): experiment["name"] = input("Enter the experiment name (press enter for same name as the snippet): ") experiment["snippet"] = input("Enter the snippet name: ") experiment["name"] = experiment["snippet"] if experiment["name"] == "" else experiment["name"] + experiment["commit_hash"] = input("Enter the commit hash: ") experiment["function_name"] = input("Enter the function name: ") experiment["function_path"] = input("Enter the function path: ") diff --git a/experiments/metadata/doom/am_map_1.json b/experiments/metadata/doom/am_map_1.json index e0ee3fb..76d4c62 100644 --- a/experiments/metadata/doom/am_map_1.json +++ b/experiments/metadata/doom/am_map_1.json @@ -1,6 +1,7 @@ { "name": "am_map_1", "snippet": "am_map_1", + "commit_hash": "a77dfb96cb91780ca334d0d4cfd86957558007e0", "function_name": "AM_getIslope", "function_path": "/linuxdoom-1.10/am_map.c", "language": "c", diff --git a/experiments/metadata/doom/am_map_2.json b/experiments/metadata/doom/am_map_2.json index 53675ae..a910d89 100644 --- a/experiments/metadata/doom/am_map_2.json +++ b/experiments/metadata/doom/am_map_2.json @@ -1,6 +1,7 @@ { "name": "am_map_2", "snippet": "am_map_2", + "commit_hash": "a77dfb96cb91780ca334d0d4cfd86957558007e0", "function_name": "AM_activateNewScale", "function_path": "/linuxdoom-1.10/am_map.c", "language": "c", diff --git a/experiments/metadata/doom/am_map_3.json b/experiments/metadata/doom/am_map_3.json index f42c1a6..e598c0e 100644 --- a/experiments/metadata/doom/am_map_3.json +++ b/experiments/metadata/doom/am_map_3.json @@ -1,11 +1,11 @@ { "name": "am_map_3", "snippet": "am_map_3", + "commit_hash": "a77dfb96cb91780ca334d0d4cfd86957558007e0", "function_name": "AM_saveScaleAndLoc", "function_path": "/linuxdoom-1.10/am_map.c", "language": "c", - "errors": { "use_undeclared_identifier": [ "old_m_x", diff --git a/experiments/metadata/doom/am_map_4.json b/experiments/metadata/doom/am_map_4.json index 59419c9..95281e7 100644 --- a/experiments/metadata/doom/am_map_4.json +++ b/experiments/metadata/doom/am_map_4.json @@ -1,6 +1,7 @@ { "name": "am_map_4", "snippet": "am_map_4", + "commit_hash": "a77dfb96cb91780ca334d0d4cfd86957558007e0", "function_name": "AM_restoreScaleAndLoc", "function_path": "/linuxdoom-1.10/am_map.c", "language": "c", diff --git a/experiments/metadata/doom/am_map_5.json b/experiments/metadata/doom/am_map_5.json index ce51a74..9f50095 100644 --- a/experiments/metadata/doom/am_map_5.json +++ b/experiments/metadata/doom/am_map_5.json @@ -1,6 +1,7 @@ { "name": "am_map_5", "snippet": "am_map_5", + "commit_hash": "a77dfb96cb91780ca334d0d4cfd86957558007e0", "function_name": "AM_addMark", "function_path": "/linuxdoom-1.10/am_map.c", "language": "c", diff --git a/experiments/metadata/doom/am_map_6.json b/experiments/metadata/doom/am_map_6.json index 41c46e8..6a263b2 100644 --- a/experiments/metadata/doom/am_map_6.json +++ b/experiments/metadata/doom/am_map_6.json @@ -1,9 +1,11 @@ { "name": "am_map_6", "snippet": "am_map_6", + "commit_hash": "a77dfb96cb91780ca334d0d4cfd86957558007e0", "function_name": "AM_findMinMaxBoundaries", "function_path": "/linuxdoom-1.10/am_map.c", "language": "c", + "errors": { "use_undeclared_identifier": [ "max_y", diff --git a/experiments/metadata/doom/project.json b/experiments/metadata/doom/project.json index c4e7c2f..9f20975 100644 --- a/experiments/metadata/doom/project.json +++ b/experiments/metadata/doom/project.json @@ -1,4 +1,6 @@ { "project": "DOOM", - "org": "id-Software" + "org": "id-Software", + "repository": "https://github.com/id-Software/DOOM", + "license": "GPLv2" } \ No newline at end of file