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 |
|---|---|---|---|---|---|---|---|
DIFF00099992800 | raw_sql_safe | SQL | inventory_659.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM users WHERE name = 'active'; | NONE | false |
DIFF00099992801 | raw_sql_destructive | SQL | logs_898.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE inventory SET quantity = CONCAT(quantity, is_active); | UPDATE_CONCAT | true |
DIFF00099992802 | obfuscated_destructive | SQL | accounts_263.sql | schema cleanup | @@ -1,3 +1,3 @@
+DeLETE FROM ShipmENts; | DELETE_UNQUALIFIED | true |
DIFF00099992803 | obfuscated_destructive | SQL | payments_911.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM payments; | DELETE_UNQUALIFIED | true |
DIFF00099992804 | general_code_change | TypeScript | orders_802.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 |
DIFF00099992805 | raw_sql_safe | SQL | products_39.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (phone, role) VALUES (%s, %s); | NONE | false |
DIFF00099992806 | test_suite_cleanup | SQL | spec/employees_595.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | false |
DIFF00099992807 | general_code_change | JavaScript | invoices_48.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 |
DIFF00099992808 | orm_schema_change | TypeScript | notifications_90.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Inventory { // removed field: name } | NONE | true |
DIFF00099992809 | general_code_change | Java | refunds_828.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099992810 | raw_sql_destructive | SQL | transactions_355.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00099992811 | orm_schema_change | Ruby | shipments_772.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :user_id | NONE | true |
DIFF00099992812 | orm_schema_change | Python | shipments_832.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='payments', name='status') | NONE | true |
DIFF00099992813 | orm_schema_change | Python | transactions_929.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='reviews', name='category') | NONE | true |
DIFF00099992814 | raw_sql_safe | SQL | customers_268.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_order_id ON subscriptions (metadata); | NONE | false |
DIFF00099992815 | raw_sql_safe | SQL | reviews_506.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE customers SET description = %s WHERE order_id = %s; | NONE | false |
DIFF00099992816 | raw_sql_safe | SQL | comments_501.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE products ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099992817 | general_code_change | Java | logs_857.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099992818 | test_suite_cleanup | SQL | spec/tickets_476.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN address TO full_name; | ALTER_RENAME | false |
DIFF00099992819 | general_code_change | JavaScript | employees_555.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099992820 | raw_sql_safe | SQL | subscriptions_189.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM refunds WHERE price = 'active'; | NONE | false |
DIFF00099992821 | general_code_change | Python | customers_129.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099992822 | general_code_change | Java | payments_498.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099992823 | obfuscated_destructive | SQL | products_316.sql | schema cleanup | @@ -1,3 +1,3 @@
+update logs set is_active = concat(is_active, created_at); | UPDATE_CONCAT | true |
DIFF00099992824 | mentioned_in_comment | Python | orders_751.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE users; -- now deprecated""" | TRUNCATE | false |
DIFF00099992825 | orm_schema_change | JavaScript | customers_884.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('accounts', 'updated_at') | NONE | true |
DIFF00099992826 | mentioned_in_comment | Python | orders_531.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE subscriptions SET score = CONCAT(score, updated_at); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00099992827 | raw_sql_destructive | SQL | transactions_245.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE inventory SET description = CONCAT(description, price); | UPDATE_CONCAT | true |
DIFF00099992828 | test_suite_cleanup | SQL | test/shipments_187.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | false |
DIFF00099992829 | raw_sql_destructive | SQL | customers_697.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00099992830 | raw_sql_safe | SQL | customers_805.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM transactions WHERE email = 'active'; | NONE | false |
DIFF00099992831 | test_suite_cleanup | SQL | mysql-test/suite/transactions_712.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | false |
DIFF00099992832 | general_code_change | TypeScript | products_169.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 |
DIFF00099992833 | general_code_change | Ruby | events_245.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099992834 | general_code_change | JavaScript | logs_323.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 |
DIFF00099992835 | raw_sql_safe | SQL | subscriptions_432.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET balance = %s WHERE quantity = %s; | NONE | false |
DIFF00099992836 | general_code_change | Python | subscriptions_109.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099992837 | general_code_change | Ruby | tickets_670.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099992838 | general_code_change | JavaScript | refunds_309.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099992839 | general_code_change | Python | payments_906.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099992840 | raw_sql_destructive | SQL | events_101.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE shipments SET role = CONCAT(role, order_id); | UPDATE_CONCAT | true |
DIFF00099992841 | raw_sql_destructive | SQL | logs_814.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN user_id; | DROP_COLUMN | true |
DIFF00099992842 | raw_sql_destructive | SQL | reviews_453.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | true |
DIFF00099992843 | orm_schema_change | JavaScript | notifications_204.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('notifications', 'created_at') | NONE | true |
DIFF00099992844 | raw_sql_safe | SQL | invoices_155.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE reviews SET role = %s WHERE price = %s; | NONE | false |
DIFF00099992845 | raw_sql_safe | SQL | refunds_875.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO notifications (priority, order_id) VALUES (%s, %s); | NONE | false |
DIFF00099992846 | orm_schema_change | JavaScript | transactions_967.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('inventory', 'updated_at') | NONE | true |
DIFF00099992847 | test_suite_cleanup | SQL | test/employees_850.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | false |
DIFF00099992848 | mentioned_in_comment | Python | inventory_155.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE shipments; -- now deprecated""" | TRUNCATE | false |
DIFF00099992849 | orm_schema_change | Python | payments_584.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='name') | NONE | true |
DIFF00099992850 | orm_schema_change | JavaScript | shipments_189.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('address')) | NONE | true |
DIFF00099992851 | general_code_change | Python | payments_877.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099992852 | orm_schema_change | JavaScript | inventory_9.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'address') | NONE | true |
DIFF00099992853 | general_code_change | JavaScript | reviews_648.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 |
DIFF00099992854 | raw_sql_destructive | SQL | customers_763.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM tickets; | DELETE_UNQUALIFIED | true |
DIFF00099992855 | raw_sql_destructive | SQL | events_109.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN user_id TO contact_email; | ALTER_RENAME | true |
DIFF00099992856 | orm_schema_change | Ruby | transactions_102.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :comments, :created_at | NONE | true |
DIFF00099992857 | general_code_change | JavaScript | logs_481.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099992858 | general_code_change | Ruby | employees_579.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099992859 | raw_sql_safe | SQL | transactions_845.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE products SET balance = %s WHERE category = %s; | NONE | false |
DIFF00099992860 | general_code_change | JavaScript | refunds_138.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099992861 | orm_schema_change | Ruby | subscriptions_753.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :refunds, :email | NONE | true |
DIFF00099992862 | obfuscated_destructive | SQL | sessions_321.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | true |
DIFF00099992863 | raw_sql_destructive | SQL | notifications_952.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00099992864 | raw_sql_destructive | SQL | subscriptions_276.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | true |
DIFF00099992865 | general_code_change | Python | invoices_328.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099992866 | obfuscated_destructive | SQL | payments_477.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table reviews; | TRUNCATE | true |
DIFF00099992867 | general_code_change | JavaScript | customers_948.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 |
DIFF00099992868 | orm_schema_change | Ruby | shipments_526.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :sessions, :quantity | NONE | true |
DIFF00099992869 | raw_sql_safe | SQL | customers_976.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_name ON notifications (user_id); | NONE | false |
DIFF00099992870 | orm_schema_change | TypeScript | inventory_126.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Comments { // removed field: amount } | NONE | true |
DIFF00099992871 | raw_sql_safe | SQL | subscriptions_643.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE reviews ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099992872 | orm_schema_change | JavaScript | refunds_218.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'metadata') | NONE | true |
DIFF00099992873 | test_suite_cleanup | SQL | mysql-test/suite/invoices_284.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | false |
DIFF00099992874 | test_suite_cleanup | SQL | spec/tickets_625.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE accounts; | DROP_TABLE | false |
DIFF00099992875 | general_code_change | JavaScript | products_119.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 |
DIFF00099992876 | raw_sql_safe | SQL | inventory_220.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_quantity ON customers (price); | NONE | false |
DIFF00099992877 | raw_sql_destructive | SQL | transactions_201.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE orders; | TRUNCATE | true |
DIFF00099992878 | orm_schema_change | JavaScript | comments_137.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('inventory', table => table.dropColumn('metadata')) | NONE | true |
DIFF00099992879 | raw_sql_destructive | SQL | tickets_238.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions DROP COLUMN status; | DROP_COLUMN | true |
DIFF00099992880 | general_code_change | JavaScript | transactions_64.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099992881 | mentioned_in_comment | Python | inventory_209.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE shipments;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099992882 | raw_sql_destructive | SQL | customers_76.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | true |
DIFF00099992883 | mentioned_in_comment | Python | tickets_840.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE invoices DROP COLUMN email;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099992884 | general_code_change | JavaScript | logs_221.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 |
DIFF00099992885 | raw_sql_destructive | SQL | shipments_780.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM events; | DELETE_UNQUALIFIED | true |
DIFF00099992886 | general_code_change | Java | products_141.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099992887 | general_code_change | Go | inventory_219.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099992888 | raw_sql_destructive | SQL | reviews_939.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN name TO user_role; | ALTER_RENAME | true |
DIFF00099992889 | mentioned_in_comment | Python | inventory_64.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE tickets SET category = CONCAT(category, email); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00099992890 | orm_schema_change | Python | products_173.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='events', name='amount') | NONE | true |
DIFF00099992891 | raw_sql_safe | SQL | events_541.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE customers SET phone = %s WHERE updated_at = %s; | NONE | false |
DIFF00099992892 | raw_sql_safe | SQL | shipments_117.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE status = 'active'; | NONE | false |
DIFF00099992893 | raw_sql_safe | SQL | events_860.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (description, quantity) VALUES (%s, %s); | NONE | false |
DIFF00099992894 | mentioned_in_comment | Python | sessions_82.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE sessions DROP COLUMN amount; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099992895 | raw_sql_safe | SQL | inventory_232.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE name = 'active'; | NONE | false |
DIFF00099992896 | general_code_change | TypeScript | shipments_540.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 |
DIFF00099992897 | raw_sql_destructive | SQL | shipments_81.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN description TO user_role; | ALTER_RENAME | true |
DIFF00099992898 | raw_sql_safe | SQL | shipments_60.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_role ON transactions (score); | NONE | false |
DIFF00099992899 | general_code_change | Go | orders_291.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.