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 |
|---|---|---|---|---|---|---|---|
DIFF00000006500 | raw_sql_destructive | SQL | accounts_741.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | true |
DIFF00000006501 | orm_schema_change | Ruby | logs_231.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :notifications, :category | NONE | true |
DIFF00000006502 | raw_sql_safe | SQL | sessions_412.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO comments (priority, created_at) VALUES (%s, %s); | NONE | false |
DIFF00000006503 | raw_sql_safe | SQL | products_359.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000006504 | mentioned_in_comment | Python | subscriptions_222.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM notifications; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000006505 | raw_sql_safe | SQL | tickets_148.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_payments_metadata ON payments (priority); | NONE | false |
DIFF00000006506 | raw_sql_safe | SQL | tickets_692.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM users WHERE category = 'active'; | NONE | false |
DIFF00000006507 | test_suite_cleanup | SQL | spec/subscriptions_663.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE accounts; | TRUNCATE | false |
DIFF00000006508 | raw_sql_destructive | SQL | notifications_967.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM orders; | DELETE_UNQUALIFIED | true |
DIFF00000006509 | general_code_change | JavaScript | orders_668.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 |
DIFF00000006510 | test_suite_cleanup | SQL | test/events_292.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | false |
DIFF00000006511 | raw_sql_safe | SQL | users_781.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE comments SET priority = %s WHERE quantity = %s; | NONE | false |
DIFF00000006512 | orm_schema_change | TypeScript | sessions_601.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Accounts { // removed field: order_id } | NONE | true |
DIFF00000006513 | raw_sql_safe | SQL | payments_144.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE shipments ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000006514 | raw_sql_destructive | SQL | inventory_979.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | true |
DIFF00000006515 | obfuscated_destructive | SQL | comments_244.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table products; | DROP_TABLE | true |
DIFF00000006516 | orm_schema_change | JavaScript | reviews_335.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('events', table => table.dropColumn('category')) | NONE | true |
DIFF00000006517 | orm_schema_change | JavaScript | payments_351.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('sessions', table => table.dropColumn('status')) | NONE | true |
DIFF00000006518 | orm_schema_change | Ruby | logs_862.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :logs, :quantity | NONE | true |
DIFF00000006519 | mentioned_in_comment | Python | shipments_172.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM inventory; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000006520 | orm_schema_change | Ruby | comments_90.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :comments, :priority | NONE | true |
DIFF00000006521 | general_code_change | Python | refunds_216.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000006522 | general_code_change | JavaScript | subscriptions_122.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 |
DIFF00000006523 | general_code_change | Python | employees_5.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000006524 | test_suite_cleanup | SQL | mysql-test/suite/inventory_50.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE refunds SET priority = CONCAT(priority, balance); | UPDATE_CONCAT | false |
DIFF00000006525 | raw_sql_safe | SQL | subscriptions_964.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE accounts SET is_active = %s WHERE role = %s; | NONE | false |
DIFF00000006526 | raw_sql_destructive | SQL | tickets_835.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
DIFF00000006527 | orm_schema_change | Ruby | customers_990.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :transactions, :address | NONE | true |
DIFF00000006528 | mentioned_in_comment | Python | notifications_839.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE reviews RENAME COLUMN created_at TO contact_email;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000006529 | mentioned_in_comment | Python | invoices_206.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE events; -- now deprecated""" | DROP_TABLE | false |
DIFF00000006530 | raw_sql_safe | SQL | orders_168.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_users_user_id ON users (role); | NONE | false |
DIFF00000006531 | raw_sql_destructive | SQL | tickets_869.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET is_active = CONCAT(is_active, category); | UPDATE_CONCAT | true |
DIFF00000006532 | general_code_change | Ruby | notifications_202.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000006533 | raw_sql_destructive | SQL | refunds_437.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN price TO full_name; | ALTER_RENAME | true |
DIFF00000006534 | orm_schema_change | JavaScript | accounts_420.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('employees', table => table.dropColumn('quantity')) | NONE | true |
DIFF00000006535 | raw_sql_safe | SQL | payments_169.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO sessions (created_at, role) VALUES (%s, %s); | NONE | false |
DIFF00000006536 | general_code_change | Python | events_228.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000006537 | general_code_change | Java | refunds_371.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000006538 | general_code_change | Go | products_6.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006539 | raw_sql_safe | SQL | sessions_501.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_user_id ON transactions (metadata); | NONE | false |
DIFF00000006540 | test_suite_cleanup | SQL | mysql-test/suite/accounts_273.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | false |
DIFF00000006541 | orm_schema_change | Python | tickets_293.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='comments', name='quantity') | NONE | true |
DIFF00000006542 | general_code_change | Ruby | employees_345.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000006543 | general_code_change | JavaScript | transactions_83.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000006544 | general_code_change | JavaScript | users_904.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 |
DIFF00000006545 | raw_sql_safe | SQL | transactions_170.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE products SET email = %s WHERE created_at = %s; | NONE | false |
DIFF00000006546 | orm_schema_change | JavaScript | products_81.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'user_id') | NONE | true |
DIFF00000006547 | general_code_change | Ruby | tickets_872.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000006548 | obfuscated_destructive | SQL | shipments_31.sql | schema cleanup | @@ -1,3 +1,3 @@
+dELeTE FROM cOMMeNTs; | DELETE_UNQUALIFIED | true |
DIFF00000006549 | test_suite_cleanup | SQL | tests/users_495.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE events SET category = CONCAT(category, phone); | UPDATE_CONCAT | false |
DIFF00000006550 | raw_sql_destructive | SQL | inventory_989.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE logs DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00000006551 | test_suite_cleanup | SQL | tests/orders_157.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | false |
DIFF00000006552 | general_code_change | JavaScript | subscriptions_756.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000006553 | raw_sql_destructive | SQL | products_225.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE notifications SET quantity = CONCAT(quantity, name); | UPDATE_CONCAT | true |
DIFF00000006554 | raw_sql_destructive | SQL | reviews_347.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | true |
DIFF00000006555 | raw_sql_destructive | SQL | shipments_626.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | true |
DIFF00000006556 | raw_sql_safe | SQL | customers_427.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO subscriptions (priority, role) VALUES (%s, %s); | NONE | false |
DIFF00000006557 | test_suite_cleanup | SQL | spec/tickets_150.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | false |
DIFF00000006558 | obfuscated_destructive | SQL | comments_998.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
tickets
RENAME
COLUMN
metadata
TO
amount_cents; | ALTER_RENAME | true |
DIFF00000006559 | general_code_change | JavaScript | products_49.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 |
DIFF00000006560 | raw_sql_destructive | SQL | products_653.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts DROP COLUMN priority; | DROP_COLUMN | true |
DIFF00000006561 | obfuscated_destructive | SQL | events_732.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE refunds SET order_id = CONCAT(order_id, amount); | UPDATE_CONCAT | true |
DIFF00000006562 | raw_sql_destructive | SQL | transactions_280.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | true |
DIFF00000006563 | orm_schema_change | Python | orders_726.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='tickets', name='email') | NONE | true |
DIFF00000006564 | general_code_change | TypeScript | shipments_260.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 |
DIFF00000006565 | orm_schema_change | Python | events_149.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='order_id') | NONE | true |
DIFF00000006566 | orm_schema_change | TypeScript | products_196.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: email } | NONE | true |
DIFF00000006567 | obfuscated_destructive | SQL | payments_94.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | true |
DIFF00000006568 | mentioned_in_comment | Python | products_792.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE employees; -- now deprecated""" | DROP_TABLE | false |
DIFF00000006569 | mentioned_in_comment | Python | tickets_453.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE subscriptions DROP COLUMN status; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000006570 | raw_sql_safe | SQL | subscriptions_55.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_price ON customers (amount); | NONE | false |
DIFF00000006571 | test_suite_cleanup | SQL | spec/sessions_38.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM reviews; | DELETE_UNQUALIFIED | false |
DIFF00000006572 | general_code_change | Ruby | notifications_645.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000006573 | orm_schema_change | Ruby | users_357.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :employees, :role | NONE | true |
DIFF00000006574 | general_code_change | Python | inventory_376.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000006575 | general_code_change | Java | payments_341.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000006576 | raw_sql_destructive | SQL | customers_283.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE accounts SET category = CONCAT(category, name); | UPDATE_CONCAT | true |
DIFF00000006577 | mentioned_in_comment | Python | inventory_71.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM payments; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000006578 | orm_schema_change | JavaScript | notifications_277.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'description') | NONE | true |
DIFF00000006579 | mentioned_in_comment | Python | shipments_615.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE logs SET email = CONCAT(email, email);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000006580 | test_suite_cleanup | SQL | spec/employees_372.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE transactions DROP COLUMN created_at; | DROP_COLUMN | false |
DIFF00000006581 | general_code_change | Java | subscriptions_974.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000006582 | general_code_change | JavaScript | events_443.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 |
DIFF00000006583 | general_code_change | JavaScript | shipments_599.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 |
DIFF00000006584 | raw_sql_destructive | SQL | accounts_831.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
DIFF00000006585 | raw_sql_destructive | SQL | shipments_418.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE events SET quantity = CONCAT(quantity, status); | UPDATE_CONCAT | true |
DIFF00000006586 | general_code_change | TypeScript | inventory_206.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 |
DIFF00000006587 | raw_sql_safe | SQL | invoices_465.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE shipments ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000006588 | orm_schema_change | JavaScript | notifications_213.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('price')) | NONE | true |
DIFF00000006589 | mentioned_in_comment | Python | subscriptions_439.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE tickets DROP COLUMN category;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000006590 | orm_schema_change | Python | employees_571.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='quantity') | NONE | true |
DIFF00000006591 | general_code_change | Go | sessions_981.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006592 | raw_sql_safe | SQL | payments_369.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE balance = 'active'; | NONE | false |
DIFF00000006593 | test_suite_cleanup | SQL | mysql-test/suite/events_965.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN role; | DROP_COLUMN | false |
DIFF00000006594 | mentioned_in_comment | Python | transactions_323.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE customers SET quantity = CONCAT(quantity, price);") | UPDATE_CONCAT | false |
DIFF00000006595 | mentioned_in_comment | Python | tickets_408.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE inventory DROP COLUMN phone;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000006596 | general_code_change | Python | invoices_270.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000006597 | general_code_change | Python | comments_257.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000006598 | mentioned_in_comment | Python | sessions_281.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE employees RENAME COLUMN balance TO amount_cents;") | ALTER_RENAME | false |
DIFF00000006599 | raw_sql_destructive | SQL | customers_254.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE products SET description = CONCAT(description, priority); | UPDATE_CONCAT | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.