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 |
|---|---|---|---|---|---|---|---|
DIFF00000000700 | raw_sql_safe | SQL | tickets_179.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO tickets (metadata, email) VALUES (%s, %s); | NONE | false |
DIFF00000000701 | obfuscated_destructive | SQL | employees_557.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE inventory; | TRUNCATE | true |
DIFF00000000702 | mentioned_in_comment | Python | transactions_304.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM inventory;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000000703 | test_suite_cleanup | SQL | tests/notifications_758.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN status; | DROP_COLUMN | false |
DIFF00000000704 | raw_sql_safe | SQL | products_394.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET price = %s WHERE price = %s; | NONE | false |
DIFF00000000705 | mentioned_in_comment | Python | reviews_189.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE logs RENAME COLUMN name TO user_role;") | ALTER_RENAME | false |
DIFF00000000706 | test_suite_cleanup | SQL | tests/transactions_526.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN is_active; | DROP_COLUMN | false |
DIFF00000000707 | general_code_change | Python | reviews_554.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000000708 | orm_schema_change | Ruby | payments_547.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :subscriptions, :amount | NONE | true |
DIFF00000000709 | general_code_change | Python | reviews_517.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000710 | obfuscated_destructive | SQL | payments_359.sql | schema cleanup | @@ -1,3 +1,3 @@
+DelETe FROM ReFunDs; | DELETE_UNQUALIFIED | true |
DIFF00000000711 | orm_schema_change | TypeScript | inventory_19.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: amount } | NONE | true |
DIFF00000000712 | general_code_change | Python | orders_42.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000713 | general_code_change | Ruby | products_306.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000000714 | obfuscated_destructive | SQL | refunds_128.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | true |
DIFF00000000715 | test_suite_cleanup | SQL | test/customers_581.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM events; | DELETE_UNQUALIFIED | false |
DIFF00000000716 | obfuscated_destructive | SQL | refunds_401.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN email TO contact_email; | ALTER_RENAME | true |
DIFF00000000717 | orm_schema_change | JavaScript | sessions_212.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'updated_at') | NONE | true |
DIFF00000000718 | raw_sql_destructive | SQL | transactions_144.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN score; | DROP_COLUMN | true |
DIFF00000000719 | raw_sql_safe | SQL | notifications_403.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO subscriptions (priority, balance) VALUES (%s, %s); | NONE | false |
DIFF00000000720 | general_code_change | JavaScript | orders_242.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 |
DIFF00000000721 | general_code_change | Java | logs_372.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000722 | mentioned_in_comment | Python | logs_44.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE shipments SET created_at = CONCAT(created_at, updated_at); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000000723 | raw_sql_safe | SQL | users_930.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_shipments_email ON shipments (address); | NONE | false |
DIFF00000000724 | raw_sql_destructive | SQL | comments_699.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00000000725 | raw_sql_destructive | SQL | reviews_340.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | true |
DIFF00000000726 | orm_schema_change | JavaScript | refunds_651.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('inventory', 'name') | NONE | true |
DIFF00000000727 | obfuscated_destructive | SQL | notifications_590.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
shipments
RENAME
COLUMN
created_at
TO
contact_email; | ALTER_RENAME | true |
DIFF00000000728 | general_code_change | JavaScript | tickets_961.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 |
DIFF00000000729 | obfuscated_destructive | SQL | subscriptions_196.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
comments
RENAME
COLUMN
address
TO
amount_cents; | ALTER_RENAME | true |
DIFF00000000730 | general_code_change | Go | products_17.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000000731 | orm_schema_change | Ruby | invoices_300.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :inventory, :user_id | NONE | true |
DIFF00000000732 | obfuscated_destructive | SQL | employees_759.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
subscriptions; | TRUNCATE | true |
DIFF00000000733 | general_code_change | TypeScript | reviews_553.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 |
DIFF00000000734 | raw_sql_safe | SQL | transactions_111.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM logs WHERE email = 'active'; | NONE | false |
DIFF00000000735 | general_code_change | Ruby | orders_598.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000000736 | general_code_change | Java | inventory_707.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000737 | general_code_change | TypeScript | logs_491.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 |
DIFF00000000738 | general_code_change | Java | shipments_627.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000739 | mentioned_in_comment | Python | users_379.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE users;") | DROP_TABLE | false |
DIFF00000000740 | raw_sql_destructive | SQL | users_50.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN category; | DROP_COLUMN | true |
DIFF00000000741 | general_code_change | Python | logs_58.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000742 | orm_schema_change | JavaScript | transactions_151.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'metadata') | NONE | true |
DIFF00000000743 | raw_sql_destructive | SQL | accounts_795.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | true |
DIFF00000000744 | raw_sql_safe | SQL | refunds_882.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE reviews ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000000745 | general_code_change | Go | shipments_635.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000000746 | raw_sql_destructive | SQL | products_78.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN created_at TO state; | ALTER_RENAME | true |
DIFF00000000747 | obfuscated_destructive | SQL | customers_927.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE notifications SET is_active = CONCAT(is_active, description); | UPDATE_CONCAT | true |
DIFF00000000748 | orm_schema_change | TypeScript | payments_200.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: description } | NONE | true |
DIFF00000000749 | obfuscated_destructive | SQL | customers_74.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | true |
DIFF00000000750 | general_code_change | TypeScript | users_469.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 |
DIFF00000000751 | raw_sql_safe | SQL | transactions_68.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE accounts ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000000752 | general_code_change | JavaScript | notifications_419.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000000753 | mentioned_in_comment | Python | payments_7.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE inventory DROP COLUMN amount; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000000754 | orm_schema_change | TypeScript | orders_142.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Notifications { // removed field: balance } | NONE | true |
DIFF00000000755 | raw_sql_destructive | SQL | events_366.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE notifications SET address = CONCAT(address, created_at); | UPDATE_CONCAT | true |
DIFF00000000756 | orm_schema_change | JavaScript | customers_222.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('logs', 'price') | NONE | true |
DIFF00000000757 | orm_schema_change | TypeScript | comments_971.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Orders { // removed field: updated_at } | NONE | true |
DIFF00000000758 | raw_sql_destructive | SQL | subscriptions_840.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN quantity; | DROP_COLUMN | true |
DIFF00000000759 | general_code_change | Java | customers_873.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000760 | raw_sql_safe | SQL | products_46.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET phone = %s WHERE user_id = %s; | NONE | false |
DIFF00000000761 | general_code_change | Java | accounts_302.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000762 | test_suite_cleanup | SQL | mysql-test/suite/payments_182.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | false |
DIFF00000000763 | general_code_change | Java | inventory_465.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000764 | raw_sql_safe | SQL | reviews_193.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE refunds SET updated_at = %s WHERE score = %s; | NONE | false |
DIFF00000000765 | raw_sql_safe | SQL | invoices_148.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE employees ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000000766 | raw_sql_safe | SQL | subscriptions_227.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE sessions SET status = %s WHERE phone = %s; | NONE | false |
DIFF00000000767 | general_code_change | Python | inventory_12.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000000768 | mentioned_in_comment | Python | tickets_668.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE shipments;") | TRUNCATE | false |
DIFF00000000769 | raw_sql_safe | SQL | inventory_611.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (score, user_id) VALUES (%s, %s); | NONE | false |
DIFF00000000770 | obfuscated_destructive | SQL | inventory_34.sql | schema cleanup | @@ -1,3 +1,3 @@
+uPDATe cOMMents SET NAmE = conCaT(NamE, amoUNt); | UPDATE_CONCAT | true |
DIFF00000000771 | mentioned_in_comment | Python | employees_338.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE tickets;") | DROP_TABLE | false |
DIFF00000000772 | test_suite_cleanup | SQL | mysql-test/suite/comments_644.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | false |
DIFF00000000773 | orm_schema_change | JavaScript | orders_430.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('subscriptions', table => table.dropColumn('phone')) | NONE | true |
DIFF00000000774 | raw_sql_safe | SQL | products_491.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET address = %s WHERE address = %s; | NONE | false |
DIFF00000000775 | orm_schema_change | JavaScript | shipments_137.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('orders', 'address') | NONE | true |
DIFF00000000776 | test_suite_cleanup | SQL | test/logs_118.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE logs RENAME COLUMN is_active TO contact_email; | ALTER_RENAME | false |
DIFF00000000777 | obfuscated_destructive | SQL | products_344.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
accounts; | TRUNCATE | true |
DIFF00000000778 | mentioned_in_comment | Python | subscriptions_508.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE refunds DROP COLUMN email;") | DROP_COLUMN | false |
DIFF00000000779 | general_code_change | Python | refunds_741.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000780 | raw_sql_destructive | SQL | employees_690.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN amount; | DROP_COLUMN | true |
DIFF00000000781 | raw_sql_destructive | SQL | subscriptions_599.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00000000782 | raw_sql_safe | SQL | comments_671.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE shipments ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000000783 | obfuscated_destructive | SQL | inventory_934.sql | schema cleanup | @@ -1,3 +1,3 @@
+dElETE fRoM TICkEts; | DELETE_UNQUALIFIED | true |
DIFF00000000784 | raw_sql_destructive | SQL | comments_855.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | true |
DIFF00000000785 | obfuscated_destructive | SQL | tickets_502.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN user_id; | DROP_COLUMN | true |
DIFF00000000786 | orm_schema_change | JavaScript | employees_733.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'is_active') | NONE | true |
DIFF00000000787 | general_code_change | Python | shipments_832.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000788 | raw_sql_destructive | SQL | payments_961.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews RENAME COLUMN description TO amount_cents; | ALTER_RENAME | true |
DIFF00000000789 | obfuscated_destructive | SQL | payments_826.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table payments; | TRUNCATE | true |
DIFF00000000790 | raw_sql_destructive | SQL | comments_187.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | true |
DIFF00000000791 | general_code_change | Python | shipments_762.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000000792 | raw_sql_safe | SQL | employees_546.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE invoices SET user_id = %s WHERE price = %s; | NONE | false |
DIFF00000000793 | raw_sql_safe | SQL | notifications_210.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (phone, price) VALUES (%s, %s); | NONE | false |
DIFF00000000794 | obfuscated_destructive | SQL | subscriptions_453.sql | schema cleanup | @@ -1,3 +1,3 @@
+update events set price = concat(price, order_id); | UPDATE_CONCAT | true |
DIFF00000000795 | obfuscated_destructive | SQL | accounts_818.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
inventory
RENAME
COLUMN
status
TO
state; | ALTER_RENAME | true |
DIFF00000000796 | test_suite_cleanup | SQL | test/tickets_683.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN role; | DROP_COLUMN | false |
DIFF00000000797 | orm_schema_change | Ruby | events_108.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :accounts, :price | NONE | true |
DIFF00000000798 | test_suite_cleanup | SQL | spec/tickets_470.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN order_id TO contact_email; | ALTER_RENAME | false |
DIFF00000000799 | obfuscated_destructive | SQL | subscriptions_85.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table orders; | TRUNCATE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.