Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate BugsInPy #184

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a09695d
add BugsInPy submodule
t-sorger Nov 24, 2024
c9384d5
add initial BugsInPybug.py
t-sorger Nov 27, 2024
ce48490
add initial BugsInPy.py to benchmark
t-sorger Nov 27, 2024
865975b
add BugsInPy to core utils
t-sorger Dec 7, 2024
e8976c5
add initial tests for BugsInPy; fix typo
t-sorger Dec 7, 2024
9a3325d
add BugsInPy submodule
t-sorger Nov 24, 2024
96d79c5
add initial BugsInPybug.py
t-sorger Nov 27, 2024
83b35cd
add initial BugsInPy.py to benchmark
t-sorger Nov 27, 2024
0cf0179
add BugsInPy to core utils
t-sorger Dec 7, 2024
e09839c
add initial tests for BugsInPy; fix typo
t-sorger Dec 7, 2024
f335bdf
add test implementation for BugsInPybug
t-sorger Jan 14, 2025
2bc479a
fix bin path issues
t-sorger Jan 14, 2025
bd08ec1
lint code
t-sorger Jan 14, 2025
11600a3
rework tests for BugsInPy
t-sorger Jan 14, 2025
1cc7bc6
update submodules
t-sorger Jan 14, 2025
0d28f9d
Merge branch 'BugsInPy' of github.com:ASSERT-KTH/repairbench-framewor…
t-sorger Jan 14, 2025
d3de871
add BugsInPy submodule
t-sorger Nov 24, 2024
56f4502
add initial BugsInPybug.py
t-sorger Nov 27, 2024
8274a8d
add initial BugsInPy.py to benchmark
t-sorger Nov 27, 2024
63f5834
add BugsInPy to core utils
t-sorger Dec 7, 2024
8e761a6
add initial tests for BugsInPy; fix typo
t-sorger Dec 7, 2024
41821d4
add test implementation for BugsInPybug
t-sorger Jan 14, 2025
28e4c9a
fix bin path issues
t-sorger Jan 14, 2025
21420fd
lint code
t-sorger Jan 14, 2025
5962796
rework tests for BugsInPy
t-sorger Jan 14, 2025
ea287fa
update submodules
t-sorger Jan 14, 2025
17c438d
Merge branch 'BugsInPy' of github.com:ASSERT-KTH/repairbench-framewor…
t-sorger Jan 22, 2025
7177e86
adds RichBug and fixes process calls
t-sorger Jan 26, 2025
7a195e0
add checks and fix path issues
t-sorger Jan 26, 2025
1c2f662
fix code and first tests
t-sorger Jan 26, 2025
1845b6d
fix error in tests
t-sorger Jan 26, 2025
f0cfa76
lint code
t-sorger Jan 26, 2025
1c1ea5e
start adding instruct test and new python utils
t-sorger Feb 4, 2025
1e0ffd0
update python.py
t-sorger Feb 9, 2025
edd053f
update Python utils and comment other test cases
t-sorger Feb 25, 2025
c74c397
add InfillingPromptingPython
t-sorger Feb 25, 2025
b679250
update utils for Python
t-sorger Feb 25, 2025
994e21e
add test infilling for BugsInPy codellama
t-sorger Feb 25, 2025
4d3561c
lint files
t-sorger Feb 25, 2025
c583a39
uncomment other infilling tests
t-sorger Feb 25, 2025
779340a
add initial files for language_utils
t-sorger Feb 27, 2025
76272cf
add get_language_utils method
t-sorger Feb 27, 2025
b1e684f
add usage of LanguageUtils for infilling
t-sorger Feb 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add get_language_utils method
  • Loading branch information
t-sorger committed Feb 27, 2025
commit 76272cf7f7f5ae42c67af21e5ce7e819cc89c675
14 changes: 14 additions & 0 deletions elleelleaime/core/utils/language_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ def extract_failing_test_cases(self, bug: RichBug) -> dict[str, str]:
def remove_comments(self, source: str):
pass

@staticmethod
def get_language_utils(language: str):
"""Returns an instance of the appropriate subclass based on the language."""
if language == "python":
from elleelleaime.core.utils.python import PythonUtils

return PythonUtils()
elif language == "java":
from elleelleaime.core.utils.java import JavaUtils

return JavaUtils()
else:
raise ValueError(f"Unsupported language: '{language}'.")

def compute_diff(
self, buggy_code: str, fixed_code: str, context_len: Optional[int] = None
) -> List[str]:
Expand Down
Loading