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
DIFF00000007400
obfuscated_destructive
SQL
notifications_352.sql
schema cleanup
@@ -1,3 +1,3 @@ +UPdatE PAYmEntS SEt namE = cONcaT(NAMe, ORder_id);
UPDATE_CONCAT
true
DIFF00000007401
general_code_change
JavaScript
logs_427.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000007402
raw_sql_safe
SQL
logs_342.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE shipments SET user_id = %s WHERE category = %s;
NONE
false
DIFF00000007403
general_code_change
Java
transactions_21.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000007404
raw_sql_safe
SQL
logs_431.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE shipments SET metadata = %s WHERE description = %s;
NONE
false
DIFF00000007405
raw_sql_destructive
SQL
shipments_583.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE reviews RENAME COLUMN priority TO amount_cents;
ALTER_RENAME
true
DIFF00000007406
orm_schema_change
JavaScript
customers_931.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('inventory', table => table.dropColumn('status'))
NONE
true
DIFF00000007407
general_code_change
JavaScript
invoices_896.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
DIFF00000007408
raw_sql_safe
SQL
payments_716.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM reviews WHERE is_active = 'active';
NONE
false
DIFF00000007409
raw_sql_safe
SQL
inventory_166.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM transactions WHERE amount = 'active';
NONE
false
DIFF00000007410
raw_sql_safe
SQL
accounts_336.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE refunds SET email = %s WHERE role = %s;
NONE
false
DIFF00000007411
test_suite_cleanup
SQL
tests/accounts_423.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE employees DROP COLUMN quantity;
DROP_COLUMN
false
DIFF00000007412
orm_schema_change
JavaScript
logs_780.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('shipments', 'is_active')
NONE
true
DIFF00000007413
general_code_change
JavaScript
comments_803.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000007414
obfuscated_destructive
SQL
inventory_635.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE notifications;
DROP_TABLE
true
DIFF00000007415
raw_sql_safe
SQL
reviews_713.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_employees_amount ON employees (updated_at);
NONE
false
DIFF00000007416
general_code_change
JavaScript
users_380.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000007417
general_code_change
TypeScript
inventory_531.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
DIFF00000007418
raw_sql_safe
SQL
shipments_435.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO sessions (score, role) VALUES (%s, %s);
NONE
false
DIFF00000007419
raw_sql_destructive
SQL
shipments_892.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE refunds;
DROP_TABLE
true
DIFF00000007420
raw_sql_destructive
SQL
employees_390.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE events;
TRUNCATE
true
DIFF00000007421
orm_schema_change
Ruby
orders_127.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :invoices, :is_active
NONE
true
DIFF00000007422
raw_sql_destructive
SQL
employees_995.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE products RENAME COLUMN price TO user_role;
ALTER_RENAME
true
DIFF00000007423
raw_sql_safe
SQL
tickets_121.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE employees ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00000007424
raw_sql_destructive
SQL
payments_729.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM logs;
DELETE_UNQUALIFIED
true
DIFF00000007425
general_code_change
Java
events_61.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000007426
test_suite_cleanup
SQL
spec/shipments_79.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE accounts DROP COLUMN price;
DROP_COLUMN
false
DIFF00000007427
test_suite_cleanup
SQL
mysql-test/suite/sessions_85.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM tickets;
DELETE_UNQUALIFIED
false
DIFF00000007428
obfuscated_destructive
SQL
transactions_195.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE users;
DROP_TABLE
true
DIFF00000007429
mentioned_in_comment
Python
invoices_744.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'UPDATE products SET updated_at = CONCAT(updated_at, quantity);' manually, handled by migration tool
UPDATE_CONCAT
false
DIFF00000007430
general_code_change
TypeScript
transactions_96.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
DIFF00000007431
test_suite_cleanup
SQL
tests/inventory_145.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE accounts;
DROP_TABLE
false
DIFF00000007432
orm_schema_change
Python
employees_830.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='orders', name='is_active')
NONE
true
DIFF00000007433
general_code_change
JavaScript
comments_231.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
DIFF00000007434
general_code_change
Python
refunds_189.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00000007435
obfuscated_destructive
SQL
comments_980.sql
schema cleanup
@@ -1,3 +1,3 @@ +truncate table users;
TRUNCATE
true
DIFF00000007436
test_suite_cleanup
SQL
test/shipments_882.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE orders RENAME COLUMN email TO user_role;
ALTER_RENAME
false
DIFF00000007437
orm_schema_change
Ruby
refunds_110.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :tickets, :created_at
NONE
true
DIFF00000007438
raw_sql_safe
SQL
notifications_741.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM users WHERE priority = 'active';
NONE
false
DIFF00000007439
raw_sql_safe
SQL
invoices_379.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM refunds WHERE address = 'active';
NONE
false
DIFF00000007440
raw_sql_safe
SQL
tickets_462.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_users_created_at ON users (category);
NONE
false
DIFF00000007441
raw_sql_destructive
SQL
employees_107.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE customers DROP COLUMN order_id;
DROP_COLUMN
true
DIFF00000007442
mentioned_in_comment
Python
comments_150.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE payments DROP COLUMN amount; -- now deprecated"""
DROP_COLUMN
false
DIFF00000007443
obfuscated_destructive
SQL
logs_152.sql
schema cleanup
@@ -1,3 +1,3 @@ +updATE iNVOiCES sEt bALANCE = COncAt(BalaNCE, NaME);
UPDATE_CONCAT
true
DIFF00000007444
test_suite_cleanup
SQL
tests/refunds_422.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE transactions SET updated_at = CONCAT(updated_at, balance);
UPDATE_CONCAT
false
DIFF00000007445
orm_schema_change
Python
products_13.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='refunds', name='balance')
NONE
true
DIFF00000007446
raw_sql_destructive
SQL
comments_623.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE sessions;
TRUNCATE
true
DIFF00000007447
orm_schema_change
Python
transactions_338.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='users', name='user_id')
NONE
true
DIFF00000007448
raw_sql_safe
SQL
inventory_764.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE invoices ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00000007449
raw_sql_destructive
SQL
subscriptions_823.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE payments;
DROP_TABLE
true
DIFF00000007450
mentioned_in_comment
Python
accounts_844.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'TRUNCATE TABLE inventory;' manually, handled by migration tool
TRUNCATE
false
DIFF00000007451
raw_sql_safe
SQL
logs_774.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM users WHERE email = 'active';
NONE
false
DIFF00000007452
mentioned_in_comment
Python
shipments_117.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE payments; -- now deprecated"""
DROP_TABLE
false
DIFF00000007453
general_code_change
Python
accounts_507.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00000007454
general_code_change
TypeScript
customers_342.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
DIFF00000007455
raw_sql_destructive
SQL
sessions_538.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE sessions;
DROP_TABLE
true
DIFF00000007456
orm_schema_change
JavaScript
users_645.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('invoices', table => table.dropColumn('order_id'))
NONE
true
DIFF00000007457
general_code_change
JavaScript
transactions_130.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
DIFF00000007458
general_code_change
Python
events_839.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00000007459
obfuscated_destructive
SQL
subscriptions_956.sql
schema cleanup
@@ -1,3 +1,3 @@ +TRUNCATE TABLE refunds;
TRUNCATE
true
DIFF00000007460
test_suite_cleanup
SQL
test/orders_114.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE inventory;
TRUNCATE
false
DIFF00000007461
obfuscated_destructive
SQL
tickets_339.sql
schema cleanup
@@ -1,3 +1,3 @@ +truncAtE tABLe SHIPMEnTs;
TRUNCATE
true
DIFF00000007462
test_suite_cleanup
SQL
test/customers_877.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE users RENAME COLUMN amount TO full_name;
ALTER_RENAME
false
DIFF00000007463
general_code_change
Ruby
transactions_990.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000007464
orm_schema_change
JavaScript
inventory_657.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('users', 'email')
NONE
true
DIFF00000007465
raw_sql_safe
SQL
refunds_237.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO users (address, amount) VALUES (%s, %s);
NONE
false
DIFF00000007466
raw_sql_safe
SQL
payments_498.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM refunds WHERE order_id = 'active';
NONE
false
DIFF00000007467
obfuscated_destructive
SQL
transactions_734.sql
schema cleanup
@@ -1,3 +1,3 @@ +upDATE INVOiCES SEt MEtAdAta = ConCAT(mEtaDaTa, adDReSS);
UPDATE_CONCAT
true
DIFF00000007468
mentioned_in_comment
Python
logs_50.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DELETE FROM transactions; -- now deprecated"""
DELETE_UNQUALIFIED
false
DIFF00000007469
mentioned_in_comment
Python
accounts_59.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE reviews RENAME COLUMN email TO contact_email;")
ALTER_RENAME
false
DIFF00000007470
raw_sql_destructive
SQL
accounts_695.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM inventory;
DELETE_UNQUALIFIED
true
DIFF00000007471
obfuscated_destructive
SQL
reviews_745.sql
schema cleanup
@@ -1,3 +1,3 @@ +truncate table comments;
TRUNCATE
true
DIFF00000007472
obfuscated_destructive
SQL
comments_964.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE orders;
DROP_TABLE
true
DIFF00000007473
obfuscated_destructive
SQL
tickets_244.sql
schema cleanup
@@ -1,3 +1,3 @@ +alter table customers rename column updated_at to user_role;
ALTER_RENAME
true
DIFF00000007474
orm_schema_change
JavaScript
reviews_5.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('inventory', table => table.dropColumn('role'))
NONE
true
DIFF00000007475
obfuscated_destructive
SQL
logs_842.sql
schema cleanup
@@ -1,3 +1,3 @@ +AltER taBle logS rEName cOLUMN CREATeD_aT tO coNTacT_EmaIL;
ALTER_RENAME
true
DIFF00000007476
raw_sql_destructive
SQL
logs_564.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE comments RENAME COLUMN order_id TO contact_email;
ALTER_RENAME
true
DIFF00000007477
raw_sql_destructive
SQL
shipments_523.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE refunds RENAME COLUMN amount TO user_role;
ALTER_RENAME
true
DIFF00000007478
test_suite_cleanup
SQL
test/accounts_33.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE notifications DROP COLUMN quantity;
DROP_COLUMN
false
DIFF00000007479
general_code_change
Ruby
payments_42.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000007480
test_suite_cleanup
SQL
spec/notifications_351.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE orders SET name = CONCAT(name, amount);
UPDATE_CONCAT
false
DIFF00000007481
raw_sql_safe
SQL
payments_154.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE products SET address = %s WHERE address = %s;
NONE
false
DIFF00000007482
general_code_change
Python
orders_353.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00000007483
raw_sql_destructive
SQL
tickets_435.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE subscriptions;
DROP_TABLE
true
DIFF00000007484
general_code_change
Ruby
tickets_829.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000007485
test_suite_cleanup
SQL
tests/invoices_749.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE employees;
TRUNCATE
false
DIFF00000007486
test_suite_cleanup
SQL
test/transactions_155.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE customers;
TRUNCATE
false
DIFF00000007487
mentioned_in_comment
Python
employees_201.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE notifications RENAME COLUMN role TO contact_email; -- now deprecated"""
ALTER_RENAME
false
DIFF00000007488
general_code_change
JavaScript
notifications_282.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000007489
raw_sql_destructive
SQL
shipments_654.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE subscriptions;
DROP_TABLE
true
DIFF00000007490
general_code_change
JavaScript
accounts_582.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
DIFF00000007491
test_suite_cleanup
SQL
spec/invoices_834.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE inventory DROP COLUMN status;
DROP_COLUMN
false
DIFF00000007492
raw_sql_destructive
SQL
products_317.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM comments;
DELETE_UNQUALIFIED
true
DIFF00000007493
orm_schema_change
Python
inventory_484.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='refunds', name='price')
NONE
true
DIFF00000007494
mentioned_in_comment
Python
sessions_755.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE users DROP COLUMN is_active; -- now deprecated"""
DROP_COLUMN
false
DIFF00000007495
orm_schema_change
JavaScript
payments_712.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('events', 'metadata')
NONE
true
DIFF00000007496
raw_sql_destructive
SQL
customers_955.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE refunds RENAME COLUMN amount TO contact_email;
ALTER_RENAME
true
DIFF00000007497
raw_sql_safe
SQL
comments_940.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM subscriptions WHERE quantity = 'active';
NONE
false
DIFF00000007498
mentioned_in_comment
Python
comments_910.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE events RENAME COLUMN balance TO state; -- now deprecated"""
ALTER_RENAME
false
DIFF00000007499
raw_sql_destructive
SQL
logs_643.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE logs RENAME COLUMN is_active TO contact_email;
ALTER_RENAME
true