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 |
|---|---|---|---|---|---|---|---|
DIFF00000006600 | raw_sql_destructive | SQL | accounts_450.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00000006601 | obfuscated_destructive | SQL | products_964.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table customers drop column updated_at; | DROP_COLUMN | true |
DIFF00000006602 | general_code_change | JavaScript | sessions_628.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 |
DIFF00000006603 | general_code_change | Ruby | employees_292.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000006604 | mentioned_in_comment | Python | comments_823.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE reviews SET description = CONCAT(description, name);") | UPDATE_CONCAT | false |
DIFF00000006605 | raw_sql_destructive | SQL | refunds_516.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN category TO full_name; | ALTER_RENAME | true |
DIFF00000006606 | orm_schema_change | JavaScript | comments_852.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('invoices', table => table.dropColumn('quantity')) | NONE | true |
DIFF00000006607 | general_code_change | Python | products_18.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000006608 | general_code_change | Ruby | users_662.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000006609 | raw_sql_destructive | SQL | employees_764.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | true |
DIFF00000006610 | test_suite_cleanup | SQL | tests/reviews_352.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN created_at TO user_role; | ALTER_RENAME | false |
DIFF00000006611 | general_code_change | Go | refunds_838.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006612 | raw_sql_destructive | SQL | sessions_461.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE accounts; | TRUNCATE | true |
DIFF00000006613 | raw_sql_destructive | SQL | events_191.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN email; | DROP_COLUMN | true |
DIFF00000006614 | general_code_change | JavaScript | comments_602.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000006615 | orm_schema_change | JavaScript | orders_699.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('logs', 'priority') | NONE | true |
DIFF00000006616 | orm_schema_change | TypeScript | events_195.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Events { // removed field: address } | NONE | true |
DIFF00000006617 | test_suite_cleanup | SQL | test/events_359.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM orders; | DELETE_UNQUALIFIED | false |
DIFF00000006618 | raw_sql_safe | SQL | events_230.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE tickets ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000006619 | test_suite_cleanup | SQL | spec/reviews_783.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE users SET description = CONCAT(description, price); | UPDATE_CONCAT | false |
DIFF00000006620 | obfuscated_destructive | SQL | sessions_125.sql | schema cleanup | @@ -1,3 +1,3 @@
+dRop TAblE cuSToMERS; | DROP_TABLE | true |
DIFF00000006621 | test_suite_cleanup | SQL | test/payments_644.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN order_id; | DROP_COLUMN | false |
DIFF00000006622 | mentioned_in_comment | Python | comments_614.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE reviews RENAME COLUMN price TO contact_email;") | ALTER_RENAME | false |
DIFF00000006623 | orm_schema_change | Ruby | tickets_535.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :customers, :order_id | NONE | true |
DIFF00000006624 | test_suite_cleanup | SQL | test/transactions_41.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | false |
DIFF00000006625 | general_code_change | Go | employees_139.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006626 | raw_sql_destructive | SQL | notifications_584.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN priority TO full_name; | ALTER_RENAME | true |
DIFF00000006627 | obfuscated_destructive | SQL | employees_201.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLtER TabLE ReviEwS rENAME COlUMn EMAiL tO AmoUNT_cENts; | ALTER_RENAME | true |
DIFF00000006628 | raw_sql_safe | SQL | products_695.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO subscriptions (name, role) VALUES (%s, %s); | NONE | false |
DIFF00000006629 | orm_schema_change | Ruby | shipments_582.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :accounts, :description | NONE | true |
DIFF00000006630 | test_suite_cleanup | SQL | tests/invoices_390.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | false |
DIFF00000006631 | orm_schema_change | Python | inventory_906.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='is_active') | NONE | true |
DIFF00000006632 | general_code_change | JavaScript | products_448.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 |
DIFF00000006633 | orm_schema_change | TypeScript | customers_220.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Employees { // removed field: description } | NONE | true |
DIFF00000006634 | orm_schema_change | JavaScript | orders_43.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('users', table => table.dropColumn('user_id')) | NONE | true |
DIFF00000006635 | mentioned_in_comment | Python | subscriptions_469.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE comments;") | TRUNCATE | false |
DIFF00000006636 | general_code_change | Python | notifications_663.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000006637 | raw_sql_safe | SQL | inventory_464.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM transactions WHERE description = 'active'; | NONE | false |
DIFF00000006638 | obfuscated_destructive | SQL | inventory_86.sql | schema cleanup | @@ -1,3 +1,3 @@
+Drop taBLe EveNTS; | DROP_TABLE | true |
DIFF00000006639 | raw_sql_safe | SQL | subscriptions_679.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE comments SET status = %s WHERE email = %s; | NONE | false |
DIFF00000006640 | mentioned_in_comment | Python | shipments_133.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE products;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000006641 | test_suite_cleanup | SQL | tests/events_356.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE inventory DROP COLUMN quantity; | DROP_COLUMN | false |
DIFF00000006642 | orm_schema_change | Python | inventory_817.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='sessions', name='category') | NONE | true |
DIFF00000006643 | raw_sql_safe | SQL | customers_302.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO refunds (created_at, priority) VALUES (%s, %s); | NONE | false |
DIFF00000006644 | general_code_change | Go | shipments_8.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006645 | general_code_change | Ruby | sessions_912.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000006646 | raw_sql_safe | SQL | subscriptions_118.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE name = 'active'; | NONE | false |
DIFF00000006647 | orm_schema_change | JavaScript | sessions_715.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'phone') | NONE | true |
DIFF00000006648 | orm_schema_change | JavaScript | tickets_31.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('accounts', 'updated_at') | NONE | true |
DIFF00000006649 | test_suite_cleanup | SQL | test/comments_392.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | false |
DIFF00000006650 | obfuscated_destructive | SQL | products_705.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN description; | DROP_COLUMN | true |
DIFF00000006651 | raw_sql_destructive | SQL | subscriptions_214.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN role; | DROP_COLUMN | true |
DIFF00000006652 | mentioned_in_comment | Python | inventory_251.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE orders;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000006653 | raw_sql_destructive | SQL | accounts_279.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | true |
DIFF00000006654 | test_suite_cleanup | SQL | mysql-test/suite/accounts_217.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN is_active TO state; | ALTER_RENAME | false |
DIFF00000006655 | mentioned_in_comment | Python | inventory_449.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE notifications SET status = CONCAT(status, amount);") | UPDATE_CONCAT | false |
DIFF00000006656 | obfuscated_destructive | SQL | events_655.sql | schema cleanup | @@ -1,3 +1,3 @@
+TrunCaTE taBlE ordErS; | TRUNCATE | true |
DIFF00000006657 | raw_sql_safe | SQL | invoices_775.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE comments SET price = %s WHERE score = %s; | NONE | false |
DIFF00000006658 | general_code_change | Python | subscriptions_159.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000006659 | raw_sql_safe | SQL | refunds_291.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO customers (updated_at, phone) VALUES (%s, %s); | NONE | false |
DIFF00000006660 | general_code_change | Go | transactions_831.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006661 | general_code_change | Python | invoices_743.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000006662 | raw_sql_destructive | SQL | invoices_41.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN role TO state; | ALTER_RENAME | true |
DIFF00000006663 | general_code_change | Go | employees_767.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006664 | obfuscated_destructive | SQL | employees_459.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
subscriptions; | DROP_TABLE | true |
DIFF00000006665 | raw_sql_destructive | SQL | logs_526.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE orders SET updated_at = CONCAT(updated_at, name); | UPDATE_CONCAT | true |
DIFF00000006666 | mentioned_in_comment | Python | customers_69.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE reviews; -- now deprecated""" | TRUNCATE | false |
DIFF00000006667 | raw_sql_destructive | SQL | notifications_917.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00000006668 | test_suite_cleanup | SQL | tests/events_580.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE notifications SET address = CONCAT(address, quantity); | UPDATE_CONCAT | false |
DIFF00000006669 | general_code_change | JavaScript | comments_493.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000006670 | orm_schema_change | TypeScript | events_657.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: user_id } | NONE | true |
DIFF00000006671 | raw_sql_safe | SQL | customers_758.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE reviews ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000006672 | test_suite_cleanup | SQL | tests/events_533.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN price TO full_name; | ALTER_RENAME | false |
DIFF00000006673 | orm_schema_change | Ruby | customers_105.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :logs, :score | NONE | true |
DIFF00000006674 | raw_sql_destructive | SQL | shipments_346.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds RENAME COLUMN order_id TO user_role; | ALTER_RENAME | true |
DIFF00000006675 | raw_sql_destructive | SQL | orders_462.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | true |
DIFF00000006676 | orm_schema_change | TypeScript | subscriptions_234.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Transactions { // removed field: updated_at } | NONE | true |
DIFF00000006677 | general_code_change | Java | sessions_408.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000006678 | orm_schema_change | Python | subscriptions_20.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='role') | NONE | true |
DIFF00000006679 | test_suite_cleanup | SQL | spec/accounts_258.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | false |
DIFF00000006680 | mentioned_in_comment | Python | sessions_790.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM products; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000006681 | raw_sql_destructive | SQL | shipments_299.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | true |
DIFF00000006682 | obfuscated_destructive | SQL | reviews_174.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | true |
DIFF00000006683 | test_suite_cleanup | SQL | test/employees_538.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM payments; | DELETE_UNQUALIFIED | false |
DIFF00000006684 | general_code_change | Python | tickets_6.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000006685 | general_code_change | Python | events_332.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000006686 | raw_sql_safe | SQL | customers_78.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_address ON customers (email); | NONE | false |
DIFF00000006687 | raw_sql_destructive | SQL | reviews_86.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN description; | DROP_COLUMN | true |
DIFF00000006688 | orm_schema_change | Ruby | transactions_389.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :customers, :score | NONE | true |
DIFF00000006689 | mentioned_in_comment | Python | orders_450.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE sessions; -- now deprecated""" | DROP_TABLE | false |
DIFF00000006690 | general_code_change | Java | employees_659.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000006691 | mentioned_in_comment | Python | employees_600.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE customers RENAME COLUMN balance TO full_name; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000006692 | test_suite_cleanup | SQL | tests/refunds_110.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE inventory; | TRUNCATE | false |
DIFF00000006693 | mentioned_in_comment | Python | employees_896.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE subscriptions DROP COLUMN phone;") | DROP_COLUMN | false |
DIFF00000006694 | test_suite_cleanup | SQL | test/invoices_869.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN user_id; | DROP_COLUMN | false |
DIFF00000006695 | general_code_change | JavaScript | customers_245.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000006696 | orm_schema_change | Python | orders_227.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='payments', name='status') | NONE | true |
DIFF00000006697 | general_code_change | Go | refunds_872.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000006698 | raw_sql_destructive | SQL | comments_590.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE accounts; | DROP_TABLE | true |
DIFF00000006699 | test_suite_cleanup | SQL | mysql-test/suite/events_737.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN amount TO contact_email; | ALTER_RENAME | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.