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 |
|---|---|---|---|---|---|---|---|
DIFF00000003600 | raw_sql_destructive | SQL | logs_340.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE payments SET created_at = CONCAT(created_at, name); | UPDATE_CONCAT | true |
DIFF00000003601 | raw_sql_destructive | SQL | inventory_234.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN quantity; | DROP_COLUMN | true |
DIFF00000003602 | general_code_change | Go | reviews_798.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003603 | general_code_change | Ruby | reviews_499.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003604 | mentioned_in_comment | Python | refunds_997.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE users;") | DROP_TABLE | false |
DIFF00000003605 | orm_schema_change | JavaScript | reviews_619.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('products', 'is_active') | NONE | true |
DIFF00000003606 | mentioned_in_comment | Python | payments_386.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM logs;") | DELETE_UNQUALIFIED | false |
DIFF00000003607 | obfuscated_destructive | SQL | shipments_623.sql | schema cleanup | @@ -1,3 +1,3 @@
+trunCatE taBLE ACCOuNtS; | TRUNCATE | true |
DIFF00000003608 | raw_sql_safe | SQL | payments_651.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE balance = 'active'; | NONE | false |
DIFF00000003609 | test_suite_cleanup | SQL | tests/refunds_442.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN category; | DROP_COLUMN | false |
DIFF00000003610 | general_code_change | Ruby | tickets_984.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003611 | raw_sql_safe | SQL | invoices_345.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO users (quantity, phone) VALUES (%s, %s); | NONE | false |
DIFF00000003612 | orm_schema_change | Python | invoices_495.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='employees', name='email') | NONE | true |
DIFF00000003613 | orm_schema_change | JavaScript | refunds_648.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'price') | NONE | true |
DIFF00000003614 | mentioned_in_comment | Python | comments_120.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE shipments SET updated_at = CONCAT(updated_at, phone);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000003615 | raw_sql_safe | SQL | comments_889.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM sessions WHERE order_id = 'active'; | NONE | false |
DIFF00000003616 | raw_sql_safe | SQL | refunds_568.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_description ON subscriptions (order_id); | NONE | false |
DIFF00000003617 | orm_schema_change | TypeScript | events_325.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: amount } | NONE | true |
DIFF00000003618 | raw_sql_destructive | SQL | events_300.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | true |
DIFF00000003619 | general_code_change | Go | shipments_372.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003620 | raw_sql_destructive | SQL | comments_79.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | true |
DIFF00000003621 | raw_sql_safe | SQL | transactions_271.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE reviews ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000003622 | general_code_change | Python | subscriptions_31.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003623 | raw_sql_safe | SQL | transactions_282.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000003624 | orm_schema_change | TypeScript | comments_910.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: metadata } | NONE | true |
DIFF00000003625 | mentioned_in_comment | Python | notifications_686.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE accounts DROP COLUMN amount; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000003626 | raw_sql_safe | SQL | comments_650.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_employees_role ON employees (order_id); | NONE | false |
DIFF00000003627 | obfuscated_destructive | SQL | transactions_16.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from shipments; | DELETE_UNQUALIFIED | true |
DIFF00000003628 | raw_sql_safe | SQL | logs_928.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE shipments ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000003629 | general_code_change | JavaScript | payments_910.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003630 | obfuscated_destructive | SQL | orders_935.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
logs; | TRUNCATE | true |
DIFF00000003631 | obfuscated_destructive | SQL | employees_497.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRuNcaTE TaBle ShIpmENTS; | TRUNCATE | true |
DIFF00000003632 | raw_sql_destructive | SQL | payments_806.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | true |
DIFF00000003633 | raw_sql_safe | SQL | users_14.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000003634 | obfuscated_destructive | SQL | shipments_930.sql | schema cleanup | @@ -1,3 +1,3 @@
+update sessions set email = concat(email, created_at); | UPDATE_CONCAT | true |
DIFF00000003635 | raw_sql_destructive | SQL | events_654.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00000003636 | raw_sql_destructive | SQL | shipments_23.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | true |
DIFF00000003637 | mentioned_in_comment | Python | comments_929.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE events; -- now deprecated""" | TRUNCATE | false |
DIFF00000003638 | obfuscated_destructive | SQL | products_485.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table products; | TRUNCATE | true |
DIFF00000003639 | orm_schema_change | JavaScript | shipments_798.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('sessions', 'priority') | NONE | true |
DIFF00000003640 | raw_sql_safe | SQL | comments_439.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE accounts ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000003641 | mentioned_in_comment | Python | customers_861.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE tickets SET address = CONCAT(address, priority);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000003642 | test_suite_cleanup | SQL | test/payments_698.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | false |
DIFF00000003643 | general_code_change | Ruby | customers_638.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003644 | obfuscated_destructive | SQL | comments_419.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
payments; | DELETE_UNQUALIFIED | true |
DIFF00000003645 | test_suite_cleanup | SQL | tests/employees_342.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | false |
DIFF00000003646 | raw_sql_destructive | SQL | payments_612.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | true |
DIFF00000003647 | orm_schema_change | Ruby | inventory_410.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :events, :order_id | NONE | true |
DIFF00000003648 | raw_sql_safe | SQL | products_573.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM subscriptions WHERE score = 'active'; | NONE | false |
DIFF00000003649 | orm_schema_change | TypeScript | sessions_858.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Accounts { // removed field: role } | NONE | true |
DIFF00000003650 | obfuscated_destructive | SQL | payments_192.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
employees
RENAME
COLUMN
category
TO
state; | ALTER_RENAME | true |
DIFF00000003651 | general_code_change | JavaScript | tickets_269.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 |
DIFF00000003652 | test_suite_cleanup | SQL | spec/payments_12.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE payments SET priority = CONCAT(priority, score); | UPDATE_CONCAT | false |
DIFF00000003653 | mentioned_in_comment | Python | products_821.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE reviews RENAME COLUMN user_id TO contact_email;") | ALTER_RENAME | false |
DIFF00000003654 | orm_schema_change | JavaScript | accounts_593.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('reviews', 'name') | NONE | true |
DIFF00000003655 | orm_schema_change | JavaScript | reviews_424.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('notifications', table => table.dropColumn('order_id')) | NONE | true |
DIFF00000003656 | general_code_change | Python | customers_811.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003657 | raw_sql_safe | SQL | invoices_158.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO employees (amount, status) VALUES (%s, %s); | NONE | false |
DIFF00000003658 | raw_sql_destructive | SQL | inventory_484.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00000003659 | raw_sql_safe | SQL | transactions_997.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE products SET created_at = %s WHERE quantity = %s; | NONE | false |
DIFF00000003660 | mentioned_in_comment | Python | accounts_885.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE users RENAME COLUMN is_active TO user_role;") | ALTER_RENAME | false |
DIFF00000003661 | orm_schema_change | JavaScript | notifications_790.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('notifications', table => table.dropColumn('amount')) | NONE | true |
DIFF00000003662 | obfuscated_destructive | SQL | logs_386.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
customers; | DELETE_UNQUALIFIED | true |
DIFF00000003663 | mentioned_in_comment | Python | payments_718.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE payments SET updated_at = CONCAT(updated_at, balance); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000003664 | general_code_change | Python | sessions_536.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003665 | general_code_change | JavaScript | events_366.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 |
DIFF00000003666 | mentioned_in_comment | Python | shipments_547.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE refunds; -- now deprecated""" | TRUNCATE | false |
DIFF00000003667 | general_code_change | Ruby | logs_180.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003668 | mentioned_in_comment | Python | refunds_910.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM accounts;") | DELETE_UNQUALIFIED | false |
DIFF00000003669 | general_code_change | JavaScript | events_435.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003670 | general_code_change | TypeScript | notifications_481.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 |
DIFF00000003671 | test_suite_cleanup | SQL | tests/payments_644.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE employees SET address = CONCAT(address, description); | UPDATE_CONCAT | false |
DIFF00000003672 | raw_sql_safe | SQL | customers_66.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_reviews_price ON reviews (category); | NONE | false |
DIFF00000003673 | raw_sql_safe | SQL | orders_562.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_reviews_status ON reviews (phone); | NONE | false |
DIFF00000003674 | mentioned_in_comment | Python | employees_535.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE shipments; -- now deprecated""" | TRUNCATE | false |
DIFF00000003675 | orm_schema_change | JavaScript | shipments_266.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00000003676 | general_code_change | Go | users_469.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003677 | orm_schema_change | TypeScript | notifications_570.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Events { // removed field: role } | NONE | true |
DIFF00000003678 | general_code_change | Python | sessions_195.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003679 | orm_schema_change | Ruby | refunds_350.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :users, :quantity | NONE | true |
DIFF00000003680 | raw_sql_destructive | SQL | refunds_191.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions RENAME COLUMN address TO full_name; | ALTER_RENAME | true |
DIFF00000003681 | raw_sql_destructive | SQL | shipments_941.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN score TO contact_email; | ALTER_RENAME | true |
DIFF00000003682 | test_suite_cleanup | SQL | test/reviews_483.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE comments SET user_id = CONCAT(user_id, updated_at); | UPDATE_CONCAT | false |
DIFF00000003683 | raw_sql_safe | SQL | logs_600.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO customers (price, order_id) VALUES (%s, %s); | NONE | false |
DIFF00000003684 | obfuscated_destructive | SQL | subscriptions_984.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE comments SET category = CONCAT(category, phone); | UPDATE_CONCAT | true |
DIFF00000003685 | test_suite_cleanup | SQL | test/transactions_44.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN quantity; | DROP_COLUMN | false |
DIFF00000003686 | general_code_change | Python | accounts_673.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003687 | raw_sql_safe | SQL | transactions_243.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_comments_created_at ON comments (description); | NONE | false |
DIFF00000003688 | orm_schema_change | Ruby | refunds_323.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :tickets, :updated_at | NONE | true |
DIFF00000003689 | raw_sql_safe | SQL | accounts_710.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO sessions (user_id, metadata) VALUES (%s, %s); | NONE | false |
DIFF00000003690 | obfuscated_destructive | SQL | accounts_845.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM notifications; | DELETE_UNQUALIFIED | true |
DIFF00000003691 | raw_sql_safe | SQL | tickets_722.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET name = %s WHERE address = %s; | NONE | false |
DIFF00000003692 | orm_schema_change | JavaScript | accounts_445.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'updated_at') | NONE | true |
DIFF00000003693 | raw_sql_safe | SQL | logs_494.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000003694 | raw_sql_safe | SQL | invoices_865.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE shipments SET created_at = %s WHERE priority = %s; | NONE | false |
DIFF00000003695 | general_code_change | Ruby | employees_50.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003696 | raw_sql_safe | SQL | customers_642.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE order_id = 'active'; | NONE | false |
DIFF00000003697 | raw_sql_safe | SQL | orders_106.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO inventory (user_id, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00000003698 | mentioned_in_comment | Python | products_355.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE refunds;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000003699 | test_suite_cleanup | SQL | test/products_393.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE users SET updated_at = CONCAT(updated_at, balance); | UPDATE_CONCAT | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.