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 |
|---|---|---|---|---|---|---|---|
DIFF00099994600 | general_code_change | Go | customers_575.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099994601 | orm_schema_change | JavaScript | logs_808.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('notifications', 'name') | NONE | true |
DIFF00099994602 | general_code_change | JavaScript | subscriptions_48.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994603 | orm_schema_change | Python | sessions_267.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='price') | NONE | true |
DIFF00099994604 | general_code_change | TypeScript | users_641.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 |
DIFF00099994605 | orm_schema_change | Ruby | orders_261.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :sessions, :role | NONE | true |
DIFF00099994606 | raw_sql_safe | SQL | sessions_210.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE inventory SET user_id = %s WHERE is_active = %s; | NONE | false |
DIFF00099994607 | mentioned_in_comment | Python | comments_686.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE inventory RENAME COLUMN email TO amount_cents; -- now deprecated""" | ALTER_RENAME | false |
DIFF00099994608 | obfuscated_destructive | SQL | refunds_979.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
payments
SET
address
=
CONCAT(address,
address); | UPDATE_CONCAT | true |
DIFF00099994609 | orm_schema_change | Python | sessions_978.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='accounts', name='metadata') | NONE | true |
DIFF00099994610 | orm_schema_change | Ruby | refunds_299.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :employees, :is_active | NONE | true |
DIFF00099994611 | raw_sql_destructive | SQL | employees_972.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN role TO amount_cents; | ALTER_RENAME | true |
DIFF00099994612 | general_code_change | JavaScript | shipments_796.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 |
DIFF00099994613 | mentioned_in_comment | Python | employees_185.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE comments DROP COLUMN description; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099994614 | raw_sql_destructive | SQL | transactions_386.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00099994615 | orm_schema_change | JavaScript | transactions_698.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('subscriptions', table => table.dropColumn('description')) | NONE | true |
DIFF00099994616 | orm_schema_change | JavaScript | employees_727.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('balance')) | NONE | true |
DIFF00099994617 | raw_sql_safe | SQL | events_916.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO payments (quantity, email) VALUES (%s, %s); | NONE | false |
DIFF00099994618 | mentioned_in_comment | Python | accounts_471.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE employees;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099994619 | raw_sql_destructive | SQL | tickets_350.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN email TO amount_cents; | ALTER_RENAME | true |
DIFF00099994620 | raw_sql_destructive | SQL | invoices_778.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM payments; | DELETE_UNQUALIFIED | true |
DIFF00099994621 | raw_sql_destructive | SQL | employees_118.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE logs DROP COLUMN category; | DROP_COLUMN | true |
DIFF00099994622 | raw_sql_destructive | SQL | inventory_929.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00099994623 | orm_schema_change | Ruby | transactions_333.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :tickets, :priority | NONE | true |
DIFF00099994624 | obfuscated_destructive | SQL | refunds_649.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00099994625 | general_code_change | Java | users_631.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099994626 | mentioned_in_comment | Python | inventory_913.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE notifications RENAME COLUMN updated_at TO state;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00099994627 | orm_schema_change | Python | invoices_464.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='created_at') | NONE | true |
DIFF00099994628 | obfuscated_destructive | SQL | inventory_33.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table users; | TRUNCATE | true |
DIFF00099994629 | test_suite_cleanup | SQL | tests/comments_891.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET quantity = CONCAT(quantity, balance); | UPDATE_CONCAT | false |
DIFF00099994630 | test_suite_cleanup | SQL | mysql-test/suite/logs_954.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE tickets DROP COLUMN role; | DROP_COLUMN | false |
DIFF00099994631 | raw_sql_destructive | SQL | sessions_429.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices RENAME COLUMN description TO contact_email; | ALTER_RENAME | true |
DIFF00099994632 | test_suite_cleanup | SQL | test/invoices_747.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | false |
DIFF00099994633 | test_suite_cleanup | SQL | tests/orders_307.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE transactions SET status = CONCAT(status, amount); | UPDATE_CONCAT | false |
DIFF00099994634 | raw_sql_safe | SQL | users_736.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE created_at = 'active'; | NONE | false |
DIFF00099994635 | general_code_change | Java | payments_157.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099994636 | raw_sql_destructive | SQL | comments_436.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE invoices SET amount = CONCAT(amount, balance); | UPDATE_CONCAT | true |
DIFF00099994637 | orm_schema_change | Ruby | users_558.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :logs, :address | NONE | true |
DIFF00099994638 | test_suite_cleanup | SQL | mysql-test/suite/notifications_830.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | false |
DIFF00099994639 | orm_schema_change | JavaScript | payments_171.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('balance')) | NONE | true |
DIFF00099994640 | general_code_change | Java | customers_337.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099994641 | general_code_change | Ruby | users_953.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099994642 | raw_sql_destructive | SQL | subscriptions_723.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE sessions SET metadata = CONCAT(metadata, updated_at); | UPDATE_CONCAT | true |
DIFF00099994643 | raw_sql_destructive | SQL | employees_341.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN priority; | DROP_COLUMN | true |
DIFF00099994644 | test_suite_cleanup | SQL | tests/refunds_22.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | false |
DIFF00099994645 | obfuscated_destructive | SQL | employees_24.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
accounts
SET
order_id
=
CONCAT(order_id,
user_id); | UPDATE_CONCAT | true |
DIFF00099994646 | general_code_change | Python | subscriptions_542.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099994647 | mentioned_in_comment | Python | orders_31.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE tickets SET user_id = CONCAT(user_id, email); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00099994648 | general_code_change | TypeScript | events_371.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 |
DIFF00099994649 | raw_sql_safe | SQL | events_318.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_invoices_quantity ON invoices (user_id); | NONE | false |
DIFF00099994650 | mentioned_in_comment | Python | tickets_867.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE tickets;") | DROP_TABLE | false |
DIFF00099994651 | mentioned_in_comment | Python | transactions_678.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE events DROP COLUMN address; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099994652 | general_code_change | JavaScript | users_51.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 |
DIFF00099994653 | obfuscated_destructive | SQL | reviews_604.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table employees; | DROP_TABLE | true |
DIFF00099994654 | orm_schema_change | TypeScript | invoices_943.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Tickets { // removed field: priority } | NONE | true |
DIFF00099994655 | obfuscated_destructive | SQL | payments_592.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE shipments SET email = CONCAT(email, created_at); | UPDATE_CONCAT | true |
DIFF00099994656 | mentioned_in_comment | Python | products_820.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE shipments;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099994657 | test_suite_cleanup | SQL | mysql-test/suite/tickets_409.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE customers; | TRUNCATE | false |
DIFF00099994658 | raw_sql_destructive | SQL | logs_438.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | true |
DIFF00099994659 | raw_sql_destructive | SQL | logs_6.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds RENAME COLUMN is_active TO full_name; | ALTER_RENAME | true |
DIFF00099994660 | mentioned_in_comment | Python | customers_989.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE logs; -- now deprecated""" | TRUNCATE | false |
DIFF00099994661 | raw_sql_safe | SQL | orders_756.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_reviews_priority ON reviews (role); | NONE | false |
DIFF00099994662 | raw_sql_safe | SQL | refunds_851.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO comments (category, created_at) VALUES (%s, %s); | NONE | false |
DIFF00099994663 | general_code_change | JavaScript | refunds_282.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994664 | mentioned_in_comment | Python | refunds_817.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE orders;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099994665 | obfuscated_destructive | SQL | orders_266.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | true |
DIFF00099994666 | obfuscated_destructive | SQL | payments_762.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table orders; | TRUNCATE | true |
DIFF00099994667 | general_code_change | Python | refunds_509.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099994668 | raw_sql_destructive | SQL | shipments_824.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE refunds SET order_id = CONCAT(order_id, phone); | UPDATE_CONCAT | true |
DIFF00099994669 | test_suite_cleanup | SQL | spec/subscriptions_980.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE logs DROP COLUMN order_id; | DROP_COLUMN | false |
DIFF00099994670 | general_code_change | Python | transactions_457.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099994671 | general_code_change | JavaScript | invoices_690.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 |
DIFF00099994672 | general_code_change | JavaScript | notifications_237.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994673 | obfuscated_destructive | SQL | inventory_427.sql | schema cleanup | @@ -1,3 +1,3 @@
+tRUncAtE tABle UserS; | TRUNCATE | true |
DIFF00099994674 | orm_schema_change | Python | payments_499.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='category') | NONE | true |
DIFF00099994675 | raw_sql_destructive | SQL | products_773.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN score; | DROP_COLUMN | true |
DIFF00099994676 | raw_sql_safe | SQL | comments_575.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_status ON subscriptions (user_id); | NONE | false |
DIFF00099994677 | raw_sql_destructive | SQL | employees_240.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN amount; | DROP_COLUMN | true |
DIFF00099994678 | general_code_change | JavaScript | users_731.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994679 | test_suite_cleanup | SQL | tests/sessions_402.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | false |
DIFF00099994680 | obfuscated_destructive | SQL | comments_639.sql | schema cleanup | @@ -1,3 +1,3 @@
+AlTer TaBLE SESSIONS RenAme CoLumN stAtuS To CONTAct_EMaiL; | ALTER_RENAME | true |
DIFF00099994681 | general_code_change | JavaScript | products_694.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994682 | mentioned_in_comment | Python | customers_310.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE employees SET score = CONCAT(score, balance);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099994683 | general_code_change | Python | events_512.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099994684 | orm_schema_change | Ruby | shipments_45.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :notifications, :status | NONE | true |
DIFF00099994685 | raw_sql_destructive | SQL | notifications_434.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | true |
DIFF00099994686 | orm_schema_change | TypeScript | tickets_298.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Products { // removed field: quantity } | NONE | true |
DIFF00099994687 | general_code_change | TypeScript | users_852.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 |
DIFF00099994688 | raw_sql_safe | SQL | comments_456.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_description ON notifications (name); | NONE | false |
DIFF00099994689 | raw_sql_safe | SQL | orders_151.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE created_at = 'active'; | NONE | false |
DIFF00099994690 | mentioned_in_comment | Python | products_878.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE invoices; -- now deprecated""" | TRUNCATE | false |
DIFF00099994691 | raw_sql_destructive | SQL | events_212.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE comments SET quantity = CONCAT(quantity, amount); | UPDATE_CONCAT | true |
DIFF00099994692 | orm_schema_change | JavaScript | employees_682.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'updated_at') | NONE | true |
DIFF00099994693 | mentioned_in_comment | Python | reviews_29.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM logs; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099994694 | raw_sql_safe | SQL | payments_190.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO refunds (status, created_at) VALUES (%s, %s); | NONE | false |
DIFF00099994695 | test_suite_cleanup | SQL | tests/products_615.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | false |
DIFF00099994696 | raw_sql_safe | SQL | subscriptions_604.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO invoices (phone, status) VALUES (%s, %s); | NONE | false |
DIFF00099994697 | raw_sql_destructive | SQL | products_584.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory RENAME COLUMN role TO amount_cents; | ALTER_RENAME | true |
DIFF00099994698 | raw_sql_safe | SQL | transactions_712.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM notifications WHERE status = 'active'; | NONE | false |
DIFF00099994699 | raw_sql_safe | SQL | accounts_986.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO shipments (name, user_id) VALUES (%s, %s); | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.