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
DIFF00000000900
mentioned_in_comment
Python
logs_464.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'TRUNCATE TABLE employees;' manually, handled by migration tool
TRUNCATE
false
DIFF00000000901
raw_sql_destructive
SQL
inventory_165.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE users SET is_active = CONCAT(is_active, name);
UPDATE_CONCAT
true
DIFF00000000902
general_code_change
JavaScript
employees_488.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000000903
raw_sql_safe
SQL
inventory_204.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE refunds ADD COLUMN user_role VARCHAR(255);
NONE
false
DIFF00000000904
raw_sql_destructive
SQL
inventory_845.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE events;
DROP_TABLE
true
DIFF00000000905
general_code_change
JavaScript
tickets_125.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000000906
raw_sql_safe
SQL
payments_351.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_comments_amount ON comments (description);
NONE
false
DIFF00000000907
raw_sql_safe
SQL
accounts_538.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO sessions (metadata, status) VALUES (%s, %s);
NONE
false
DIFF00000000908
mentioned_in_comment
Python
employees_237.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE accounts RENAME COLUMN phone TO full_name;")
ALTER_RENAME
false
DIFF00000000909
obfuscated_destructive
SQL
subscriptions_190.sql
schema cleanup
@@ -1,3 +1,3 @@ +delete from shipments;
DELETE_UNQUALIFIED
true
DIFF00000000910
raw_sql_destructive
SQL
subscriptions_215.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE orders;
TRUNCATE
true
DIFF00000000911
general_code_change
Ruby
tickets_447.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000000912
raw_sql_destructive
SQL
notifications_662.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE sessions RENAME COLUMN email TO amount_cents;
ALTER_RENAME
true
DIFF00000000913
raw_sql_destructive
SQL
orders_137.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE shipments;
DROP_TABLE
true
DIFF00000000914
general_code_change
JavaScript
customers_740.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000000915
general_code_change
JavaScript
products_859.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
DIFF00000000916
general_code_change
JavaScript
logs_543.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000000917
obfuscated_destructive
SQL
events_881.sql
schema cleanup
@@ -1,3 +1,3 @@ +update inventory set email = concat(email, role);
UPDATE_CONCAT
true
DIFF00000000918
raw_sql_safe
SQL
orders_24.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE sessions SET score = %s WHERE user_id = %s;
NONE
false
DIFF00000000919
obfuscated_destructive
SQL
transactions_557.sql
schema cleanup
@@ -1,3 +1,3 @@ +alter taBle tICkETs DrOp cOLuMN rOle;
DROP_COLUMN
true
DIFF00000000920
raw_sql_safe
SQL
shipments_912.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE notifications ADD COLUMN full_name VARCHAR(255);
NONE
false
DIFF00000000921
orm_schema_change
Python
payments_129.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='customers', name='description')
NONE
true
DIFF00000000922
mentioned_in_comment
Python
users_931.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE events RENAME COLUMN is_active TO user_role;' manually, handled by migration tool
ALTER_RENAME
false
DIFF00000000923
obfuscated_destructive
SQL
invoices_220.sql
schema cleanup
@@ -1,3 +1,3 @@ +update notifications set user_id = concat(user_id, priority);
UPDATE_CONCAT
true
DIFF00000000924
orm_schema_change
JavaScript
refunds_796.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('tickets', 'is_active')
NONE
true
DIFF00000000925
mentioned_in_comment
Python
subscriptions_591.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'UPDATE customers SET description = CONCAT(description, updated_at);' manually, handled by migration tool
UPDATE_CONCAT
false
DIFF00000000926
test_suite_cleanup
SQL
test/sessions_717.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE orders;
DROP_TABLE
false
DIFF00000000927
obfuscated_destructive
SQL
orders_146.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM reviews;
DELETE_UNQUALIFIED
true
DIFF00000000928
mentioned_in_comment
Python
subscriptions_328.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE inventory RENAME COLUMN metadata TO state;")
ALTER_RENAME
false
DIFF00000000929
orm_schema_change
TypeScript
users_853.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Users { // removed field: amount }
NONE
true
DIFF00000000930
general_code_change
Java
subscriptions_669.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000000931
general_code_change
JavaScript
logs_307.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000000932
general_code_change
Python
accounts_47.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00000000933
orm_schema_change
TypeScript
subscriptions_482.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Shipments { // removed field: status }
NONE
true
DIFF00000000934
obfuscated_destructive
SQL
inventory_409.sql
schema cleanup
@@ -1,3 +1,3 @@ +truncate table customers;
TRUNCATE
true
DIFF00000000935
mentioned_in_comment
Python
logs_95.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE customers; -- now deprecated"""
DROP_TABLE
false
DIFF00000000936
orm_schema_change
JavaScript
users_663.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('reviews', table => table.dropColumn('score'))
NONE
true
DIFF00000000937
general_code_change
Ruby
logs_677.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000000938
raw_sql_destructive
SQL
inventory_963.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE tickets;
TRUNCATE
true
DIFF00000000939
orm_schema_change
JavaScript
orders_929.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('orders', 'status')
NONE
true
DIFF00000000940
general_code_change
Python
reviews_438.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00000000941
raw_sql_destructive
SQL
accounts_68.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM tickets;
DELETE_UNQUALIFIED
true
DIFF00000000942
general_code_change
Go
employees_390.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000000943
orm_schema_change
TypeScript
payments_371.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Orders { // removed field: name }
NONE
true
DIFF00000000944
raw_sql_destructive
SQL
employees_945.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE inventory;
TRUNCATE
true
DIFF00000000945
general_code_change
TypeScript
users_226.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
DIFF00000000946
raw_sql_safe
SQL
transactions_776.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE accounts ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00000000947
raw_sql_destructive
SQL
tickets_323.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE logs;
TRUNCATE
true
DIFF00000000948
general_code_change
Python
comments_71.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00000000949
raw_sql_destructive
SQL
tickets_93.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE users SET price = CONCAT(price, created_at);
UPDATE_CONCAT
true
DIFF00000000950
general_code_change
Go
tickets_600.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000000951
general_code_change
Go
users_175.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000000952
orm_schema_change
Ruby
transactions_317.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :invoices, :phone
NONE
true
DIFF00000000953
raw_sql_safe
SQL
transactions_678.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO events (quantity, phone) VALUES (%s, %s);
NONE
false
DIFF00000000954
orm_schema_change
TypeScript
comments_153.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Inventory { // removed field: email }
NONE
true
DIFF00000000955
test_suite_cleanup
SQL
mysql-test/suite/events_442.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM transactions;
DELETE_UNQUALIFIED
false
DIFF00000000956
raw_sql_safe
SQL
users_187.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE logs SET created_at = %s WHERE metadata = %s;
NONE
false
DIFF00000000957
raw_sql_destructive
SQL
payments_340.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE customers RENAME COLUMN balance TO state;
ALTER_RENAME
true
DIFF00000000958
orm_schema_change
Python
sessions_506.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='sessions', name='updated_at')
NONE
true
DIFF00000000959
general_code_change
JavaScript
logs_833.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000000960
mentioned_in_comment
Python
employees_36.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE products RENAME COLUMN score TO full_name;")
ALTER_RENAME
false
DIFF00000000961
orm_schema_change
JavaScript
notifications_562.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('customers', table => table.dropColumn('balance'))
NONE
true
DIFF00000000962
raw_sql_safe
SQL
reviews_970.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM products WHERE price = 'active';
NONE
false
DIFF00000000963
obfuscated_destructive
SQL
payments_921.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE tickets RENAME COLUMN score TO contact_email;
ALTER_RENAME
true
DIFF00000000964
raw_sql_safe
SQL
orders_424.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE inventory ADD COLUMN state VARCHAR(255);
NONE
false
DIFF00000000965
raw_sql_safe
SQL
customers_441.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO comments (priority, metadata) VALUES (%s, %s);
NONE
false
DIFF00000000966
obfuscated_destructive
SQL
reviews_521.sql
schema cleanup
@@ -1,3 +1,3 @@ +update accounts set priority = concat(priority, price);
UPDATE_CONCAT
true
DIFF00000000967
raw_sql_safe
SQL
users_845.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO customers (price, status) VALUES (%s, %s);
NONE
false
DIFF00000000968
test_suite_cleanup
SQL
test/comments_183.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE subscriptions SET phone = CONCAT(phone, address);
UPDATE_CONCAT
false
DIFF00000000969
mentioned_in_comment
Python
users_941.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE subscriptions RENAME COLUMN name TO full_name; -- now deprecated"""
ALTER_RENAME
false
DIFF00000000970
orm_schema_change
Ruby
notifications_577.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :users, :name
NONE
true
DIFF00000000971
obfuscated_destructive
SQL
payments_810.sql
schema cleanup
@@ -1,3 +1,3 @@ +drOp TaBLe evENTS;
DROP_TABLE
true
DIFF00000000972
orm_schema_change
JavaScript
accounts_281.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('events', 'metadata')
NONE
true
DIFF00000000973
raw_sql_destructive
SQL
events_733.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE shipments DROP COLUMN email;
DROP_COLUMN
true
DIFF00000000974
orm_schema_change
JavaScript
employees_626.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('customers', table => table.dropColumn('description'))
NONE
true
DIFF00000000975
mentioned_in_comment
Python
subscriptions_221.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE logs DROP COLUMN user_id;' manually, handled by migration tool
DROP_COLUMN
false
DIFF00000000976
general_code_change
Python
tickets_220.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00000000977
raw_sql_safe
SQL
users_143.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_inventory_user_id ON inventory (score);
NONE
false
DIFF00000000978
test_suite_cleanup
SQL
tests/tickets_633.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM comments;
DELETE_UNQUALIFIED
false
DIFF00000000979
orm_schema_change
Python
invoices_805.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='shipments', name='phone')
NONE
true
DIFF00000000980
orm_schema_change
TypeScript
users_904.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Logs { // removed field: name }
NONE
true
DIFF00000000981
test_suite_cleanup
SQL
spec/inventory_664.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE customers;
DROP_TABLE
false
DIFF00000000982
raw_sql_safe
SQL
sessions_754.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_sessions_role ON sessions (order_id);
NONE
false
DIFF00000000983
raw_sql_destructive
SQL
accounts_412.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE accounts DROP COLUMN balance;
DROP_COLUMN
true
DIFF00000000984
general_code_change
Java
notifications_415.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000000985
raw_sql_safe
SQL
payments_555.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_payments_amount ON payments (category);
NONE
false
DIFF00000000986
raw_sql_safe
SQL
notifications_429.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE inventory SET created_at = %s WHERE address = %s;
NONE
false
DIFF00000000987
general_code_change
Ruby
products_151.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000000988
orm_schema_change
JavaScript
payments_647.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('payments', table => table.dropColumn('score'))
NONE
true
DIFF00000000989
raw_sql_safe
SQL
subscriptions_628.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE notifications SET quantity = %s WHERE quantity = %s;
NONE
false
DIFF00000000990
raw_sql_safe
SQL
sessions_328.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE products ADD COLUMN user_role VARCHAR(255);
NONE
false
DIFF00000000991
mentioned_in_comment
Python
notifications_794.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE products DROP COLUMN description;' manually, handled by migration tool
DROP_COLUMN
false
DIFF00000000992
general_code_change
Java
invoices_1.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000000993
raw_sql_safe
SQL
inventory_824.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE employees ADD COLUMN full_name VARCHAR(255);
NONE
false
DIFF00000000994
orm_schema_change
Python
inventory_364.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='payments', name='order_id')
NONE
true
DIFF00000000995
raw_sql_destructive
SQL
logs_151.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE comments DROP COLUMN user_id;
DROP_COLUMN
true
DIFF00000000996
orm_schema_change
JavaScript
inventory_131.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('products', 'order_id')
NONE
true
DIFF00000000997
general_code_change
JavaScript
comments_996.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000000998
orm_schema_change
JavaScript
payments_270.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('invoices', table => table.dropColumn('metadata'))
NONE
true
DIFF00000000999
raw_sql_destructive
SQL
orders_479.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM employees;
DELETE_UNQUALIFIED
true