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 the dependency_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
- Checked out all the D4J repos (
buggy and fixed) and placed them in a folder named projectName_id/fixed and projectName_id/buggy.
- Copied the
source_data.jsonl file into the data/prompts/ folder.
- Copied the
d4j2_fixed_info folder into the data directory.
- Generated prompts using the script
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 the completion key. and palced in the data/outputs/gpt4o_comment_extend_full.jsonl
I'm using GPT-4o right now.
Current Issues:
- The script is correctly extracting methods, imports, and classes.
- But, the test generation process is not working as expected:
- Import statements are sometimes placed inside the class, disrupting the structure of the test template.
- Duplicate imports, missing functions or different function names.
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.4was the version in thedependency_analyzerscript. 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 existThis error occurred in the
Csvproject and a few others, but not in all projects.Method-Level Compilation Failures:
method removeDomainMarker not found in org/jfree/chart/plot/CategoryPlotmethod skip not found in org/apache/commons/codec/binary/BaseNCodecInputStreamProject Setup, Steps followed:
I have the following files in the
frameworks/projects/libdirectory: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.jarbuggyandfixed) and placed them in a folder namedprojectName_id/fixedandprojectName_id/buggy.source_data.jsonlfile into thedata/prompts/folder.d4j2_fixed_infofolder into thedatadirectory.rq1/generate_prompts.pyand 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 thecompletionkey. and palced in thedata/outputs/gpt4o_comment_extend_full.jsonlI'm using GPT-4o right now.
Current Issues: