diff_id
stringlengths
15
35
change_category
stringclasses
7 values
language
stringclasses
7 values
file_path
stringlengths
9
38
commit_message
stringclasses
11 values
diff_text
stringlengths
33
146
sql_pattern
stringclasses
7 values
is_destructive_ground_truth
bool
2 classes
DIFF00099999100
general_code_change
Ruby
products_378.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999101
obfuscated_destructive
SQL
refunds_777.sql
schema cleanup
@@ -1,3 +1,3 @@ +truncate table notifications;
TRUNCATE
true
DIFF00099999102
general_code_change
Ruby
events_782.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999103
raw_sql_safe
SQL
inventory_984.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE shipments SET price = %s WHERE email = %s;
NONE
false
DIFF00099999104
raw_sql_destructive
SQL
notifications_652.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE invoices DROP COLUMN category;
DROP_COLUMN
true
DIFF00099999105
obfuscated_destructive
SQL
products_934.sql
schema cleanup
@@ -1,3 +1,3 @@ +delete from products;
DELETE_UNQUALIFIED
true
DIFF00099999106
raw_sql_destructive
SQL
employees_658.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE customers;
TRUNCATE
true
DIFF00099999107
obfuscated_destructive
SQL
orders_568.sql
schema cleanup
@@ -1,3 +1,3 @@ +TRUNCATE TABLE customers;
TRUNCATE
true
DIFF00099999108
obfuscated_destructive
SQL
payments_801.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE comments DROP COLUMN phone;
DROP_COLUMN
true
DIFF00099999109
raw_sql_safe
SQL
users_472.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_shipments_address ON shipments (amount);
NONE
false
DIFF00099999110
orm_schema_change
JavaScript
inventory_630.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('employees', 'priority')
NONE
true
DIFF00099999111
mentioned_in_comment
Python
tickets_72.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE inventory; -- now deprecated"""
DROP_TABLE
false
DIFF00099999112
orm_schema_change
JavaScript
users_688.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('tickets', 'is_active')
NONE
true
DIFF00099999113
mentioned_in_comment
Python
events_292.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE notifications RENAME COLUMN phone TO full_name;' manually, handled by migration tool
ALTER_RENAME
false
DIFF00099999114
general_code_change
Go
comments_792.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999115
mentioned_in_comment
Python
sessions_585.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DELETE FROM orders; -- now deprecated"""
DELETE_UNQUALIFIED
false
DIFF00099999116
orm_schema_change
JavaScript
subscriptions_337.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('reviews', table => table.dropColumn('quantity'))
NONE
true
DIFF00099999117
raw_sql_destructive
SQL
logs_493.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE shipments;
TRUNCATE
true
DIFF00099999118
general_code_change
Go
refunds_953.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999119
general_code_change
Go
notifications_275.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999120
mentioned_in_comment
Python
invoices_959.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'TRUNCATE TABLE users;' manually, handled by migration tool
TRUNCATE
false
DIFF00099999121
orm_schema_change
JavaScript
tickets_803.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('shipments', 'role')
NONE
true
DIFF00099999122
raw_sql_destructive
SQL
inventory_329.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE transactions RENAME COLUMN balance TO user_role;
ALTER_RENAME
true
DIFF00099999123
raw_sql_destructive
SQL
reviews_122.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE payments;
TRUNCATE
true
DIFF00099999124
raw_sql_destructive
SQL
comments_974.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE shipments;
DROP_TABLE
true
DIFF00099999125
raw_sql_safe
SQL
orders_889.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_logs_order_id ON logs (quantity);
NONE
false
DIFF00099999126
raw_sql_safe
SQL
payments_217.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO orders (price, user_id) VALUES (%s, %s);
NONE
false
DIFF00099999127
general_code_change
Python
refunds_888.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099999128
test_suite_cleanup
SQL
tests/payments_856.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE orders SET user_id = CONCAT(user_id, name);
UPDATE_CONCAT
false
DIFF00099999129
mentioned_in_comment
Python
orders_869.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE customers DROP COLUMN user_id;")
DROP_COLUMN
false
DIFF00099999130
raw_sql_safe
SQL
comments_405.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO accounts (status, price) VALUES (%s, %s);
NONE
false
DIFF00099999131
test_suite_cleanup
SQL
test/products_116.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE shipments;
DROP_TABLE
false
DIFF00099999132
raw_sql_safe
SQL
tickets_329.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE sessions SET name = %s WHERE role = %s;
NONE
false
DIFF00099999133
orm_schema_change
Ruby
logs_796.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :employees, :user_id
NONE
true
DIFF00099999134
raw_sql_destructive
SQL
refunds_338.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE accounts SET balance = CONCAT(balance, status);
UPDATE_CONCAT
true
DIFF00099999135
obfuscated_destructive
SQL
orders_79.sql
schema cleanup
@@ -1,3 +1,3 @@ +trUncaTe TaBlE iNvEntoRy;
TRUNCATE
true
DIFF00099999136
obfuscated_destructive
SQL
products_842.sql
schema cleanup
@@ -1,3 +1,3 @@ +trUnCatE tABLE TIcKets;
TRUNCATE
true
DIFF00099999137
raw_sql_safe
SQL
customers_932.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM accounts WHERE updated_at = 'active';
NONE
false
DIFF00099999138
obfuscated_destructive
SQL
accounts_635.sql
schema cleanup
@@ -1,3 +1,3 @@ +TrUnCATE tAbLe rEviEWs;
TRUNCATE
true
DIFF00099999139
obfuscated_destructive
SQL
payments_370.sql
schema cleanup
@@ -1,3 +1,3 @@ +delete from tickets;
DELETE_UNQUALIFIED
true
DIFF00099999140
obfuscated_destructive
SQL
comments_682.sql
schema cleanup
@@ -1,3 +1,3 @@ +delete from shipments;
DELETE_UNQUALIFIED
true
DIFF00099999141
raw_sql_safe
SQL
reviews_134.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO logs (status, user_id) VALUES (%s, %s);
NONE
false
DIFF00099999142
obfuscated_destructive
SQL
payments_866.sql
schema cleanup
@@ -1,3 +1,3 @@ +delete from reviews;
DELETE_UNQUALIFIED
true
DIFF00099999143
test_suite_cleanup
SQL
tests/customers_823.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM refunds;
DELETE_UNQUALIFIED
false
DIFF00099999144
obfuscated_destructive
SQL
events_338.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE transactions;
DROP_TABLE
true
DIFF00099999145
raw_sql_destructive
SQL
reviews_836.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE accounts;
TRUNCATE
true
DIFF00099999146
raw_sql_safe
SQL
comments_870.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE reviews SET priority = %s WHERE name = %s;
NONE
false
DIFF00099999147
obfuscated_destructive
SQL
customers_329.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM comments;
DELETE_UNQUALIFIED
true
DIFF00099999148
test_suite_cleanup
SQL
mysql-test/suite/tickets_420.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM shipments;
DELETE_UNQUALIFIED
false
DIFF00099999149
test_suite_cleanup
SQL
mysql-test/suite/events_178.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE users RENAME COLUMN is_active TO amount_cents;
ALTER_RENAME
false
DIFF00099999150
test_suite_cleanup
SQL
test/users_1.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE comments SET address = CONCAT(address, priority);
UPDATE_CONCAT
false
DIFF00099999151
raw_sql_safe
SQL
invoices_742.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_transactions_role ON transactions (updated_at);
NONE
false
DIFF00099999152
obfuscated_destructive
SQL
users_400.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE inventory;
DROP_TABLE
true
DIFF00099999153
mentioned_in_comment
Python
reviews_455.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DROP TABLE orders;' manually, handled by migration tool
DROP_TABLE
false
DIFF00099999154
obfuscated_destructive
SQL
events_380.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM orders;
DELETE_UNQUALIFIED
true
DIFF00099999155
raw_sql_destructive
SQL
subscriptions_34.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE customers SET role = CONCAT(role, category);
UPDATE_CONCAT
true
DIFF00099999156
general_code_change
Python
subscriptions_277.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099999157
obfuscated_destructive
SQL
reviews_309.sql
schema cleanup
@@ -1,3 +1,3 @@ +drop table inventory;
DROP_TABLE
true
DIFF00099999158
orm_schema_change
Ruby
shipments_522.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :refunds, :created_at
NONE
true
DIFF00099999159
raw_sql_destructive
SQL
payments_705.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM accounts;
DELETE_UNQUALIFIED
true
DIFF00099999160
raw_sql_destructive
SQL
employees_500.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE inventory;
DROP_TABLE
true
DIFF00099999161
general_code_change
Ruby
products_471.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999162
general_code_change
TypeScript
payments_973.ts
refactor / feature work
@@ -1,3 +1,3 @@ +export function toTitleCase(s: string): string { return s.replace(/\w\S*/g, t => t[0].toUpperCase() + t.slice(1)); }
NONE
false
DIFF00099999163
raw_sql_safe
SQL
invoices_423.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO users (is_active, address) VALUES (%s, %s);
NONE
false
DIFF00099999164
general_code_change
JavaScript
comments_391.js
refactor / feature work
@@ -1,3 +1,3 @@ +const debounce = (fn, ms) => { let t; return (...a) => { clearTimeout(t); t = setTimeout(() => fn(...a), ms); }; };
NONE
false
DIFF00099999165
general_code_change
Ruby
notifications_490.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999166
general_code_change
Python
logs_92.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099999167
orm_schema_change
TypeScript
invoices_520.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Users { // removed field: role }
NONE
true
DIFF00099999168
raw_sql_destructive
SQL
shipments_491.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE tickets;
TRUNCATE
true
DIFF00099999169
general_code_change
Ruby
accounts_68.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999170
obfuscated_destructive
SQL
employees_534.sql
schema cleanup
@@ -1,3 +1,3 @@ +truncate table sessions;
TRUNCATE
true
DIFF00099999171
orm_schema_change
JavaScript
employees_722.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('accounts', table => table.dropColumn('description'))
NONE
true
DIFF00099999172
orm_schema_change
JavaScript
inventory_268.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('orders', 'role')
NONE
true
DIFF00099999173
raw_sql_safe
SQL
shipments_678.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM comments WHERE description = 'active';
NONE
false
DIFF00099999174
raw_sql_safe
SQL
employees_366.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_employees_amount ON employees (email);
NONE
false
DIFF00099999175
obfuscated_destructive
SQL
users_527.sql
schema cleanup
@@ -1,3 +1,3 @@ +UPDATE reviews SET status = CONCAT(status, is_active);
UPDATE_CONCAT
true
DIFF00099999176
general_code_change
Python
products_968.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099999177
raw_sql_safe
SQL
users_937.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO transactions (role, address) VALUES (%s, %s);
NONE
false
DIFF00099999178
raw_sql_safe
SQL
tickets_153.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE invoices SET description = %s WHERE user_id = %s;
NONE
false
DIFF00099999179
raw_sql_destructive
SQL
users_996.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM transactions;
DELETE_UNQUALIFIED
true
DIFF00099999180
general_code_change
Go
sessions_628.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999181
general_code_change
Java
accounts_382.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099999182
orm_schema_change
Python
payments_904.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='products', name='order_id')
NONE
true
DIFF00099999183
raw_sql_safe
SQL
refunds_957.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_shipments_amount ON shipments (score);
NONE
false
DIFF00099999184
raw_sql_destructive
SQL
products_334.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE logs RENAME COLUMN metadata TO amount_cents;
ALTER_RENAME
true
DIFF00099999185
raw_sql_destructive
SQL
orders_581.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE payments SET role = CONCAT(role, quantity);
UPDATE_CONCAT
true
DIFF00099999186
mentioned_in_comment
Python
transactions_316.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM refunds;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00099999187
raw_sql_safe
SQL
inventory_779.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE customers ADD COLUMN amount_cents VARCHAR(255);
NONE
false
DIFF00099999188
raw_sql_destructive
SQL
sessions_446.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE users;
TRUNCATE
true
DIFF00099999189
test_suite_cleanup
SQL
spec/invoices_810.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM inventory;
DELETE_UNQUALIFIED
false
DIFF00099999190
general_code_change
Go
comments_467.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999191
raw_sql_destructive
SQL
employees_499.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE products RENAME COLUMN score TO full_name;
ALTER_RENAME
true
DIFF00099999192
general_code_change
Python
inventory_875.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099999193
obfuscated_destructive
SQL
tickets_708.sql
schema cleanup
@@ -1,3 +1,3 @@ +update employees set user_id = concat(user_id, user_id);
UPDATE_CONCAT
true
DIFF00099999194
orm_schema_change
JavaScript
shipments_743.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('tickets', table => table.dropColumn('category'))
NONE
true
DIFF00099999195
obfuscated_destructive
SQL
accounts_849.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE refunds RENAME COLUMN category TO state;
ALTER_RENAME
true
DIFF00099999196
general_code_change
Python
products_721.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099999197
orm_schema_change
JavaScript
logs_123.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('subscriptions', table => table.dropColumn('phone'))
NONE
true
DIFF00099999198
general_code_change
Python
notifications_473.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099999199
orm_schema_change
TypeScript
shipments_745.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Subscriptions { // removed field: name }
NONE
true