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 |
|---|---|---|---|---|---|---|---|
DIFF00000007700 | general_code_change | JavaScript | reviews_753.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 |
DIFF00000007701 | orm_schema_change | Python | invoices_170.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='balance') | NONE | true |
DIFF00000007702 | general_code_change | JavaScript | invoices_687.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007703 | raw_sql_destructive | SQL | sessions_322.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
DIFF00000007704 | general_code_change | Ruby | employees_244.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007705 | raw_sql_destructive | SQL | accounts_238.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE logs SET score = CONCAT(score, balance); | UPDATE_CONCAT | true |
DIFF00000007706 | general_code_change | JavaScript | events_529.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 |
DIFF00000007707 | orm_schema_change | JavaScript | orders_188.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('transactions', 'description') | NONE | true |
DIFF00000007708 | general_code_change | Java | refunds_943.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000007709 | orm_schema_change | TypeScript | events_30.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Inventory { // removed field: description } | NONE | true |
DIFF00000007710 | raw_sql_destructive | SQL | payments_231.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | true |
DIFF00000007711 | orm_schema_change | JavaScript | products_756.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'created_at') | NONE | true |
DIFF00000007712 | orm_schema_change | TypeScript | invoices_409.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Reviews { // removed field: role } | NONE | true |
DIFF00000007713 | raw_sql_destructive | SQL | payments_937.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications RENAME COLUMN status TO state; | ALTER_RENAME | true |
DIFF00000007714 | general_code_change | Go | subscriptions_866.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007715 | test_suite_cleanup | SQL | mysql-test/suite/products_24.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | false |
DIFF00000007716 | orm_schema_change | JavaScript | transactions_553.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('notifications', table => table.dropColumn('priority')) | NONE | true |
DIFF00000007717 | general_code_change | Ruby | accounts_691.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007718 | obfuscated_destructive | SQL | orders_442.sql | schema cleanup | @@ -1,3 +1,3 @@
+AltEr TAblE loGs rEnaMe CoLumN aDdrESS To StATe; | ALTER_RENAME | true |
DIFF00000007719 | test_suite_cleanup | SQL | mysql-test/suite/transactions_182.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | false |
DIFF00000007720 | test_suite_cleanup | SQL | test/events_166.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE users RENAME COLUMN role TO state; | ALTER_RENAME | false |
DIFF00000007721 | mentioned_in_comment | Python | accounts_813.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE transactions;") | DROP_TABLE | false |
DIFF00000007722 | general_code_change | JavaScript | inventory_214.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007723 | general_code_change | Java | subscriptions_783.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000007724 | general_code_change | Python | reviews_140.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007725 | general_code_change | Python | inventory_782.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007726 | test_suite_cleanup | SQL | tests/tickets_165.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | false |
DIFF00000007727 | mentioned_in_comment | Python | shipments_945.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE sessions RENAME COLUMN order_id TO user_role;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000007728 | test_suite_cleanup | SQL | tests/invoices_387.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN order_id; | DROP_COLUMN | false |
DIFF00000007729 | general_code_change | Java | products_90.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000007730 | test_suite_cleanup | SQL | test/reviews_895.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | false |
DIFF00000007731 | raw_sql_safe | SQL | payments_846.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM accounts WHERE created_at = 'active'; | NONE | false |
DIFF00000007732 | raw_sql_safe | SQL | inventory_301.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET category = %s WHERE name = %s; | NONE | false |
DIFF00000007733 | raw_sql_destructive | SQL | products_113.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | true |
DIFF00000007734 | raw_sql_safe | SQL | customers_425.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE users ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000007735 | obfuscated_destructive | SQL | logs_31.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table sessions rename column description to contact_email; | ALTER_RENAME | true |
DIFF00000007736 | raw_sql_destructive | SQL | notifications_244.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE accounts SET priority = CONCAT(priority, metadata); | UPDATE_CONCAT | true |
DIFF00000007737 | orm_schema_change | TypeScript | orders_685.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Payments { // removed field: amount } | NONE | true |
DIFF00000007738 | orm_schema_change | Python | sessions_70.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='payments', name='name') | NONE | true |
DIFF00000007739 | raw_sql_safe | SQL | payments_788.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE reviews SET user_id = %s WHERE updated_at = %s; | NONE | false |
DIFF00000007740 | general_code_change | JavaScript | subscriptions_642.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 |
DIFF00000007741 | raw_sql_destructive | SQL | refunds_459.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets DROP COLUMN status; | DROP_COLUMN | true |
DIFF00000007742 | raw_sql_safe | SQL | inventory_231.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE employees ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000007743 | mentioned_in_comment | Python | refunds_534.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE employees DROP COLUMN metadata;") | DROP_COLUMN | false |
DIFF00000007744 | raw_sql_safe | SQL | tickets_348.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM logs WHERE quantity = 'active'; | NONE | false |
DIFF00000007745 | raw_sql_destructive | SQL | employees_322.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN quantity; | DROP_COLUMN | true |
DIFF00000007746 | test_suite_cleanup | SQL | test/logs_538.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE logs RENAME COLUMN role TO state; | ALTER_RENAME | false |
DIFF00000007747 | general_code_change | Go | comments_15.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007748 | orm_schema_change | Python | notifications_665.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='events', name='score') | NONE | true |
DIFF00000007749 | orm_schema_change | Ruby | sessions_27.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :sessions, :updated_at | NONE | true |
DIFF00000007750 | general_code_change | Ruby | subscriptions_985.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007751 | general_code_change | Java | payments_5.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000007752 | raw_sql_safe | SQL | tickets_488.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE invoices SET role = %s WHERE quantity = %s; | NONE | false |
DIFF00000007753 | orm_schema_change | TypeScript | shipments_656.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Accounts { // removed field: priority } | NONE | true |
DIFF00000007754 | raw_sql_safe | SQL | payments_369.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE tickets ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000007755 | orm_schema_change | Ruby | comments_303.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :transactions, :address | NONE | true |
DIFF00000007756 | orm_schema_change | Ruby | inventory_670.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :reviews, :amount | NONE | true |
DIFF00000007757 | mentioned_in_comment | Python | tickets_290.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE payments RENAME COLUMN quantity TO user_role; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000007758 | test_suite_cleanup | SQL | tests/accounts_629.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE products SET order_id = CONCAT(order_id, updated_at); | UPDATE_CONCAT | false |
DIFF00000007759 | test_suite_cleanup | SQL | test/subscriptions_852.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN name; | DROP_COLUMN | false |
DIFF00000007760 | general_code_change | Python | shipments_12.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000007761 | raw_sql_destructive | SQL | payments_784.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE logs SET name = CONCAT(name, quantity); | UPDATE_CONCAT | true |
DIFF00000007762 | obfuscated_destructive | SQL | notifications_187.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN name TO user_role; | ALTER_RENAME | true |
DIFF00000007763 | raw_sql_safe | SQL | invoices_267.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (is_active, description) VALUES (%s, %s); | NONE | false |
DIFF00000007764 | raw_sql_safe | SQL | accounts_513.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000007765 | raw_sql_safe | SQL | orders_549.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET phone = %s WHERE address = %s; | NONE | false |
DIFF00000007766 | test_suite_cleanup | SQL | tests/logs_473.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE accounts; | DROP_TABLE | false |
DIFF00000007767 | raw_sql_destructive | SQL | tickets_185.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE comments SET priority = CONCAT(priority, updated_at); | UPDATE_CONCAT | true |
DIFF00000007768 | orm_schema_change | TypeScript | shipments_319.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Events { // removed field: user_id } | NONE | true |
DIFF00000007769 | raw_sql_destructive | SQL | comments_530.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices RENAME COLUMN phone TO contact_email; | ALTER_RENAME | true |
DIFF00000007770 | mentioned_in_comment | Python | customers_641.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE invoices RENAME COLUMN description TO state;") | ALTER_RENAME | false |
DIFF00000007771 | general_code_change | Java | shipments_492.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000007772 | raw_sql_safe | SQL | invoices_778.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO inventory (name, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00000007773 | test_suite_cleanup | SQL | test/shipments_538.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | false |
DIFF00000007774 | test_suite_cleanup | SQL | mysql-test/suite/transactions_904.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN description; | DROP_COLUMN | false |
DIFF00000007775 | mentioned_in_comment | Python | shipments_418.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE employees; -- now deprecated""" | TRUNCATE | false |
DIFF00000007776 | orm_schema_change | JavaScript | events_926.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'user_id') | NONE | true |
DIFF00000007777 | orm_schema_change | Python | events_351.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='transactions', name='score') | NONE | true |
DIFF00000007778 | raw_sql_destructive | SQL | events_227.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM refunds; | DELETE_UNQUALIFIED | true |
DIFF00000007779 | mentioned_in_comment | Python | notifications_211.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM comments;") | DELETE_UNQUALIFIED | false |
DIFF00000007780 | mentioned_in_comment | Python | tickets_917.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE comments DROP COLUMN role; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000007781 | raw_sql_destructive | SQL | invoices_177.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | true |
DIFF00000007782 | obfuscated_destructive | SQL | users_546.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
comments; | DROP_TABLE | true |
DIFF00000007783 | general_code_change | Python | logs_529.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007784 | orm_schema_change | TypeScript | reviews_644.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Subscriptions { // removed field: priority } | NONE | true |
DIFF00000007785 | general_code_change | Python | comments_540.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000007786 | raw_sql_safe | SQL | transactions_264.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE events SET balance = %s WHERE score = %s; | NONE | false |
DIFF00000007787 | general_code_change | TypeScript | shipments_734.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 |
DIFF00000007788 | general_code_change | Ruby | comments_205.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007789 | mentioned_in_comment | Python | refunds_966.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE orders SET metadata = CONCAT(metadata, is_active);") | UPDATE_CONCAT | false |
DIFF00000007790 | general_code_change | Ruby | transactions_579.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007791 | orm_schema_change | TypeScript | accounts_624.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: updated_at } | NONE | true |
DIFF00000007792 | orm_schema_change | Python | payments_294.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='users', name='quantity') | NONE | true |
DIFF00000007793 | raw_sql_destructive | SQL | tickets_180.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | true |
DIFF00000007794 | raw_sql_destructive | SQL | events_895.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications RENAME COLUMN address TO contact_email; | ALTER_RENAME | true |
DIFF00000007795 | obfuscated_destructive | SQL | transactions_971.sql | schema cleanup | @@ -1,3 +1,3 @@
+AlTER tabLe COmMENTS RenamE COlumN ScorE TO CONtaCt_eMAiL; | ALTER_RENAME | true |
DIFF00000007796 | raw_sql_destructive | SQL | comments_846.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00000007797 | raw_sql_destructive | SQL | customers_935.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE invoices; | TRUNCATE | true |
DIFF00000007798 | general_code_change | Ruby | reviews_174.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007799 | raw_sql_destructive | SQL | shipments_97.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions DROP COLUMN score; | DROP_COLUMN | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.