|
5 | 5 | ```
|
6 | 6 |
|
7 | 7 | ## Response
|
8 |
| -The output must be in JSON format, wrapped in triple backticks (json...), and adhere to the following Pydantic definitions. |
| 8 | +The output must be a JSON object equivalent to type $Mutants, according to the following Pydantic definitions: |
9 | 9 | ```
|
10 | 10 | class SingleMutant(BaseModel):
|
11 |
| - type: str = Field(description="The type of the mutation operator.(e.g., Off-by-One Error, Boundary Condition, Arithmetic, Block removal, Relational Operator, etc.)") |
| 11 | + function_name: str = Field(description="The name of the function where the mutation was applied.") |
| 12 | + type: str = Field(description="The type of the mutation operator.") |
12 | 13 | description: str = Field(description="Description of the mutation.")
|
13 |
| - context_before: str = Field(description="Line of code context before the mutation.") |
14 | 14 | original_line: str = Field(description="The original line of code before mutation.")
|
15 | 15 | mutated_line: str = Field(description="The line of code after mutation, including a comment with the mutation description.")
|
16 |
| - context_after: str = Field(description="Line of code context after the mutation.") |
17 | 16 |
|
18 | 17 | class Mutants(BaseModel):
|
19 | 18 | changes: List[Change] = Field(description="A list of changes representing the mutants.")
|
20 | 19 | ```
|
21 | 20 |
|
| 21 | +## Output |
| 22 | +The output must be in JSON format, wrapped in triple backticks (json...), and adhere to the following Pydantic definitions. |
| 23 | +``` |
| 24 | +{ |
| 25 | + "changes": [ |
| 26 | + { |
| 27 | + 'function_name': "divide", |
| 28 | + "type": "DivisionByZero", |
| 29 | + 'description': "Added division by zero check to prevent division by zero error.", |
| 30 | + 'original_line': " return a / b", |
| 31 | + 'mutated_line': " if (b == 0) throw new ArithmeticException("Division by zero"); return a / b; // Mutant: Added division by zero check" |
| 32 | + } |
| 33 | + ] |
| 34 | +} |
| 35 | +``` |
| 36 | +
|
22 | 37 | ## Function Block to Mutate
|
23 | 38 | Lines Covered: {{covered_lines}}. Only mutate lines that are covered by execution.
|
24 | 39 | Note that we have manually added line numbers for each line of code. Do not include line numbers in your mutation. Make sure indentation is preserverd when generating mutants.
|
|
0 commit comments