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 |
|---|---|---|---|---|---|---|---|
DIFF00000005700 | obfuscated_destructive | SQL | subscriptions_537.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table inventory rename column description to user_role; | ALTER_RENAME | true |
DIFF00000005701 | mentioned_in_comment | Python | orders_218.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE events RENAME COLUMN phone TO amount_cents;") | ALTER_RENAME | false |
DIFF00000005702 | orm_schema_change | JavaScript | orders_586.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('users', table => table.dropColumn('name')) | NONE | true |
DIFF00000005703 | mentioned_in_comment | Python | products_919.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE payments;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000005704 | mentioned_in_comment | Python | payments_225.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE refunds RENAME COLUMN created_at TO state; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000005705 | test_suite_cleanup | SQL | test/invoices_877.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | false |
DIFF00000005706 | orm_schema_change | JavaScript | shipments_756.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('inventory', table => table.dropColumn('category')) | NONE | true |
DIFF00000005707 | raw_sql_destructive | SQL | inventory_200.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE comments SET price = CONCAT(price, email); | UPDATE_CONCAT | true |
DIFF00000005708 | general_code_change | Ruby | notifications_897.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000005709 | raw_sql_safe | SQL | transactions_141.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM shipments WHERE description = 'active'; | NONE | false |
DIFF00000005710 | general_code_change | JavaScript | tickets_777.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 |
DIFF00000005711 | raw_sql_destructive | SQL | customers_453.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET score = CONCAT(score, status); | UPDATE_CONCAT | true |
DIFF00000005712 | general_code_change | Java | employees_957.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000005713 | general_code_change | JavaScript | orders_206.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005714 | raw_sql_destructive | SQL | notifications_854.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | true |
DIFF00000005715 | general_code_change | Python | notifications_230.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000005716 | raw_sql_destructive | SQL | notifications_985.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM payments; | DELETE_UNQUALIFIED | true |
DIFF00000005717 | orm_schema_change | JavaScript | orders_187.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('tickets', table => table.dropColumn('order_id')) | NONE | true |
DIFF00000005718 | raw_sql_destructive | SQL | sessions_937.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00000005719 | general_code_change | Python | shipments_974.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000005720 | test_suite_cleanup | SQL | mysql-test/suite/events_363.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE products SET amount = CONCAT(amount, category); | UPDATE_CONCAT | false |
DIFF00000005721 | test_suite_cleanup | SQL | mysql-test/suite/subscriptions_261.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE transactions SET amount = CONCAT(amount, role); | UPDATE_CONCAT | false |
DIFF00000005722 | test_suite_cleanup | SQL | tests/events_939.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN description TO user_role; | ALTER_RENAME | false |
DIFF00000005723 | orm_schema_change | Ruby | refunds_67.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :sessions, :metadata | NONE | true |
DIFF00000005724 | test_suite_cleanup | SQL | test/transactions_811.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE transactions; | TRUNCATE | false |
DIFF00000005725 | raw_sql_destructive | SQL | shipments_587.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | true |
DIFF00000005726 | mentioned_in_comment | Python | transactions_707.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE transactions DROP COLUMN name; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000005727 | obfuscated_destructive | SQL | transactions_267.sql | schema cleanup | @@ -1,3 +1,3 @@
+Drop TablE OrdeRs; | DROP_TABLE | true |
DIFF00000005728 | raw_sql_destructive | SQL | payments_631.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | true |
DIFF00000005729 | test_suite_cleanup | SQL | tests/tickets_998.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | false |
DIFF00000005730 | general_code_change | JavaScript | refunds_504.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005731 | obfuscated_destructive | SQL | employees_284.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
tickets; | DELETE_UNQUALIFIED | true |
DIFF00000005732 | test_suite_cleanup | SQL | mysql-test/suite/refunds_252.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE orders; | TRUNCATE | false |
DIFF00000005733 | general_code_change | TypeScript | reviews_701.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 |
DIFF00000005734 | mentioned_in_comment | Python | orders_802.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE tickets;") | DROP_TABLE | false |
DIFF00000005735 | test_suite_cleanup | SQL | mysql-test/suite/orders_765.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | false |
DIFF00000005736 | general_code_change | Java | events_127.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000005737 | mentioned_in_comment | Python | accounts_152.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE refunds; -- now deprecated""" | TRUNCATE | false |
DIFF00000005738 | obfuscated_destructive | SQL | events_635.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
subscriptions; | TRUNCATE | true |
DIFF00000005739 | raw_sql_destructive | SQL | shipments_284.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN priority TO amount_cents; | ALTER_RENAME | true |
DIFF00000005740 | general_code_change | JavaScript | tickets_781.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005741 | raw_sql_safe | SQL | employees_284.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM sessions WHERE status = 'active'; | NONE | false |
DIFF00000005742 | raw_sql_safe | SQL | inventory_490.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE employees SET updated_at = %s WHERE is_active = %s; | NONE | false |
DIFF00000005743 | mentioned_in_comment | Python | sessions_912.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE orders SET amount = CONCAT(amount, created_at); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000005744 | general_code_change | Python | reviews_950.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000005745 | orm_schema_change | JavaScript | events_806.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('notifications', table => table.dropColumn('address')) | NONE | true |
DIFF00000005746 | raw_sql_safe | SQL | notifications_743.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO invoices (name, status) VALUES (%s, %s); | NONE | false |
DIFF00000005747 | orm_schema_change | Ruby | inventory_428.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :user_id | NONE | true |
DIFF00000005748 | obfuscated_destructive | SQL | subscriptions_829.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
invoices; | TRUNCATE | true |
DIFF00000005749 | orm_schema_change | JavaScript | users_646.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('shipments', table => table.dropColumn('amount')) | NONE | true |
DIFF00000005750 | test_suite_cleanup | SQL | spec/products_783.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | false |
DIFF00000005751 | raw_sql_destructive | SQL | reviews_66.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | true |
DIFF00000005752 | mentioned_in_comment | Python | subscriptions_393.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE users; -- now deprecated""" | DROP_TABLE | false |
DIFF00000005753 | raw_sql_safe | SQL | products_705.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000005754 | general_code_change | TypeScript | accounts_392.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 |
DIFF00000005755 | orm_schema_change | Ruby | orders_979.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :comments, :category | NONE | true |
DIFF00000005756 | general_code_change | Python | logs_354.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000005757 | mentioned_in_comment | Python | reviews_229.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM refunds; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000005758 | test_suite_cleanup | SQL | mysql-test/suite/employees_925.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE inventory DROP COLUMN updated_at; | DROP_COLUMN | false |
DIFF00000005759 | raw_sql_safe | SQL | logs_820.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE products ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000005760 | orm_schema_change | Python | employees_659.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='updated_at') | NONE | true |
DIFF00000005761 | general_code_change | Ruby | orders_348.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000005762 | mentioned_in_comment | Python | logs_876.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM refunds; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000005763 | raw_sql_safe | SQL | invoices_665.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE notifications SET updated_at = %s WHERE quantity = %s; | NONE | false |
DIFF00000005764 | raw_sql_safe | SQL | accounts_814.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_users_balance ON users (amount); | NONE | false |
DIFF00000005765 | obfuscated_destructive | SQL | tickets_486.sql | schema cleanup | @@ -1,3 +1,3 @@
+uPDATe CustoMERs SeT NamE = ConCAT(nAME, cREaTEd_aT); | UPDATE_CONCAT | true |
DIFF00000005766 | obfuscated_destructive | SQL | invoices_489.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table products rename column price to user_role; | ALTER_RENAME | true |
DIFF00000005767 | raw_sql_destructive | SQL | products_183.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM refunds; | DELETE_UNQUALIFIED | true |
DIFF00000005768 | general_code_change | JavaScript | payments_980.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 |
DIFF00000005769 | raw_sql_safe | SQL | tickets_538.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE priority = 'active'; | NONE | false |
DIFF00000005770 | mentioned_in_comment | Python | subscriptions_297.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE customers SET email = CONCAT(email, user_id);") | UPDATE_CONCAT | false |
DIFF00000005771 | raw_sql_safe | SQL | employees_109.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO tickets (order_id, balance) VALUES (%s, %s); | NONE | false |
DIFF00000005772 | mentioned_in_comment | Python | comments_479.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE orders;") | TRUNCATE | false |
DIFF00000005773 | mentioned_in_comment | Python | tickets_684.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE sessions RENAME COLUMN updated_at TO contact_email;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000005774 | raw_sql_destructive | SQL | employees_700.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE customers; | TRUNCATE | true |
DIFF00000005775 | general_code_change | JavaScript | accounts_8.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005776 | raw_sql_destructive | SQL | payments_91.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN category TO contact_email; | ALTER_RENAME | true |
DIFF00000005777 | raw_sql_destructive | SQL | transactions_685.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts DROP COLUMN created_at; | DROP_COLUMN | true |
DIFF00000005778 | raw_sql_destructive | SQL | tickets_862.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN phone; | DROP_COLUMN | true |
DIFF00000005779 | general_code_change | Python | inventory_822.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000005780 | mentioned_in_comment | Python | payments_537.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM transactions; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000005781 | orm_schema_change | Ruby | sessions_709.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :notifications, :created_at | NONE | true |
DIFF00000005782 | raw_sql_safe | SQL | refunds_112.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (metadata, name) VALUES (%s, %s); | NONE | false |
DIFF00000005783 | orm_schema_change | Python | users_255.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='events', name='price') | NONE | true |
DIFF00000005784 | raw_sql_safe | SQL | orders_78.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM users WHERE is_active = 'active'; | NONE | false |
DIFF00000005785 | mentioned_in_comment | Python | orders_319.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE orders DROP COLUMN phone; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000005786 | general_code_change | Java | orders_23.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000005787 | obfuscated_destructive | SQL | comments_534.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE accounts DROP COLUMN priority; | DROP_COLUMN | true |
DIFF00000005788 | raw_sql_destructive | SQL | transactions_964.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN status TO amount_cents; | ALTER_RENAME | true |
DIFF00000005789 | mentioned_in_comment | Python | tickets_488.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE payments DROP COLUMN created_at;") | DROP_COLUMN | false |
DIFF00000005790 | raw_sql_safe | SQL | sessions_709.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO accounts (user_id, score) VALUES (%s, %s); | NONE | false |
DIFF00000005791 | raw_sql_destructive | SQL | users_852.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN name TO amount_cents; | ALTER_RENAME | true |
DIFF00000005792 | obfuscated_destructive | SQL | invoices_58.sql | schema cleanup | @@ -1,3 +1,3 @@
+uPdAte seSSIOnS Set StatUS = CONCAT(STATUs, rOLE); | UPDATE_CONCAT | true |
DIFF00000005793 | raw_sql_safe | SQL | events_580.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO products (phone, address) VALUES (%s, %s); | NONE | false |
DIFF00000005794 | raw_sql_safe | SQL | comments_447.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE comments ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000005795 | test_suite_cleanup | SQL | test/sessions_868.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | false |
DIFF00000005796 | general_code_change | Go | transactions_102.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000005797 | general_code_change | TypeScript | transactions_127.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 |
DIFF00000005798 | obfuscated_destructive | SQL | tickets_80.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLTeR tABLe refunDs rEnAmE COlUmN Score To aMoUnT_centS; | ALTER_RENAME | true |
DIFF00000005799 | raw_sql_destructive | SQL | transactions_186.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN score TO contact_email; | ALTER_RENAME | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.