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 |
|---|---|---|---|---|---|---|---|
DIFF00099996600 | general_code_change | Java | logs_270.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099996601 | raw_sql_safe | SQL | refunds_541.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (email, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00099996602 | obfuscated_destructive | SQL | payments_48.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from events; | DELETE_UNQUALIFIED | true |
DIFF00099996603 | test_suite_cleanup | SQL | spec/orders_937.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE users; | TRUNCATE | false |
DIFF00099996604 | raw_sql_safe | SQL | tickets_355.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE name = 'active'; | NONE | false |
DIFF00099996605 | general_code_change | Java | notifications_11.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099996606 | obfuscated_destructive | SQL | accounts_935.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table comments drop column status; | DROP_COLUMN | true |
DIFF00099996607 | general_code_change | Go | products_406.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996608 | raw_sql_safe | SQL | accounts_161.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE refunds SET amount = %s WHERE quantity = %s; | NONE | false |
DIFF00099996609 | orm_schema_change | Python | reviews_696.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='reviews', name='amount') | NONE | true |
DIFF00099996610 | raw_sql_safe | SQL | customers_936.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM refunds WHERE user_id = 'active'; | NONE | false |
DIFF00099996611 | general_code_change | Python | comments_23.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099996612 | mentioned_in_comment | Python | tickets_320.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE orders SET score = CONCAT(score, user_id);") | UPDATE_CONCAT | false |
DIFF00099996613 | orm_schema_change | Python | employees_299.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='transactions', name='phone') | NONE | true |
DIFF00099996614 | obfuscated_destructive | SQL | reviews_585.sql | schema cleanup | @@ -1,3 +1,3 @@
+upDATE TIckETS SET AMoUNt = cONCat(amoUNt, catEgORy); | UPDATE_CONCAT | true |
DIFF00099996615 | obfuscated_destructive | SQL | orders_118.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE InVoiCes; | DROP_TABLE | true |
DIFF00099996616 | raw_sql_destructive | SQL | shipments_202.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00099996617 | raw_sql_safe | SQL | reviews_904.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE transactions SET category = %s WHERE price = %s; | NONE | false |
DIFF00099996618 | test_suite_cleanup | SQL | tests/users_866.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE users SET status = CONCAT(status, status); | UPDATE_CONCAT | false |
DIFF00099996619 | general_code_change | JavaScript | logs_829.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 |
DIFF00099996620 | general_code_change | JavaScript | payments_614.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 |
DIFF00099996621 | raw_sql_destructive | SQL | transactions_566.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | true |
DIFF00099996622 | mentioned_in_comment | Python | transactions_762.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE sessions DROP COLUMN category; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099996623 | raw_sql_safe | SQL | shipments_696.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (name, price) VALUES (%s, %s); | NONE | false |
DIFF00099996624 | test_suite_cleanup | SQL | spec/users_674.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE events SET user_id = CONCAT(user_id, status); | UPDATE_CONCAT | false |
DIFF00099996625 | raw_sql_safe | SQL | users_767.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM users WHERE name = 'active'; | NONE | false |
DIFF00099996626 | general_code_change | JavaScript | payments_45.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 |
DIFF00099996627 | obfuscated_destructive | SQL | inventory_995.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE logs RENAME COLUMN metadata TO full_name; | ALTER_RENAME | true |
DIFF00099996628 | obfuscated_destructive | SQL | users_904.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLter tabLe REfuNdS renAMe COluMn quaNtITy tO FUll_nAme; | ALTER_RENAME | true |
DIFF00099996629 | obfuscated_destructive | SQL | notifications_93.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table accounts rename column category to user_role; | ALTER_RENAME | true |
DIFF00099996630 | general_code_change | TypeScript | customers_185.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 |
DIFF00099996631 | raw_sql_safe | SQL | transactions_758.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE customers SET order_id = %s WHERE description = %s; | NONE | false |
DIFF00099996632 | mentioned_in_comment | Python | logs_580.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE subscriptions SET address = CONCAT(address, priority);") | UPDATE_CONCAT | false |
DIFF00099996633 | raw_sql_destructive | SQL | payments_136.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN phone TO state; | ALTER_RENAME | true |
DIFF00099996634 | orm_schema_change | Python | users_108.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='comments', name='amount') | NONE | true |
DIFF00099996635 | test_suite_cleanup | SQL | mysql-test/suite/subscriptions_19.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | false |
DIFF00099996636 | raw_sql_safe | SQL | events_541.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM orders WHERE is_active = 'active'; | NONE | false |
DIFF00099996637 | raw_sql_safe | SQL | reviews_936.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099996638 | test_suite_cleanup | SQL | spec/events_209.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | false |
DIFF00099996639 | raw_sql_destructive | SQL | sessions_665.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | true |
DIFF00099996640 | raw_sql_destructive | SQL | transactions_376.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00099996641 | raw_sql_destructive | SQL | payments_625.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | true |
DIFF00099996642 | raw_sql_destructive | SQL | events_729.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE users; | DROP_TABLE | true |
DIFF00099996643 | general_code_change | Python | payments_61.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099996644 | test_suite_cleanup | SQL | mysql-test/suite/transactions_452.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE payments SET phone = CONCAT(phone, email); | UPDATE_CONCAT | false |
DIFF00099996645 | orm_schema_change | Python | tickets_406.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='users', name='amount') | NONE | true |
DIFF00099996646 | obfuscated_destructive | SQL | invoices_656.sql | schema cleanup | @@ -1,3 +1,3 @@
+altER tAblE notIfIcAtIons REnAme ColuMn addrEss to user_roLe; | ALTER_RENAME | true |
DIFF00099996647 | mentioned_in_comment | Python | notifications_739.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE employees DROP COLUMN is_active;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099996648 | obfuscated_destructive | SQL | invoices_416.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELetE fROM seSSIonS; | DELETE_UNQUALIFIED | true |
DIFF00099996649 | general_code_change | Python | orders_614.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099996650 | raw_sql_safe | SQL | events_946.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE tickets ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099996651 | test_suite_cleanup | SQL | spec/users_243.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE employees SET price = CONCAT(price, created_at); | UPDATE_CONCAT | false |
DIFF00099996652 | raw_sql_safe | SQL | subscriptions_310.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE transactions SET created_at = %s WHERE created_at = %s; | NONE | false |
DIFF00099996653 | obfuscated_destructive | SQL | refunds_992.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
shipments
SET
price
=
CONCAT(price,
role); | UPDATE_CONCAT | true |
DIFF00099996654 | orm_schema_change | JavaScript | inventory_953.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('subscriptions', table => table.dropColumn('amount')) | NONE | true |
DIFF00099996655 | raw_sql_destructive | SQL | products_164.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE users SET metadata = CONCAT(metadata, description); | UPDATE_CONCAT | true |
DIFF00099996656 | raw_sql_safe | SQL | subscriptions_488.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_employees_phone ON employees (price); | NONE | false |
DIFF00099996657 | obfuscated_destructive | SQL | payments_946.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table shipments; | DROP_TABLE | true |
DIFF00099996658 | orm_schema_change | TypeScript | subscriptions_249.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Inventory { // removed field: amount } | NONE | true |
DIFF00099996659 | raw_sql_safe | SQL | customers_793.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM tickets WHERE is_active = 'active'; | NONE | false |
DIFF00099996660 | raw_sql_destructive | SQL | subscriptions_400.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds RENAME COLUMN role TO user_role; | ALTER_RENAME | true |
DIFF00099996661 | orm_schema_change | JavaScript | payments_682.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('inventory', table => table.dropColumn('amount')) | NONE | true |
DIFF00099996662 | raw_sql_destructive | SQL | subscriptions_212.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE inventory; | DROP_TABLE | true |
DIFF00099996663 | raw_sql_safe | SQL | payments_444.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET updated_at = %s WHERE status = %s; | NONE | false |
DIFF00099996664 | obfuscated_destructive | SQL | products_953.sql | schema cleanup | @@ -1,3 +1,3 @@
+alTeR TABle REFunds renaMe COluMn baLancE tO Full_naME; | ALTER_RENAME | true |
DIFF00099996665 | obfuscated_destructive | SQL | invoices_177.sql | schema cleanup | @@ -1,3 +1,3 @@
+uPDatE SHIPMeNTS Set rolE = concaT(RoLe, USer_id); | UPDATE_CONCAT | true |
DIFF00099996666 | orm_schema_change | TypeScript | subscriptions_397.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Tickets { // removed field: order_id } | NONE | true |
DIFF00099996667 | obfuscated_destructive | SQL | employees_434.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRunCAte Table EMpLOyEes; | TRUNCATE | true |
DIFF00099996668 | raw_sql_safe | SQL | shipments_99.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_employees_balance ON employees (role); | NONE | false |
DIFF00099996669 | mentioned_in_comment | Python | tickets_391.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM logs; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099996670 | raw_sql_destructive | SQL | shipments_283.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00099996671 | test_suite_cleanup | SQL | tests/payments_657.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE users; | TRUNCATE | false |
DIFF00099996672 | orm_schema_change | JavaScript | users_69.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('invoices', 'phone') | NONE | true |
DIFF00099996673 | orm_schema_change | JavaScript | refunds_872.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('logs', 'metadata') | NONE | true |
DIFF00099996674 | general_code_change | JavaScript | inventory_689.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 |
DIFF00099996675 | test_suite_cleanup | SQL | test/accounts_73.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN description TO contact_email; | ALTER_RENAME | false |
DIFF00099996676 | raw_sql_safe | SQL | notifications_636.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE comments ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099996677 | general_code_change | JavaScript | transactions_651.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 |
DIFF00099996678 | raw_sql_safe | SQL | invoices_287.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (category, priority) VALUES (%s, %s); | NONE | false |
DIFF00099996679 | orm_schema_change | JavaScript | subscriptions_304.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'role') | NONE | true |
DIFF00099996680 | raw_sql_destructive | SQL | transactions_293.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN updated_at; | DROP_COLUMN | true |
DIFF00099996681 | mentioned_in_comment | Python | subscriptions_902.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE invoices; -- now deprecated""" | TRUNCATE | false |
DIFF00099996682 | orm_schema_change | JavaScript | reviews_693.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('accounts', 'balance') | NONE | true |
DIFF00099996683 | raw_sql_safe | SQL | tickets_371.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE products SET role = %s WHERE priority = %s; | NONE | false |
DIFF00099996684 | raw_sql_destructive | SQL | customers_231.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE transactions SET category = CONCAT(category, price); | UPDATE_CONCAT | true |
DIFF00099996685 | mentioned_in_comment | Python | subscriptions_729.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE shipments SET quantity = CONCAT(quantity, created_at);") | UPDATE_CONCAT | false |
DIFF00099996686 | general_code_change | Go | products_340.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996687 | raw_sql_safe | SQL | products_769.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM logs WHERE metadata = 'active'; | NONE | false |
DIFF00099996688 | test_suite_cleanup | SQL | mysql-test/suite/payments_136.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | false |
DIFF00099996689 | general_code_change | JavaScript | refunds_678.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099996690 | general_code_change | Ruby | inventory_667.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996691 | raw_sql_safe | SQL | shipments_828.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM products WHERE created_at = 'active'; | NONE | false |
DIFF00099996692 | raw_sql_destructive | SQL | employees_771.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | true |
DIFF00099996693 | raw_sql_safe | SQL | sessions_900.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO comments (email, metadata) VALUES (%s, %s); | NONE | false |
DIFF00099996694 | orm_schema_change | JavaScript | invoices_664.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'priority') | NONE | true |
DIFF00099996695 | raw_sql_safe | SQL | notifications_103.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (price, score) VALUES (%s, %s); | NONE | false |
DIFF00099996696 | raw_sql_destructive | SQL | tickets_704.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN updated_at TO contact_email; | ALTER_RENAME | true |
DIFF00099996697 | general_code_change | JavaScript | events_328.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 |
DIFF00099996698 | orm_schema_change | JavaScript | subscriptions_453.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00099996699 | test_suite_cleanup | SQL | tests/payments_124.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.