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 |
|---|---|---|---|---|---|---|---|
DIFF00000002500 | orm_schema_change | JavaScript | products_964.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('subscriptions', 'created_at') | NONE | true |
DIFF00000002501 | orm_schema_change | JavaScript | employees_795.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('customers', 'updated_at') | NONE | true |
DIFF00000002502 | raw_sql_destructive | SQL | events_726.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00000002503 | obfuscated_destructive | SQL | users_954.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | true |
DIFF00000002504 | test_suite_cleanup | SQL | spec/orders_841.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | false |
DIFF00000002505 | general_code_change | Java | shipments_405.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002506 | raw_sql_safe | SQL | tickets_605.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO subscriptions (phone, role) VALUES (%s, %s); | NONE | false |
DIFF00000002507 | obfuscated_destructive | SQL | accounts_418.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table shipments; | TRUNCATE | true |
DIFF00000002508 | raw_sql_destructive | SQL | refunds_298.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | true |
DIFF00000002509 | general_code_change | Ruby | customers_678.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000002510 | orm_schema_change | Ruby | shipments_18.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :payments, :metadata | NONE | true |
DIFF00000002511 | raw_sql_safe | SQL | payments_324.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE invoices ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000002512 | raw_sql_destructive | SQL | events_673.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET priority = CONCAT(priority, status); | UPDATE_CONCAT | true |
DIFF00000002513 | general_code_change | Go | accounts_214.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000002514 | mentioned_in_comment | Python | logs_721.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM reviews;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000002515 | orm_schema_change | Python | subscriptions_359.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='phone') | NONE | true |
DIFF00000002516 | raw_sql_safe | SQL | customers_893.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE payments SET balance = %s WHERE score = %s; | NONE | false |
DIFF00000002517 | raw_sql_destructive | SQL | sessions_140.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | true |
DIFF00000002518 | raw_sql_destructive | SQL | logs_248.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | true |
DIFF00000002519 | general_code_change | JavaScript | payments_824.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002520 | raw_sql_destructive | SQL | customers_273.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds RENAME COLUMN metadata TO state; | ALTER_RENAME | true |
DIFF00000002521 | raw_sql_destructive | SQL | tickets_697.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN order_id TO state; | ALTER_RENAME | true |
DIFF00000002522 | raw_sql_safe | SQL | invoices_203.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE sessions ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000002523 | test_suite_cleanup | SQL | mysql-test/suite/employees_175.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | false |
DIFF00000002524 | raw_sql_destructive | SQL | orders_883.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE tickets SET phone = CONCAT(phone, metadata); | UPDATE_CONCAT | true |
DIFF00000002525 | raw_sql_safe | SQL | orders_55.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE employees SET priority = %s WHERE status = %s; | NONE | false |
DIFF00000002526 | mentioned_in_comment | Python | invoices_685.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM inventory;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000002527 | general_code_change | JavaScript | accounts_361.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 |
DIFF00000002528 | general_code_change | Ruby | tickets_767.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000002529 | raw_sql_destructive | SQL | refunds_291.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE customers; | TRUNCATE | true |
DIFF00000002530 | general_code_change | JavaScript | accounts_495.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002531 | general_code_change | JavaScript | products_431.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002532 | raw_sql_safe | SQL | subscriptions_73.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE tickets SET order_id = %s WHERE is_active = %s; | NONE | false |
DIFF00000002533 | obfuscated_destructive | SQL | invoices_913.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN name TO full_name; | ALTER_RENAME | true |
DIFF00000002534 | test_suite_cleanup | SQL | tests/users_318.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | false |
DIFF00000002535 | general_code_change | JavaScript | events_402.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002536 | raw_sql_safe | SQL | shipments_51.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_orders_status ON orders (user_id); | NONE | false |
DIFF00000002537 | raw_sql_destructive | SQL | orders_788.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE inventory SET balance = CONCAT(balance, role); | UPDATE_CONCAT | true |
DIFF00000002538 | test_suite_cleanup | SQL | spec/payments_112.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | false |
DIFF00000002539 | raw_sql_safe | SQL | invoices_410.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE comments ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000002540 | raw_sql_destructive | SQL | comments_979.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM tickets; | DELETE_UNQUALIFIED | true |
DIFF00000002541 | test_suite_cleanup | SQL | tests/products_765.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | false |
DIFF00000002542 | raw_sql_safe | SQL | invoices_91.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_products_updated_at ON products (order_id); | NONE | false |
DIFF00000002543 | obfuscated_destructive | SQL | users_974.sql | schema cleanup | @@ -1,3 +1,3 @@
+update transactions set created_at = concat(created_at, user_id); | UPDATE_CONCAT | true |
DIFF00000002544 | raw_sql_safe | SQL | employees_170.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE order_id = 'active'; | NONE | false |
DIFF00000002545 | raw_sql_destructive | SQL | customers_812.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN category; | DROP_COLUMN | true |
DIFF00000002546 | general_code_change | JavaScript | subscriptions_936.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002547 | test_suite_cleanup | SQL | test/products_788.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | false |
DIFF00000002548 | orm_schema_change | Ruby | tickets_735.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :address | NONE | true |
DIFF00000002549 | test_suite_cleanup | SQL | mysql-test/suite/tickets_90.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE orders; | TRUNCATE | false |
DIFF00000002550 | orm_schema_change | Ruby | orders_698.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :employees, :quantity | NONE | true |
DIFF00000002551 | raw_sql_safe | SQL | users_515.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE sessions ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000002552 | orm_schema_change | JavaScript | orders_492.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('employees', table => table.dropColumn('phone')) | NONE | true |
DIFF00000002553 | mentioned_in_comment | Python | tickets_924.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE invoices RENAME COLUMN updated_at TO amount_cents;") | ALTER_RENAME | false |
DIFF00000002554 | obfuscated_destructive | SQL | reviews_208.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table tickets; | TRUNCATE | true |
DIFF00000002555 | orm_schema_change | JavaScript | invoices_154.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('subscriptions', 'email') | NONE | true |
DIFF00000002556 | raw_sql_destructive | SQL | refunds_827.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE invoices SET description = CONCAT(description, updated_at); | UPDATE_CONCAT | true |
DIFF00000002557 | raw_sql_destructive | SQL | notifications_109.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN balance TO user_role; | ALTER_RENAME | true |
DIFF00000002558 | general_code_change | JavaScript | invoices_866.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002559 | mentioned_in_comment | Python | customers_722.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE customers RENAME COLUMN category TO amount_cents;") | ALTER_RENAME | false |
DIFF00000002560 | raw_sql_safe | SQL | payments_792.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO notifications (role, address) VALUES (%s, %s); | NONE | false |
DIFF00000002561 | general_code_change | Java | accounts_160.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002562 | mentioned_in_comment | Python | products_627.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM subscriptions;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000002563 | general_code_change | JavaScript | orders_477.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 |
DIFF00000002564 | raw_sql_safe | SQL | inventory_301.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO sessions (user_id, amount) VALUES (%s, %s); | NONE | false |
DIFF00000002565 | orm_schema_change | TypeScript | payments_802.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Shipments { // removed field: is_active } | NONE | true |
DIFF00000002566 | general_code_change | JavaScript | inventory_948.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 |
DIFF00000002567 | mentioned_in_comment | Python | sessions_830.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE products;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000002568 | mentioned_in_comment | Python | orders_625.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE subscriptions;") | TRUNCATE | false |
DIFF00000002569 | raw_sql_destructive | SQL | payments_52.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN updated_at TO state; | ALTER_RENAME | true |
DIFF00000002570 | obfuscated_destructive | SQL | employees_111.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table logs; | TRUNCATE | true |
DIFF00000002571 | raw_sql_safe | SQL | events_646.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO shipments (description, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00000002572 | obfuscated_destructive | SQL | customers_570.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | true |
DIFF00000002573 | raw_sql_destructive | SQL | events_189.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE events SET quantity = CONCAT(quantity, price); | UPDATE_CONCAT | true |
DIFF00000002574 | obfuscated_destructive | SQL | payments_214.sql | schema cleanup | @@ -1,3 +1,3 @@
+DeLete FrOm cuSTOMErs; | DELETE_UNQUALIFIED | true |
DIFF00000002575 | raw_sql_destructive | SQL | invoices_52.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00000002576 | raw_sql_safe | SQL | shipments_867.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (order_id, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00000002577 | raw_sql_destructive | SQL | accounts_88.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | true |
DIFF00000002578 | test_suite_cleanup | SQL | tests/events_552.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN order_id; | DROP_COLUMN | false |
DIFF00000002579 | raw_sql_safe | SQL | notifications_195.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE email = 'active'; | NONE | false |
DIFF00000002580 | general_code_change | Ruby | transactions_476.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000002581 | general_code_change | Go | products_904.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000002582 | raw_sql_safe | SQL | customers_883.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE transactions SET amount = %s WHERE phone = %s; | NONE | false |
DIFF00000002583 | raw_sql_destructive | SQL | reviews_386.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM payments; | DELETE_UNQUALIFIED | true |
DIFF00000002584 | orm_schema_change | TypeScript | tickets_429.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Invoices { // removed field: address } | NONE | true |
DIFF00000002585 | general_code_change | JavaScript | payments_138.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002586 | test_suite_cleanup | SQL | test/employees_715.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE employees SET metadata = CONCAT(metadata, metadata); | UPDATE_CONCAT | false |
DIFF00000002587 | obfuscated_destructive | SQL | reviews_944.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE logs SET order_id = CONCAT(order_id, balance); | UPDATE_CONCAT | true |
DIFF00000002588 | raw_sql_safe | SQL | notifications_655.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE comments SET email = %s WHERE phone = %s; | NONE | false |
DIFF00000002589 | raw_sql_destructive | SQL | reviews_459.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews RENAME COLUMN is_active TO contact_email; | ALTER_RENAME | true |
DIFF00000002590 | obfuscated_destructive | SQL | employees_823.sql | schema cleanup | @@ -1,3 +1,3 @@
+TruncAtE Table sHIPMentS; | TRUNCATE | true |
DIFF00000002591 | mentioned_in_comment | Python | notifications_818.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE shipments;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000002592 | general_code_change | JavaScript | accounts_705.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 |
DIFF00000002593 | obfuscated_destructive | SQL | logs_249.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
reviews; | DELETE_UNQUALIFIED | true |
DIFF00000002594 | test_suite_cleanup | SQL | test/refunds_104.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE refunds RENAME COLUMN is_active TO full_name; | ALTER_RENAME | false |
DIFF00000002595 | general_code_change | Python | transactions_377.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000002596 | general_code_change | Ruby | logs_980.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000002597 | orm_schema_change | TypeScript | events_726.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Tickets { // removed field: quantity } | NONE | true |
DIFF00000002598 | test_suite_cleanup | SQL | tests/notifications_113.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | false |
DIFF00000002599 | orm_schema_change | Ruby | orders_891.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :payments, :category | NONE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.