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 |
|---|---|---|---|---|---|---|---|
DIFF00000001000 | mentioned_in_comment | Python | logs_861.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE transactions RENAME COLUMN price TO contact_email; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000001001 | mentioned_in_comment | Python | products_198.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE reviews;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000001002 | raw_sql_destructive | SQL | payments_970.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN category TO state; | ALTER_RENAME | true |
DIFF00000001003 | general_code_change | Python | employees_15.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000001004 | raw_sql_destructive | SQL | accounts_830.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN balance TO full_name; | ALTER_RENAME | true |
DIFF00000001005 | general_code_change | JavaScript | sessions_189.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 |
DIFF00000001006 | obfuscated_destructive | SQL | subscriptions_383.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE sessions SET description = CONCAT(description, metadata); | UPDATE_CONCAT | true |
DIFF00000001007 | obfuscated_destructive | SQL | refunds_462.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
products
RENAME
COLUMN
category
TO
full_name; | ALTER_RENAME | true |
DIFF00000001008 | raw_sql_destructive | SQL | tickets_647.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | true |
DIFF00000001009 | raw_sql_safe | SQL | notifications_450.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE events SET quantity = %s WHERE metadata = %s; | NONE | false |
DIFF00000001010 | raw_sql_safe | SQL | logs_991.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO customers (phone, price) VALUES (%s, %s); | NONE | false |
DIFF00000001011 | raw_sql_safe | SQL | customers_387.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE events SET updated_at = %s WHERE email = %s; | NONE | false |
DIFF00000001012 | orm_schema_change | JavaScript | customers_367.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('inventory', 'amount') | NONE | true |
DIFF00000001013 | raw_sql_destructive | SQL | transactions_94.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00000001014 | raw_sql_destructive | SQL | payments_700.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | true |
DIFF00000001015 | raw_sql_destructive | SQL | notifications_159.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | true |
DIFF00000001016 | orm_schema_change | TypeScript | inventory_929.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Transactions { // removed field: score } | NONE | true |
DIFF00000001017 | test_suite_cleanup | SQL | tests/sessions_504.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | false |
DIFF00000001018 | orm_schema_change | Python | transactions_394.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='sessions', name='quantity') | NONE | true |
DIFF00000001019 | test_suite_cleanup | SQL | mysql-test/suite/invoices_759.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE invoices SET created_at = CONCAT(created_at, quantity); | UPDATE_CONCAT | false |
DIFF00000001020 | general_code_change | JavaScript | comments_347.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000001021 | general_code_change | Java | invoices_909.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001022 | raw_sql_destructive | SQL | sessions_357.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE shipments SET email = CONCAT(email, priority); | UPDATE_CONCAT | true |
DIFF00000001023 | orm_schema_change | JavaScript | products_341.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('users', table => table.dropColumn('category')) | NONE | true |
DIFF00000001024 | raw_sql_destructive | SQL | users_693.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | true |
DIFF00000001025 | mentioned_in_comment | Python | payments_438.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE reviews DROP COLUMN phone;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000001026 | orm_schema_change | TypeScript | transactions_952.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Inventory { // removed field: address } | NONE | true |
DIFF00000001027 | mentioned_in_comment | Python | employees_363.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM orders; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000001028 | mentioned_in_comment | Python | events_22.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE transactions;") | TRUNCATE | false |
DIFF00000001029 | mentioned_in_comment | Python | tickets_798.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM logs;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000001030 | raw_sql_safe | SQL | accounts_493.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_products_address ON products (priority); | NONE | false |
DIFF00000001031 | general_code_change | TypeScript | logs_317.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 |
DIFF00000001032 | raw_sql_destructive | SQL | payments_478.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets DROP COLUMN description; | DROP_COLUMN | true |
DIFF00000001033 | raw_sql_safe | SQL | users_695.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000001034 | test_suite_cleanup | SQL | tests/employees_409.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN metadata; | DROP_COLUMN | false |
DIFF00000001035 | raw_sql_destructive | SQL | invoices_57.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE users SET role = CONCAT(role, is_active); | UPDATE_CONCAT | true |
DIFF00000001036 | test_suite_cleanup | SQL | test/customers_12.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN metadata; | DROP_COLUMN | false |
DIFF00000001037 | raw_sql_safe | SQL | refunds_50.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO comments (order_id, is_active) VALUES (%s, %s); | NONE | false |
DIFF00000001038 | general_code_change | Ruby | invoices_386.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001039 | obfuscated_destructive | SQL | events_904.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
sessions; | DELETE_UNQUALIFIED | true |
DIFF00000001040 | general_code_change | JavaScript | notifications_10.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000001041 | test_suite_cleanup | SQL | mysql-test/suite/users_961.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN created_at; | DROP_COLUMN | false |
DIFF00000001042 | general_code_change | Python | payments_94.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001043 | mentioned_in_comment | Python | shipments_403.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE inventory;") | TRUNCATE | false |
DIFF00000001044 | raw_sql_safe | SQL | transactions_876.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (amount, metadata) VALUES (%s, %s); | NONE | false |
DIFF00000001045 | orm_schema_change | Ruby | sessions_786.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :logs, :category | NONE | true |
DIFF00000001046 | general_code_change | Go | accounts_244.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000001047 | general_code_change | Java | employees_793.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001048 | obfuscated_destructive | SQL | transactions_413.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table payments; | DROP_TABLE | true |
DIFF00000001049 | orm_schema_change | JavaScript | invoices_648.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('employees', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00000001050 | test_suite_cleanup | SQL | mysql-test/suite/notifications_834.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN created_at; | DROP_COLUMN | false |
DIFF00000001051 | general_code_change | Python | invoices_647.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001052 | general_code_change | JavaScript | events_845.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 |
DIFF00000001053 | obfuscated_destructive | SQL | accounts_86.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncaTe table PrOduCTS; | TRUNCATE | true |
DIFF00000001054 | obfuscated_destructive | SQL | invoices_374.sql | schema cleanup | @@ -1,3 +1,3 @@
+DeLete from ORderS; | DELETE_UNQUALIFIED | true |
DIFF00000001055 | general_code_change | Ruby | payments_394.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001056 | orm_schema_change | JavaScript | shipments_596.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('payments', 'created_at') | NONE | true |
DIFF00000001057 | orm_schema_change | Python | payments_443.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='reviews', name='address') | NONE | true |
DIFF00000001058 | obfuscated_destructive | SQL | employees_117.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from shipments; | DELETE_UNQUALIFIED | true |
DIFF00000001059 | general_code_change | Ruby | transactions_708.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001060 | general_code_change | Ruby | notifications_254.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001061 | raw_sql_destructive | SQL | events_950.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | true |
DIFF00000001062 | general_code_change | Python | orders_324.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000001063 | raw_sql_safe | SQL | tickets_674.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE users ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000001064 | test_suite_cleanup | SQL | tests/reviews_762.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | false |
DIFF00000001065 | mentioned_in_comment | Python | orders_76.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE employees RENAME COLUMN address TO amount_cents;") | ALTER_RENAME | false |
DIFF00000001066 | raw_sql_safe | SQL | users_315.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_orders_score ON orders (score); | NONE | false |
DIFF00000001067 | general_code_change | Java | invoices_792.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001068 | general_code_change | JavaScript | sessions_235.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000001069 | orm_schema_change | JavaScript | notifications_909.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('transactions', 'amount') | NONE | true |
DIFF00000001070 | test_suite_cleanup | SQL | test/employees_516.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN metadata TO contact_email; | ALTER_RENAME | false |
DIFF00000001071 | orm_schema_change | JavaScript | invoices_12.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('is_active')) | NONE | true |
DIFF00000001072 | general_code_change | Python | tickets_920.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001073 | general_code_change | Ruby | invoices_394.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001074 | mentioned_in_comment | Python | users_442.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM customers; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000001075 | raw_sql_destructive | SQL | employees_733.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | true |
DIFF00000001076 | obfuscated_destructive | SQL | shipments_250.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
users
SET
description
=
CONCAT(description,
name); | UPDATE_CONCAT | true |
DIFF00000001077 | raw_sql_safe | SQL | reviews_795.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM users WHERE balance = 'active'; | NONE | false |
DIFF00000001078 | orm_schema_change | JavaScript | comments_444.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('quantity')) | NONE | true |
DIFF00000001079 | raw_sql_destructive | SQL | events_606.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | true |
DIFF00000001080 | orm_schema_change | TypeScript | shipments_621.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Subscriptions { // removed field: metadata } | NONE | true |
DIFF00000001081 | raw_sql_destructive | SQL | logs_881.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE products SET role = CONCAT(role, metadata); | UPDATE_CONCAT | true |
DIFF00000001082 | general_code_change | Ruby | users_19.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001083 | general_code_change | Python | subscriptions_125.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001084 | mentioned_in_comment | Python | customers_661.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE tickets DROP COLUMN metadata;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000001085 | general_code_change | TypeScript | subscriptions_415.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 |
DIFF00000001086 | general_code_change | JavaScript | orders_641.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 |
DIFF00000001087 | orm_schema_change | Ruby | shipments_700.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :updated_at | NONE | true |
DIFF00000001088 | test_suite_cleanup | SQL | mysql-test/suite/notifications_185.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN order_id TO user_role; | ALTER_RENAME | false |
DIFF00000001089 | mentioned_in_comment | Python | comments_683.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE comments;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000001090 | orm_schema_change | JavaScript | products_550.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('products', 'status') | NONE | true |
DIFF00000001091 | orm_schema_change | JavaScript | products_445.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('orders', 'updated_at') | NONE | true |
DIFF00000001092 | general_code_change | Python | refunds_151.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001093 | orm_schema_change | Python | inventory_66.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='payments', name='updated_at') | NONE | true |
DIFF00000001094 | general_code_change | JavaScript | subscriptions_162.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 |
DIFF00000001095 | orm_schema_change | Ruby | payments_156.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :payments, :updated_at | NONE | true |
DIFF00000001096 | test_suite_cleanup | SQL | tests/logs_830.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE logs SET role = CONCAT(role, user_id); | UPDATE_CONCAT | false |
DIFF00000001097 | mentioned_in_comment | Python | products_943.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE sessions DROP COLUMN email; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000001098 | test_suite_cleanup | SQL | spec/employees_238.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | false |
DIFF00000001099 | obfuscated_destructive | SQL | customers_448.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table notifications rename column category to state; | ALTER_RENAME | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.