Files

1 line
30 KiB
JSON

{"repo": "anonymagent/refagent", "files": {"README.md": {"917d08db886c67baf7b85f09ecfba28ca69d852a": {"t": 1785746381.8276882, "n": 6669, "h": "fab62ff1a8fea350", "c": "# Multi-agent LLM-based Framework for Automatic Software Refactoring\n\n## Overview\nThis repository provides a **multi-agent LLM-based framework** for **automatic software refactoring**. The framework leverages **Large Language Models (LLMs)** to suggest and apply refactoring techniques, improving code maintainability and readability. The system integrates multiple agents to analyze, recommend, and validate code transformations automatically.\n\n## Features\n- Multi-agent architecture for software refactoring\n- Utilization of **LLMs** (e.g., OpenAI, StarCoder, DeepSeekCoder, etc.)\n- Compatibility with GitHub repositories for code retrieval, version control, and committing improvements\n\n## Requirements\nBefore running the framework, you need to set up the environment.\n\n### Environment Setup\n1. **Create a `.env` file** in the project root and add the following environment variables:\n ```env\n API_KEY=\"\"\n GITHUB_API_KEY=\"\"\n MODEL_NAME=\"gpt-4o\"\n ```\n Fill in the required API keys before running the framework.\n\n > ✅ If you want to use the framework with **DeepSeek models**, set `MODEL_NAME` to either `deepseek-coder` or `deepseek-chat`. \n > The endpoint for DeepSeek is: \n > `https://api.deepseek.com/v1/chat/completions`\n\n2. **Hardware**:\n - Ideally runs on a **GPU** for efficiency\n - If using **open-source LLMs** (e.g., StarCoder, DeepSeek), ensure you are running with GPU support\n\n# RefAgent — Multi-agent LLM-based Refactoring Framework\n\nRefAgent is a multi-agent system that uses Large Language Models (LLMs) to analyze, suggest, and apply refactorings to Java projects. The pipeline can clone a repository tag, apply model-guided refactorings, compile and test, and optionally commit improvements back to the repository.\n\nThis README gives a compact, practical guide to set up and run the project.\n\n---\n\n## Quick start\n\n- Run the full pipeline (clone → build → refactor):\n\n```bash\n./run_refAgent.sh <org/repo-name> <tag>\n# e.g. ./run_refAgent.sh apache/maven v3.8.6\n```\n\n- Or run the Python pipeline directly when the project is already present in `projects/after/`:\n\n```bash\npython3 refAgent/RefAgent_main.py <project-name>\n# e.g. python3 refAgent/RefAgent_main.py jclouds\n```\n\n---\n\n## Prerequisites\n\n- Python 3.9+\n- Java (JDK) compatible with the target project\n- Maven installed and on PATH (or the project's `mvnw` wrapper)\n- Git\n- LLM API credentials (OpenAI or another adapter supported by `refAgent/OpenaiLLM.py`)\n\nRecommended Java versions\n- For best compatibility with the built-in Python parser (`javalang`) and the tooling in this repo,\n we recommend using Java 8, 9, or 12 for projects you plan to analyze and refactor. If your project\n uses newer Java language features (post-Java 12), consider using a Java-based parser (e.g. JavaParser)\n or building with the project's `mvnw` wrapper and double-checking parsing results.\n\nImportant note about CompilerAgent & TestAgent\n- The `CompilerAgent` and `TestAgent` are agents whose sole purpose is to compile and run\n Maven-based Java projects. They do not modify environment settings or install toolchains.\n- It is critical that the Java (JDK) version and the Maven version (or the project's `mvnw` wrapper)\n exactly match what the target project expects. Mismatched Java/Maven versions are the most\n common cause of build and test failures and can produce misleading LLM diagnostics.\n- The provided `run_refAgent.sh` performs a basic verification, but you should always confirm the\n JDK and Maven versions locally before running RefAgent. If the project provides `mvnw`,\n prefer using it (see Troubleshooting below).\n\nOptional: GPU when running large local models.\n\n## Configuration (.env)\n\nCreate a `.env` file in the repository root (read by `settings.py`):\n\n```env\nAPI_KEY=\"<your-llm-api-key>\"\nGITHUB_API_KEY=\"<your-github-token>\" # optional, used for commits\nMODEL_NAME=\"gpt-4\"\n```\n\nThe `Settings` class (in `settings.py`) reads `.env` automatically.\n\n## Install dependencies\n\nInstall Python dependencies into a virtualenv and activate it:\n\n```bash\npython -m venv venv\nsource venv/bin/activate\npip install -r requirment.txt\n```\n\nNote: the repository currently includes `requirment.txt` (typo preserved). Rename to `requirements.txt` if you prefer standard naming and update commands accordingly.\n\n## How it works (high level)\n\n- The main pipeline (`refAgent/RefAgent_main.py`) iterates over Java files in `projects/before/<project>`.\n- Agents:\n - `PlannerAgent`: decides which methods need refactoring based on CKOO metrics.\n - `RefactoringGeneratorAgent`: asks the LLM to produce refactored Java code following the plan.\n - `CompilerAgent`: compiles the Maven project and asks the LLM to summarize compilation errors when compilation fails.\n - `TestAgent`: runs Maven tests, summarizes failing tests per-test, and can combine all failures into a single LLM-produced summary.\n- Summaries from compiler/test failures are appended in-memory to `refactoring_generator.llm.message_history` so the `refactoring_generator` includes them as context in subsequent calls.\n\n## Useful scripts\n\n- `run_refAgent.sh <org/repo> <tag>` — clones the repo tag, copies to `projects/after/`, builds, and runs the Python pipeline. The script resolves its own directory so it reliably finds `refAgent/RefAgent_main.py`.\n\n## Troubleshooting\n\n- Can't find `RefAgent_main.py` from the shell script:\n - Ensure the script is executable (`chmod +x run_refAgent.sh`). The script now computes its own directory and runs the Python file by absolute path.\n- Maven build issues:\n - Check Java version compatibility with the target project. Prefer using the project's `mvnw` wrapper where available.\n - Reminder: because `CompilerAgent` and `TestAgent` only invoke the build/test tools, they cannot\n recover from an incompatible JDK or Maven version. If you see cryptic compile errors, first verify\n you are using the correct Java and Maven versions that are known to build the project locally.\n The `.sh` script performs a basic check, but you should double-check manually with `java -version`\n and `mvn -v` (or `./mvnw -v`).\n- LLM failures or rate limits:\n - Verify `.env` API keys and quotas.\n\n## Development notes & suggestions\n\n- Message history and context:\n - The current design keeps summaries in-memory per-agent (`OpenaiLLM.message_history`). If you want summaries available to multiple agents, either append the summary to each agent's history or use a shared LLM wrapper instance.\n - If you want summaries to persist across runs, save them into `results/<project>/` and reload them when the pipeline starts.\n\n\n## License\n\nMIT\n"}, "4405a88641be964a2467fe5dd3e1339ae2ce028b": {"t": 1785763152.4201496, "n": 6669, "h": "fab62ff1a8fea350", "c": "# Multi-agent LLM-based Framework for Automatic Software Refactoring\n\n## Overview\nThis repository provides a **multi-agent LLM-based framework** for **automatic software refactoring**. The framework leverages **Large Language Models (LLMs)** to suggest and apply refactoring techniques, improving code maintainability and readability. The system integrates multiple agents to analyze, recommend, and validate code transformations automatically.\n\n## Features\n- Multi-agent architecture for software refactoring\n- Utilization of **LLMs** (e.g., OpenAI, StarCoder, DeepSeekCoder, etc.)\n- Compatibility with GitHub repositories for code retrieval, version control, and committing improvements\n\n## Requirements\nBefore running the framework, you need to set up the environment.\n\n### Environment Setup\n1. **Create a `.env` file** in the project root and add the following environment variables:\n ```env\n API_KEY=\"\"\n GITHUB_API_KEY=\"\"\n MODEL_NAME=\"gpt-4o\"\n ```\n Fill in the required API keys before running the framework.\n\n > ✅ If you want to use the framework with **DeepSeek models**, set `MODEL_NAME` to either `deepseek-coder` or `deepseek-chat`. \n > The endpoint for DeepSeek is: \n > `https://api.deepseek.com/v1/chat/completions`\n\n2. **Hardware**:\n - Ideally runs on a **GPU** for efficiency\n - If using **open-source LLMs** (e.g., StarCoder, DeepSeek), ensure you are running with GPU support\n\n# RefAgent — Multi-agent LLM-based Refactoring Framework\n\nRefAgent is a multi-agent system that uses Large Language Models (LLMs) to analyze, suggest, and apply refactorings to Java projects. The pipeline can clone a repository tag, apply model-guided refactorings, compile and test, and optionally commit improvements back to the repository.\n\nThis README gives a compact, practical guide to set up and run the project.\n\n---\n\n## Quick start\n\n- Run the full pipeline (clone → build → refactor):\n\n```bash\n./run_refAgent.sh <org/repo-name> <tag>\n# e.g. ./run_refAgent.sh apache/maven v3.8.6\n```\n\n- Or run the Python pipeline directly when the project is already present in `projects/after/`:\n\n```bash\npython3 refAgent/RefAgent_main.py <project-name>\n# e.g. python3 refAgent/RefAgent_main.py jclouds\n```\n\n---\n\n## Prerequisites\n\n- Python 3.9+\n- Java (JDK) compatible with the target project\n- Maven installed and on PATH (or the project's `mvnw` wrapper)\n- Git\n- LLM API credentials (OpenAI or another adapter supported by `refAgent/OpenaiLLM.py`)\n\nRecommended Java versions\n- For best compatibility with the built-in Python parser (`javalang`) and the tooling in this repo,\n we recommend using Java 8, 9, or 12 for projects you plan to analyze and refactor. If your project\n uses newer Java language features (post-Java 12), consider using a Java-based parser (e.g. JavaParser)\n or building with the project's `mvnw` wrapper and double-checking parsing results.\n\nImportant note about CompilerAgent & TestAgent\n- The `CompilerAgent` and `TestAgent` are agents whose sole purpose is to compile and run\n Maven-based Java projects. They do not modify environment settings or install toolchains.\n- It is critical that the Java (JDK) version and the Maven version (or the project's `mvnw` wrapper)\n exactly match what the target project expects. Mismatched Java/Maven versions are the most\n common cause of build and test failures and can produce misleading LLM diagnostics.\n- The provided `run_refAgent.sh` performs a basic verification, but you should always confirm the\n JDK and Maven versions locally before running RefAgent. If the project provides `mvnw`,\n prefer using it (see Troubleshooting below).\n\nOptional: GPU when running large local models.\n\n## Configuration (.env)\n\nCreate a `.env` file in the repository root (read by `settings.py`):\n\n```env\nAPI_KEY=\"<your-llm-api-key>\"\nGITHUB_API_KEY=\"<your-github-token>\" # optional, used for commits\nMODEL_NAME=\"gpt-4\"\n```\n\nThe `Settings` class (in `settings.py`) reads `.env` automatically.\n\n## Install dependencies\n\nInstall Python dependencies into a virtualenv and activate it:\n\n```bash\npython -m venv venv\nsource venv/bin/activate\npip install -r requirment.txt\n```\n\nNote: the repository currently includes `requirment.txt` (typo preserved). Rename to `requirements.txt` if you prefer standard naming and update commands accordingly.\n\n## How it works (high level)\n\n- The main pipeline (`refAgent/RefAgent_main.py`) iterates over Java files in `projects/before/<project>`.\n- Agents:\n - `PlannerAgent`: decides which methods need refactoring based on CKOO metrics.\n - `RefactoringGeneratorAgent`: asks the LLM to produce refactored Java code following the plan.\n - `CompilerAgent`: compiles the Maven project and asks the LLM to summarize compilation errors when compilation fails.\n - `TestAgent`: runs Maven tests, summarizes failing tests per-test, and can combine all failures into a single LLM-produced summary.\n- Summaries from compiler/test failures are appended in-memory to `refactoring_generator.llm.message_history` so the `refactoring_generator` includes them as context in subsequent calls.\n\n## Useful scripts\n\n- `run_refAgent.sh <org/repo> <tag>` — clones the repo tag, copies to `projects/after/`, builds, and runs the Python pipeline. The script resolves its own directory so it reliably finds `refAgent/RefAgent_main.py`.\n\n## Troubleshooting\n\n- Can't find `RefAgent_main.py` from the shell script:\n - Ensure the script is executable (`chmod +x run_refAgent.sh`). The script now computes its own directory and runs the Python file by absolute path.\n- Maven build issues:\n - Check Java version compatibility with the target project. Prefer using the project's `mvnw` wrapper where available.\n - Reminder: because `CompilerAgent` and `TestAgent` only invoke the build/test tools, they cannot\n recover from an incompatible JDK or Maven version. If you see cryptic compile errors, first verify\n you are using the correct Java and Maven versions that are known to build the project locally.\n The `.sh` script performs a basic check, but you should double-check manually with `java -version`\n and `mvn -v` (or `./mvnw -v`).\n- LLM failures or rate limits:\n - Verify `.env` API keys and quotas.\n\n## Development notes & suggestions\n\n- Message history and context:\n - The current design keeps summaries in-memory per-agent (`OpenaiLLM.message_history`). If you want summaries available to multiple agents, either append the summary to each agent's history or use a shared LLM wrapper instance.\n - If you want summaries to persist across runs, save them into `results/<project>/` and reload them when the pipeline starts.\n\n\n## License\n\nMIT\n"}, "842b16f481b9fd05d96e383a55303bc967ff8222": {"t": 1785763153.878208, "n": 3643, "h": "a3a0ec68d5659a4b", "c": "# Multi-agent LLM-based Framework for Automatic Software Refactoring\n\n## Overview\nThis repository provides a **multi-agent LLM-based framework** for **automatic software refactoring**. The framework leverages **Large Language Models (LLMs)** to suggest and apply refactoring techniques, improving code maintainability and readability. The system integrates multiple agents to analyze, recommend, and validate code transformations automatically.\n\n## Features\n- Multi-agent architecture for software refactoring\n- Utilization of **LLMs** (e.g., OpenAI, StarCoder, DeepSeek, etc.)\n- GPU support for faster processing\n- Integration with **Refactoring Miner** for detecting and validating refactorings\n- Compatibility with GitHub repositories for code retrieval, version control, and committing improvements\n\n## Requirements\nBefore running the framework, you need to set up the environment.\n\n### Environment Setup\n1. **Create a `.env` file** in the project root and add the following environment variables:\n ```env\n API_KEY=\"\"\n GITHUB_API_KEY=\"\"\n MODEL_NAME=\"gpt-40\"\n ```\n Fill in the required API keys before running the framework.\n\n > ✅ If you want to use the framework with **DeepSeek models**, set `MODEL_NAME` to either `deepseek-coder` or `deepseek-chat`. \n > The endpoint for DeepSeek is: \n > `https://api.deepseek.com/v1/chat/completions`\n\n2. **Hardware**:\n - Ideally runs on a **GPU** for efficiency\n - If using **open-source LLMs** (e.g., StarCoder, DeepSeek), ensure you are running with GPU support\n\n3. **Refactoring Miner**:\n - Download **Refactoring Miner** from [this GitHub repo](https://github.com/tsantalis/RefactoringMiner)\n - Place it inside a folder named `REFACTORINGMINER` at the project root\n\n4. **Java & Maven**:\n - Make sure **Maven** is installed and accessible via the terminal\n - Required Maven version: **3.0.5**\n - Make sure your **Java version is compatible** with the Maven project being cloned and built\n > ⚠️ **If the Maven build fails**, please ensure you are using a Java version supported by the project (e.g., Java 8, 11, etc.)\n\n## Installation\n```bash\n# Clone the repository\ngit clone https://github.com/your-repo/multi-agent-refactoring.git\ncd multi-agent-refactoring\n\n# Create and activate a virtual environment\npython -m venv venv\nsource venv/bin/activate # On Windows use: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n````\n\n## Running Experiments\n\n### 1. Full Pipeline (Clone → Build → Refactor)\n\nTo run the complete pipeline using a GitHub repo and a specific tag:\n\n```bash\n./run_refAgent.sh <org/repo-name> <tag>\n```\n\n**Example:**\n\n```bash\n./run_refAgent.sh apache/maven v3.8.6\n```\n\nThis script will:\n\n* Clone the specified repository tag into `projects/before/`\n* Copy it into `projects/after/`\n* Build it using Maven\n* Launch the refactoring pipeline via `refAgent/RefAgent_main.py`\n\n### 2. Running the Python Refactoring Script Directly\n\nIf you already have a cloned and built project (e.g., from `run_refAgent.sh`), you can run the main refactoring pipeline directly:\n\n```bash\npython refAgent/RefAgent_main.py <project-name>\n```\n\n**Example:**\n\n```bash\npython refAgent/RefAgent_main.py jclouds\n```\n\n## Repository List\n\nInside the folder `data/repositories`, you will find a list of all the repositories and their corresponding tags used in our experiments. These are ready to be passed into the `setup_and_build.sh` script.\n\n## Documentation\n\nMore documentation will be added soon to explain the internal logic of each agent and the LLM prompt strategies.\n\n## License\n\nThis project is licensed under the **MIT License**."}, "09b309fc626022ca019eb62474d1862ebf06867b": {"t": 1785763155.6164508, "n": 3392, "h": "72d347a79e534d71", "c": "\n# Multi-agent LLM-based Framework for Automatic Software Refactoring\n\n## Overview\nThis repository provides a **multi-agent LLM-based framework** for **automatic software refactoring**. The framework leverages **Large Language Models (LLMs)** to suggest and apply refactoring techniques, improving code maintainability and readability. The system integrates multiple agents to analyze, recommend, and validate code transformations automatically.\n\n## Features\n- Multi-agent architecture for software refactoring\n- Utilization of **LLMs** (e.g., OpenAI, StarCoder, etc.)\n- GPU support for faster processing\n- Integration with **Refactoring Miner** for detecting and validating refactorings\n- Compatibility with GitHub repositories for code retrieval, version control, and committing improvements\n\n## Requirements\nBefore running the framework, you need to set up the environment.\n\n### Environment Setup\n1. **Create a `.env` file** in the project root and add the following environment variables:\n ```env\n API_KEY=\"\"\n GITHUB_API_KEY=\"\"\n MODEL_NAME=\"gpt-40\"\n ```\n Fill in the required API keys before running the framework.\n\n2. **Hardware**:\n - Ideally runs on a **GPU** for efficiency\n - If using **open-source LLMs** (e.g., StarCoder), ensure you are running with GPU support\n\n3. **Refactoring Miner**:\n - Download **Refactoring Miner** from [this GitHub repo](https://github.com/tsantalis/RefactoringMiner)\n - Place it inside a folder named `REFACTORINGMINER` at the project root\n\n4. **Java & Maven**:\n - Make sure **Maven** is installed and accessible via the terminal\n - Required Maven version: **3.0.5**\n - Make sure your **Java version is compatible** with the Maven project being cloned and built\n > ⚠️ **If the Maven build fails**, please ensure you are using a Java version supported by the project (e.g., Java 8, 11, etc.)\n\n## Installation\n```bash\n# Clone the repository\ngit clone https://github.com/your-repo/multi-agent-refactoring.git\ncd multi-agent-refactoring\n\n# Create and activate a virtual environment\npython -m venv venv\nsource venv/bin/activate # On Windows use: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n## Running Experiments\n\n### 1. Full Pipeline (Clone → Build → Refactor)\nTo run the complete pipeline using a GitHub repo and a specific tag:\n\n```bash\n./run_refAgent.sh <org/repo-name> <tag>\n```\n\n**Example:**\n```bash\n./run_refAgent.sh apache/maven v3.8.6\n```\n\nThis script will:\n- Clone the specified repository tag into `projects/before/`\n- Copy it into `projects/after/`\n- Build it using Maven\n- Launch the refactoring pipeline via `refAgent/RefAgent_main.py`\n\n### 2. Running the Python Refactoring Script Directly\nIf you already have a cloned and built project (e.g., from `run_refAgent.sh`), you can run the main refactoring pipeline directly:\n\n```bash\npython refAgent/RefAgent_main.py <project-name>\n```\n\n**Example:**\n```bash\npython refAgent/RefAgent_main.py jclouds\n```\n\n## Repository List\n\nInside the folder `data/repositories`, you will find a list of all the repositories and their corresponding tags used in our experiments. These are ready to be passed into the `setup_and_build.sh` script.\n\n## Documentation\nMore documentation will be added soon to explain the internal logic of each agent and the LLM prompt strategies.\n\n## License\nThis project is licensed under the **MIT License**.\n"}, "cb0e50a2485aee9f2af60ceb7587e78dd0f70be1": {"t": 1785763157.1046371, "n": 2141, "h": "3525e95ffadd4ee2", "c": "# Multi-agent LLM-based Framework for Automatic Software Refactoring\n\n## Overview\nThis repository provides a **multi-agent LLM-based framework** for **automatic software refactoring**. The framework leverages **Large Language Models (LLMs)** to suggest and apply refactoring techniques, improving code maintainability and readability. The system integrates multiple agents to analyze, recommend, and validate code transformations automatically.\n\n## Features\n- Multi-agent architecture for software refactoring\n- Utilization of **LLMs** (e.g., OpenAI, StarCoder, etc.)\n- GPU support for faster processing\n- Integration with **Refactoring Miner** for detecting and validating refactorings\n- Compatibility with GitHub repositories for code retrieval and version control, and commit improvement\n\n## Requirements\nBefore running the framework, you need to set up the environment.\n\n### Environment Setup\n1. **Create a `.env` file** in the project root and add the following environment variables:\n ```env\n API_KEY=\"\"\n GITHUB_API_KEY=\"\"\n MODEL_NAME=\"gpt-40\"\n ```\n Fill in the required API keys before running the framework.\n\n2. **Hardware**:\n - Ideally runs on a **GPU** for efficiency\n - If using **open-source LLMs** (e.g., StarCoder), ensure you are in GPU\n\n3. **Refactoring Miner**:\n - Download **Refactoring Miner** from [here](https://github.com/tsantalis/RefactoringMiner)\n - Place it inside a folder named `REFACTORINGMINER` at the project root\n\n### Installation\n```bash\n# Clone the repository\ngit clone https://github.com/your-repo/multi-agent-refactoring.git\ncd multi-agent-refactoring\n\n# Create and activate a virtual environment\npython -m venv venv\nsource venv/bin/activate # On Windows use: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n## Running Experiments\nTo run the experiments, execute the main script:\n```bash\npython RefAgent_main.py\n```\nEnsure that all **API keys** are set and the **Refactoring Miner** folder is correctly placed before running the script.\n\n## Documentation\nMore documentation to come\n\n## License\nThis project is licensed under the MIT License.\n\n"}, "75b2b99ec17dd348c34a76bbcf9125a9f1ee4b82": {"t": 1785763158.6164653, "n": 2088, "h": "dc5ceda6aefec93d", "c": "# Multi-agent LLM-based Framework for Automatic Software Refactoring\n\n## Overview\nThis repository provides a **multi-agent LLM-based framework** for **automatic software refactoring**. The framework leverages **Large Language Models (LLMs)** to suggest and apply refactoring techniques, improving code maintainability and readability. The system integrates multiple agents to analyze, recommend, and validate code transformations automatically.\n\n## Features\n- Multi-agent architecture for software refactoring\n- Utilization of **LLMs** (e.g., OpenAI, StarCoder, etc.)\n- GPU support for faster processing\n- Integration with **Refactoring Miner** for detecting and validating refactorings\n- Compatibility with GitHub repositories for code retrieval and version control, and commit improvement\n\n## Requirements\nBefore running the framework, you need to set up the environment.\n\n### Environment Setup\n1. **API Keys**: Obtain the following API keys and set them as environment variables:\n - `OPENAI_API_KEY` (if using OpenAI models)\n - `GITHUB_API_KEY` (for accessing repositories)\n\n2. **Hardware**:\n - Ideally runs on a **GPU** for efficiency\n - If using **open-source LLMs** (e.g., StarCoder), ensure you are in GPU\n\n3. **Refactoring Miner**:\n - Download **Refactoring Miner** from [here](https://github.com/tsantalis/RefactoringMiner)\n - Place it inside a folder named `REFACTORINGMINER` at the project root\n\n### Installation\n```bash\n# Clone the repository\ngit clone https://github.com/your-repo/multi-agent-refactoring.git\ncd multi-agent-refactoring\n\n# Create and activate a virtual environment\npython -m venv venv\nsource venv/bin/activate # On Windows use: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n## Running Experiments\nTo run the experiments, execute the main script:\n```bash\npython RefAgent_main.py\n```\nEnsure that all **API keys** are set and the **Refactoring Miner** folder is correctly placed before running the script.\n\n## Documentation\nMore documentation to come\n\n## License\nThis project is licensed under the MIT License.\n\n"}, "edad61f86bf0d4c62e5d57805c1d4b204e08ef65": {"t": 1785763160.0980747, "n": 2176, "h": "553e762dcd25951e", "c": "# Multi-agent LLM-based Framework for Automatic Software Refactoring\n\n## Overview\nThis repository provides a **multi-agent LLM-based framework** for **automatic software refactoring**. The framework leverages **Large Language Models (LLMs)** to suggest and apply refactoring techniques, improving code maintainability and readability. The system integrates multiple agents to analyze, recommend, and validate code transformations automatically.\n\n## Features\n- Multi-agent architecture for software refactoring\n- Utilization of **LLMs** (e.g., OpenAI, StarCoder, etc.)\n- GPU support for faster processing\n- Integration with **Refactoring Miner** for detecting and validating refactorings\n- Compatibility with GitHub repositories for code retrieval and version control, and commit improvement\n\n## Requirements\nBefore running the framework, you need to set up the environment.\n\n### Environment Setup\n1. **API Keys**: Obtain the following API keys and set them as environment variables:\n - `OPENAI_API_KEY` (if using OpenAI models)\n - `GITHUB_API_KEY` (for accessing repositories)\n\n2. **Hardware**:\n - Ideally runs on a **GPU** for efficiency\n - If using **open-source LLMs** (e.g., StarCoder), ensure you are in GPU\n\n3. **Refactoring Miner**:\n - Download **Refactoring Miner** from [here](https://github.com/tsantalis/RefactoringMiner)\n - Place it inside a folder named `REFACTORINGMINER` at the project root\n\n### Installation\n```bash\n# Clone the repository\ngit clone https://github.com/your-repo/multi-agent-refactoring.git\ncd multi-agent-refactoring\n\n# Create and activate a virtual environment\npython -m venv venv\nsource venv/bin/activate # On Windows use: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n## Running Experiments\nTo run the experiments, execute the main script:\n```bash\npython RefAgent_main.py\n```\nEnsure that all **API keys** are set and the **Refactoring Miner** folder is correctly placed before running the script.\n\n## Documentation\nMore documentation to come\n\n## Contributing\nFeel free to submit issues and pull requests to improve the framework!\n\n## License\nThis project is licensed under the MIT License.\n\n"}, "2f77f23a6d9f3de1bc54b1bdb8c532cb568470c3": {"t": 1785763161.4767463, "n": 2189, "h": "93b6baece4db9608", "c": "# Multi-agent LLM-based Framework for Automatic Software Refactoring\n\n## Overview\nThis repository provides a **multi-agent LLM-based framework** for **automatic software refactoring**. The framework leverages **Large Language Models (LLMs)** to suggest and apply refactoring techniques, improving code maintainability and readability. The system integrates multiple agents to analyze, recommend, and validate code transformations automatically.\n\n## Features\n- Multi-agent architecture for software refactoring\n- Utilization of **LLMs** (e.g., OpenAI, StarCoder, etc.)\n- GPU support for faster processing\n- Integration with **Refactoring Miner** for detecting and validating refactorings\n- Compatibility with GitHub repositories for code retrieval and version control, and commit improvement\n\n## Requirements\nBefore running the framework, you need to set up the environment.\n\n### Environment Setup\n1. **API Keys**: Obtain the following API keys and set them as environment variables:\n - `OPENAI_API_KEY` (if using OpenAI models)\n - `GITHUB_API_KEY` (for accessing repositories)\n\n2. **Hardware**:\n - Ideally runs on a **GPU** for efficiency\n - If using **open-source LLMs** (e.g., StarCoder), ensure they are properly installed\n\n3. **Refactoring Miner**:\n - Download **Refactoring Miner** from [here](https://github.com/tsantalis/RefactoringMiner)\n - Place it inside a folder named `REFACTORINGMINER` at the project root\n\n### Installation\n```bash\n# Clone the repository\ngit clone https://github.com/your-repo/multi-agent-refactoring.git\ncd multi-agent-refactoring\n\n# Create and activate a virtual environment\npython -m venv venv\nsource venv/bin/activate # On Windows use: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n## Running Experiments\nTo run the experiments, execute the main script:\n```bash\npython RefAgent_main.py\n```\nEnsure that all **API keys** are set and the **Refactoring Miner** folder is correctly placed before running the script.\n\n## Documentation\nMore documentation to come\n\n## Contributing\nFeel free to submit issues and pull requests to improve the framework!\n\n## License\nThis project is licensed under the MIT License.\n\n"}, "2e0d596f3495ac4af5ce24dfef3be80db5b388a0": {"t": 1785763163.9637604, "n": 78, "h": "ed0d19aea54becd1", "c": "# RefAgent\nMulti-agent LLM-based Framework for automatic software refactoring\n"}}}}