Dataset Viewer
Auto-converted to Parquet Duplicate
image
imagewidth (px)
284
524
original_caption
stringlengths
44
89
conflicting_caption
stringlengths
46
85
question
stringlengths
26
110
image_bias
stringlengths
1
37
text_bias
stringlengths
1
38
distractor
stringlengths
1
39
serial_no
int64
1
100
conflict type
stringclasses
5 values
language
stringclasses
1 value
This function calculates the total by adding tax to the price.
This function calculates the total by subtracting tax from the price.
How does the function calculate the total using price and tax?
By adding tax to the price
By subtracting tax from the price
By multiplying price by tax
1
operator_substitution
english
This function returns True if the number n is even.
This function returns True if the number n is odd.
What kind of numbers does this function return True for?
Even numbers
Odd numbers
Prime numbers
2
operator_substitution
english
This function reduces the price by subtracting the discount.
This function increases the price by adding the discount.
What action does this function perform on the price with the discount?
Reduces price by subtracting discount
Increases price by adding discount
Multiplies price by discount percentage
3
operator_substitution
english
This function checks if the user's age is 18 or older.
This function checks if the user's age is under 18.
What age group does this function check for?
18 or older
Under 18
Exactly 18
4
operator_substitution
english
This function allows access if the user is either an admin or the owner.
This function allows access only if the user is both an admin and the owner.
What permissions are required to gain access?
Either admin or owner
Both admin and owner
Neither admin nor owner
5
operator_substitution
english
This function calculates the ratio by dividing a by b.
This function calculates the product by multiplying a by b.
What operation is performed on variables a and b?
Division
Multiplication
Addition
6
operator_substitution
english
This function decrements the counter by subtracting 1.
This function increments the counter by adding 1.
What happens to the counter value when this function runs?
Decreases by 1
Increases by 1
Doubles in value
7
operator_substitution
english
This function returns True if the year is divisible by 4.
This function returns True if the year is not divisible by 4.
When does this function return True?
Divisible by 4
Not divisible by 4
Divisible by 100
8
operator_substitution
english
This function returns True if the age is less than 18.
This function returns True if the age is 18 or older.
Under what condition does this function return True?
Age is under 18
Age is 18 or older
Age is exactly 0
9
operator_substitution
english
This function checks if the length of the string is exactly 0.
This function checks if the length of the string is not 0.
What string length does this function look for to return True?
Exactly 0
Not 0
Greater than 10
10
operator_substitution
english
This function returns True if x is strictly greater than 0.
This function returns True if x is strictly less than 0.
For what values of x does this function return True?
Greater than 0
Less than 0
Equal to 0
11
operator_substitution
english
This function doubles the value by multiplying by 2.
This function halves the value by dividing by 2.
What effect does this function have on the input value?
Multiplies by 2
Divides by 2
Squares the value
12
operator_substitution
english
This function checks if the value is less than 0.
This function checks if the value is greater than 0.
What range of values does this function check for?
Less than 0
Greater than 0
Exactly 0
13
operator_substitution
english
This function returns True if the remainder of a divided by b is zero.
This function returns True if the remainder of a divided by b is non-zero.
Under what remainder condition does this function return True?
Remainder is zero
Remainder is non-zero
Remainder is equal to a
14
operator_substitution
english
This function returns True if the length of the input is 8 or more.
This function returns True if the length of the input is less than 8.
What string length criteria returns True?
Length of 8 or more
Length of less than 8
Length of exactly 8
15
operator_substitution
english
This function returns True if x is both greater than 0 and less than 100.
This function returns True if x is either greater than 0 or less than 100.
What constraint must x satisfy to return True?
Both greater than 0 and less than 100
Either greater than 0 or less than 100
Exactly equal to 50
16
operator_substitution
english
This function increases the index by adding 1.
This function decreases the index by subtracting 1.
What is the mathematical outcome of running this function on index i?
Increases by 1
Decreases by 1
Multiplies by 2
17
operator_substitution
english
This function returns True if the value is strictly greater than the limit.
This function returns True if the value is strictly less than the limit.
When does this function return True?
Value is greater than limit
Value is less than limit
Value is equal to limit
18
operator_substitution
english
This function calculates the percentage by dividing part by total and multiplying by 100.
This function calculates the percentage by dividing part by total and adding 100.
What operation is done to the division result?
Multiplication by 100
Addition of 100
Subtraction of 100
19
operator_substitution
english
This function returns True if x is not equal to y.
This function returns True if x is equal to y.
Under what condition does this check return True?
x is not equal to y
x is equal to y
x is greater than y
20
operator_substitution
english
This function subtracts the offset from the base value.
This function subtracts the base value from the offset.
How is the mathematical subtraction performed in this function?
base minus offset
offset minus base
base plus offset
21
operand_order
english
This function divides the total amount by the number of people.
This function divides the number of people by the total amount.
What is the dividend and divisor in this function?
total divided by people
people divided by total
total multiplied by people
22
operand_order
english
This function returns True if x is less than y.
This function returns True if y is less than x.
What relationship does this function check?
x is less than y
y is less than x
x is equal to y
23
operand_order
english
This function computes the difference of a minus b.
This function computes the difference of b minus a.
What is the calculation layout?
a minus b
b minus a
a multiplied by b
24
operand_order
english
This function checks if variable a is greater than variable b.
This function checks if variable b is greater than variable a.
What does the logic verify?
a is greater than b
b is greater than a
a is equal to b
25
operand_order
english
This function returns the remainder of a divided by b.
This function returns the remainder of b divided by a.
What modulo operation is being executed?
a modulo b
b modulo a
a divided by b
26
operand_order
english
This function concatenates 'first' followed by 'second'.
This function concatenates 'second' followed by 'first'.
In what order are the strings combined?
first followed by second
second followed by first
Joined with a space in between
27
operand_order
english
This function calculates profit by subtracting cost from revenue.
This function calculates profit by subtracting revenue from cost.
What is the subtraction formula used?
revenue minus cost
cost minus revenue
revenue divided by cost
28
operand_order
english
This function scales down the value by dividing val by factor.
This function scales down the value by dividing factor by val.
What mathematical division is represented?
val divided by factor
factor divided by val
val multiplied by factor
29
operand_order
english
This function calculates the slope by dividing dy by dx.
This function calculates the slope by dividing dx by dy.
How is the slope computed?
dy divided by dx
dx divided by dy
dy multiplied by dx
30
operand_order
english
This function checks if set_a is a subset of set_b.
This function checks if set_b is a subset of set_a.
What subset relationship is being tested?
set_a is subset of set_b
set_b is subset of set_a
set_a and set_b are disjoint
31
operand_order
english
This function formats the name with first name followed by last name.
This function formats the name with last name followed by first name.
What is the format of the output string?
first followed by last name
last followed by first name
Last name in all capital letters
32
operand_order
english
This function adds val before the array elements.
This function adds the array elements before val.
Where does the new value appear in relation to the list?
Before the array elements
After the array elements
In the middle of the array
33
operand_order
english
This function concatenates dir before file with a slash.
This function concatenates file before dir with a slash.
How are the path components joined?
dir before file
file before dir
Separated by a backslash
34
operand_order
english
This function calculates base raised to the power of exp.
This function calculates exp raised to the power of base.
What mathematical power calculation is executed?
base raised to power of exp
exp raised to power of base
base multiplied by exp
35
operand_order
english
This function subtracts tax from the amount.
This function subtracts the amount from the tax.
What is the subtraction formula?
amount minus tax
tax minus amount
amount divided by tax
36
operand_order
english
This function returns a tuple with x in the first position and y in the second.
This function returns a tuple with y in the first position and x in the second.
What is the order of elements in the returned coordinate tuple?
x first, then y
y first, then x
x and y summed together
37
operand_order
english
This function calculates the elapsed time by subtracting start from end.
This function calculates the elapsed time by subtracting end from start.
How is the time difference calculated?
end minus start
start minus end
end plus start
38
operand_order
english
This function calculates the change as new minus old, divided by old.
This function calculates the change as old minus new, divided by old.
What formula calculates the percentage difference?
new minus old in numerator
old minus new in numerator
new plus old in numerator
39
operand_order
english
This function calculates the vector by subtracting source from target.
This function calculates the vector by subtracting target from source.
What is the vector subtraction direction?
target minus source
source minus target
target plus source
40
operand_order
english
This function loops exactly 10 times to process the array.
This function loops exactly 100 times to process the array.
How many times does the loop execute in this function?
10 times
100 times
Infinite times
41
loop_boundary
english
This function retries the connection up to 3 times.
This function retries the connection up to 30 times.
What is the maximum number of connection attempts in this code?
3 attempts
30 attempts
5 attempts
42
loop_boundary
english
The while loop runs as long as count is strictly greater than 0.
The while loop runs as long as count is greater than or equal to 0.
What is the condition for the countdown while loop to continue?
count is strictly greater than 0
count is greater than or equal to 0
count is equal to 0
43
loop_boundary
english
This function sets the fetch data limit to 20.
This function sets the fetch data limit to 200.
What is the numerical limit set in this function?
20
200
10
44
loop_boundary
english
The function writes data inside a loop that runs 5 times.
The function writes data inside a loop that runs 50 times.
What is the size limit of the buffer write loop?
5
50
10
45
loop_boundary
english
This function sets the maximum lines to read to 50.
This function sets the maximum lines to read to 500.
How many maximum lines will this code attempt to read?
50 lines
500 lines
5 lines
46
loop_boundary
english
This function validates that the grade is between 0 and 100.
This function validates that the grade is between 0 and 10.
What is the maximum valid score this function accepts?
100
10
50
47
loop_boundary
english
This function clamps the value to a maximum threshold of 10.
This function clamps the value to a maximum threshold of 100.
What is the upper bound value used to clamp the output?
10
100
0
48
loop_boundary
english
This function checks if the value of x is less than 50.
This function checks if the value of x is less than 5.
What is the value boundary for the check?
50
5
100
49
loop_boundary
english
The range function inside the loop goes up to 100 iterations.
The range function inside the loop goes up to 1000 iterations.
How many iterations are configured in the range function?
100
1000
10
50
loop_boundary
english
This function loops through and tests ports up to index 1024.
This function loops through and tests ports up to index 10240.
What is the upper limit of ports tested in the loop?
1024
10240
80
51
loop_boundary
english
This function sets the generation count variable to 10.
This function sets the generation count variable to 100.
What sequence length does the count variable specify?
10
100
1000
52
loop_boundary
english
This function returns True if retries are 5 or more.
This function returns True if retries are 50 or more.
What is the threshold for checking maximum retries?
5 or more
50 or more
exactly 5
53
loop_boundary
english
The batch size configured in this function is 32.
The batch size configured in this function is 320.
What batch size value is passed to the process function?
32
320
64
54
loop_boundary
english
This function returns True if time t is less than 30.
This function returns True if time t is less than 300.
What is the threshold value used to check the timeout?
30
300
60
55
loop_boundary
english
This function sets the maximum character length to 80.
This function sets the maximum character length to 800.
What is the character length cutoff used for truncation?
80
800
100
56
loop_boundary
english
This function checks if the octet value is at most 255.
This function checks if the octet value is at most 2550.
What is the upper limit value allowed for the ip octet?
255
2550
256
57
loop_boundary
english
This function triggers a sleep command for 5 seconds.
This function triggers a sleep command for 50 seconds.
How many seconds does this function delay execution?
5 seconds
50 seconds
1 second
58
loop_boundary
english
This function checks if value p is less than or equal to 100.
This function checks if value p is less than or equal to 1000.
What is the upper boundary check for the percent validation?
100
1000
1
59
loop_boundary
english
This function defines a capacity variable holding 500.
This function defines a capacity variable holding 50.
What value is assigned to the capacity variable?
500
50
1000
60
loop_boundary
english
This function retrieves the first element at index 0 of the array.
This function retrieves the last element at index -1 of the array.
Which array element does the index position target?
First element (index 0)
Last element (index -1)
Second element (index 1)
61
array_indexing
english
This function retrieves the last element at index -1 of the array.
This function retrieves the first element at index 0 of the array.
Which position in the list is returned by the indexing code?
Last element (index -1)
First element (index 0)
Middle element
62
array_indexing
english
This function retrieves the element at index 1 of the list.
This function retrieves the element at index 0 of the list.
What element index is being accessed?
Index 1
Index 0
Index -1
63
array_indexing
english
This function retrieves the second-to-last element at index -2.
This function retrieves the first element at index 0.
Which element does index position -2 retrieve?
Second-to-last element
First element
Last element
64
array_indexing
english
This function retrieves the element at index 2 of the list.
This function retrieves the element at index -1 of the list.
Which position in the list is accessed?
Index 2
Index -1
Index 0
65
array_indexing
english
This function slices the array returning elements up to index 3.
This function slices the array returning elements starting from index 3.
What sub-array range does the slicing code return?
Elements up to index 3
Elements starting from index 3
Only the element at index 3
66
array_indexing
english
This function slices the list returning the last 3 elements.
This function slices the list returning all elements except the last 3.
Which elements are returned by the slice operation?
The last 3 elements
All elements except the last 3
Only the first 3 elements
67
array_indexing
english
This function retrieves the first column value of the first row at matrix[0][0].
This function retrieves the last column value of the first row at matrix[0][-1].
Which cell in the matrix does the index code target?
Row 0, Column 0
Row 0, Column -1
Row -1, Column 0
68
array_indexing
english
This function extracts the header at index 0 of the rows list.
This function extracts the footer at index -1 of the rows list.
Based on the index expression used on the rows list, which document row position is returned by this function?
Header (index 0)
Footer (index -1)
Middle row
69
array_indexing
english
This function extracts the footer at index -1 of the rows list.
This function extracts the header at index 0 of the rows list.
Based on the index expression used on the rows list, which document row position is returned by this function?
Footer (index -1)
Header (index 0)
None of the rows
70
array_indexing
english
This function gets the last item at index -1 representing the newest item.
This function gets the first item at index 0 representing the oldest item.
Which item (newest or oldest) is retrieved from the list by this function?
Last item (index -1)
First item (index 0)
A random item
71
array_indexing
english
This function gets the first item at index 0 representing the oldest item.
This function gets the last item at index -1 representing the newest item.
Which item (oldest or newest) is retrieved from the list by this function?
First item (index 0)
Last item (index -1)
Second item
72
array_indexing
english
This function accesses index 1 to retrieve the runner-up score.
This function accesses index 0 to retrieve the winner's score.
Which standing score position (winner or runner-up) is retrieved by this function?
Runner-up (index 1)
Winner (index 0)
Third place
73
array_indexing
english
This function accesses index 0 to retrieve the winning score.
This function accesses index -1 to retrieve the last place score.
Which standing score position (winner or last place) is retrieved by this function?
Winner (index 0)
Last place (index -1)
Runner-up
74
array_indexing
english
This function slices the array returning the first 2 elements.
This function slices the array returning all elements except the first 2.
Which subset of elements is returned from the array by this function?
First 2 elements
All elements except the first 2
Only index 2
75
array_indexing
english
This function slices the list returning the last 2 elements.
This function slices the list returning all elements except the last 2.
Which sub-list items does the slice output?
The last 2 elements
All elements except the last 2
The first 2 elements
76
array_indexing
english
This function retrieves the top-left cell at grid[0][0].
This function retrieves the bottom-right cell at grid[-1][-1].
Which grid cell coordinate is retrieved?
Top-left cell
Bottom-right cell
Middle cell
77
array_indexing
english
This function retrieves the bottom-right cell at grid[-1][-1].
This function retrieves the top-left cell at grid[0][0].
What position in the 2D grid is accessed?
Bottom-right cell
Top-left cell
Bottom-left cell
78
array_indexing
english
This function accesses index -2 to return the second-to-last item.
This function accesses index -1 to return the last item.
Which item (second-to-last or last) is retrieved from the list by this function?
Second-to-last item
Last item
First item
79
array_indexing
english
This function retrieves the middle element of the array using index mid.
This function retrieves the first element of the array using index 0.
Which position in the array is returned by the function?
Middle element
First element
Last element
80
array_indexing
english
This function returns True if the user role is admin, otherwise False.
This function returns False if the user role is admin, otherwise True.
What does this function return for a user whose role is 'admin'?
True
False
null
81
boolean_inversion
english
The function returns True if the user is active, and False otherwise.
The function returns False if the user is active, and True otherwise.
What is the return value when user.is_active is True?
True
False
null
82
boolean_inversion
english
This function returns True if the character '@' exists in the email, otherwise False.
This function returns False if the character '@' exists in the email, otherwise True.
What does the function return if the email contains '@'?
True
False
null
83
boolean_inversion
english
This function returns False if n is less than 2.
This function returns True if n is less than 2.
What does this function return if the input n is 1?
False
True
null
84
boolean_inversion
english
This function returns True if the array has a length of 0.
This function returns False if the array has a length of 0.
What does this code output for an empty list input?
True
False
null
85
boolean_inversion
english
This function returns True if the input day is Saturday or Sunday.
This function returns False if the input day is Saturday or Sunday.
What does this code return for the input day 'Saturday'?
True
False
null
86
boolean_inversion
english
This function returns True if token age exceeds 3600.
This function returns False if token age exceeds 3600.
What is the return value if the token's age is 4000?
True
False
null
87
boolean_inversion
english
This function returns True if the status code is 400 or higher.
This function returns False if the status code is 400 or higher.
What does the code return for a status code of 404?
True
False
null
88
boolean_inversion
english
This function returns True if the session is valid, otherwise False.
This function returns False if the session is valid, otherwise True.
What does the function output for a valid session?
True
False
null
89
boolean_inversion
english
This function returns True if the response code is exactly 200.
This function returns False if the response code is exactly 200.
What is the return value of this function when code is 200?
True
False
null
90
boolean_inversion
english
This function returns True if the input character is a digit.
This function returns False if the input character is a digit.
What does this code return for the character '5'?
True
False
null
91
boolean_inversion
english
This function returns True if the string is all lowercase.
This function returns False if the string is all lowercase.
What does this function return for a lowercase string 'abc'?
True
False
null
92
boolean_inversion
english
This function returns True if the path points to a file.
This function returns False if the path points to a file.
What does this function return if the path is indeed a valid file?
True
False
null
93
boolean_inversion
english
This function returns True if the path points to a directory.
This function returns False if the path points to a directory.
What does this function return if the path is a folder?
True
False
null
94
boolean_inversion
english
This function returns True if the input year is divisible by 4.
This function returns False if the input year is divisible by 4.
What is the output for a year that is divisible by 4?
True
False
null
95
boolean_inversion
english
This function returns True if the number x is even.
This function returns False if the number x is even.
What does the code return if x is 4?
True
False
null
96
boolean_inversion
english
This function returns True if the number x is odd.
This function returns False if the number x is odd.
What does the code return if x is 5?
True
False
null
97
boolean_inversion
english
This function returns True if the string is all uppercase.
This function returns False if the string is all uppercase.
What does this function return for the uppercase string 'XYZ'?
True
False
null
98
boolean_inversion
english
This function returns True if the user is verified, otherwise False.
This function returns False if the user is verified, otherwise True.
What does the code return if user.verified is True?
True
False
null
99
boolean_inversion
english
This function returns True if the task.done flag is True.
This function returns False if the task.done flag is True.
What is the return value of this function when task.done is True?
True
False
null
100
boolean_inversion
english

