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
DIFF00099992400
orm_schema_change
JavaScript
reviews_162.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('users', 'phone')
NONE
true
DIFF00099992401
test_suite_cleanup
SQL
spec/products_531.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE sessions RENAME COLUMN amount TO state;
ALTER_RENAME
false
DIFF00099992402
mentioned_in_comment
Python
events_936.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM subscriptions;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00099992403
raw_sql_destructive
SQL
products_426.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE notifications DROP COLUMN quantity;
DROP_COLUMN
true
DIFF00099992404
general_code_change
Go
shipments_603.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099992405
orm_schema_change
JavaScript
events_799.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('invoices', table => table.dropColumn('email'))
NONE
true
DIFF00099992406
general_code_change
Go
employees_745.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099992407
general_code_change
Python
inventory_901.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099992408
raw_sql_safe
SQL
refunds_260.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE orders ADD COLUMN full_name VARCHAR(255);
NONE
false
DIFF00099992409
general_code_change
TypeScript
transactions_38.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
DIFF00099992410
obfuscated_destructive
SQL
reviews_54.sql
schema cleanup
@@ -1,3 +1,3 @@ +altEr TAbLe reFuNds dROp coLuMn AmOUNT;
DROP_COLUMN
true
DIFF00099992411
mentioned_in_comment
Python
events_496.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: UPDATE subscriptions SET email = CONCAT(email, balance); -- now deprecated"""
UPDATE_CONCAT
false
DIFF00099992412
obfuscated_destructive
SQL
reviews_819.sql
schema cleanup
@@ -1,3 +1,3 @@ +updAte SubSCrIptioNs SEt cateGorY = CONCat(CaTEGory, oRDeR_Id);
UPDATE_CONCAT
true
DIFF00099992413
orm_schema_change
JavaScript
events_940.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('inventory', table => table.dropColumn('phone'))
NONE
true
DIFF00099992414
test_suite_cleanup
SQL
test/notifications_510.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE products RENAME COLUMN status TO user_role;
ALTER_RENAME
false
DIFF00099992415
general_code_change
Python
shipments_272.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099992416
test_suite_cleanup
SQL
tests/users_957.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE notifications RENAME COLUMN balance TO full_name;
ALTER_RENAME
false
DIFF00099992417
general_code_change
Java
products_553.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099992418
raw_sql_destructive
SQL
tickets_859.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE customers SET quantity = CONCAT(quantity, address);
UPDATE_CONCAT
true
DIFF00099992419
raw_sql_safe
SQL
sessions_162.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE refunds SET metadata = %s WHERE is_active = %s;
NONE
false
DIFF00099992420
raw_sql_safe
SQL
invoices_202.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_subscriptions_status ON subscriptions (updated_at);
NONE
false
DIFF00099992421
orm_schema_change
Ruby
tickets_77.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :events, :user_id
NONE
true
DIFF00099992422
raw_sql_safe
SQL
accounts_233.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE transactions SET status = %s WHERE order_id = %s;
NONE
false
DIFF00099992423
obfuscated_destructive
SQL
accounts_579.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM reviews;
DELETE_UNQUALIFIED
true
DIFF00099992424
orm_schema_change
Python
logs_791.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='customers', name='priority')
NONE
true
DIFF00099992425
obfuscated_destructive
SQL
comments_684.sql
schema cleanup
@@ -1,3 +1,3 @@ +UPDATE invoices SET created_at = CONCAT(created_at, name);
UPDATE_CONCAT
true
DIFF00099992426
raw_sql_safe
SQL
tickets_223.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE customers ADD COLUMN amount_cents VARCHAR(255);
NONE
false
DIFF00099992427
raw_sql_destructive
SQL
comments_926.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM invoices;
DELETE_UNQUALIFIED
true
DIFF00099992428
obfuscated_destructive
SQL
accounts_725.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE accounts;
DROP_TABLE
true
DIFF00099992429
orm_schema_change
TypeScript
shipments_890.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Sessions { // removed field: email }
NONE
true
DIFF00099992430
orm_schema_change
JavaScript
events_213.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('subscriptions', 'description')
NONE
true
DIFF00099992431
orm_schema_change
Ruby
customers_558.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :customers, :updated_at
NONE
true
DIFF00099992432
obfuscated_destructive
SQL
inventory_47.sql
schema cleanup
@@ -1,3 +1,3 @@ +DEleTe frOM NOTIfiCaTIOns;
DELETE_UNQUALIFIED
true
DIFF00099992433
test_suite_cleanup
SQL
tests/refunds_864.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE sessions DROP COLUMN phone;
DROP_COLUMN
false
DIFF00099992434
general_code_change
Go
payments_298.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099992435
mentioned_in_comment
Python
orders_636.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE reviews DROP COLUMN score;")
DROP_COLUMN
false
DIFF00099992436
test_suite_cleanup
SQL
tests/orders_698.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE invoices RENAME COLUMN updated_at TO user_role;
ALTER_RENAME
false
DIFF00099992437
raw_sql_safe
SQL
comments_365.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO refunds (email, address) VALUES (%s, %s);
NONE
false
DIFF00099992438
raw_sql_safe
SQL
products_125.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM subscriptions WHERE price = 'active';
NONE
false
DIFF00099992439
raw_sql_destructive
SQL
accounts_972.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE logs SET amount = CONCAT(amount, role);
UPDATE_CONCAT
true
DIFF00099992440
general_code_change
Ruby
accounts_700.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099992441
general_code_change
TypeScript
accounts_427.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
DIFF00099992442
raw_sql_safe
SQL
comments_777.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM comments WHERE updated_at = 'active';
NONE
false
DIFF00099992443
raw_sql_safe
SQL
refunds_74.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE sessions ADD COLUMN amount_cents VARCHAR(255);
NONE
false
DIFF00099992444
general_code_change
Python
invoices_862.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099992445
orm_schema_change
Python
products_886.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='subscriptions', name='user_id')
NONE
true
DIFF00099992446
orm_schema_change
JavaScript
refunds_702.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('shipments', table => table.dropColumn('priority'))
NONE
true
DIFF00099992447
general_code_change
JavaScript
subscriptions_137.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099992448
general_code_change
Ruby
reviews_364.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099992449
general_code_change
Python
users_614.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099992450
raw_sql_destructive
SQL
comments_822.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE shipments RENAME COLUMN category TO state;
ALTER_RENAME
true
DIFF00099992451
mentioned_in_comment
Python
shipments_840.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'TRUNCATE TABLE events;' manually, handled by migration tool
TRUNCATE
false
DIFF00099992452
orm_schema_change
JavaScript
transactions_643.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('logs', table => table.dropColumn('description'))
NONE
true
DIFF00099992453
test_suite_cleanup
SQL
tests/subscriptions_409.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM reviews;
DELETE_UNQUALIFIED
false
DIFF00099992454
raw_sql_destructive
SQL
comments_161.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE accounts;
TRUNCATE
true
DIFF00099992455
raw_sql_safe
SQL
employees_570.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO reviews (description, phone) VALUES (%s, %s);
NONE
false
DIFF00099992456
raw_sql_destructive
SQL
users_354.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE notifications;
DROP_TABLE
true
DIFF00099992457
orm_schema_change
Ruby
invoices_589.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :transactions, :order_id
NONE
true
DIFF00099992458
raw_sql_destructive
SQL
orders_244.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM orders;
DELETE_UNQUALIFIED
true
DIFF00099992459
mentioned_in_comment
Python
comments_583.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE inventory DROP COLUMN order_id; -- now deprecated"""
DROP_COLUMN
false
DIFF00099992460
orm_schema_change
Ruby
customers_564.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :logs, :metadata
NONE
true
DIFF00099992461
obfuscated_destructive
SQL
reviews_683.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE reviews RENAME COLUMN price TO user_role;
ALTER_RENAME
true
DIFF00099992462
raw_sql_safe
SQL
shipments_768.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE logs ADD COLUMN amount_cents VARCHAR(255);
NONE
false
DIFF00099992463
orm_schema_change
JavaScript
products_454.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('orders', 'address')
NONE
true
DIFF00099992464
general_code_change
TypeScript
inventory_265.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
DIFF00099992465
general_code_change
JavaScript
products_759.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
DIFF00099992466
mentioned_in_comment
Python
notifications_932.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: UPDATE orders SET address = CONCAT(address, address); -- now deprecated"""
UPDATE_CONCAT
false
DIFF00099992467
general_code_change
JavaScript
reviews_440.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
DIFF00099992468
test_suite_cleanup
SQL
mysql-test/suite/events_622.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE transactions RENAME COLUMN is_active TO state;
ALTER_RENAME
false
DIFF00099992469
general_code_change
Python
comments_943.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099992470
general_code_change
Java
employees_920.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099992471
mentioned_in_comment
Python
transactions_156.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DELETE FROM employees;")
DELETE_UNQUALIFIED
false
DIFF00099992472
orm_schema_change
JavaScript
logs_117.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('products', table => table.dropColumn('phone'))
NONE
true
DIFF00099992473
raw_sql_destructive
SQL
refunds_236.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE customers RENAME COLUMN priority TO amount_cents;
ALTER_RENAME
true
DIFF00099992474
general_code_change
Java
transactions_292.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099992475
raw_sql_destructive
SQL
orders_847.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE notifications SET phone = CONCAT(phone, email);
UPDATE_CONCAT
true
DIFF00099992476
orm_schema_change
TypeScript
notifications_768.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Sessions { // removed field: order_id }
NONE
true
DIFF00099992477
raw_sql_safe
SQL
transactions_70.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE logs SET status = %s WHERE balance = %s;
NONE
false
DIFF00099992478
general_code_change
TypeScript
products_452.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
DIFF00099992479
general_code_change
JavaScript
products_956.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
DIFF00099992480
mentioned_in_comment
Python
products_169.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DELETE FROM users;")
DELETE_UNQUALIFIED
false
DIFF00099992481
raw_sql_safe
SQL
employees_50.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_events_metadata ON events (price);
NONE
false
DIFF00099992482
raw_sql_safe
SQL
sessions_396.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM employees WHERE user_id = 'active';
NONE
false
DIFF00099992483
raw_sql_destructive
SQL
products_227.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE orders SET description = CONCAT(description, category);
UPDATE_CONCAT
true
DIFF00099992484
general_code_change
JavaScript
payments_337.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
DIFF00099992485
raw_sql_safe
SQL
products_640.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE users SET metadata = %s WHERE balance = %s;
NONE
false
DIFF00099992486
orm_schema_change
Ruby
products_113.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :users, :metadata
NONE
true
DIFF00099992487
orm_schema_change
Python
logs_280.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='inventory', name='role')
NONE
true
DIFF00099992488
raw_sql_destructive
SQL
transactions_502.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE shipments DROP COLUMN priority;
DROP_COLUMN
true
DIFF00099992489
general_code_change
TypeScript
invoices_823.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
DIFF00099992490
raw_sql_safe
SQL
transactions_968.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE events ADD COLUMN state VARCHAR(255);
NONE
false
DIFF00099992491
orm_schema_change
Ruby
transactions_237.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :inventory, :user_id
NONE
true
DIFF00099992492
general_code_change
Java
employees_979.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099992493
orm_schema_change
Python
notifications_446.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='notifications', name='score')
NONE
true
DIFF00099992494
obfuscated_destructive
SQL
reviews_299.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM subscriptions;
DELETE_UNQUALIFIED
true
DIFF00099992495
raw_sql_destructive
SQL
events_465.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE products SET status = CONCAT(status, email);
UPDATE_CONCAT
true
DIFF00099992496
mentioned_in_comment
Python
accounts_250.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE invoices DROP COLUMN score;' manually, handled by migration tool
DROP_COLUMN
false
DIFF00099992497
general_code_change
Ruby
customers_123.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099992498
orm_schema_change
TypeScript
sessions_709.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Transactions { // removed field: name }
NONE
true
DIFF00099992499
raw_sql_destructive
SQL
reviews_692.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE products DROP COLUMN priority;
DROP_COLUMN
true