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 |
|---|---|---|---|---|---|---|---|
DIFF00000002300 | general_code_change | Java | products_501.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002301 | orm_schema_change | Python | reviews_968.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='transactions', name='updated_at') | NONE | true |
DIFF00000002302 | general_code_change | JavaScript | logs_933.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002303 | raw_sql_safe | SQL | customers_648.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_comments_order_id ON comments (user_id); | NONE | false |
DIFF00000002304 | raw_sql_destructive | SQL | subscriptions_559.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN created_at TO contact_email; | ALTER_RENAME | true |
DIFF00000002305 | obfuscated_destructive | SQL | events_902.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE comments SET metadata = CONCAT(metadata, price); | UPDATE_CONCAT | true |
DIFF00000002306 | mentioned_in_comment | Python | notifications_986.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE subscriptions DROP COLUMN is_active;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000002307 | general_code_change | Python | logs_989.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000002308 | obfuscated_destructive | SQL | customers_593.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | true |
DIFF00000002309 | raw_sql_safe | SQL | refunds_463.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO tickets (balance, amount) VALUES (%s, %s); | NONE | false |
DIFF00000002310 | raw_sql_destructive | SQL | customers_61.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00000002311 | obfuscated_destructive | SQL | employees_241.sql | schema cleanup | @@ -1,3 +1,3 @@
+UpdatE AccOUnts SEt UPdaTED_At = cOncat(UpdAtEd_At, iS_ACTIvE); | UPDATE_CONCAT | true |
DIFF00000002312 | test_suite_cleanup | SQL | tests/sessions_243.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | false |
DIFF00000002313 | raw_sql_safe | SQL | reviews_565.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_logs_role ON logs (is_active); | NONE | false |
DIFF00000002314 | test_suite_cleanup | SQL | tests/invoices_617.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN address; | DROP_COLUMN | false |
DIFF00000002315 | raw_sql_safe | SQL | tickets_375.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (user_id, user_id) VALUES (%s, %s); | NONE | false |
DIFF00000002316 | orm_schema_change | Python | users_27.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='name') | NONE | true |
DIFF00000002317 | general_code_change | JavaScript | accounts_161.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002318 | general_code_change | Java | users_814.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002319 | general_code_change | Python | users_95.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000002320 | obfuscated_destructive | SQL | accounts_61.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table logs; | TRUNCATE | true |
DIFF00000002321 | test_suite_cleanup | SQL | tests/refunds_429.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN metadata; | DROP_COLUMN | false |
DIFF00000002322 | orm_schema_change | TypeScript | events_828.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Tickets { // removed field: email } | NONE | true |
DIFF00000002323 | general_code_change | TypeScript | subscriptions_399.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 |
DIFF00000002324 | test_suite_cleanup | SQL | tests/refunds_332.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN metadata; | DROP_COLUMN | false |
DIFF00000002325 | general_code_change | Java | customers_982.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002326 | test_suite_cleanup | SQL | tests/tickets_863.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | false |
DIFF00000002327 | raw_sql_safe | SQL | events_461.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO inventory (priority, description) VALUES (%s, %s); | NONE | false |
DIFF00000002328 | general_code_change | TypeScript | sessions_113.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 |
DIFF00000002329 | general_code_change | JavaScript | orders_961.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002330 | mentioned_in_comment | Python | users_272.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM sessions;") | DELETE_UNQUALIFIED | false |
DIFF00000002331 | test_suite_cleanup | SQL | test/employees_906.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN is_active; | DROP_COLUMN | false |
DIFF00000002332 | obfuscated_destructive | SQL | inventory_28.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN status; | DROP_COLUMN | true |
DIFF00000002333 | general_code_change | Python | logs_554.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000002334 | orm_schema_change | JavaScript | payments_407.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('transactions', table => table.dropColumn('category')) | NONE | true |
DIFF00000002335 | raw_sql_safe | SQL | inventory_49.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE inventory SET status = %s WHERE priority = %s; | NONE | false |
DIFF00000002336 | general_code_change | Java | events_632.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002337 | general_code_change | Go | comments_517.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000002338 | obfuscated_destructive | SQL | shipments_447.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table customers; | DROP_TABLE | true |
DIFF00000002339 | orm_schema_change | TypeScript | tickets_686.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Comments { // removed field: role } | NONE | true |
DIFF00000002340 | general_code_change | JavaScript | payments_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 |
DIFF00000002341 | mentioned_in_comment | Python | logs_848.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE inventory SET user_id = CONCAT(user_id, address);") | UPDATE_CONCAT | false |
DIFF00000002342 | obfuscated_destructive | SQL | payments_399.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00000002343 | raw_sql_safe | SQL | inventory_80.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE notifications SET category = %s WHERE address = %s; | NONE | false |
DIFF00000002344 | general_code_change | JavaScript | accounts_787.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002345 | raw_sql_destructive | SQL | refunds_606.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN metadata; | DROP_COLUMN | true |
DIFF00000002346 | general_code_change | TypeScript | comments_501.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 |
DIFF00000002347 | test_suite_cleanup | SQL | test/transactions_388.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE users RENAME COLUMN name TO user_role; | ALTER_RENAME | false |
DIFF00000002348 | raw_sql_destructive | SQL | payments_660.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | true |
DIFF00000002349 | general_code_change | Python | refunds_433.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000002350 | orm_schema_change | JavaScript | accounts_145.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('employees', table => table.dropColumn('name')) | NONE | true |
DIFF00000002351 | general_code_change | Python | subscriptions_84.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000002352 | raw_sql_safe | SQL | users_374.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (score, phone) VALUES (%s, %s); | NONE | false |
DIFF00000002353 | general_code_change | Java | tickets_402.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002354 | general_code_change | JavaScript | accounts_142.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002355 | raw_sql_safe | SQL | refunds_324.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE events SET score = %s WHERE description = %s; | NONE | false |
DIFF00000002356 | orm_schema_change | JavaScript | accounts_655.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('transactions', 'created_at') | NONE | true |
DIFF00000002357 | raw_sql_destructive | SQL | shipments_414.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory DROP COLUMN updated_at; | DROP_COLUMN | true |
DIFF00000002358 | raw_sql_safe | SQL | shipments_752.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM products WHERE category = 'active'; | NONE | false |
DIFF00000002359 | general_code_change | JavaScript | reviews_181.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002360 | general_code_change | Go | notifications_663.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000002361 | raw_sql_destructive | SQL | customers_34.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE accounts; | TRUNCATE | true |
DIFF00000002362 | raw_sql_destructive | SQL | refunds_203.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM notifications; | DELETE_UNQUALIFIED | true |
DIFF00000002363 | raw_sql_safe | SQL | invoices_189.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM transactions WHERE created_at = 'active'; | NONE | false |
DIFF00000002364 | general_code_change | JavaScript | invoices_413.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 |
DIFF00000002365 | orm_schema_change | TypeScript | payments_521.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Subscriptions { // removed field: priority } | NONE | true |
DIFF00000002366 | orm_schema_change | Ruby | subscriptions_944.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :transactions, :category | NONE | true |
DIFF00000002367 | raw_sql_destructive | SQL | transactions_10.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | true |
DIFF00000002368 | general_code_change | JavaScript | notifications_471.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002369 | general_code_change | Go | payments_111.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000002370 | raw_sql_destructive | SQL | notifications_760.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | true |
DIFF00000002371 | general_code_change | JavaScript | comments_780.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 |
DIFF00000002372 | mentioned_in_comment | Python | employees_360.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE shipments RENAME COLUMN address TO contact_email; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000002373 | general_code_change | Ruby | subscriptions_308.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000002374 | raw_sql_destructive | SQL | employees_838.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users RENAME COLUMN is_active TO amount_cents; | ALTER_RENAME | true |
DIFF00000002375 | orm_schema_change | JavaScript | products_463.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('orders', table => table.dropColumn('role')) | NONE | true |
DIFF00000002376 | test_suite_cleanup | SQL | test/comments_821.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | false |
DIFF00000002377 | test_suite_cleanup | SQL | mysql-test/suite/customers_4.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE tickets SET created_at = CONCAT(created_at, order_id); | UPDATE_CONCAT | false |
DIFF00000002378 | raw_sql_destructive | SQL | payments_375.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users RENAME COLUMN phone TO state; | ALTER_RENAME | true |
DIFF00000002379 | general_code_change | TypeScript | shipments_243.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 |
DIFF00000002380 | obfuscated_destructive | SQL | shipments_520.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | true |
DIFF00000002381 | orm_schema_change | Ruby | invoices_847.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :payments, :category | NONE | true |
DIFF00000002382 | general_code_change | JavaScript | inventory_802.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002383 | general_code_change | JavaScript | comments_883.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002384 | raw_sql_safe | SQL | payments_811.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_user_id ON transactions (user_id); | NONE | false |
DIFF00000002385 | raw_sql_destructive | SQL | reviews_987.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET description = CONCAT(description, status); | UPDATE_CONCAT | true |
DIFF00000002386 | test_suite_cleanup | SQL | tests/notifications_65.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN user_id; | DROP_COLUMN | false |
DIFF00000002387 | raw_sql_safe | SQL | orders_831.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE employees SET phone = %s WHERE priority = %s; | NONE | false |
DIFF00000002388 | general_code_change | Python | reviews_943.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000002389 | raw_sql_destructive | SQL | transactions_705.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE orders; | TRUNCATE | true |
DIFF00000002390 | orm_schema_change | TypeScript | inventory_997.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: status } | NONE | true |
DIFF00000002391 | raw_sql_destructive | SQL | notifications_4.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM reviews; | DELETE_UNQUALIFIED | true |
DIFF00000002392 | orm_schema_change | TypeScript | comments_946.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: score } | NONE | true |
DIFF00000002393 | orm_schema_change | Python | users_7.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='logs', name='score') | NONE | true |
DIFF00000002394 | general_code_change | Python | subscriptions_77.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000002395 | raw_sql_safe | SQL | shipments_448.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO reviews (score, order_id) VALUES (%s, %s); | NONE | false |
DIFF00000002396 | general_code_change | Java | customers_686.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002397 | general_code_change | JavaScript | shipments_685.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 |
DIFF00000002398 | test_suite_cleanup | SQL | test/tickets_573.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN amount TO state; | ALTER_RENAME | false |
DIFF00000002399 | general_code_change | JavaScript | logs_544.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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.