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 |
|---|---|---|---|---|---|---|---|
DIFF00000005500 | general_code_change | Go | employees_611.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000005501 | orm_schema_change | Ruby | logs_219.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :refunds, :priority | NONE | true |
DIFF00000005502 | orm_schema_change | TypeScript | comments_134.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Subscriptions { // removed field: is_active } | NONE | true |
DIFF00000005503 | general_code_change | Python | tickets_789.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000005504 | general_code_change | JavaScript | sessions_755.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005505 | mentioned_in_comment | Python | orders_679.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM products;") | DELETE_UNQUALIFIED | false |
DIFF00000005506 | raw_sql_safe | SQL | inventory_773.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_order_id ON notifications (created_at); | NONE | false |
DIFF00000005507 | raw_sql_safe | SQL | customers_26.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM employees WHERE name = 'active'; | NONE | false |
DIFF00000005508 | general_code_change | Go | products_916.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000005509 | obfuscated_destructive | SQL | events_642.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE transactions; | TRUNCATE | true |
DIFF00000005510 | general_code_change | Go | payments_995.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000005511 | general_code_change | Python | tickets_51.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000005512 | raw_sql_destructive | SQL | employees_25.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE events SET status = CONCAT(status, description); | UPDATE_CONCAT | true |
DIFF00000005513 | mentioned_in_comment | Python | payments_347.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM tickets;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000005514 | test_suite_cleanup | SQL | spec/tickets_919.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN name; | DROP_COLUMN | false |
DIFF00000005515 | orm_schema_change | JavaScript | notifications_687.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00000005516 | test_suite_cleanup | SQL | mysql-test/suite/orders_628.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | false |
DIFF00000005517 | test_suite_cleanup | SQL | tests/tickets_405.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | false |
DIFF00000005518 | general_code_change | JavaScript | inventory_264.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005519 | raw_sql_destructive | SQL | notifications_518.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE notifications SET order_id = CONCAT(order_id, phone); | UPDATE_CONCAT | true |
DIFF00000005520 | orm_schema_change | TypeScript | users_360.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: quantity } | NONE | true |
DIFF00000005521 | mentioned_in_comment | Python | reviews_668.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM inventory;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000005522 | general_code_change | Python | inventory_643.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000005523 | raw_sql_destructive | SQL | logs_280.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00000005524 | general_code_change | JavaScript | orders_131.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005525 | mentioned_in_comment | Python | payments_647.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM notifications;") | DELETE_UNQUALIFIED | false |
DIFF00000005526 | orm_schema_change | Python | events_420.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='order_id') | NONE | true |
DIFF00000005527 | general_code_change | Python | inventory_351.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000005528 | test_suite_cleanup | SQL | test/employees_246.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | false |
DIFF00000005529 | obfuscated_destructive | SQL | comments_802.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALtEr TabLe SessIONS drop CoLumN upDATeD_AT; | DROP_COLUMN | true |
DIFF00000005530 | obfuscated_destructive | SQL | logs_498.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from reviews; | DELETE_UNQUALIFIED | true |
DIFF00000005531 | general_code_change | JavaScript | products_517.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 |
DIFF00000005532 | test_suite_cleanup | SQL | spec/users_898.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN quantity; | DROP_COLUMN | false |
DIFF00000005533 | mentioned_in_comment | Python | invoices_135.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE orders; -- now deprecated""" | TRUNCATE | false |
DIFF00000005534 | obfuscated_destructive | SQL | shipments_70.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
orders
RENAME
COLUMN
address
TO
contact_email; | ALTER_RENAME | true |
DIFF00000005535 | mentioned_in_comment | Python | invoices_949.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE invoices RENAME COLUMN phone TO state;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000005536 | general_code_change | TypeScript | logs_517.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 |
DIFF00000005537 | general_code_change | Go | invoices_690.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000005538 | test_suite_cleanup | SQL | test/reviews_506.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM reviews; | DELETE_UNQUALIFIED | false |
DIFF00000005539 | orm_schema_change | TypeScript | shipments_347.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Shipments { // removed field: price } | NONE | true |
DIFF00000005540 | test_suite_cleanup | SQL | spec/invoices_304.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM refunds; | DELETE_UNQUALIFIED | false |
DIFF00000005541 | test_suite_cleanup | SQL | spec/subscriptions_321.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | false |
DIFF00000005542 | general_code_change | Python | notifications_748.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000005543 | mentioned_in_comment | Python | comments_310.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE shipments;") | TRUNCATE | false |
DIFF00000005544 | mentioned_in_comment | Python | shipments_80.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE reviews; -- now deprecated""" | DROP_TABLE | false |
DIFF00000005545 | general_code_change | Python | events_708.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000005546 | mentioned_in_comment | Python | invoices_772.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM logs; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000005547 | mentioned_in_comment | Python | customers_681.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE events;") | TRUNCATE | false |
DIFF00000005548 | mentioned_in_comment | Python | invoices_401.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE events RENAME COLUMN user_id TO full_name;") | ALTER_RENAME | false |
DIFF00000005549 | raw_sql_safe | SQL | payments_721.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO employees (quantity, email) VALUES (%s, %s); | NONE | false |
DIFF00000005550 | general_code_change | Go | invoices_913.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000005551 | raw_sql_destructive | SQL | products_996.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | true |
DIFF00000005552 | general_code_change | JavaScript | shipments_795.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 |
DIFF00000005553 | raw_sql_safe | SQL | employees_752.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000005554 | orm_schema_change | JavaScript | invoices_141.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('customers', 'updated_at') | NONE | true |
DIFF00000005555 | general_code_change | JavaScript | users_895.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 |
DIFF00000005556 | orm_schema_change | JavaScript | orders_394.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('transactions', table => table.dropColumn('quantity')) | NONE | true |
DIFF00000005557 | mentioned_in_comment | Python | reviews_970.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM notifications; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000005558 | raw_sql_safe | SQL | tickets_704.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE amount = 'active'; | NONE | false |
DIFF00000005559 | obfuscated_destructive | SQL | logs_948.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALtER table shipMeNtS drop COLumn meTaDATA; | DROP_COLUMN | true |
DIFF00000005560 | test_suite_cleanup | SQL | mysql-test/suite/comments_280.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN metadata; | DROP_COLUMN | false |
DIFF00000005561 | general_code_change | Python | shipments_718.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000005562 | orm_schema_change | Ruby | users_727.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :users, :score | NONE | true |
DIFF00000005563 | general_code_change | JavaScript | customers_595.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005564 | general_code_change | JavaScript | orders_608.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 |
DIFF00000005565 | orm_schema_change | JavaScript | logs_696.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('invoices', 'address') | NONE | true |
DIFF00000005566 | general_code_change | JavaScript | users_389.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005567 | orm_schema_change | TypeScript | shipments_729.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Products { // removed field: user_id } | NONE | true |
DIFF00000005568 | obfuscated_destructive | SQL | events_636.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
refunds; | TRUNCATE | true |
DIFF00000005569 | general_code_change | JavaScript | shipments_512.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005570 | general_code_change | Go | notifications_420.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000005571 | raw_sql_safe | SQL | reviews_67.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO notifications (is_active, price) VALUES (%s, %s); | NONE | false |
DIFF00000005572 | general_code_change | Go | refunds_4.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000005573 | orm_schema_change | JavaScript | inventory_946.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'description') | NONE | true |
DIFF00000005574 | raw_sql_destructive | SQL | payments_741.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | true |
DIFF00000005575 | general_code_change | TypeScript | events_712.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 |
DIFF00000005576 | general_code_change | Python | users_34.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000005577 | orm_schema_change | TypeScript | products_88.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Products { // removed field: email } | NONE | true |
DIFF00000005578 | test_suite_cleanup | SQL | test/tickets_241.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | false |
DIFF00000005579 | raw_sql_safe | SQL | logs_991.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (address, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00000005580 | general_code_change | TypeScript | employees_984.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 |
DIFF00000005581 | obfuscated_destructive | SQL | employees_157.sql | schema cleanup | @@ -1,3 +1,3 @@
+Alter TaBlE PrOdUCTS droP CoLUMn nAmE; | DROP_COLUMN | true |
DIFF00000005582 | obfuscated_destructive | SQL | shipments_555.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
transactions; | DELETE_UNQUALIFIED | true |
DIFF00000005583 | general_code_change | Python | payments_50.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000005584 | raw_sql_destructive | SQL | subscriptions_945.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE tickets SET balance = CONCAT(balance, category); | UPDATE_CONCAT | true |
DIFF00000005585 | orm_schema_change | JavaScript | sessions_946.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('customers', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00000005586 | test_suite_cleanup | SQL | spec/inventory_680.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE tickets SET balance = CONCAT(balance, created_at); | UPDATE_CONCAT | false |
DIFF00000005587 | test_suite_cleanup | SQL | tests/accounts_556.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE inventory; | DROP_TABLE | false |
DIFF00000005588 | raw_sql_destructive | SQL | users_159.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | true |
DIFF00000005589 | obfuscated_destructive | SQL | reviews_936.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
shipments
SET
amount
=
CONCAT(amount,
is_active); | UPDATE_CONCAT | true |
DIFF00000005590 | raw_sql_destructive | SQL | invoices_798.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE refunds SET status = CONCAT(status, order_id); | UPDATE_CONCAT | true |
DIFF00000005591 | obfuscated_destructive | SQL | payments_848.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table transactions rename column priority to user_role; | ALTER_RENAME | true |
DIFF00000005592 | raw_sql_safe | SQL | users_145.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO inventory (address, user_id) VALUES (%s, %s); | NONE | false |
DIFF00000005593 | raw_sql_safe | SQL | users_323.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO accounts (phone, order_id) VALUES (%s, %s); | NONE | false |
DIFF00000005594 | orm_schema_change | Ruby | transactions_122.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :inventory, :role | NONE | true |
DIFF00000005595 | general_code_change | JavaScript | comments_967.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 |
DIFF00000005596 | raw_sql_safe | SQL | orders_575.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM transactions WHERE status = 'active'; | NONE | false |
DIFF00000005597 | general_code_change | JavaScript | payments_126.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 |
DIFF00000005598 | general_code_change | Go | events_441.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000005599 | orm_schema_change | JavaScript | comments_527.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('tickets', table => table.dropColumn('priority')) | NONE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.