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 |
|---|---|---|---|---|---|---|---|
DIFF00099992300 | general_code_change | Go | products_427.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099992301 | orm_schema_change | Python | logs_494.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='employees', name='email') | NONE | true |
DIFF00099992302 | raw_sql_destructive | SQL | payments_668.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | true |
DIFF00099992303 | raw_sql_destructive | SQL | refunds_588.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | true |
DIFF00099992304 | raw_sql_destructive | SQL | invoices_666.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE comments SET user_id = CONCAT(user_id, phone); | UPDATE_CONCAT | true |
DIFF00099992305 | mentioned_in_comment | Python | reviews_651.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE employees;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099992306 | general_code_change | TypeScript | employees_75.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 |
DIFF00099992307 | obfuscated_destructive | SQL | users_489.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE reviews SET metadata = CONCAT(metadata, order_id); | UPDATE_CONCAT | true |
DIFF00099992308 | raw_sql_safe | SQL | refunds_257.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_score ON customers (price); | NONE | false |
DIFF00099992309 | raw_sql_safe | SQL | products_265.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_balance ON subscriptions (description); | NONE | false |
DIFF00099992310 | orm_schema_change | JavaScript | sessions_903.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('events', table => table.dropColumn('priority')) | NONE | true |
DIFF00099992311 | general_code_change | Python | products_367.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099992312 | mentioned_in_comment | Python | transactions_877.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM reviews;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00099992313 | raw_sql_destructive | SQL | products_158.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | true |
DIFF00099992314 | raw_sql_safe | SQL | notifications_769.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE invoices ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099992315 | test_suite_cleanup | SQL | tests/events_810.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN order_id; | DROP_COLUMN | false |
DIFF00099992316 | raw_sql_safe | SQL | users_196.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099992317 | raw_sql_safe | SQL | users_60.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE customers SET address = %s WHERE order_id = %s; | NONE | false |
DIFF00099992318 | orm_schema_change | Ruby | logs_807.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :products, :quantity | NONE | true |
DIFF00099992319 | test_suite_cleanup | SQL | test/sessions_71.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN score TO state; | ALTER_RENAME | false |
DIFF00099992320 | raw_sql_destructive | SQL | customers_770.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00099992321 | raw_sql_safe | SQL | comments_92.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM refunds WHERE balance = 'active'; | NONE | false |
DIFF00099992322 | raw_sql_safe | SQL | notifications_433.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM sessions WHERE is_active = 'active'; | NONE | false |
DIFF00099992323 | orm_schema_change | TypeScript | tickets_387.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Inventory { // removed field: email } | NONE | true |
DIFF00099992324 | obfuscated_destructive | SQL | users_356.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from users; | DELETE_UNQUALIFIED | true |
DIFF00099992325 | raw_sql_destructive | SQL | accounts_708.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users RENAME COLUMN quantity TO state; | ALTER_RENAME | true |
DIFF00099992326 | raw_sql_destructive | SQL | inventory_334.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | true |
DIFF00099992327 | general_code_change | TypeScript | users_471.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 |
DIFF00099992328 | orm_schema_change | Ruby | refunds_639.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :customers, :created_at | NONE | true |
DIFF00099992329 | orm_schema_change | JavaScript | products_374.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('reviews', table => table.dropColumn('user_id')) | NONE | true |
DIFF00099992330 | raw_sql_safe | SQL | products_84.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM subscriptions WHERE category = 'active'; | NONE | false |
DIFF00099992331 | orm_schema_change | Python | shipments_296.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='events', name='email') | NONE | true |
DIFF00099992332 | raw_sql_destructive | SQL | invoices_371.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00099992333 | general_code_change | JavaScript | accounts_364.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 |
DIFF00099992334 | mentioned_in_comment | Python | users_452.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE invoices; -- now deprecated""" | DROP_TABLE | false |
DIFF00099992335 | mentioned_in_comment | Python | products_961.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE transactions;") | DROP_TABLE | false |
DIFF00099992336 | general_code_change | JavaScript | invoices_897.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099992337 | orm_schema_change | Python | refunds_295.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='customers', name='status') | NONE | true |
DIFF00099992338 | obfuscated_destructive | SQL | products_451.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table shipments rename column updated_at to amount_cents; | ALTER_RENAME | true |
DIFF00099992339 | raw_sql_safe | SQL | logs_789.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_shipments_score ON shipments (status); | NONE | false |
DIFF00099992340 | general_code_change | Ruby | comments_837.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099992341 | test_suite_cleanup | SQL | spec/notifications_657.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM payments; | DELETE_UNQUALIFIED | false |
DIFF00099992342 | general_code_change | JavaScript | inventory_972.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099992343 | general_code_change | Go | tickets_986.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099992344 | raw_sql_destructive | SQL | shipments_504.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM orders; | DELETE_UNQUALIFIED | true |
DIFF00099992345 | general_code_change | Ruby | tickets_377.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099992346 | obfuscated_destructive | SQL | payments_860.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | true |
DIFF00099992347 | general_code_change | Ruby | products_672.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099992348 | test_suite_cleanup | SQL | test/logs_700.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | false |
DIFF00099992349 | raw_sql_safe | SQL | sessions_743.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO products (quantity, user_id) VALUES (%s, %s); | NONE | false |
DIFF00099992350 | mentioned_in_comment | Python | notifications_595.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE shipments RENAME COLUMN phone TO full_name; -- now deprecated""" | ALTER_RENAME | false |
DIFF00099992351 | orm_schema_change | Python | refunds_513.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='accounts', name='created_at') | NONE | true |
DIFF00099992352 | general_code_change | Java | payments_519.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099992353 | general_code_change | Java | sessions_752.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099992354 | raw_sql_safe | SQL | notifications_929.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_category ON refunds (email); | NONE | false |
DIFF00099992355 | general_code_change | Java | events_626.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099992356 | general_code_change | Python | logs_390.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099992357 | general_code_change | JavaScript | notifications_580.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099992358 | test_suite_cleanup | SQL | tests/inventory_794.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE shipments SET category = CONCAT(category, address); | UPDATE_CONCAT | false |
DIFF00099992359 | raw_sql_safe | SQL | tickets_345.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE shipments SET metadata = %s WHERE name = %s; | NONE | false |
DIFF00099992360 | mentioned_in_comment | Python | comments_89.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM accounts;") | DELETE_UNQUALIFIED | false |
DIFF00099992361 | raw_sql_safe | SQL | customers_49.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE user_id = 'active'; | NONE | false |
DIFF00099992362 | orm_schema_change | JavaScript | refunds_452.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('accounts', table => table.dropColumn('price')) | NONE | true |
DIFF00099992363 | raw_sql_safe | SQL | events_504.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE notifications ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099992364 | obfuscated_destructive | SQL | sessions_890.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN name; | DROP_COLUMN | true |
DIFF00099992365 | mentioned_in_comment | Python | tickets_815.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE employees;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099992366 | general_code_change | TypeScript | products_586.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 |
DIFF00099992367 | raw_sql_safe | SQL | sessions_511.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM logs WHERE email = 'active'; | NONE | false |
DIFF00099992368 | raw_sql_destructive | SQL | orders_35.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets DROP COLUMN score; | DROP_COLUMN | true |
DIFF00099992369 | raw_sql_destructive | SQL | shipments_652.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN address; | DROP_COLUMN | true |
DIFF00099992370 | general_code_change | Go | logs_493.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099992371 | orm_schema_change | JavaScript | accounts_7.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('events', table => table.dropColumn('price')) | NONE | true |
DIFF00099992372 | general_code_change | TypeScript | notifications_283.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 |
DIFF00099992373 | general_code_change | TypeScript | users_928.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 |
DIFF00099992374 | orm_schema_change | TypeScript | events_524.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: metadata } | NONE | true |
DIFF00099992375 | raw_sql_destructive | SQL | orders_837.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | true |
DIFF00099992376 | raw_sql_destructive | SQL | sessions_194.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | true |
DIFF00099992377 | general_code_change | Ruby | orders_273.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099992378 | mentioned_in_comment | Python | invoices_584.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE customers DROP COLUMN name;") | DROP_COLUMN | false |
DIFF00099992379 | orm_schema_change | TypeScript | reviews_394.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Inventory { // removed field: order_id } | NONE | true |
DIFF00099992380 | orm_schema_change | Python | products_677.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='users', name='score') | NONE | true |
DIFF00099992381 | obfuscated_destructive | SQL | refunds_501.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table inventory rename column metadata to state; | ALTER_RENAME | true |
DIFF00099992382 | obfuscated_destructive | SQL | notifications_635.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table accounts drop column priority; | DROP_COLUMN | true |
DIFF00099992383 | raw_sql_safe | SQL | subscriptions_286.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE shipments SET score = %s WHERE status = %s; | NONE | false |
DIFF00099992384 | general_code_change | TypeScript | employees_473.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 |
DIFF00099992385 | raw_sql_safe | SQL | subscriptions_676.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET amount = %s WHERE is_active = %s; | NONE | false |
DIFF00099992386 | raw_sql_safe | SQL | events_603.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM sessions WHERE is_active = 'active'; | NONE | false |
DIFF00099992387 | general_code_change | Go | refunds_907.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099992388 | general_code_change | Go | inventory_249.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099992389 | test_suite_cleanup | SQL | test/transactions_418.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | false |
DIFF00099992390 | obfuscated_destructive | SQL | events_727.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE employees SET description = CONCAT(description, updated_at); | UPDATE_CONCAT | true |
DIFF00099992391 | test_suite_cleanup | SQL | mysql-test/suite/shipments_605.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE comments SET user_id = CONCAT(user_id, quantity); | UPDATE_CONCAT | false |
DIFF00099992392 | test_suite_cleanup | SQL | spec/payments_179.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN phone; | DROP_COLUMN | false |
DIFF00099992393 | general_code_change | TypeScript | users_725.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 |
DIFF00099992394 | raw_sql_destructive | SQL | reviews_423.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE invoices; | TRUNCATE | true |
DIFF00099992395 | raw_sql_safe | SQL | invoices_325.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE invoices ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099992396 | raw_sql_safe | SQL | employees_13.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE amount = 'active'; | NONE | false |
DIFF00099992397 | general_code_change | TypeScript | logs_97.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 |
DIFF00099992398 | raw_sql_destructive | SQL | transactions_70.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | true |
DIFF00099992399 | mentioned_in_comment | Python | customers_384.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE refunds SET priority = CONCAT(priority, created_at);' manually, handled by migration tool | UPDATE_CONCAT | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.