Code Conflict Dataset

A dataset of 100 visual Python code conflict samples designed to evaluate Vision-Language Models (VLMs) under cross-modal conflicts (discrepancy between code screenshots and caption text).

Dataset Statistics

  • Total Rows: 100 samples
  • Language: English (english)
  • Categories: 5 distinct Python code conflict types (20 samples per category):
    1. operator_substitution (Rows 1–20): Swapping math or logic operators (e.g., + to -, == to !=, or to and).
    2. operand_order (Rows 21–40): Changing the sequence of parameters or subtraction/division operands (e.g., a - b to b - a).
    3. loop_boundary (Rows 41–60): Boundary limit or off-by-one changes in loops (e.g., range(10) vs range(100)).
    4. array_indexing (Rows 61–80): Index offset variations, slices, or grid coordinates (e.g., arr[0] vs arr[-1]).
    5. boolean_inversion (Rows 81–100): Logical inversion of conditional branches (e.g., returning True instead of False).

Dataset Schema

When loading this dataset via Hugging Face's datasets library, the schema is as follows:

Column Name Type Description
image image The high-resolution syntax-highlighted code screenshot.
original_caption string Truthful description matching the visual code snippet's logic.
conflicting_caption string Incorrect/misleading text description representing the conflict.
question string Neutral evaluative question that does not reveal the answer or index in the text.
image_bias string Correct option matching the code screenshot (VLM visual bias choice).
text_bias string Option matching the misleading text caption (VLM text bias choice).
distractor string Plausible but incorrect distractor option.
serial_no int64 Sequential ID (1 to 100).
conflict type string The category of the syntax conflict.
language string Language of the evaluation text (always english).

In the source train/metadata.csv file, the column is named file_name and contains the relative path to the image file (e.g. code_1.png). The Hugging Face ImageFolder builder automatically parses the file_name column to load the image objects and exposes them under the image column, discarding the raw file name string.

Setup & Reproduction Steps

To regenerate the screenshots or execute the generation script:

1. Requirements & Tools

  • Python 3
  • Pygments (used for syntax highlighting and compiling Python code snippets to high-resolution PNG images):
    pip install Pygments
    
  • Matplotlib (optional helper used during image styling adjustments).

2. Generate Batches

Run the generation script generate_batch.py for any specific batch of 5 (e.g., batch 9 for rows 41-45):

python3 generate_batch.py 9

Evaluation Context

This dataset was prepared and tested using Gemini 3.5 Flash to study modal arbitration behaviour under conflicting visual and textual constraints.

Downloads last month
46