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 |
|---|---|---|---|---|---|---|---|
DIFF00099996500 | raw_sql_destructive | SQL | invoices_856.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM tickets; | DELETE_UNQUALIFIED | true |
DIFF00099996501 | raw_sql_destructive | SQL | payments_354.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | true |
DIFF00099996502 | general_code_change | Ruby | logs_518.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996503 | general_code_change | JavaScript | customers_49.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 |
DIFF00099996504 | raw_sql_destructive | SQL | orders_14.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE users; | TRUNCATE | true |
DIFF00099996505 | raw_sql_destructive | SQL | transactions_15.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE events; | TRUNCATE | true |
DIFF00099996506 | mentioned_in_comment | Python | accounts_186.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE invoices DROP COLUMN role;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099996507 | raw_sql_safe | SQL | shipments_369.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE notifications SET balance = %s WHERE quantity = %s; | NONE | false |
DIFF00099996508 | orm_schema_change | TypeScript | users_36.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Invoices { // removed field: name } | NONE | true |
DIFF00099996509 | raw_sql_destructive | SQL | sessions_130.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN score; | DROP_COLUMN | true |
DIFF00099996510 | raw_sql_safe | SQL | events_60.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_comments_amount ON comments (created_at); | NONE | false |
DIFF00099996511 | general_code_change | Python | subscriptions_90.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099996512 | raw_sql_safe | SQL | customers_72.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE products SET score = %s WHERE name = %s; | NONE | false |
DIFF00099996513 | raw_sql_destructive | SQL | events_807.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN quantity; | DROP_COLUMN | true |
DIFF00099996514 | raw_sql_safe | SQL | comments_203.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE employees SET metadata = %s WHERE status = %s; | NONE | false |
DIFF00099996515 | general_code_change | Java | inventory_166.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099996516 | test_suite_cleanup | SQL | tests/accounts_64.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | false |
DIFF00099996517 | raw_sql_safe | SQL | users_8.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_logs_status ON logs (updated_at); | NONE | false |
DIFF00099996518 | general_code_change | JavaScript | users_369.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099996519 | orm_schema_change | TypeScript | orders_722.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Products { // removed field: metadata } | NONE | true |
DIFF00099996520 | orm_schema_change | JavaScript | transactions_759.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'created_at') | NONE | true |
DIFF00099996521 | general_code_change | Go | payments_714.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996522 | general_code_change | Python | invoices_517.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099996523 | test_suite_cleanup | SQL | spec/payments_819.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | false |
DIFF00099996524 | mentioned_in_comment | Python | subscriptions_24.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE customers; -- now deprecated""" | DROP_TABLE | false |
DIFF00099996525 | general_code_change | TypeScript | inventory_929.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 |
DIFF00099996526 | general_code_change | Python | accounts_350.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099996527 | raw_sql_destructive | SQL | accounts_407.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | true |
DIFF00099996528 | general_code_change | Java | users_314.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099996529 | test_suite_cleanup | SQL | test/accounts_577.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | false |
DIFF00099996530 | raw_sql_safe | SQL | notifications_352.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM customers WHERE metadata = 'active'; | NONE | false |
DIFF00099996531 | orm_schema_change | JavaScript | comments_789.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('shipments', table => table.dropColumn('description')) | NONE | true |
DIFF00099996532 | orm_schema_change | JavaScript | comments_570.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('score')) | NONE | true |
DIFF00099996533 | general_code_change | Go | products_359.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996534 | general_code_change | Python | sessions_225.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099996535 | raw_sql_safe | SQL | sessions_353.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO invoices (status, metadata) VALUES (%s, %s); | NONE | false |
DIFF00099996536 | general_code_change | Python | notifications_255.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099996537 | mentioned_in_comment | Python | sessions_181.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM users;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00099996538 | general_code_change | TypeScript | orders_516.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 |
DIFF00099996539 | general_code_change | Python | shipments_419.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099996540 | general_code_change | Go | orders_702.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996541 | test_suite_cleanup | SQL | spec/comments_937.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN address; | DROP_COLUMN | false |
DIFF00099996542 | raw_sql_destructive | SQL | employees_975.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00099996543 | orm_schema_change | TypeScript | sessions_640.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Customers { // removed field: created_at } | NONE | true |
DIFF00099996544 | raw_sql_destructive | SQL | invoices_351.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00099996545 | raw_sql_destructive | SQL | transactions_862.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN user_id; | DROP_COLUMN | true |
DIFF00099996546 | test_suite_cleanup | SQL | mysql-test/suite/notifications_946.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | false |
DIFF00099996547 | raw_sql_destructive | SQL | events_220.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN metadata TO full_name; | ALTER_RENAME | true |
DIFF00099996548 | raw_sql_safe | SQL | orders_837.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO employees (category, is_active) VALUES (%s, %s); | NONE | false |
DIFF00099996549 | general_code_change | Ruby | inventory_413.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996550 | orm_schema_change | JavaScript | orders_968.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('tickets', 'metadata') | NONE | true |
DIFF00099996551 | raw_sql_safe | SQL | accounts_122.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE logs SET quantity = %s WHERE score = %s; | NONE | false |
DIFF00099996552 | mentioned_in_comment | Python | users_839.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE users; -- now deprecated""" | TRUNCATE | false |
DIFF00099996553 | raw_sql_destructive | SQL | accounts_45.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | true |
DIFF00099996554 | raw_sql_safe | SQL | users_687.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM orders WHERE created_at = 'active'; | NONE | false |
DIFF00099996555 | general_code_change | Go | orders_92.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996556 | raw_sql_destructive | SQL | shipments_691.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN user_id TO contact_email; | ALTER_RENAME | true |
DIFF00099996557 | orm_schema_change | TypeScript | employees_189.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: balance } | NONE | true |
DIFF00099996558 | orm_schema_change | TypeScript | comments_463.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Invoices { // removed field: is_active } | NONE | true |
DIFF00099996559 | test_suite_cleanup | SQL | mysql-test/suite/comments_784.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN score TO state; | ALTER_RENAME | false |
DIFF00099996560 | orm_schema_change | JavaScript | employees_73.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'amount') | NONE | true |
DIFF00099996561 | orm_schema_change | JavaScript | reviews_288.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('orders', 'priority') | NONE | true |
DIFF00099996562 | general_code_change | Python | products_211.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099996563 | general_code_change | Python | shipments_536.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099996564 | general_code_change | TypeScript | refunds_930.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 |
DIFF00099996565 | test_suite_cleanup | SQL | mysql-test/suite/shipments_836.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN category TO contact_email; | ALTER_RENAME | false |
DIFF00099996566 | mentioned_in_comment | Python | inventory_956.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE invoices RENAME COLUMN quantity TO user_role; -- now deprecated""" | ALTER_RENAME | false |
DIFF00099996567 | mentioned_in_comment | Python | invoices_925.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE accounts SET description = CONCAT(description, amount);") | UPDATE_CONCAT | false |
DIFF00099996568 | raw_sql_destructive | SQL | accounts_722.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | true |
DIFF00099996569 | general_code_change | JavaScript | users_985.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 |
DIFF00099996570 | mentioned_in_comment | Python | accounts_898.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE logs SET description = CONCAT(description, order_id);") | UPDATE_CONCAT | false |
DIFF00099996571 | test_suite_cleanup | SQL | spec/shipments_867.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM reviews; | DELETE_UNQUALIFIED | false |
DIFF00099996572 | obfuscated_destructive | SQL | sessions_67.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
payments
DROP
COLUMN
quantity; | DROP_COLUMN | true |
DIFF00099996573 | orm_schema_change | JavaScript | invoices_24.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'phone') | NONE | true |
DIFF00099996574 | raw_sql_safe | SQL | subscriptions_776.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE description = 'active'; | NONE | false |
DIFF00099996575 | mentioned_in_comment | Python | invoices_757.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE subscriptions SET user_id = CONCAT(user_id, user_id);") | UPDATE_CONCAT | false |
DIFF00099996576 | test_suite_cleanup | SQL | mysql-test/suite/subscriptions_277.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | false |
DIFF00099996577 | mentioned_in_comment | Python | payments_26.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE shipments DROP COLUMN address;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099996578 | general_code_change | JavaScript | customers_3.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099996579 | test_suite_cleanup | SQL | spec/subscriptions_551.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE users SET quantity = CONCAT(quantity, amount); | UPDATE_CONCAT | false |
DIFF00099996580 | test_suite_cleanup | SQL | spec/employees_106.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | false |
DIFF00099996581 | raw_sql_safe | SQL | invoices_723.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE accounts ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099996582 | orm_schema_change | Ruby | orders_598.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :logs, :score | NONE | true |
DIFF00099996583 | raw_sql_safe | SQL | customers_410.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO sessions (priority, description) VALUES (%s, %s); | NONE | false |
DIFF00099996584 | obfuscated_destructive | SQL | products_481.sql | schema cleanup | @@ -1,3 +1,3 @@
+altEr TAble INvoicEs dRop ColuMN EmAil; | DROP_COLUMN | true |
DIFF00099996585 | orm_schema_change | TypeScript | inventory_349.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Customers { // removed field: metadata } | NONE | true |
DIFF00099996586 | raw_sql_safe | SQL | customers_45.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO products (phone, is_active) VALUES (%s, %s); | NONE | false |
DIFF00099996587 | general_code_change | TypeScript | logs_643.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 |
DIFF00099996588 | raw_sql_destructive | SQL | reviews_21.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | true |
DIFF00099996589 | raw_sql_destructive | SQL | notifications_343.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE accounts; | TRUNCATE | true |
DIFF00099996590 | general_code_change | Java | shipments_448.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099996591 | mentioned_in_comment | Python | refunds_693.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE shipments;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099996592 | raw_sql_safe | SQL | logs_338.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE reviews ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099996593 | orm_schema_change | JavaScript | refunds_130.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'address') | NONE | true |
DIFF00099996594 | general_code_change | Go | notifications_704.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996595 | general_code_change | Python | comments_15.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099996596 | general_code_change | Go | accounts_594.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996597 | mentioned_in_comment | Python | accounts_336.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM users;") | DELETE_UNQUALIFIED | false |
DIFF00099996598 | general_code_change | JavaScript | events_426.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 |
DIFF00099996599 | mentioned_in_comment | Python | logs_693.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM employees;") | DELETE_UNQUALIFIED | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.