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 |
|---|---|---|---|---|---|---|---|
DIFF00000000300 | orm_schema_change | Ruby | orders_182.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :orders, :address | NONE | true |
DIFF00000000301 | mentioned_in_comment | Python | shipments_810.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE events SET user_id = CONCAT(user_id, phone); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000000302 | general_code_change | Python | orders_752.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000000303 | test_suite_cleanup | SQL | tests/customers_34.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | false |
DIFF00000000304 | raw_sql_destructive | SQL | logs_826.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00000000305 | raw_sql_safe | SQL | refunds_780.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO refunds (metadata, category) VALUES (%s, %s); | NONE | false |
DIFF00000000306 | raw_sql_destructive | SQL | customers_208.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN price TO full_name; | ALTER_RENAME | true |
DIFF00000000307 | general_code_change | Ruby | transactions_544.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000000308 | raw_sql_safe | SQL | sessions_987.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE comments SET category = %s WHERE order_id = %s; | NONE | false |
DIFF00000000309 | test_suite_cleanup | SQL | mysql-test/suite/reviews_914.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN description; | DROP_COLUMN | false |
DIFF00000000310 | mentioned_in_comment | Python | invoices_936.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE reviews DROP COLUMN created_at;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000000311 | orm_schema_change | JavaScript | accounts_696.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('priority')) | NONE | true |
DIFF00000000312 | obfuscated_destructive | SQL | comments_14.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table reviews drop column priority; | DROP_COLUMN | true |
DIFF00000000313 | obfuscated_destructive | SQL | accounts_754.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN amount; | DROP_COLUMN | true |
DIFF00000000314 | general_code_change | Go | products_647.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000000315 | test_suite_cleanup | SQL | mysql-test/suite/reviews_75.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM reviews; | DELETE_UNQUALIFIED | false |
DIFF00000000316 | orm_schema_change | JavaScript | refunds_277.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'balance') | NONE | true |
DIFF00000000317 | obfuscated_destructive | SQL | invoices_634.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table accounts; | DROP_TABLE | true |
DIFF00000000318 | obfuscated_destructive | SQL | customers_975.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table notifications rename column role to amount_cents; | ALTER_RENAME | true |
DIFF00000000319 | test_suite_cleanup | SQL | spec/reviews_243.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN category; | DROP_COLUMN | false |
DIFF00000000320 | general_code_change | Python | transactions_681.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000321 | general_code_change | Python | users_185.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000000322 | general_code_change | JavaScript | logs_1.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000000323 | test_suite_cleanup | SQL | mysql-test/suite/orders_187.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | false |
DIFF00000000324 | orm_schema_change | TypeScript | comments_481.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Employees { // removed field: quantity } | NONE | true |
DIFF00000000325 | raw_sql_destructive | SQL | logs_975.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | true |
DIFF00000000326 | raw_sql_destructive | SQL | invoices_100.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | true |
DIFF00000000327 | general_code_change | Go | accounts_996.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000000328 | raw_sql_destructive | SQL | employees_466.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews RENAME COLUMN priority TO state; | ALTER_RENAME | true |
DIFF00000000329 | general_code_change | JavaScript | users_900.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 |
DIFF00000000330 | raw_sql_destructive | SQL | employees_469.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE notifications SET address = CONCAT(address, status); | UPDATE_CONCAT | true |
DIFF00000000331 | orm_schema_change | Ruby | reviews_7.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :reviews, :user_id | NONE | true |
DIFF00000000332 | general_code_change | Ruby | inventory_14.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000000333 | orm_schema_change | JavaScript | tickets_638.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('inventory', 'status') | NONE | true |
DIFF00000000334 | orm_schema_change | JavaScript | reviews_61.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('status')) | NONE | true |
DIFF00000000335 | obfuscated_destructive | SQL | events_834.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALter tAblE CommentS rEnAME cOLumN AMOuNT TO USEr_ROLE; | ALTER_RENAME | true |
DIFF00000000336 | raw_sql_safe | SQL | inventory_6.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000000337 | raw_sql_destructive | SQL | events_282.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | true |
DIFF00000000338 | test_suite_cleanup | SQL | test/comments_510.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | false |
DIFF00000000339 | raw_sql_destructive | SQL | payments_737.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | true |
DIFF00000000340 | general_code_change | Java | transactions_192.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000341 | mentioned_in_comment | Python | accounts_496.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE orders DROP COLUMN price; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000000342 | general_code_change | JavaScript | sessions_840.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 |
DIFF00000000343 | test_suite_cleanup | SQL | test/shipments_672.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE notifications RENAME COLUMN description TO contact_email; | ALTER_RENAME | false |
DIFF00000000344 | obfuscated_destructive | SQL | tickets_673.sql | schema cleanup | @@ -1,3 +1,3 @@
+DEletE frOM iNvOices; | DELETE_UNQUALIFIED | true |
DIFF00000000345 | mentioned_in_comment | Python | refunds_552.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE users RENAME COLUMN balance TO full_name; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000000346 | mentioned_in_comment | Python | tickets_803.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE refunds DROP COLUMN email;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000000347 | raw_sql_safe | SQL | orders_469.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (metadata, status) VALUES (%s, %s); | NONE | false |
DIFF00000000348 | test_suite_cleanup | SQL | spec/refunds_286.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN user_id TO amount_cents; | ALTER_RENAME | false |
DIFF00000000349 | general_code_change | Java | shipments_853.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000350 | obfuscated_destructive | SQL | subscriptions_101.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from logs; | DELETE_UNQUALIFIED | true |
DIFF00000000351 | general_code_change | Java | orders_2.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000352 | general_code_change | Go | comments_9.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000000353 | mentioned_in_comment | Python | subscriptions_950.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE tickets DROP COLUMN updated_at;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000000354 | general_code_change | JavaScript | refunds_483.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 |
DIFF00000000355 | general_code_change | TypeScript | inventory_321.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 |
DIFF00000000356 | raw_sql_safe | SQL | transactions_723.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE payments ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000000357 | raw_sql_destructive | SQL | products_270.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN phone; | DROP_COLUMN | true |
DIFF00000000358 | orm_schema_change | Ruby | users_349.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :employees, :status | NONE | true |
DIFF00000000359 | obfuscated_destructive | SQL | shipments_387.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN is_active; | DROP_COLUMN | true |
DIFF00000000360 | obfuscated_destructive | SQL | customers_22.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00000000361 | general_code_change | Java | invoices_377.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000000362 | mentioned_in_comment | Python | transactions_924.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM shipments;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000000363 | general_code_change | Go | accounts_907.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000000364 | raw_sql_destructive | SQL | customers_582.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | true |
DIFF00000000365 | mentioned_in_comment | Python | shipments_517.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE reviews SET score = CONCAT(score, role);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000000366 | general_code_change | TypeScript | transactions_247.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 |
DIFF00000000367 | orm_schema_change | TypeScript | tickets_564.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Reviews { // removed field: priority } | NONE | true |
DIFF00000000368 | orm_schema_change | Ruby | invoices_302.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :orders, :created_at | NONE | true |
DIFF00000000369 | general_code_change | Python | shipments_88.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000000370 | mentioned_in_comment | Python | logs_120.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE products SET metadata = CONCAT(metadata, category);") | UPDATE_CONCAT | false |
DIFF00000000371 | mentioned_in_comment | Python | orders_680.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE events DROP COLUMN amount;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000000372 | general_code_change | Ruby | products_612.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000000373 | test_suite_cleanup | SQL | test/logs_365.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | false |
DIFF00000000374 | general_code_change | Python | refunds_661.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000000375 | raw_sql_safe | SQL | employees_196.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM products WHERE order_id = 'active'; | NONE | false |
DIFF00000000376 | raw_sql_safe | SQL | refunds_891.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_orders_amount ON orders (score); | NONE | false |
DIFF00000000377 | obfuscated_destructive | SQL | accounts_165.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
customers
SET
updated_at
=
CONCAT(updated_at,
metadata); | UPDATE_CONCAT | true |
DIFF00000000378 | orm_schema_change | JavaScript | events_771.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('tickets', table => table.dropColumn('priority')) | NONE | true |
DIFF00000000379 | raw_sql_safe | SQL | shipments_232.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE employees ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000000380 | orm_schema_change | JavaScript | payments_200.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('order_id')) | NONE | true |
DIFF00000000381 | test_suite_cleanup | SQL | mysql-test/suite/comments_62.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN priority TO full_name; | ALTER_RENAME | false |
DIFF00000000382 | mentioned_in_comment | Python | customers_267.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE invoices DROP COLUMN name;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000000383 | orm_schema_change | Ruby | events_936.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :comments, :email | NONE | true |
DIFF00000000384 | mentioned_in_comment | Python | logs_140.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE accounts SET user_id = CONCAT(user_id, priority);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000000385 | general_code_change | TypeScript | transactions_417.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 |
DIFF00000000386 | test_suite_cleanup | SQL | test/payments_530.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN status; | DROP_COLUMN | false |
DIFF00000000387 | raw_sql_safe | SQL | shipments_830.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_products_email ON products (score); | NONE | false |
DIFF00000000388 | orm_schema_change | JavaScript | logs_558.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('tickets', 'status') | NONE | true |
DIFF00000000389 | orm_schema_change | Ruby | customers_65.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :subscriptions, :quantity | NONE | true |
DIFF00000000390 | raw_sql_safe | SQL | reviews_393.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET balance = %s WHERE order_id = %s; | NONE | false |
DIFF00000000391 | orm_schema_change | JavaScript | products_938.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('accounts', 'priority') | NONE | true |
DIFF00000000392 | mentioned_in_comment | Python | subscriptions_452.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE refunds;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000000393 | orm_schema_change | TypeScript | payments_776.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Inventory { // removed field: created_at } | NONE | true |
DIFF00000000394 | raw_sql_destructive | SQL | payments_290.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN score; | DROP_COLUMN | true |
DIFF00000000395 | raw_sql_destructive | SQL | customers_151.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM orders; | DELETE_UNQUALIFIED | true |
DIFF00000000396 | general_code_change | TypeScript | orders_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 |
DIFF00000000397 | mentioned_in_comment | Python | subscriptions_355.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE events SET order_id = CONCAT(order_id, category);") | UPDATE_CONCAT | false |
DIFF00000000398 | orm_schema_change | Python | reviews_329.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='accounts', name='priority') | NONE | true |
DIFF00000000399 | test_suite_cleanup | SQL | test/comments_734.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.