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 |
|---|---|---|---|---|---|---|---|
DIFF00000008700 | test_suite_cleanup | SQL | tests/employees_793.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE comments SET price = CONCAT(price, phone); | UPDATE_CONCAT | false |
DIFF00000008701 | obfuscated_destructive | SQL | sessions_790.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM tickets; | DELETE_UNQUALIFIED | true |
DIFF00000008702 | orm_schema_change | TypeScript | reviews_120.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Employees { // removed field: amount } | NONE | true |
DIFF00000008703 | general_code_change | Python | inventory_402.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008704 | raw_sql_destructive | SQL | shipments_933.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN metadata; | DROP_COLUMN | true |
DIFF00000008705 | general_code_change | Ruby | users_304.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008706 | orm_schema_change | TypeScript | subscriptions_338.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Sessions { // removed field: score } | NONE | true |
DIFF00000008707 | test_suite_cleanup | SQL | tests/comments_332.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | false |
DIFF00000008708 | obfuscated_destructive | SQL | invoices_344.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE accounts; | TRUNCATE | true |
DIFF00000008709 | raw_sql_destructive | SQL | accounts_195.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices RENAME COLUMN phone TO contact_email; | ALTER_RENAME | true |
DIFF00000008710 | orm_schema_change | JavaScript | orders_128.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00000008711 | raw_sql_destructive | SQL | invoices_593.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN status; | DROP_COLUMN | true |
DIFF00000008712 | orm_schema_change | JavaScript | notifications_56.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('notifications', table => table.dropColumn('priority')) | NONE | true |
DIFF00000008713 | general_code_change | Python | shipments_553.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008714 | mentioned_in_comment | Python | tickets_143.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE orders SET score = CONCAT(score, address);") | UPDATE_CONCAT | false |
DIFF00000008715 | orm_schema_change | JavaScript | refunds_580.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('accounts', 'balance') | NONE | true |
DIFF00000008716 | orm_schema_change | Ruby | users_812.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :orders, :amount | NONE | true |
DIFF00000008717 | orm_schema_change | JavaScript | payments_194.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('subscriptions', 'priority') | NONE | true |
DIFF00000008718 | test_suite_cleanup | SQL | test/sessions_686.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN order_id TO user_role; | ALTER_RENAME | false |
DIFF00000008719 | orm_schema_change | JavaScript | users_940.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'amount') | NONE | true |
DIFF00000008720 | orm_schema_change | JavaScript | tickets_957.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('score')) | NONE | true |
DIFF00000008721 | mentioned_in_comment | Python | subscriptions_962.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE refunds DROP COLUMN address;") | DROP_COLUMN | false |
DIFF00000008722 | raw_sql_destructive | SQL | accounts_644.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN is_active; | DROP_COLUMN | true |
DIFF00000008723 | general_code_change | Python | shipments_767.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008724 | test_suite_cleanup | SQL | test/products_512.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | false |
DIFF00000008725 | raw_sql_safe | SQL | tickets_398.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE created_at = 'active'; | NONE | false |
DIFF00000008726 | general_code_change | Java | subscriptions_33.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000008727 | general_code_change | Ruby | shipments_52.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008728 | mentioned_in_comment | Python | reviews_276.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE notifications;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000008729 | general_code_change | Java | shipments_347.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000008730 | obfuscated_destructive | SQL | employees_350.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN email; | DROP_COLUMN | true |
DIFF00000008731 | raw_sql_destructive | SQL | logs_956.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00000008732 | mentioned_in_comment | Python | employees_434.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM invoices;") | DELETE_UNQUALIFIED | false |
DIFF00000008733 | general_code_change | Python | orders_446.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008734 | orm_schema_change | Ruby | orders_536.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :reviews, :role | NONE | true |
DIFF00000008735 | orm_schema_change | JavaScript | notifications_502.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('notifications', table => table.dropColumn('role')) | NONE | true |
DIFF00000008736 | orm_schema_change | TypeScript | reviews_879.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: price } | NONE | true |
DIFF00000008737 | mentioned_in_comment | Python | transactions_541.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE tickets RENAME COLUMN role TO contact_email; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000008738 | raw_sql_destructive | SQL | employees_783.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | true |
DIFF00000008739 | general_code_change | TypeScript | employees_633.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 |
DIFF00000008740 | general_code_change | Python | comments_294.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008741 | general_code_change | Ruby | products_583.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008742 | general_code_change | TypeScript | shipments_851.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 |
DIFF00000008743 | raw_sql_safe | SQL | inventory_962.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE invoices SET updated_at = %s WHERE category = %s; | NONE | false |
DIFF00000008744 | general_code_change | Go | orders_629.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008745 | orm_schema_change | JavaScript | users_239.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('invoices', 'description') | NONE | true |
DIFF00000008746 | orm_schema_change | JavaScript | inventory_595.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('transactions', 'amount') | NONE | true |
DIFF00000008747 | raw_sql_destructive | SQL | transactions_790.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | true |
DIFF00000008748 | mentioned_in_comment | Python | accounts_56.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM events; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000008749 | general_code_change | JavaScript | notifications_72.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 |
DIFF00000008750 | general_code_change | Python | shipments_989.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008751 | general_code_change | JavaScript | products_714.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 |
DIFF00000008752 | mentioned_in_comment | Python | reviews_13.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE events;") | TRUNCATE | false |
DIFF00000008753 | orm_schema_change | Ruby | accounts_191.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :logs, :score | NONE | true |
DIFF00000008754 | orm_schema_change | JavaScript | tickets_789.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('reviews', table => table.dropColumn('quantity')) | NONE | true |
DIFF00000008755 | general_code_change | Go | accounts_370.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008756 | raw_sql_destructive | SQL | employees_440.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN order_id TO full_name; | ALTER_RENAME | true |
DIFF00000008757 | raw_sql_safe | SQL | accounts_781.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO invoices (metadata, priority) VALUES (%s, %s); | NONE | false |
DIFF00000008758 | mentioned_in_comment | Python | logs_206.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE accounts;") | DROP_TABLE | false |
DIFF00000008759 | raw_sql_destructive | SQL | tickets_228.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | true |
DIFF00000008760 | obfuscated_destructive | SQL | employees_314.sql | schema cleanup | @@ -1,3 +1,3 @@
+update users set status = concat(status, priority); | UPDATE_CONCAT | true |
DIFF00000008761 | test_suite_cleanup | SQL | tests/customers_439.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN quantity; | DROP_COLUMN | false |
DIFF00000008762 | general_code_change | Python | events_695.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008763 | test_suite_cleanup | SQL | spec/accounts_856.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE inventory; | DROP_TABLE | false |
DIFF00000008764 | raw_sql_destructive | SQL | subscriptions_498.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM events; | DELETE_UNQUALIFIED | true |
DIFF00000008765 | mentioned_in_comment | Python | transactions_741.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE customers SET address = CONCAT(address, phone);") | UPDATE_CONCAT | false |
DIFF00000008766 | test_suite_cleanup | SQL | mysql-test/suite/reviews_553.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE notifications SET balance = CONCAT(balance, role); | UPDATE_CONCAT | false |
DIFF00000008767 | general_code_change | Python | accounts_868.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008768 | orm_schema_change | Python | payments_113.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='email') | NONE | true |
DIFF00000008769 | test_suite_cleanup | SQL | tests/sessions_798.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | false |
DIFF00000008770 | general_code_change | Ruby | comments_504.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008771 | general_code_change | JavaScript | accounts_475.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008772 | obfuscated_destructive | SQL | tickets_514.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTeR tabLE nOTIFICaTioNs DrOP COlumN rOLE; | DROP_COLUMN | true |
DIFF00000008773 | raw_sql_destructive | SQL | logs_687.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices RENAME COLUMN order_id TO contact_email; | ALTER_RENAME | true |
DIFF00000008774 | obfuscated_destructive | SQL | events_835.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
transactions; | DELETE_UNQUALIFIED | true |
DIFF00000008775 | test_suite_cleanup | SQL | mysql-test/suite/payments_200.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN name TO state; | ALTER_RENAME | false |
DIFF00000008776 | raw_sql_safe | SQL | sessions_851.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM orders WHERE quantity = 'active'; | NONE | false |
DIFF00000008777 | orm_schema_change | TypeScript | events_486.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Subscriptions { // removed field: email } | NONE | true |
DIFF00000008778 | obfuscated_destructive | SQL | notifications_908.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
invoices
DROP
COLUMN
email; | DROP_COLUMN | true |
DIFF00000008779 | raw_sql_safe | SQL | orders_665.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE users SET priority = %s WHERE address = %s; | NONE | false |
DIFF00000008780 | general_code_change | JavaScript | customers_75.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 |
DIFF00000008781 | orm_schema_change | JavaScript | accounts_45.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('subscriptions', table => table.dropColumn('metadata')) | NONE | true |
DIFF00000008782 | mentioned_in_comment | Python | sessions_992.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE transactions DROP COLUMN created_at;") | DROP_COLUMN | false |
DIFF00000008783 | general_code_change | JavaScript | tickets_972.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008784 | test_suite_cleanup | SQL | tests/subscriptions_623.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE orders SET balance = CONCAT(balance, address); | UPDATE_CONCAT | false |
DIFF00000008785 | raw_sql_safe | SQL | events_52.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE products ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000008786 | general_code_change | JavaScript | invoices_280.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 |
DIFF00000008787 | raw_sql_destructive | SQL | refunds_975.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00000008788 | orm_schema_change | Python | orders_14.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='name') | NONE | true |
DIFF00000008789 | general_code_change | JavaScript | orders_30.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008790 | orm_schema_change | JavaScript | products_163.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('users', table => table.dropColumn('category')) | NONE | true |
DIFF00000008791 | raw_sql_safe | SQL | orders_279.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE notifications SET priority = %s WHERE metadata = %s; | NONE | false |
DIFF00000008792 | orm_schema_change | JavaScript | shipments_646.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('quantity')) | NONE | true |
DIFF00000008793 | test_suite_cleanup | SQL | mysql-test/suite/subscriptions_5.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN balance TO full_name; | ALTER_RENAME | false |
DIFF00000008794 | raw_sql_safe | SQL | sessions_729.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM notifications WHERE amount = 'active'; | NONE | false |
DIFF00000008795 | orm_schema_change | TypeScript | comments_160.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Comments { // removed field: name } | NONE | true |
DIFF00000008796 | raw_sql_destructive | SQL | employees_733.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN order_id TO full_name; | ALTER_RENAME | true |
DIFF00000008797 | obfuscated_destructive | SQL | customers_665.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table invoices; | DROP_TABLE | true |
DIFF00000008798 | general_code_change | Java | comments_825.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000008799 | general_code_change | TypeScript | sessions_238.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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.