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 |
|---|---|---|---|---|---|---|---|
DIFF00000004800 | general_code_change | Go | sessions_656.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000004801 | general_code_change | JavaScript | tickets_308.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000004802 | orm_schema_change | Ruby | customers_131.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :products, :created_at | NONE | true |
DIFF00000004803 | general_code_change | TypeScript | employees_695.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 |
DIFF00000004804 | test_suite_cleanup | SQL | spec/shipments_964.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | false |
DIFF00000004805 | general_code_change | Python | refunds_854.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000004806 | orm_schema_change | JavaScript | products_783.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('orders', 'address') | NONE | true |
DIFF00000004807 | raw_sql_safe | SQL | sessions_15.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE reviews ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000004808 | raw_sql_destructive | SQL | subscriptions_232.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | true |
DIFF00000004809 | raw_sql_destructive | SQL | employees_627.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE payments SET email = CONCAT(email, price); | UPDATE_CONCAT | true |
DIFF00000004810 | raw_sql_destructive | SQL | accounts_596.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM orders; | DELETE_UNQUALIFIED | true |
DIFF00000004811 | raw_sql_safe | SQL | employees_336.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (name, score) VALUES (%s, %s); | NONE | false |
DIFF00000004812 | mentioned_in_comment | Python | reviews_830.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE events RENAME COLUMN priority TO state; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000004813 | general_code_change | JavaScript | subscriptions_442.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000004814 | orm_schema_change | TypeScript | invoices_773.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Subscriptions { // removed field: category } | NONE | true |
DIFF00000004815 | general_code_change | Python | tickets_555.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000004816 | general_code_change | Java | inventory_6.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000004817 | raw_sql_safe | SQL | inventory_697.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_orders_user_id ON orders (balance); | NONE | false |
DIFF00000004818 | orm_schema_change | Ruby | refunds_28.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :orders, :phone | NONE | true |
DIFF00000004819 | orm_schema_change | Python | customers_1.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='shipments', name='order_id') | NONE | true |
DIFF00000004820 | raw_sql_safe | SQL | tickets_100.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO payments (metadata, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00000004821 | test_suite_cleanup | SQL | spec/employees_592.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE logs SET role = CONCAT(role, is_active); | UPDATE_CONCAT | false |
DIFF00000004822 | mentioned_in_comment | Python | transactions_237.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE accounts SET score = CONCAT(score, address); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000004823 | raw_sql_safe | SQL | inventory_388.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE status = 'active'; | NONE | false |
DIFF00000004824 | raw_sql_safe | SQL | accounts_738.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE invoices ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000004825 | general_code_change | Java | invoices_363.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000004826 | general_code_change | JavaScript | notifications_799.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 |
DIFF00000004827 | obfuscated_destructive | SQL | comments_205.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE accounts SET name = CONCAT(name, score); | UPDATE_CONCAT | true |
DIFF00000004828 | raw_sql_destructive | SQL | tickets_798.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN is_active TO full_name; | ALTER_RENAME | true |
DIFF00000004829 | raw_sql_safe | SQL | customers_711.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO users (created_at, metadata) VALUES (%s, %s); | NONE | false |
DIFF00000004830 | orm_schema_change | Ruby | accounts_171.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :transactions, :description | NONE | true |
DIFF00000004831 | mentioned_in_comment | Python | users_529.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE comments DROP COLUMN quantity;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000004832 | obfuscated_destructive | SQL | users_153.sql | schema cleanup | @@ -1,3 +1,3 @@
+update orders set amount = concat(amount, category); | UPDATE_CONCAT | true |
DIFF00000004833 | raw_sql_safe | SQL | refunds_578.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE transactions SET is_active = %s WHERE order_id = %s; | NONE | false |
DIFF00000004834 | test_suite_cleanup | SQL | spec/comments_40.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE invoices SET category = CONCAT(category, amount); | UPDATE_CONCAT | false |
DIFF00000004835 | raw_sql_destructive | SQL | customers_236.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE accounts; | TRUNCATE | true |
DIFF00000004836 | general_code_change | JavaScript | customers_300.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000004837 | raw_sql_safe | SQL | logs_329.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM reviews WHERE address = 'active'; | NONE | false |
DIFF00000004838 | orm_schema_change | JavaScript | inventory_255.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('accounts', 'name') | NONE | true |
DIFF00000004839 | raw_sql_safe | SQL | transactions_157.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000004840 | mentioned_in_comment | Python | shipments_27.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM subscriptions;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000004841 | raw_sql_safe | SQL | refunds_361.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO tickets (updated_at, status) VALUES (%s, %s); | NONE | false |
DIFF00000004842 | orm_schema_change | Python | employees_459.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='users', name='updated_at') | NONE | true |
DIFF00000004843 | general_code_change | JavaScript | employees_98.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 |
DIFF00000004844 | general_code_change | TypeScript | transactions_496.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 |
DIFF00000004845 | orm_schema_change | Python | refunds_227.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='email') | NONE | true |
DIFF00000004846 | test_suite_cleanup | SQL | test/tickets_950.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE users SET balance = CONCAT(balance, metadata); | UPDATE_CONCAT | false |
DIFF00000004847 | general_code_change | JavaScript | accounts_583.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 |
DIFF00000004848 | general_code_change | TypeScript | employees_315.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 |
DIFF00000004849 | raw_sql_safe | SQL | shipments_806.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_payments_name ON payments (amount); | NONE | false |
DIFF00000004850 | raw_sql_safe | SQL | subscriptions_560.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE tickets ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000004851 | test_suite_cleanup | SQL | tests/events_336.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | false |
DIFF00000004852 | raw_sql_destructive | SQL | refunds_162.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts DROP COLUMN name; | DROP_COLUMN | true |
DIFF00000004853 | obfuscated_destructive | SQL | customers_870.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table notifications drop column score; | DROP_COLUMN | true |
DIFF00000004854 | raw_sql_destructive | SQL | inventory_422.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | true |
DIFF00000004855 | raw_sql_destructive | SQL | inventory_932.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN order_id TO user_role; | ALTER_RENAME | true |
DIFF00000004856 | orm_schema_change | TypeScript | products_124.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Events { // removed field: order_id } | NONE | true |
DIFF00000004857 | general_code_change | JavaScript | events_758.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 |
DIFF00000004858 | obfuscated_destructive | SQL | reviews_795.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETe frOm rEFUNds; | DELETE_UNQUALIFIED | true |
DIFF00000004859 | general_code_change | Python | subscriptions_471.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000004860 | orm_schema_change | JavaScript | payments_892.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('accounts', 'score') | NONE | true |
DIFF00000004861 | general_code_change | TypeScript | subscriptions_699.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 |
DIFF00000004862 | general_code_change | Python | payments_660.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000004863 | raw_sql_safe | SQL | users_237.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE updated_at = 'active'; | NONE | false |
DIFF00000004864 | raw_sql_safe | SQL | reviews_593.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE notifications SET balance = %s WHERE order_id = %s; | NONE | false |
DIFF00000004865 | obfuscated_destructive | SQL | events_468.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00000004866 | raw_sql_destructive | SQL | comments_601.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN name; | DROP_COLUMN | true |
DIFF00000004867 | mentioned_in_comment | Python | logs_617.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM customers; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000004868 | obfuscated_destructive | SQL | employees_224.sql | schema cleanup | @@ -1,3 +1,3 @@
+trUNCaTe tAble LoGS; | TRUNCATE | true |
DIFF00000004869 | general_code_change | Python | logs_500.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000004870 | orm_schema_change | JavaScript | transactions_334.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('reviews', 'description') | NONE | true |
DIFF00000004871 | obfuscated_destructive | SQL | shipments_930.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN role; | DROP_COLUMN | true |
DIFF00000004872 | general_code_change | Ruby | payments_864.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000004873 | mentioned_in_comment | Python | orders_781.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE subscriptions SET score = CONCAT(score, status);") | UPDATE_CONCAT | false |
DIFF00000004874 | general_code_change | JavaScript | invoices_704.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 |
DIFF00000004875 | test_suite_cleanup | SQL | spec/products_382.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | false |
DIFF00000004876 | mentioned_in_comment | Python | inventory_819.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE notifications RENAME COLUMN metadata TO contact_email;") | ALTER_RENAME | false |
DIFF00000004877 | raw_sql_safe | SQL | inventory_450.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_shipments_order_id ON shipments (balance); | NONE | false |
DIFF00000004878 | general_code_change | Python | shipments_622.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000004879 | orm_schema_change | JavaScript | accounts_197.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('orders', 'balance') | NONE | true |
DIFF00000004880 | test_suite_cleanup | SQL | test/transactions_8.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | false |
DIFF00000004881 | obfuscated_destructive | SQL | payments_79.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN category TO user_role; | ALTER_RENAME | true |
DIFF00000004882 | raw_sql_destructive | SQL | sessions_173.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory RENAME COLUMN phone TO contact_email; | ALTER_RENAME | true |
DIFF00000004883 | general_code_change | JavaScript | reviews_428.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 |
DIFF00000004884 | general_code_change | JavaScript | accounts_972.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 |
DIFF00000004885 | raw_sql_safe | SQL | invoices_338.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_shipments_updated_at ON shipments (order_id); | NONE | false |
DIFF00000004886 | test_suite_cleanup | SQL | test/transactions_852.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE reviews SET score = CONCAT(score, is_active); | UPDATE_CONCAT | false |
DIFF00000004887 | obfuscated_destructive | SQL | payments_188.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
orders
DROP
COLUMN
updated_at; | DROP_COLUMN | true |
DIFF00000004888 | mentioned_in_comment | Python | invoices_618.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE logs SET amount = CONCAT(amount, role); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000004889 | general_code_change | JavaScript | tickets_166.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 |
DIFF00000004890 | raw_sql_destructive | SQL | transactions_649.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00000004891 | general_code_change | Python | logs_630.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000004892 | general_code_change | JavaScript | reviews_554.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 |
DIFF00000004893 | general_code_change | Java | payments_959.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000004894 | orm_schema_change | TypeScript | refunds_260.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Invoices { // removed field: description } | NONE | true |
DIFF00000004895 | general_code_change | Python | sessions_636.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000004896 | raw_sql_destructive | SQL | notifications_7.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE payments SET address = CONCAT(address, quantity); | UPDATE_CONCAT | true |
DIFF00000004897 | general_code_change | JavaScript | payments_815.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 |
DIFF00000004898 | raw_sql_safe | SQL | invoices_313.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM customers WHERE role = 'active'; | NONE | false |
DIFF00000004899 | general_code_change | Java | customers_599.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.