Skip to content

Commit

Permalink
jvm: fix typos in prompts (#746)
Browse files Browse the repository at this point in the history
Signed-off-by: David Korczynski <[email protected]>
  • Loading branch information
DavidKorczynski authored Dec 7, 2024
1 parent fe43b0c commit 2b6476e
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion prompts/template_xml/jvm_problem_constructor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ The target method is the constructor of {CONSTRUCTOR_CLASS} with the following s
The constructor signature follows the format of <code>[Full qualified name of the class].(method_arguments)</code>.
For example, for the constructor of class <code>Test</code> of package <code>org.test</code> which takes in a single integer would have the following signature:
<code>[org.test.Test].<init>(int)</code>
The target method is belonging to the Java project {PROJECT_NAME} ({PROJECT_URL}).
The target method belongs to the Java project {PROJECT_NAME} ({PROJECT_URL}).
</target>
2 changes: 1 addition & 1 deletion prompts/template_xml/jvm_problem_method.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
The method signature follows the format of <code>[Full qualified name of the class].method_name(method_arguments)</code>.
For example, for a method <code>test</code> in class <code>Test</code> of package <code>org.test</code> which takes in a single integer would have the following method signature:
<code>[org.test.Test].test(int)</code>
The target method is belonging to the Java project {PROJECT_NAME} ({PROJECT_URL}).
The target method belongs to the Java project {PROJECT_NAME} ({PROJECT_URL}).
</target>
4 changes: 2 additions & 2 deletions prompts/template_xml/jvm_requirement.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public class {HARNESS_NAME} {
}
</code></item>
<item>
Here is a list of classes and their fully qualified name. You must import all classes by their fully qualified name.
For example, if the full qualified name of a class is <code>abc.def.ghi</code>, then you must add an import
Here is a list of classes and their fully qualified names. You must import all classes by their fully qualified name.
For example, if the fully qualified name of a class is <code>abc.def.ghi</code>, then you must add an import
statement <code>import abc.def.ghi;</code> in the result code.
Do not import the same class multiple times.
Each item in this list has two attributes, <class_name> tag contains the class name and <full_class_name>
Expand Down
4 changes: 2 additions & 2 deletions prompts/template_xml/jvm_requirement_coverage_fixing.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
I'm a security engineer looking to write good fuzzing harnesses. I want you help me improve my fuzzing harness so it could covers more part of the code.
I'm a security engineer looking to write good fuzzing harnesses. I want you to help me improve my fuzzing harness so it covers more of the code in the target project.

The target library is {TARGET_REPO}.

Expand Down Expand Up @@ -54,7 +54,7 @@ public class {HARNESS_NAME} {
</code></item>
<item>
You MUST ONLY use any of the following methods from the FuzzedDataProvider of the Jazzer framework for generating random data for fuzzing.
If the needed return value is not found in the table, try use constructors or methods to create the needed random object. But you MUST try your best to randomise the random object with the methods in the table.
If the needed return value is not found in the table, try to use constructors or methods to create the needed random object. But you MUST try your best to randomise the random object with the methods in the table.

| Method | Return Value |
|---------------------------------------------|---------------------------------------|
Expand Down
4 changes: 2 additions & 2 deletions prompts/template_xml/jvm_requirement_error_fixing.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
I'm a security engineer looking to write a good fuzzing harnesses. I got some compilation errors and want you to help fix them.
I'm a security engineer looking to write a good fuzzing harness. I got some compilation errors and want you to help fix them.

The target library is {TARGET_REPO}.

Expand Down Expand Up @@ -53,7 +53,7 @@ public class {HARNESS_NAME} {
</code></item>
<item>
You MUST ONLY use any of the following methods from the FuzzedDataProvider of the Jazzer framework for generating random data for fuzzing.
If the needed return value is not found in the table, try use constructors or methods to create the needed random object. But you MUST try your best to randomise the random object with the methods in the table.
If the needed return value is not found in the table, try to use constructors or methods to create the needed random object. But you MUST try your best to randomise the random object with the methods in the table.

| Method | Return Value |
|---------------------------------------------|---------------------------------------|
Expand Down
6 changes: 3 additions & 3 deletions prompts/template_xml/jvm_requirement_test_to_harness.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Here is a list of requirements that you MUST follow.
<item>You MUST invoke the close method of any resource class objects that implements the java.lang.AutoCloseable interface in the finally block after the target method is invoked.</item>
<item>You MUST use similar approach as the examples and tests to catch exceptions.</item>
<item>
Here is a comma separated list of public project methods. You must include the invocation of at least one of them in the generated harness. Each of the method signature follows the format of <code>[Full qualified name of the class].method_name(method_arguments)</code>.
Here is a comma separated list of public project methods. You must include the invocation of at least one of them in the generated harness. Each of the method signatures follows the format of <code>[Full qualified name of the class].method_name(method_arguments)</code>.
{PUBLIC_METHODS}
</item>
<item>
Expand Down Expand Up @@ -54,7 +54,7 @@ Here is a comma-separated list of all publicly accessible classes in this projec
{PUBLIC_CLASSES}
</item>
<item>
Here is a list of import statements that you MUST add to the generated harness needed for create the harness.
Here is a list of import statements that you MUST add to the generated harness.
{IMPORT_STATEMENTS}
</item>
<item>
Expand All @@ -63,7 +63,7 @@ Here is a list of other import statements for reference that you may need to mak
</item>
<item>
You MUST ONLY use any of the following methods from the FuzzedDataProvider of the Jazzer framework for generating random data for fuzzing.
If the needed return value is not found in the table, try use constructors or methods to create the needed random object. But you MUST try your best to randomise the random object with the methods in the table.
If the needed return value is not found in the table, try to use constructors or methods to create the needed random object. But you MUST try your best to randomise the random object with the methods in the table.

| Method | Return Value |
|---------------------------------------------|---------------------------------------|
Expand Down
2 changes: 1 addition & 1 deletion prompts/template_xml/jvm_simple_arg_description.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<argument>
Arugment #{ARG_COUNT} requires {SIMPLE_TYPE} variable.
Argument #{ARG_COUNT} requires the {SIMPLE_TYPE} variable.
You must use {RANDOM_METHODS} to generate {ARRAY_OR_NOT}.
</argument>
2 changes: 1 addition & 1 deletion prompts/template_xml/python_problem.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Your goal is to write a fuzzing harness for the provided method signature to fuz
<method_signature>
{METHOD_SIGNATURE}
</method_signature>
The target method is belonging to the Python project {PROJECT_NAME} ({PROJECT_URL}).
The target method belongs to the Python project {PROJECT_NAME} ({PROJECT_URL}).
This method requires {ARG_COUNT} arguments. You must prepare them with random seeded data.
{CLASS_METHOD_OR_GENERAL_METHOD}
</target>
Expand Down

0 comments on commit 2b6476e

Please sign in to comment.