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
DIFF00099998300
raw_sql_destructive
SQL
users_134.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE comments;
DROP_TABLE
true
DIFF00099998301
raw_sql_destructive
SQL
employees_741.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE users;
DROP_TABLE
true
DIFF00099998302
mentioned_in_comment
Python
refunds_928.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: UPDATE transactions SET score = CONCAT(score, phone);")
UPDATE_CONCAT
false
DIFF00099998303
raw_sql_destructive
SQL
sessions_953.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE accounts;
TRUNCATE
true
DIFF00099998304
orm_schema_change
JavaScript
invoices_470.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('tickets', table => table.dropColumn('amount'))
NONE
true
DIFF00099998305
orm_schema_change
JavaScript
inventory_880.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('refunds', table => table.dropColumn('order_id'))
NONE
true
DIFF00099998306
raw_sql_destructive
SQL
sessions_874.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE logs DROP COLUMN updated_at;
DROP_COLUMN
true
DIFF00099998307
obfuscated_destructive
SQL
shipments_956.sql
schema cleanup
@@ -1,3 +1,3 @@ +alTEr TAblE TiCketS dROP coLumN BaLANCe;
DROP_COLUMN
true
DIFF00099998308
obfuscated_destructive
SQL
shipments_476.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE accounts RENAME COLUMN priority TO contact_email;
ALTER_RENAME
true
DIFF00099998309
general_code_change
Python
users_952.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099998310
raw_sql_safe
SQL
shipments_996.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE notifications ADD COLUMN full_name VARCHAR(255);
NONE
false
DIFF00099998311
obfuscated_destructive
SQL
products_899.sql
schema cleanup
@@ -1,3 +1,3 @@ +AltEr TablE rEfuNds rENAME coLUMN naMe To FuLl_NAME;
ALTER_RENAME
true
DIFF00099998312
general_code_change
TypeScript
users_149.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
DIFF00099998313
general_code_change
JavaScript
employees_753.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099998314
raw_sql_destructive
SQL
subscriptions_688.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE customers SET created_at = CONCAT(created_at, phone);
UPDATE_CONCAT
true
DIFF00099998315
orm_schema_change
JavaScript
tickets_240.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('subscriptions', 'amount')
NONE
true
DIFF00099998316
test_suite_cleanup
SQL
test/employees_618.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE comments;
DROP_TABLE
false
DIFF00099998317
raw_sql_safe
SQL
customers_723.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM events WHERE amount = 'active';
NONE
false
DIFF00099998318
general_code_change
Java
payments_184.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099998319
general_code_change
Ruby
events_896.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099998320
orm_schema_change
Python
customers_420.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='logs', name='quantity')
NONE
true
DIFF00099998321
general_code_change
Ruby
employees_464.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099998322
orm_schema_change
JavaScript
products_919.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('events', table => table.dropColumn('is_active'))
NONE
true
DIFF00099998323
mentioned_in_comment
Python
products_934.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE events RENAME COLUMN score TO state;' manually, handled by migration tool
ALTER_RENAME
false
DIFF00099998324
test_suite_cleanup
SQL
spec/employees_308.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE tickets;
TRUNCATE
false
DIFF00099998325
general_code_change
JavaScript
refunds_929.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
DIFF00099998326
raw_sql_safe
SQL
transactions_286.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_users_created_at ON users (quantity);
NONE
false
DIFF00099998327
general_code_change
Ruby
events_976.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099998328
test_suite_cleanup
SQL
tests/transactions_45.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE products RENAME COLUMN address TO full_name;
ALTER_RENAME
false
DIFF00099998329
general_code_change
Python
shipments_636.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099998330
raw_sql_safe
SQL
sessions_194.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM subscriptions WHERE is_active = 'active';
NONE
false
DIFF00099998331
mentioned_in_comment
Python
refunds_697.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: UPDATE refunds SET category = CONCAT(category, created_at);")
UPDATE_CONCAT
false
DIFF00099998332
general_code_change
Go
users_21.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099998333
general_code_change
Ruby
comments_101.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099998334
general_code_change
JavaScript
products_932.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
DIFF00099998335
mentioned_in_comment
Python
logs_558.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DELETE FROM transactions; -- now deprecated"""
DELETE_UNQUALIFIED
false
DIFF00099998336
general_code_change
TypeScript
shipments_223.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
DIFF00099998337
raw_sql_safe
SQL
products_79.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM inventory WHERE quantity = 'active';
NONE
false
DIFF00099998338
test_suite_cleanup
SQL
test/customers_885.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM invoices;
DELETE_UNQUALIFIED
false
DIFF00099998339
general_code_change
Python
customers_640.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099998340
general_code_change
JavaScript
subscriptions_632.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099998341
general_code_change
Python
accounts_964.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099998342
orm_schema_change
TypeScript
tickets_147.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Notifications { // removed field: price }
NONE
true
DIFF00099998343
raw_sql_safe
SQL
tickets_616.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_invoices_amount ON invoices (address);
NONE
false
DIFF00099998344
orm_schema_change
TypeScript
products_508.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Comments { // removed field: status }
NONE
true
DIFF00099998345
mentioned_in_comment
Python
payments_553.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE notifications DROP COLUMN price;' manually, handled by migration tool
DROP_COLUMN
false
DIFF00099998346
orm_schema_change
JavaScript
users_275.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('inventory', 'updated_at')
NONE
true
DIFF00099998347
raw_sql_safe
SQL
subscriptions_687.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE shipments SET price = %s WHERE description = %s;
NONE
false
DIFF00099998348
obfuscated_destructive
SQL
reviews_35.sql
schema cleanup
@@ -1,3 +1,3 @@ +uPDATe nOTIfICATIonS SET quantitY = cOnCAt(QuANTiTY, CreaTeD_AT);
UPDATE_CONCAT
true
DIFF00099998349
test_suite_cleanup
SQL
test/employees_983.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM refunds;
DELETE_UNQUALIFIED
false
DIFF00099998350
general_code_change
Python
users_477.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099998351
raw_sql_destructive
SQL
transactions_501.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE notifications;
TRUNCATE
true
DIFF00099998352
raw_sql_destructive
SQL
shipments_142.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE employees;
TRUNCATE
true
DIFF00099998353
general_code_change
Python
comments_586.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099998354
mentioned_in_comment
Python
reviews_911.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DELETE FROM refunds;")
DELETE_UNQUALIFIED
false
DIFF00099998355
orm_schema_change
JavaScript
reviews_591.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('transactions', 'metadata')
NONE
true
DIFF00099998356
raw_sql_destructive
SQL
transactions_769.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE refunds;
TRUNCATE
true
DIFF00099998357
mentioned_in_comment
Python
comments_243.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: TRUNCATE TABLE refunds; -- now deprecated"""
TRUNCATE
false
DIFF00099998358
raw_sql_destructive
SQL
comments_689.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE employees SET phone = CONCAT(phone, user_id);
UPDATE_CONCAT
true
DIFF00099998359
raw_sql_safe
SQL
transactions_723.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE reviews ADD COLUMN user_role VARCHAR(255);
NONE
false
DIFF00099998360
general_code_change
Python
sessions_635.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099998361
mentioned_in_comment
Python
invoices_634.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE payments DROP COLUMN category; -- now deprecated"""
DROP_COLUMN
false
DIFF00099998362
test_suite_cleanup
SQL
mysql-test/suite/accounts_346.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE tickets;
DROP_TABLE
false
DIFF00099998363
raw_sql_destructive
SQL
orders_118.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM comments;
DELETE_UNQUALIFIED
true
DIFF00099998364
general_code_change
TypeScript
events_574.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
DIFF00099998365
general_code_change
JavaScript
logs_902.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
DIFF00099998366
general_code_change
Python
accounts_720.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099998367
raw_sql_destructive
SQL
reviews_397.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM tickets;
DELETE_UNQUALIFIED
true
DIFF00099998368
raw_sql_destructive
SQL
notifications_829.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE orders;
TRUNCATE
true
DIFF00099998369
orm_schema_change
JavaScript
tickets_905.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('shipments', 'category')
NONE
true
DIFF00099998370
obfuscated_destructive
SQL
logs_519.sql
schema cleanup
@@ -1,3 +1,3 @@ +truncate table orders;
TRUNCATE
true
DIFF00099998371
general_code_change
Go
customers_323.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099998372
test_suite_cleanup
SQL
mysql-test/suite/payments_546.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE users;
DROP_TABLE
false
DIFF00099998373
raw_sql_safe
SQL
users_489.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO transactions (category, amount) VALUES (%s, %s);
NONE
false
DIFF00099998374
orm_schema_change
JavaScript
customers_690.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('inventory', table => table.dropColumn('updated_at'))
NONE
true
DIFF00099998375
raw_sql_safe
SQL
users_600.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE reviews SET is_active = %s WHERE description = %s;
NONE
false
DIFF00099998376
raw_sql_safe
SQL
refunds_719.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM users WHERE created_at = 'active';
NONE
false
DIFF00099998377
raw_sql_destructive
SQL
subscriptions_704.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE tickets SET name = CONCAT(name, balance);
UPDATE_CONCAT
true
DIFF00099998378
raw_sql_destructive
SQL
sessions_889.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE transactions SET name = CONCAT(name, user_id);
UPDATE_CONCAT
true
DIFF00099998379
raw_sql_destructive
SQL
orders_708.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE orders RENAME COLUMN is_active TO user_role;
ALTER_RENAME
true
DIFF00099998380
general_code_change
Go
events_508.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099998381
obfuscated_destructive
SQL
transactions_550.sql
schema cleanup
@@ -1,3 +1,3 @@ +update payments set name = concat(name, category);
UPDATE_CONCAT
true
DIFF00099998382
test_suite_cleanup
SQL
mysql-test/suite/events_914.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM notifications;
DELETE_UNQUALIFIED
false
DIFF00099998383
orm_schema_change
JavaScript
sessions_716.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('inventory', 'category')
NONE
true
DIFF00099998384
general_code_change
Python
inventory_593.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099998385
orm_schema_change
TypeScript
notifications_317.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Payments { // removed field: phone }
NONE
true
DIFF00099998386
mentioned_in_comment
Python
logs_253.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE reviews DROP COLUMN score;")
DROP_COLUMN
false
DIFF00099998387
general_code_change
JavaScript
products_69.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099998388
general_code_change
JavaScript
shipments_156.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099998389
general_code_change
Go
inventory_263.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099998390
test_suite_cleanup
SQL
spec/events_104.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE refunds DROP COLUMN is_active;
DROP_COLUMN
false
DIFF00099998391
raw_sql_destructive
SQL
transactions_657.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE accounts;
TRUNCATE
true
DIFF00099998392
general_code_change
Ruby
invoices_432.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099998393
obfuscated_destructive
SQL
payments_889.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALteR tabLE ShiPmentS ReName coLUMn eMail TO AMouNt_cenTS;
ALTER_RENAME
true
DIFF00099998394
test_suite_cleanup
SQL
mysql-test/suite/payments_332.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM accounts;
DELETE_UNQUALIFIED
false
DIFF00099998395
general_code_change
Python
employees_430.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099998396
raw_sql_safe
SQL
payments_480.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE inventory ADD COLUMN state VARCHAR(255);
NONE
false
DIFF00099998397
test_suite_cleanup
SQL
tests/invoices_377.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE tickets;
DROP_TABLE
false
DIFF00099998398
general_code_change
JavaScript
refunds_966.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099998399
test_suite_cleanup
SQL
tests/events_871.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE users;
TRUNCATE
false