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 |
|---|---|---|---|---|---|---|---|
DIFF00099996700 | raw_sql_destructive | SQL | orders_188.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00099996701 | mentioned_in_comment | Python | customers_185.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM invoices; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099996702 | general_code_change | JavaScript | events_350.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099996703 | test_suite_cleanup | SQL | test/refunds_848.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | false |
DIFF00099996704 | raw_sql_destructive | SQL | transactions_890.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00099996705 | orm_schema_change | TypeScript | events_193.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Subscriptions { // removed field: quantity } | NONE | true |
DIFF00099996706 | test_suite_cleanup | SQL | tests/logs_588.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | false |
DIFF00099996707 | test_suite_cleanup | SQL | mysql-test/suite/products_683.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN address; | DROP_COLUMN | false |
DIFF00099996708 | raw_sql_safe | SQL | refunds_533.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO inventory (amount, price) VALUES (%s, %s); | NONE | false |
DIFF00099996709 | obfuscated_destructive | SQL | shipments_595.sql | schema cleanup | @@ -1,3 +1,3 @@
+trUnCATE tAble REFuNds; | TRUNCATE | true |
DIFF00099996710 | mentioned_in_comment | Python | sessions_100.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE reviews;") | DROP_TABLE | false |
DIFF00099996711 | general_code_change | TypeScript | notifications_194.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 |
DIFF00099996712 | raw_sql_safe | SQL | transactions_940.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_accounts_category ON accounts (user_id); | NONE | false |
DIFF00099996713 | test_suite_cleanup | SQL | tests/users_491.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN user_id; | DROP_COLUMN | false |
DIFF00099996714 | orm_schema_change | JavaScript | refunds_121.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'description') | NONE | true |
DIFF00099996715 | raw_sql_safe | SQL | logs_257.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM reviews WHERE created_at = 'active'; | NONE | false |
DIFF00099996716 | raw_sql_destructive | SQL | subscriptions_789.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | true |
DIFF00099996717 | obfuscated_destructive | SQL | reviews_505.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
notifications
SET
address
=
CONCAT(address,
amount); | UPDATE_CONCAT | true |
DIFF00099996718 | general_code_change | Go | customers_380.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996719 | raw_sql_destructive | SQL | inventory_739.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | true |
DIFF00099996720 | raw_sql_destructive | SQL | sessions_338.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM events; | DELETE_UNQUALIFIED | true |
DIFF00099996721 | obfuscated_destructive | SQL | tickets_333.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
sessions
DROP
COLUMN
description; | DROP_COLUMN | true |
DIFF00099996722 | orm_schema_change | Python | products_822.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='customers', name='amount') | NONE | true |
DIFF00099996723 | general_code_change | Java | tickets_510.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099996724 | raw_sql_destructive | SQL | shipments_150.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN address TO state; | ALTER_RENAME | true |
DIFF00099996725 | test_suite_cleanup | SQL | test/comments_587.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE reviews SET updated_at = CONCAT(updated_at, phone); | UPDATE_CONCAT | false |
DIFF00099996726 | raw_sql_destructive | SQL | refunds_322.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE accounts SET quantity = CONCAT(quantity, role); | UPDATE_CONCAT | true |
DIFF00099996727 | general_code_change | Ruby | reviews_754.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996728 | raw_sql_safe | SQL | products_679.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_address ON subscriptions (status); | NONE | false |
DIFF00099996729 | obfuscated_destructive | SQL | comments_725.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE logs RENAME COLUMN score TO state; | ALTER_RENAME | true |
DIFF00099996730 | obfuscated_destructive | SQL | accounts_610.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
customers; | DROP_TABLE | true |
DIFF00099996731 | obfuscated_destructive | SQL | comments_217.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from subscriptions; | DELETE_UNQUALIFIED | true |
DIFF00099996732 | obfuscated_destructive | SQL | orders_683.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table subscriptions rename column status to full_name; | ALTER_RENAME | true |
DIFF00099996733 | general_code_change | JavaScript | comments_234.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099996734 | test_suite_cleanup | SQL | test/accounts_617.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE tickets SET user_id = CONCAT(user_id, balance); | UPDATE_CONCAT | false |
DIFF00099996735 | orm_schema_change | JavaScript | subscriptions_139.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00099996736 | general_code_change | TypeScript | logs_459.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 |
DIFF00099996737 | raw_sql_safe | SQL | customers_175.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM users WHERE is_active = 'active'; | NONE | false |
DIFF00099996738 | raw_sql_destructive | SQL | payments_151.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN updated_at TO amount_cents; | ALTER_RENAME | true |
DIFF00099996739 | orm_schema_change | JavaScript | events_189.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('balance')) | NONE | true |
DIFF00099996740 | general_code_change | Java | tickets_931.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099996741 | mentioned_in_comment | Python | orders_416.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE shipments SET price = CONCAT(price, score);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099996742 | general_code_change | JavaScript | employees_936.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099996743 | raw_sql_destructive | SQL | comments_191.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | true |
DIFF00099996744 | raw_sql_destructive | SQL | inventory_61.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE events SET category = CONCAT(category, phone); | UPDATE_CONCAT | true |
DIFF00099996745 | general_code_change | Java | inventory_570.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099996746 | raw_sql_safe | SQL | notifications_186.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO tickets (created_at, price) VALUES (%s, %s); | NONE | false |
DIFF00099996747 | orm_schema_change | TypeScript | employees_895.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: score } | NONE | true |
DIFF00099996748 | test_suite_cleanup | SQL | spec/notifications_720.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE refunds SET is_active = CONCAT(is_active, category); | UPDATE_CONCAT | false |
DIFF00099996749 | raw_sql_destructive | SQL | employees_304.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | true |
DIFF00099996750 | raw_sql_destructive | SQL | invoices_731.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00099996751 | obfuscated_destructive | SQL | refunds_948.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table transactions; | TRUNCATE | true |
DIFF00099996752 | raw_sql_safe | SQL | tickets_871.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE products SET price = %s WHERE name = %s; | NONE | false |
DIFF00099996753 | raw_sql_safe | SQL | sessions_284.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099996754 | general_code_change | Python | reviews_932.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099996755 | general_code_change | Java | inventory_37.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099996756 | raw_sql_safe | SQL | orders_725.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099996757 | raw_sql_safe | SQL | notifications_867.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE sessions SET quantity = %s WHERE priority = %s; | NONE | false |
DIFF00099996758 | raw_sql_destructive | SQL | transactions_83.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE accounts; | DROP_TABLE | true |
DIFF00099996759 | raw_sql_safe | SQL | payments_913.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE transactions SET created_at = %s WHERE quantity = %s; | NONE | false |
DIFF00099996760 | raw_sql_safe | SQL | logs_985.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE logs SET role = %s WHERE phone = %s; | NONE | false |
DIFF00099996761 | orm_schema_change | JavaScript | accounts_904.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('users', table => table.dropColumn('metadata')) | NONE | true |
DIFF00099996762 | orm_schema_change | Python | invoices_107.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='accounts', name='phone') | NONE | true |
DIFF00099996763 | mentioned_in_comment | Python | transactions_704.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE tickets DROP COLUMN name;") | DROP_COLUMN | false |
DIFF00099996764 | raw_sql_safe | SQL | reviews_756.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO notifications (quantity, balance) VALUES (%s, %s); | NONE | false |
DIFF00099996765 | general_code_change | Java | inventory_179.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099996766 | mentioned_in_comment | Python | payments_280.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE orders;") | DROP_TABLE | false |
DIFF00099996767 | raw_sql_safe | SQL | customers_758.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO accounts (created_at, is_active) VALUES (%s, %s); | NONE | false |
DIFF00099996768 | test_suite_cleanup | SQL | mysql-test/suite/users_817.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE sessions SET phone = CONCAT(phone, email); | UPDATE_CONCAT | false |
DIFF00099996769 | raw_sql_safe | SQL | transactions_389.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO customers (score, amount) VALUES (%s, %s); | NONE | false |
DIFF00099996770 | orm_schema_change | JavaScript | subscriptions_976.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('amount')) | NONE | true |
DIFF00099996771 | orm_schema_change | JavaScript | orders_205.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('shipments', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00099996772 | raw_sql_destructive | SQL | customers_802.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00099996773 | general_code_change | TypeScript | comments_151.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 |
DIFF00099996774 | general_code_change | Python | payments_956.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099996775 | general_code_change | JavaScript | comments_614.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099996776 | raw_sql_destructive | SQL | notifications_520.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | true |
DIFF00099996777 | orm_schema_change | TypeScript | invoices_649.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: email } | NONE | true |
DIFF00099996778 | general_code_change | JavaScript | shipments_7.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 |
DIFF00099996779 | general_code_change | Python | accounts_229.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099996780 | test_suite_cleanup | SQL | spec/tickets_468.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE logs SET quantity = CONCAT(quantity, price); | UPDATE_CONCAT | false |
DIFF00099996781 | raw_sql_safe | SQL | shipments_877.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE customers SET status = %s WHERE metadata = %s; | NONE | false |
DIFF00099996782 | raw_sql_destructive | SQL | reviews_831.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | true |
DIFF00099996783 | mentioned_in_comment | Python | sessions_495.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE notifications;") | TRUNCATE | false |
DIFF00099996784 | raw_sql_safe | SQL | tickets_731.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE reviews ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099996785 | obfuscated_destructive | SQL | accounts_458.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | true |
DIFF00099996786 | mentioned_in_comment | Python | users_530.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM transactions;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00099996787 | general_code_change | JavaScript | logs_185.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 |
DIFF00099996788 | raw_sql_safe | SQL | users_311.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_comments_is_active ON comments (description); | NONE | false |
DIFF00099996789 | raw_sql_destructive | SQL | products_811.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions DROP COLUMN score; | DROP_COLUMN | true |
DIFF00099996790 | general_code_change | Go | reviews_52.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996791 | orm_schema_change | Ruby | accounts_418.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :customers, :phone | NONE | true |
DIFF00099996792 | test_suite_cleanup | SQL | test/customers_81.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN created_at; | DROP_COLUMN | false |
DIFF00099996793 | general_code_change | Ruby | reviews_185.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996794 | mentioned_in_comment | Python | events_510.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE events RENAME COLUMN updated_at TO user_role;") | ALTER_RENAME | false |
DIFF00099996795 | orm_schema_change | JavaScript | sessions_624.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('priority')) | NONE | true |
DIFF00099996796 | mentioned_in_comment | Python | refunds_307.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE shipments SET status = CONCAT(status, phone);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099996797 | raw_sql_destructive | SQL | payments_789.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | true |
DIFF00099996798 | orm_schema_change | Ruby | tickets_52.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :notifications, :order_id | NONE | true |
DIFF00099996799 | orm_schema_change | JavaScript | logs_536.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('orders', 'amount') | NONE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.