-
Notifications
You must be signed in to change notification settings - Fork 1
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
Compilation Errrors #4
Comments
Hi, thanks for your issue. Can you share some GPT-4o results so that I can debug with? That would be very helpful. Thank you in advance. |
Thanks for your response. This is a file with gpt output as this jsonl have the gpt outputs for all the bugs of codec and compress projects. Here are the keys in the provided JSON:
|
"Import statements are sometimes placed inside the class, disrupting the structure of the test template." |
@jundaz Thanks for your comment. This may caused by our experimental settings. By default, we applied some strategies to generate better unit tests. For example, we used "extend" to help reduce the compilation errors occurred in the generated unit tests. And in "extend" mode, LLMs' response should be a test classes without class definition (at least we hope it should be, but there is no guarantee). So we added headers(prefixes) like @yogendrahexo Could you please try change the value of the I am currently working on a more robust version of our benchmark, and will keep you guys posted. |
@LeonYang95 @jundaz I tried both options. I was initially using With |
I'm getting compilation errors. All the D4J projects are failing to compile even at the class level because of the wrong format of test generations. The import statements are getting written inside the class or duplicate imports, causing errors. In some cases, class-level compilation succeeds but only with empty tests. But, Method-level compilation is failing in them.
Compile errors: {'illegal start of type': 17, 'cannot find symbol': 8, '<identifier> expected': 6, 'package org.mockito does not exist': 2, 'repeated modifier': 1}
ERROR: Chart_15 failed compilation even though it was given an empty test class.
Errors related to Mockito:
You mentioned Mockito 5 in the instructions, but
3.12.4
was the version in thedependency_analyzer
script. I tried both versions (5.14.2 and 3.12.4), but I'm still getting Mockito errors in some compilations:package org.mockito does not exist
This error occurred in the
Csv
project and a few others, but not in all projects.Method-Level Compilation Failures:
method removeDomainMarker not found in org/jfree/chart/plot/CategoryPlot
method skip not found in org/apache/commons/codec/binary/BaseNCodecInputStream
Project Setup, Steps followed:
I have the following files in the
frameworks/projects/lib
directory:Mockito-core-3.12.4.jar
,mockito-core-5.14.2.jar
,mockito-junit-jupiter-3.12.4.jar
,junit-jupiter-api-5.7.2.jar
,junit-jupiter-params-5.0.0.jar
,powermock-api-mockito2-1.7.4.jar
,powermock-core-1.7.4.jar
,apiguardian-api-1.1.0.jar
,powermock-module-junit4-1.7.4.jar
,byte-buddy-1.14.11.jar
,byte-buddy-agent-1.14.11.jar
,objenesis-3.3.jar
,hamcrest-2.1.jar
buggy
andfixed
) and placed them in a folder namedprojectName_id/fixed
andprojectName_id/buggy
.source_data.jsonl
file into thedata/prompts/
folder.d4j2_fixed_info
folder into thedata
directory.rq1/generate_prompts.py
and retrieved content from the generated file. I sent this content to the LLM to generate output and added the response in the input data with thecompletion
key. and palced in thedata/outputs/gpt4o_comment_extend_full.jsonl
I'm using GPT-4o right now.
Current Issues:
The text was updated successfully, but these errors were encountered: