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 |
|---|---|---|---|---|---|---|---|
DIFF00099995500 | raw_sql_safe | SQL | subscriptions_858.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE name = 'active'; | NONE | false |
DIFF00099995501 | general_code_change | Python | customers_967.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099995502 | test_suite_cleanup | SQL | tests/tickets_242.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE accounts SET is_active = CONCAT(is_active, role); | UPDATE_CONCAT | false |
DIFF00099995503 | general_code_change | TypeScript | inventory_759.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 |
DIFF00099995504 | general_code_change | Python | reviews_561.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099995505 | mentioned_in_comment | Python | sessions_991.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE shipments DROP COLUMN name;") | DROP_COLUMN | false |
DIFF00099995506 | obfuscated_destructive | SQL | invoices_89.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
products; | DROP_TABLE | true |
DIFF00099995507 | mentioned_in_comment | Python | reviews_535.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE sessions SET name = CONCAT(name, created_at);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099995508 | obfuscated_destructive | SQL | sessions_99.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN amount TO state; | ALTER_RENAME | true |
DIFF00099995509 | raw_sql_safe | SQL | payments_51.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM orders WHERE priority = 'active'; | NONE | false |
DIFF00099995510 | mentioned_in_comment | Python | logs_111.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE events DROP COLUMN amount;") | DROP_COLUMN | false |
DIFF00099995511 | raw_sql_destructive | SQL | subscriptions_609.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE transactions; | TRUNCATE | true |
DIFF00099995512 | general_code_change | Python | refunds_136.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099995513 | general_code_change | Ruby | employees_764.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995514 | obfuscated_destructive | SQL | accounts_371.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table comments rename column category to amount_cents; | ALTER_RENAME | true |
DIFF00099995515 | raw_sql_destructive | SQL | payments_62.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00099995516 | general_code_change | TypeScript | customers_463.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 |
DIFF00099995517 | test_suite_cleanup | SQL | spec/notifications_212.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | false |
DIFF00099995518 | raw_sql_safe | SQL | tickets_245.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099995519 | orm_schema_change | Ruby | notifications_905.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :refunds, :score | NONE | true |
DIFF00099995520 | general_code_change | Python | employees_305.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099995521 | raw_sql_destructive | SQL | comments_916.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE events SET status = CONCAT(status, balance); | UPDATE_CONCAT | true |
DIFF00099995522 | mentioned_in_comment | Python | logs_698.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE events; -- now deprecated""" | TRUNCATE | false |
DIFF00099995523 | obfuscated_destructive | SQL | refunds_735.sql | schema cleanup | @@ -1,3 +1,3 @@
+DeLETE FrOm EMPLOyeES; | DELETE_UNQUALIFIED | true |
DIFF00099995524 | raw_sql_destructive | SQL | tickets_231.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE transactions; | TRUNCATE | true |
DIFF00099995525 | general_code_change | TypeScript | accounts_342.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 |
DIFF00099995526 | general_code_change | Java | employees_727.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099995527 | raw_sql_safe | SQL | payments_26.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM transactions WHERE role = 'active'; | NONE | false |
DIFF00099995528 | raw_sql_safe | SQL | accounts_803.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE logs SET updated_at = %s WHERE metadata = %s; | NONE | false |
DIFF00099995529 | mentioned_in_comment | Python | refunds_897.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM subscriptions;") | DELETE_UNQUALIFIED | false |
DIFF00099995530 | raw_sql_destructive | SQL | inventory_946.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | true |
DIFF00099995531 | raw_sql_destructive | SQL | shipments_834.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN order_id TO user_role; | ALTER_RENAME | true |
DIFF00099995532 | general_code_change | Ruby | tickets_374.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995533 | test_suite_cleanup | SQL | tests/transactions_446.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE refunds SET amount = CONCAT(amount, priority); | UPDATE_CONCAT | false |
DIFF00099995534 | raw_sql_destructive | SQL | events_260.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM reviews; | DELETE_UNQUALIFIED | true |
DIFF00099995535 | general_code_change | JavaScript | payments_241.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 |
DIFF00099995536 | general_code_change | TypeScript | subscriptions_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 |
DIFF00099995537 | general_code_change | JavaScript | transactions_2.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 |
DIFF00099995538 | mentioned_in_comment | Python | logs_867.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE employees;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099995539 | obfuscated_destructive | SQL | payments_408.sql | schema cleanup | @@ -1,3 +1,3 @@
+dROP TaBLE TRaNsactiOnS; | DROP_TABLE | true |
DIFF00099995540 | test_suite_cleanup | SQL | mysql-test/suite/users_811.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | false |
DIFF00099995541 | raw_sql_safe | SQL | reviews_881.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_role ON customers (metadata); | NONE | false |
DIFF00099995542 | obfuscated_destructive | SQL | users_903.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
tickets; | DROP_TABLE | true |
DIFF00099995543 | obfuscated_destructive | SQL | logs_112.sql | schema cleanup | @@ -1,3 +1,3 @@
+Alter tABLe RefUNDs drOP COLuMN AmOunT; | DROP_COLUMN | true |
DIFF00099995544 | obfuscated_destructive | SQL | refunds_112.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
refunds; | DELETE_UNQUALIFIED | true |
DIFF00099995545 | orm_schema_change | TypeScript | events_159.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Employees { // removed field: role } | NONE | true |
DIFF00099995546 | test_suite_cleanup | SQL | tests/inventory_744.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET address = CONCAT(address, balance); | UPDATE_CONCAT | false |
DIFF00099995547 | general_code_change | Go | users_749.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099995548 | orm_schema_change | TypeScript | users_46.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Notifications { // removed field: balance } | NONE | true |
DIFF00099995549 | raw_sql_safe | SQL | shipments_446.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE reviews SET is_active = %s WHERE order_id = %s; | NONE | false |
DIFF00099995550 | raw_sql_safe | SQL | employees_261.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM users WHERE quantity = 'active'; | NONE | false |
DIFF00099995551 | general_code_change | TypeScript | payments_67.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 |
DIFF00099995552 | obfuscated_destructive | SQL | transactions_261.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table tickets; | TRUNCATE | true |
DIFF00099995553 | raw_sql_safe | SQL | tickets_378.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE sessions ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099995554 | general_code_change | JavaScript | comments_780.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099995555 | general_code_change | JavaScript | comments_761.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099995556 | general_code_change | JavaScript | employees_117.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099995557 | obfuscated_destructive | SQL | refunds_519.sql | schema cleanup | @@ -1,3 +1,3 @@
+DRop tABLe TIckeTs; | DROP_TABLE | true |
DIFF00099995558 | general_code_change | Python | inventory_683.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099995559 | general_code_change | TypeScript | sessions_601.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 |
DIFF00099995560 | mentioned_in_comment | Python | orders_18.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE inventory RENAME COLUMN description TO contact_email;") | ALTER_RENAME | false |
DIFF00099995561 | orm_schema_change | Python | shipments_334.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='users', name='order_id') | NONE | true |
DIFF00099995562 | orm_schema_change | TypeScript | events_407.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Customers { // removed field: category } | NONE | true |
DIFF00099995563 | raw_sql_safe | SQL | products_61.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE comments ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099995564 | raw_sql_destructive | SQL | employees_659.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN quantity TO state; | ALTER_RENAME | true |
DIFF00099995565 | orm_schema_change | JavaScript | notifications_339.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('sessions', table => table.dropColumn('phone')) | NONE | true |
DIFF00099995566 | test_suite_cleanup | SQL | tests/orders_271.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE users RENAME COLUMN status TO state; | ALTER_RENAME | false |
DIFF00099995567 | obfuscated_destructive | SQL | products_926.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPdAte COMmEnTs sET eMail = ConCaT(EMaiL, pRIOrity); | UPDATE_CONCAT | true |
DIFF00099995568 | raw_sql_destructive | SQL | payments_878.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN status; | DROP_COLUMN | true |
DIFF00099995569 | test_suite_cleanup | SQL | spec/customers_245.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN price TO state; | ALTER_RENAME | false |
DIFF00099995570 | raw_sql_destructive | SQL | shipments_702.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN description TO amount_cents; | ALTER_RENAME | true |
DIFF00099995571 | raw_sql_safe | SQL | shipments_295.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET created_at = %s WHERE price = %s; | NONE | false |
DIFF00099995572 | test_suite_cleanup | SQL | test/users_446.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE refunds SET is_active = CONCAT(is_active, order_id); | UPDATE_CONCAT | false |
DIFF00099995573 | raw_sql_safe | SQL | comments_81.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE notifications ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099995574 | raw_sql_destructive | SQL | reviews_747.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN created_at TO contact_email; | ALTER_RENAME | true |
DIFF00099995575 | test_suite_cleanup | SQL | tests/users_677.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | false |
DIFF00099995576 | general_code_change | Python | transactions_581.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099995577 | raw_sql_destructive | SQL | customers_672.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN user_id; | DROP_COLUMN | true |
DIFF00099995578 | general_code_change | Go | events_692.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099995579 | raw_sql_safe | SQL | payments_334.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE invoices ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099995580 | mentioned_in_comment | Python | employees_318.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE reviews SET email = CONCAT(email, score);") | UPDATE_CONCAT | false |
DIFF00099995581 | orm_schema_change | JavaScript | employees_454.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('events', table => table.dropColumn('is_active')) | NONE | true |
DIFF00099995582 | raw_sql_safe | SQL | subscriptions_776.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO transactions (balance, quantity) VALUES (%s, %s); | NONE | false |
DIFF00099995583 | general_code_change | TypeScript | logs_802.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 |
DIFF00099995584 | general_code_change | JavaScript | orders_260.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099995585 | mentioned_in_comment | Python | logs_792.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM orders;") | DELETE_UNQUALIFIED | false |
DIFF00099995586 | general_code_change | JavaScript | inventory_90.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 |
DIFF00099995587 | general_code_change | Python | logs_652.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099995588 | test_suite_cleanup | SQL | mysql-test/suite/refunds_622.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | false |
DIFF00099995589 | test_suite_cleanup | SQL | spec/tickets_897.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE sessions SET name = CONCAT(name, is_active); | UPDATE_CONCAT | false |
DIFF00099995590 | orm_schema_change | Ruby | products_173.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :subscriptions, :score | NONE | true |
DIFF00099995591 | raw_sql_safe | SQL | tickets_229.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_inventory_updated_at ON inventory (name); | NONE | false |
DIFF00099995592 | general_code_change | Python | products_426.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099995593 | raw_sql_destructive | SQL | tickets_150.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00099995594 | raw_sql_safe | SQL | sessions_572.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO reviews (price, address) VALUES (%s, %s); | NONE | false |
DIFF00099995595 | obfuscated_destructive | SQL | reviews_786.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FrOM comMENtS; | DELETE_UNQUALIFIED | true |
DIFF00099995596 | mentioned_in_comment | Python | accounts_730.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE shipments; -- now deprecated""" | TRUNCATE | false |
DIFF00099995597 | raw_sql_safe | SQL | inventory_596.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE sessions ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099995598 | raw_sql_safe | SQL | payments_485.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_employees_user_id ON employees (order_id); | NONE | false |
DIFF00099995599 | general_code_change | Ruby | logs_394.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.