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 |
|---|---|---|---|---|---|---|---|
DIFF00000002000 | general_code_change | Java | employees_415.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002001 | test_suite_cleanup | SQL | mysql-test/suite/employees_683.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE inventory; | DROP_TABLE | false |
DIFF00000002002 | general_code_change | JavaScript | subscriptions_122.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002003 | mentioned_in_comment | Python | sessions_271.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE inventory; -- now deprecated""" | DROP_TABLE | false |
DIFF00000002004 | test_suite_cleanup | SQL | spec/logs_169.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE reviews RENAME COLUMN balance TO full_name; | ALTER_RENAME | false |
DIFF00000002005 | obfuscated_destructive | SQL | transactions_824.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
products; | DELETE_UNQUALIFIED | true |
DIFF00000002006 | general_code_change | Python | tickets_581.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000002007 | raw_sql_safe | SQL | refunds_938.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE accounts SET score = %s WHERE phone = %s; | NONE | false |
DIFF00000002008 | test_suite_cleanup | SQL | spec/transactions_313.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | false |
DIFF00000002009 | general_code_change | JavaScript | events_794.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002010 | raw_sql_safe | SQL | subscriptions_984.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO invoices (role, metadata) VALUES (%s, %s); | NONE | false |
DIFF00000002011 | orm_schema_change | Python | inventory_968.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='shipments', name='email') | NONE | true |
DIFF00000002012 | general_code_change | Python | users_591.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000002013 | mentioned_in_comment | Python | shipments_256.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE users; -- now deprecated""" | DROP_TABLE | false |
DIFF00000002014 | mentioned_in_comment | Python | events_25.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE sessions;") | TRUNCATE | false |
DIFF00000002015 | raw_sql_safe | SQL | inventory_315.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE comments SET quantity = %s WHERE email = %s; | NONE | false |
DIFF00000002016 | general_code_change | JavaScript | users_430.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002017 | test_suite_cleanup | SQL | tests/sessions_207.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE comments SET name = CONCAT(name, status); | UPDATE_CONCAT | false |
DIFF00000002018 | orm_schema_change | TypeScript | orders_121.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Reviews { // removed field: created_at } | NONE | true |
DIFF00000002019 | general_code_change | Java | sessions_750.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002020 | orm_schema_change | Ruby | shipments_979.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :users, :status | NONE | true |
DIFF00000002021 | obfuscated_destructive | SQL | subscriptions_48.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from events; | DELETE_UNQUALIFIED | true |
DIFF00000002022 | orm_schema_change | Python | logs_353.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='is_active') | NONE | true |
DIFF00000002023 | raw_sql_safe | SQL | comments_372.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO subscriptions (updated_at, score) VALUES (%s, %s); | NONE | false |
DIFF00000002024 | raw_sql_safe | SQL | comments_899.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE tickets SET category = %s WHERE quantity = %s; | NONE | false |
DIFF00000002025 | general_code_change | Ruby | products_198.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000002026 | obfuscated_destructive | SQL | events_657.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETe FRom rEFUNds; | DELETE_UNQUALIFIED | true |
DIFF00000002027 | general_code_change | Python | customers_798.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000002028 | raw_sql_destructive | SQL | comments_561.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | true |
DIFF00000002029 | mentioned_in_comment | Python | invoices_624.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE reviews RENAME COLUMN role TO state; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000002030 | raw_sql_safe | SQL | users_241.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE comments SET price = %s WHERE score = %s; | NONE | false |
DIFF00000002031 | mentioned_in_comment | Python | employees_21.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE sessions SET category = CONCAT(category, created_at); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000002032 | mentioned_in_comment | Python | events_908.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM notifications;") | DELETE_UNQUALIFIED | false |
DIFF00000002033 | general_code_change | TypeScript | comments_164.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 |
DIFF00000002034 | mentioned_in_comment | Python | invoices_279.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM refunds;") | DELETE_UNQUALIFIED | false |
DIFF00000002035 | orm_schema_change | TypeScript | employees_220.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Orders { // removed field: email } | NONE | true |
DIFF00000002036 | test_suite_cleanup | SQL | mysql-test/suite/accounts_934.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE tickets SET quantity = CONCAT(quantity, user_id); | UPDATE_CONCAT | false |
DIFF00000002037 | raw_sql_safe | SQL | refunds_676.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE order_id = 'active'; | NONE | false |
DIFF00000002038 | general_code_change | Python | shipments_842.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000002039 | mentioned_in_comment | Python | accounts_938.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE employees RENAME COLUMN order_id TO state; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000002040 | general_code_change | Ruby | subscriptions_209.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000002041 | raw_sql_destructive | SQL | products_962.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN amount TO full_name; | ALTER_RENAME | true |
DIFF00000002042 | orm_schema_change | TypeScript | users_219.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Employees { // removed field: role } | NONE | true |
DIFF00000002043 | general_code_change | JavaScript | tickets_808.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002044 | general_code_change | JavaScript | products_561.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 |
DIFF00000002045 | raw_sql_safe | SQL | refunds_991.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000002046 | raw_sql_destructive | SQL | logs_384.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN user_id TO amount_cents; | ALTER_RENAME | true |
DIFF00000002047 | raw_sql_destructive | SQL | logs_596.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | true |
DIFF00000002048 | mentioned_in_comment | Python | invoices_155.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM customers;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000002049 | raw_sql_safe | SQL | orders_41.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_score ON refunds (score); | NONE | false |
DIFF00000002050 | general_code_change | Ruby | payments_317.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000002051 | raw_sql_destructive | SQL | customers_39.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | true |
DIFF00000002052 | orm_schema_change | Ruby | accounts_941.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :quantity | NONE | true |
DIFF00000002053 | general_code_change | Java | products_795.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002054 | mentioned_in_comment | Python | tickets_641.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE employees DROP COLUMN email;") | DROP_COLUMN | false |
DIFF00000002055 | raw_sql_safe | SQL | shipments_740.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM orders WHERE description = 'active'; | NONE | false |
DIFF00000002056 | obfuscated_destructive | SQL | inventory_670.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN quantity; | DROP_COLUMN | true |
DIFF00000002057 | general_code_change | Python | payments_3.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000002058 | general_code_change | TypeScript | reviews_940.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 |
DIFF00000002059 | raw_sql_destructive | SQL | logs_945.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | true |
DIFF00000002060 | general_code_change | Java | refunds_555.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002061 | general_code_change | Go | products_773.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000002062 | orm_schema_change | Python | events_653.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='tickets', name='address') | NONE | true |
DIFF00000002063 | raw_sql_destructive | SQL | logs_708.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE shipments SET amount = CONCAT(amount, quantity); | UPDATE_CONCAT | true |
DIFF00000002064 | general_code_change | Python | customers_394.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000002065 | test_suite_cleanup | SQL | mysql-test/suite/users_891.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | false |
DIFF00000002066 | orm_schema_change | Ruby | accounts_364.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :logs, :balance | NONE | true |
DIFF00000002067 | general_code_change | Ruby | products_12.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000002068 | general_code_change | Python | subscriptions_237.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000002069 | obfuscated_destructive | SQL | reviews_615.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE transactions SET description = CONCAT(description, phone); | UPDATE_CONCAT | true |
DIFF00000002070 | general_code_change | Java | reviews_660.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002071 | mentioned_in_comment | Python | transactions_767.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE employees SET status = CONCAT(status, address);") | UPDATE_CONCAT | false |
DIFF00000002072 | raw_sql_safe | SQL | inventory_224.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM notifications WHERE priority = 'active'; | NONE | false |
DIFF00000002073 | test_suite_cleanup | SQL | mysql-test/suite/inventory_602.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN quantity; | DROP_COLUMN | false |
DIFF00000002074 | general_code_change | Python | reviews_388.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000002075 | obfuscated_destructive | SQL | transactions_85.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE sessions SET phone = CONCAT(phone, balance); | UPDATE_CONCAT | true |
DIFF00000002076 | test_suite_cleanup | SQL | mysql-test/suite/notifications_259.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE tickets DROP COLUMN priority; | DROP_COLUMN | false |
DIFF00000002077 | orm_schema_change | TypeScript | invoices_115.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Products { // removed field: phone } | NONE | true |
DIFF00000002078 | mentioned_in_comment | Python | notifications_956.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM notifications; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000002079 | general_code_change | JavaScript | products_271.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 |
DIFF00000002080 | mentioned_in_comment | Python | employees_493.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE sessions; -- now deprecated""" | DROP_TABLE | false |
DIFF00000002081 | orm_schema_change | JavaScript | sessions_146.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('accounts', 'metadata') | NONE | true |
DIFF00000002082 | general_code_change | Go | reviews_795.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000002083 | raw_sql_safe | SQL | transactions_337.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_priority ON refunds (priority); | NONE | false |
DIFF00000002084 | mentioned_in_comment | Python | tickets_976.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE notifications RENAME COLUMN balance TO user_role;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000002085 | orm_schema_change | Ruby | products_197.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :transactions, :status | NONE | true |
DIFF00000002086 | raw_sql_destructive | SQL | users_277.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN amount TO user_role; | ALTER_RENAME | true |
DIFF00000002087 | general_code_change | Python | shipments_538.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000002088 | test_suite_cleanup | SQL | tests/events_976.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE orders SET quantity = CONCAT(quantity, price); | UPDATE_CONCAT | false |
DIFF00000002089 | raw_sql_safe | SQL | tickets_495.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_description ON refunds (phone); | NONE | false |
DIFF00000002090 | raw_sql_destructive | SQL | inventory_364.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | true |
DIFF00000002091 | raw_sql_destructive | SQL | transactions_919.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE employees; | DROP_TABLE | true |
DIFF00000002092 | obfuscated_destructive | SQL | refunds_145.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN is_active TO state; | ALTER_RENAME | true |
DIFF00000002093 | general_code_change | JavaScript | products_689.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 |
DIFF00000002094 | raw_sql_safe | SQL | customers_158.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE reviews SET priority = %s WHERE created_at = %s; | NONE | false |
DIFF00000002095 | raw_sql_destructive | SQL | transactions_62.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00000002096 | raw_sql_destructive | SQL | accounts_330.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM orders; | DELETE_UNQUALIFIED | true |
DIFF00000002097 | raw_sql_destructive | SQL | users_506.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE customers; | TRUNCATE | true |
DIFF00000002098 | raw_sql_safe | SQL | users_279.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE comments ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000002099 | raw_sql_destructive | SQL | transactions_910.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.