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
DIFF00000008900
mentioned_in_comment
Python
payments_716.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DROP TABLE shipments;' manually, handled by migration tool
DROP_TABLE
false
DIFF00000008901
obfuscated_destructive
SQL
notifications_398.sql
schema cleanup
@@ -1,3 +1,3 @@ +truncate table notifications;
TRUNCATE
true
DIFF00000008902
raw_sql_safe
SQL
events_602.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_tickets_email ON tickets (created_at);
NONE
false
DIFF00000008903
orm_schema_change
Ruby
transactions_972.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :inventory, :created_at
NONE
true
DIFF00000008904
raw_sql_destructive
SQL
subscriptions_664.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE tickets SET price = CONCAT(price, updated_at);
UPDATE_CONCAT
true
DIFF00000008905
orm_schema_change
JavaScript
refunds_569.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('logs', 'category')
NONE
true
DIFF00000008906
general_code_change
Go
refunds_128.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000008907
orm_schema_change
Ruby
payments_843.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :products, :address
NONE
true
DIFF00000008908
test_suite_cleanup
SQL
tests/transactions_447.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE sessions SET user_id = CONCAT(user_id, metadata);
UPDATE_CONCAT
false
DIFF00000008909
obfuscated_destructive
SQL
transactions_695.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE tickets RENAME COLUMN metadata TO user_role;
ALTER_RENAME
true
DIFF00000008910
raw_sql_safe
SQL
invoices_594.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE transactions SET balance = %s WHERE phone = %s;
NONE
false
DIFF00000008911
raw_sql_safe
SQL
reviews_759.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO shipments (address, order_id) VALUES (%s, %s);
NONE
false
DIFF00000008912
raw_sql_safe
SQL
employees_632.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM tickets WHERE amount = 'active';
NONE
false
DIFF00000008913
general_code_change
Python
invoices_373.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00000008914
mentioned_in_comment
Python
invoices_412.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'UPDATE subscriptions SET priority = CONCAT(priority, status);' manually, handled by migration tool
UPDATE_CONCAT
false
DIFF00000008915
raw_sql_destructive
SQL
tickets_394.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE notifications RENAME COLUMN role TO user_role;
ALTER_RENAME
true
DIFF00000008916
raw_sql_safe
SQL
payments_7.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_orders_priority ON orders (updated_at);
NONE
false
DIFF00000008917
raw_sql_destructive
SQL
payments_416.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE accounts SET phone = CONCAT(phone, priority);
UPDATE_CONCAT
true
DIFF00000008918
test_suite_cleanup
SQL
test/shipments_530.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE events SET amount = CONCAT(amount, order_id);
UPDATE_CONCAT
false
DIFF00000008919
raw_sql_safe
SQL
comments_37.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM employees WHERE address = 'active';
NONE
false
DIFF00000008920
test_suite_cleanup
SQL
mysql-test/suite/shipments_211.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE reviews;
TRUNCATE
false
DIFF00000008921
test_suite_cleanup
SQL
spec/comments_122.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE subscriptions;
DROP_TABLE
false
DIFF00000008922
test_suite_cleanup
SQL
spec/products_181.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM comments;
DELETE_UNQUALIFIED
false
DIFF00000008923
mentioned_in_comment
Python
users_57.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'TRUNCATE TABLE transactions;' manually, handled by migration tool
TRUNCATE
false
DIFF00000008924
obfuscated_destructive
SQL
reviews_561.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM invoices;
DELETE_UNQUALIFIED
true
DIFF00000008925
orm_schema_change
JavaScript
notifications_252.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('payments', 'quantity')
NONE
true
DIFF00000008926
mentioned_in_comment
Python
events_701.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE tickets RENAME COLUMN is_active TO contact_email;")
ALTER_RENAME
false
DIFF00000008927
general_code_change
Python
logs_190.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00000008928
raw_sql_destructive
SQL
tickets_769.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE products;
DROP_TABLE
true
DIFF00000008929
raw_sql_safe
SQL
logs_588.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO accounts (quantity, updated_at) VALUES (%s, %s);
NONE
false
DIFF00000008930
general_code_change
JavaScript
users_395.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000008931
general_code_change
Java
users_481.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000008932
obfuscated_destructive
SQL
customers_283.sql
schema cleanup
@@ -1,3 +1,3 @@ +truncate table subscriptions;
TRUNCATE
true
DIFF00000008933
general_code_change
TypeScript
comments_785.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
DIFF00000008934
test_suite_cleanup
SQL
tests/refunds_866.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE logs SET amount = CONCAT(amount, updated_at);
UPDATE_CONCAT
false
DIFF00000008935
general_code_change
Go
inventory_168.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000008936
mentioned_in_comment
Python
orders_694.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: UPDATE transactions SET price = CONCAT(price, user_id);")
UPDATE_CONCAT
false
DIFF00000008937
raw_sql_safe
SQL
invoices_997.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE logs SET user_id = %s WHERE role = %s;
NONE
false
DIFF00000008938
raw_sql_safe
SQL
logs_857.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO payments (address, category) VALUES (%s, %s);
NONE
false
DIFF00000008939
raw_sql_destructive
SQL
subscriptions_338.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE inventory RENAME COLUMN price TO amount_cents;
ALTER_RENAME
true
DIFF00000008940
test_suite_cleanup
SQL
spec/invoices_499.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE payments SET price = CONCAT(price, address);
UPDATE_CONCAT
false
DIFF00000008941
orm_schema_change
JavaScript
sessions_176.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('orders', 'priority')
NONE
true
DIFF00000008942
general_code_change
Java
products_654.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000008943
mentioned_in_comment
Python
subscriptions_515.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE subscriptions; -- now deprecated"""
DROP_TABLE
false
DIFF00000008944
raw_sql_safe
SQL
notifications_927.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM customers WHERE address = 'active';
NONE
false
DIFF00000008945
general_code_change
TypeScript
refunds_227.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
DIFF00000008946
test_suite_cleanup
SQL
test/products_201.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE accounts;
TRUNCATE
false
DIFF00000008947
general_code_change
JavaScript
reviews_785.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000008948
orm_schema_change
TypeScript
tickets_620.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Customers { // removed field: name }
NONE
true
DIFF00000008949
raw_sql_safe
SQL
events_16.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM transactions WHERE updated_at = 'active';
NONE
false
DIFF00000008950
mentioned_in_comment
Python
orders_536.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM transactions;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00000008951
general_code_change
TypeScript
orders_471.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
DIFF00000008952
general_code_change
TypeScript
transactions_489.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
DIFF00000008953
test_suite_cleanup
SQL
mysql-test/suite/employees_958.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE subscriptions;
TRUNCATE
false
DIFF00000008954
mentioned_in_comment
Python
notifications_558.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE users; -- now deprecated"""
DROP_TABLE
false
DIFF00000008955
raw_sql_safe
SQL
subscriptions_380.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE accounts ADD COLUMN amount_cents VARCHAR(255);
NONE
false
DIFF00000008956
raw_sql_safe
SQL
refunds_531.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM notifications WHERE name = 'active';
NONE
false
DIFF00000008957
orm_schema_change
Python
reviews_75.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='users', name='priority')
NONE
true
DIFF00000008958
orm_schema_change
TypeScript
users_908.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Accounts { // removed field: category }
NONE
true
DIFF00000008959
raw_sql_destructive
SQL
products_119.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE sessions RENAME COLUMN description TO state;
ALTER_RENAME
true
DIFF00000008960
orm_schema_change
Ruby
users_729.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :accounts, :category
NONE
true
DIFF00000008961
raw_sql_destructive
SQL
refunds_58.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE inventory;
DROP_TABLE
true
DIFF00000008962
general_code_change
Ruby
subscriptions_849.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000008963
mentioned_in_comment
Python
transactions_890.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE comments DROP COLUMN email;' manually, handled by migration tool
DROP_COLUMN
false
DIFF00000008964
general_code_change
Ruby
customers_38.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000008965
raw_sql_destructive
SQL
reviews_253.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE users;
TRUNCATE
true
DIFF00000008966
orm_schema_change
JavaScript
invoices_569.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('notifications', table => table.dropColumn('category'))
NONE
true
DIFF00000008967
mentioned_in_comment
Python
logs_158.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE sessions RENAME COLUMN email TO contact_email;' manually, handled by migration tool
ALTER_RENAME
false
DIFF00000008968
general_code_change
Java
comments_939.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000008969
orm_schema_change
JavaScript
customers_708.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('accounts', 'phone')
NONE
true
DIFF00000008970
test_suite_cleanup
SQL
mysql-test/suite/customers_67.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE logs SET name = CONCAT(name, score);
UPDATE_CONCAT
false
DIFF00000008971
raw_sql_safe
SQL
shipments_810.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE comments ADD COLUMN user_role VARCHAR(255);
NONE
false
DIFF00000008972
test_suite_cleanup
SQL
tests/payments_680.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE logs DROP COLUMN name;
DROP_COLUMN
false
DIFF00000008973
general_code_change
Go
users_45.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000008974
test_suite_cleanup
SQL
spec/refunds_753.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE reviews SET address = CONCAT(address, metadata);
UPDATE_CONCAT
false
DIFF00000008975
raw_sql_destructive
SQL
invoices_186.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM accounts;
DELETE_UNQUALIFIED
true
DIFF00000008976
raw_sql_destructive
SQL
customers_221.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE accounts SET balance = CONCAT(balance, amount);
UPDATE_CONCAT
true
DIFF00000008977
raw_sql_safe
SQL
tickets_598.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM invoices WHERE amount = 'active';
NONE
false
DIFF00000008978
obfuscated_destructive
SQL
refunds_353.sql
schema cleanup
@@ -1,3 +1,3 @@ +trUNcAtE taBle INvENtOrY;
TRUNCATE
true
DIFF00000008979
general_code_change
Ruby
orders_299.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000008980
raw_sql_safe
SQL
sessions_384.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_tickets_quantity ON tickets (name);
NONE
false
DIFF00000008981
general_code_change
Java
tickets_690.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000008982
raw_sql_destructive
SQL
customers_341.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE notifications;
TRUNCATE
true
DIFF00000008983
general_code_change
Go
reviews_786.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000008984
mentioned_in_comment
Python
users_812.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE accounts DROP COLUMN score;")
DROP_COLUMN
false
DIFF00000008985
raw_sql_destructive
SQL
payments_421.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE payments;
TRUNCATE
true
DIFF00000008986
test_suite_cleanup
SQL
test/orders_561.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE sessions DROP COLUMN role;
DROP_COLUMN
false
DIFF00000008987
raw_sql_safe
SQL
invoices_841.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO logs (description, price) VALUES (%s, %s);
NONE
false
DIFF00000008988
general_code_change
Python
customers_138.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00000008989
mentioned_in_comment
Python
customers_5.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DELETE FROM comments; -- now deprecated"""
DELETE_UNQUALIFIED
false
DIFF00000008990
mentioned_in_comment
Python
shipments_524.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE sessions RENAME COLUMN address TO state;' manually, handled by migration tool
ALTER_RENAME
false
DIFF00000008991
raw_sql_safe
SQL
transactions_409.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM customers WHERE user_id = 'active';
NONE
false
DIFF00000008992
general_code_change
TypeScript
comments_514.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
DIFF00000008993
mentioned_in_comment
Python
notifications_329.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM comments;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00000008994
mentioned_in_comment
Python
refunds_585.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE accounts; -- now deprecated"""
DROP_TABLE
false
DIFF00000008995
orm_schema_change
JavaScript
products_779.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('logs', 'created_at')
NONE
true
DIFF00000008996
raw_sql_safe
SQL
accounts_784.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO logs (quantity, metadata) VALUES (%s, %s);
NONE
false
DIFF00000008997
raw_sql_destructive
SQL
refunds_304.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM orders;
DELETE_UNQUALIFIED
true
DIFF00000008998
test_suite_cleanup
SQL
test/comments_694.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM comments;
DELETE_UNQUALIFIED
false
DIFF00000008999
orm_schema_change
JavaScript
employees_590.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('inventory', 'is_active')
NONE
true