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 |
|---|---|---|---|---|---|---|---|
DIFF00099997000 | orm_schema_change | Python | customers_94.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='tickets', name='quantity') | NONE | true |
DIFF00099997001 | test_suite_cleanup | SQL | spec/tickets_516.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN email; | DROP_COLUMN | false |
DIFF00099997002 | obfuscated_destructive | SQL | comments_840.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
orders; | DELETE_UNQUALIFIED | true |
DIFF00099997003 | general_code_change | Python | products_265.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997004 | raw_sql_safe | SQL | sessions_72.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE notifications SET email = %s WHERE updated_at = %s; | NONE | false |
DIFF00099997005 | mentioned_in_comment | Python | sessions_938.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE comments;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099997006 | mentioned_in_comment | Python | payments_651.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE shipments; -- now deprecated""" | TRUNCATE | false |
DIFF00099997007 | raw_sql_destructive | SQL | employees_86.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN amount TO full_name; | ALTER_RENAME | true |
DIFF00099997008 | mentioned_in_comment | Python | transactions_359.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE employees; -- now deprecated""" | DROP_TABLE | false |
DIFF00099997009 | general_code_change | Java | products_72.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997010 | raw_sql_safe | SQL | invoices_486.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_shipments_phone ON shipments (price); | NONE | false |
DIFF00099997011 | raw_sql_destructive | SQL | comments_653.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00099997012 | raw_sql_safe | SQL | customers_998.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_sessions_address ON sessions (is_active); | NONE | false |
DIFF00099997013 | raw_sql_safe | SQL | shipments_190.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM refunds WHERE price = 'active'; | NONE | false |
DIFF00099997014 | raw_sql_destructive | SQL | comments_327.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00099997015 | obfuscated_destructive | SQL | products_538.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
logs; | DELETE_UNQUALIFIED | true |
DIFF00099997016 | mentioned_in_comment | Python | products_666.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE inventory; -- now deprecated""" | DROP_TABLE | false |
DIFF00099997017 | obfuscated_destructive | SQL | payments_951.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
comments; | DROP_TABLE | true |
DIFF00099997018 | obfuscated_destructive | SQL | orders_433.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
shipments
RENAME
COLUMN
score
TO
state; | ALTER_RENAME | true |
DIFF00099997019 | mentioned_in_comment | Python | subscriptions_416.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE sessions DROP COLUMN user_id;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099997020 | mentioned_in_comment | Python | logs_543.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM orders;") | DELETE_UNQUALIFIED | false |
DIFF00099997021 | mentioned_in_comment | Python | transactions_504.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE users SET phone = CONCAT(phone, role); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00099997022 | general_code_change | TypeScript | inventory_103.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 |
DIFF00099997023 | obfuscated_destructive | SQL | employees_602.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table tickets rename column address to amount_cents; | ALTER_RENAME | true |
DIFF00099997024 | raw_sql_safe | SQL | accounts_475.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_reviews_email ON reviews (created_at); | NONE | false |
DIFF00099997025 | orm_schema_change | JavaScript | invoices_601.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('description')) | NONE | true |
DIFF00099997026 | general_code_change | Python | payments_132.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997027 | general_code_change | TypeScript | events_313.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 |
DIFF00099997028 | test_suite_cleanup | SQL | spec/customers_934.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | false |
DIFF00099997029 | raw_sql_safe | SQL | customers_608.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE tickets SET role = %s WHERE priority = %s; | NONE | false |
DIFF00099997030 | mentioned_in_comment | Python | transactions_599.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE notifications;") | TRUNCATE | false |
DIFF00099997031 | raw_sql_safe | SQL | logs_964.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO subscriptions (order_id, role) VALUES (%s, %s); | NONE | false |
DIFF00099997032 | obfuscated_destructive | SQL | invoices_663.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
accounts
DROP
COLUMN
balance; | DROP_COLUMN | true |
DIFF00099997033 | obfuscated_destructive | SQL | accounts_954.sql | schema cleanup | @@ -1,3 +1,3 @@
+update sessions set balance = concat(balance, created_at); | UPDATE_CONCAT | true |
DIFF00099997034 | raw_sql_safe | SQL | reviews_134.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_payments_updated_at ON payments (email); | NONE | false |
DIFF00099997035 | raw_sql_destructive | SQL | invoices_924.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00099997036 | raw_sql_destructive | SQL | customers_795.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00099997037 | obfuscated_destructive | SQL | events_475.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE events SET status = CONCAT(status, priority); | UPDATE_CONCAT | true |
DIFF00099997038 | mentioned_in_comment | Python | orders_59.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE shipments;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099997039 | obfuscated_destructive | SQL | transactions_72.sql | schema cleanup | @@ -1,3 +1,3 @@
+AlTEr TaBle COMMEnTs renAme cOLuMN sCORe TO AMOunt_cEnTs; | ALTER_RENAME | true |
DIFF00099997040 | obfuscated_destructive | SQL | logs_854.sql | schema cleanup | @@ -1,3 +1,3 @@
+dEleTE fRom SHiPMentS; | DELETE_UNQUALIFIED | true |
DIFF00099997041 | raw_sql_destructive | SQL | payments_194.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE orders; | TRUNCATE | true |
DIFF00099997042 | general_code_change | Ruby | events_860.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997043 | orm_schema_change | JavaScript | reviews_636.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('payments', 'is_active') | NONE | true |
DIFF00099997044 | general_code_change | JavaScript | employees_162.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997045 | test_suite_cleanup | SQL | tests/tickets_365.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | false |
DIFF00099997046 | obfuscated_destructive | SQL | products_338.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
customers
RENAME
COLUMN
is_active
TO
state; | ALTER_RENAME | true |
DIFF00099997047 | general_code_change | TypeScript | employees_279.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 |
DIFF00099997048 | raw_sql_safe | SQL | products_89.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM shipments WHERE description = 'active'; | NONE | false |
DIFF00099997049 | test_suite_cleanup | SQL | mysql-test/suite/notifications_766.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE inventory SET description = CONCAT(description, metadata); | UPDATE_CONCAT | false |
DIFF00099997050 | orm_schema_change | JavaScript | invoices_996.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('logs', 'category') | NONE | true |
DIFF00099997051 | orm_schema_change | JavaScript | inventory_838.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('invoices', table => table.dropColumn('role')) | NONE | true |
DIFF00099997052 | orm_schema_change | Ruby | refunds_353.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :notifications, :status | NONE | true |
DIFF00099997053 | general_code_change | Python | refunds_819.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997054 | orm_schema_change | JavaScript | events_242.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('subscriptions', 'role') | NONE | true |
DIFF00099997055 | mentioned_in_comment | Python | refunds_855.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE payments SET created_at = CONCAT(created_at, priority);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099997056 | general_code_change | JavaScript | refunds_260.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997057 | general_code_change | Java | invoices_777.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997058 | orm_schema_change | JavaScript | tickets_238.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('orders', table => table.dropColumn('metadata')) | NONE | true |
DIFF00099997059 | mentioned_in_comment | Python | users_130.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE payments RENAME COLUMN order_id TO contact_email;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00099997060 | general_code_change | Python | refunds_550.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997061 | orm_schema_change | Python | users_812.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='transactions', name='user_id') | NONE | true |
DIFF00099997062 | mentioned_in_comment | Python | reviews_805.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM logs;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00099997063 | test_suite_cleanup | SQL | spec/inventory_455.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE transactions; | TRUNCATE | false |
DIFF00099997064 | orm_schema_change | JavaScript | payments_449.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('sessions', 'score') | NONE | true |
DIFF00099997065 | mentioned_in_comment | Python | invoices_966.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE refunds SET created_at = CONCAT(created_at, updated_at);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099997066 | test_suite_cleanup | SQL | test/shipments_62.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN description; | DROP_COLUMN | false |
DIFF00099997067 | test_suite_cleanup | SQL | tests/inventory_175.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions RENAME COLUMN order_id TO user_role; | ALTER_RENAME | false |
DIFF00099997068 | raw_sql_destructive | SQL | logs_501.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews RENAME COLUMN order_id TO state; | ALTER_RENAME | true |
DIFF00099997069 | raw_sql_destructive | SQL | invoices_214.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | true |
DIFF00099997070 | raw_sql_safe | SQL | inventory_732.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (quantity, name) VALUES (%s, %s); | NONE | false |
DIFF00099997071 | orm_schema_change | JavaScript | payments_73.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('employees', table => table.dropColumn('name')) | NONE | true |
DIFF00099997072 | general_code_change | Python | customers_644.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997073 | orm_schema_change | JavaScript | orders_558.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'description') | NONE | true |
DIFF00099997074 | raw_sql_safe | SQL | invoices_956.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM accounts WHERE balance = 'active'; | NONE | false |
DIFF00099997075 | obfuscated_destructive | SQL | invoices_942.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
shipments; | DELETE_UNQUALIFIED | true |
DIFF00099997076 | raw_sql_safe | SQL | products_489.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM refunds WHERE created_at = 'active'; | NONE | false |
DIFF00099997077 | test_suite_cleanup | SQL | spec/customers_972.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN amount TO user_role; | ALTER_RENAME | false |
DIFF00099997078 | raw_sql_safe | SQL | inventory_964.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_amount ON subscriptions (score); | NONE | false |
DIFF00099997079 | raw_sql_destructive | SQL | sessions_566.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions RENAME COLUMN order_id TO state; | ALTER_RENAME | true |
DIFF00099997080 | raw_sql_destructive | SQL | reviews_714.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN category TO user_role; | ALTER_RENAME | true |
DIFF00099997081 | orm_schema_change | JavaScript | subscriptions_480.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('users', table => table.dropColumn('email')) | NONE | true |
DIFF00099997082 | orm_schema_change | Ruby | shipments_260.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :inventory, :score | NONE | true |
DIFF00099997083 | test_suite_cleanup | SQL | tests/transactions_449.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN phone; | DROP_COLUMN | false |
DIFF00099997084 | obfuscated_destructive | SQL | accounts_769.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE sessions SET updated_at = CONCAT(updated_at, balance); | UPDATE_CONCAT | true |
DIFF00099997085 | general_code_change | TypeScript | subscriptions_426.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 |
DIFF00099997086 | raw_sql_destructive | SQL | transactions_388.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN email TO state; | ALTER_RENAME | true |
DIFF00099997087 | obfuscated_destructive | SQL | subscriptions_287.sql | schema cleanup | @@ -1,3 +1,3 @@
+delETE froM invEnTorY; | DELETE_UNQUALIFIED | true |
DIFF00099997088 | mentioned_in_comment | Python | invoices_571.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM comments;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00099997089 | orm_schema_change | Ruby | products_457.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :inventory, :amount | NONE | true |
DIFF00099997090 | orm_schema_change | TypeScript | payments_531.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Sessions { // removed field: is_active } | NONE | true |
DIFF00099997091 | orm_schema_change | Ruby | transactions_862.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :name | NONE | true |
DIFF00099997092 | raw_sql_destructive | SQL | subscriptions_788.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE customers SET metadata = CONCAT(metadata, amount); | UPDATE_CONCAT | true |
DIFF00099997093 | raw_sql_safe | SQL | events_353.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM transactions WHERE amount = 'active'; | NONE | false |
DIFF00099997094 | general_code_change | TypeScript | comments_266.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 |
DIFF00099997095 | general_code_change | Java | logs_184.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997096 | general_code_change | Ruby | accounts_436.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997097 | general_code_change | JavaScript | notifications_944.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997098 | raw_sql_safe | SQL | refunds_184.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_payments_metadata ON payments (balance); | NONE | false |
DIFF00099997099 | test_suite_cleanup | SQL | spec/subscriptions_315.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.