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 |
|---|---|---|---|---|---|---|---|
DIFF00000008400 | test_suite_cleanup | SQL | tests/sessions_927.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | false |
DIFF00000008401 | orm_schema_change | JavaScript | inventory_109.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('logs', table => table.dropColumn('phone')) | NONE | true |
DIFF00000008402 | orm_schema_change | JavaScript | events_690.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'priority') | NONE | true |
DIFF00000008403 | general_code_change | TypeScript | tickets_669.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 |
DIFF00000008404 | general_code_change | Java | customers_70.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000008405 | general_code_change | Ruby | employees_581.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008406 | raw_sql_safe | SQL | inventory_473.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE invoices ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000008407 | mentioned_in_comment | Python | users_698.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE events;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000008408 | general_code_change | Ruby | payments_77.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008409 | mentioned_in_comment | Python | tickets_570.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE users;") | TRUNCATE | false |
DIFF00000008410 | raw_sql_safe | SQL | customers_235.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM logs WHERE name = 'active'; | NONE | false |
DIFF00000008411 | raw_sql_destructive | SQL | refunds_64.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN address; | DROP_COLUMN | true |
DIFF00000008412 | raw_sql_destructive | SQL | reviews_335.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN priority TO state; | ALTER_RENAME | true |
DIFF00000008413 | general_code_change | Ruby | reviews_769.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008414 | raw_sql_safe | SQL | shipments_943.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO accounts (price, score) VALUES (%s, %s); | NONE | false |
DIFF00000008415 | orm_schema_change | JavaScript | events_326.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('accounts', table => table.dropColumn('score')) | NONE | true |
DIFF00000008416 | orm_schema_change | Python | logs_305.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='inventory', name='price') | NONE | true |
DIFF00000008417 | general_code_change | Python | events_782.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008418 | orm_schema_change | JavaScript | logs_757.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'amount') | NONE | true |
DIFF00000008419 | raw_sql_safe | SQL | customers_487.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_accounts_updated_at ON accounts (name); | NONE | false |
DIFF00000008420 | raw_sql_destructive | SQL | sessions_799.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN user_id; | DROP_COLUMN | true |
DIFF00000008421 | general_code_change | JavaScript | tickets_670.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008422 | obfuscated_destructive | SQL | employees_779.sql | schema cleanup | @@ -1,3 +1,3 @@
+update tickets set priority = concat(priority, created_at); | UPDATE_CONCAT | true |
DIFF00000008423 | mentioned_in_comment | Python | products_711.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE events DROP COLUMN order_id; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000008424 | obfuscated_destructive | SQL | users_528.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | true |
DIFF00000008425 | raw_sql_destructive | SQL | accounts_59.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE shipments SET phone = CONCAT(phone, price); | UPDATE_CONCAT | true |
DIFF00000008426 | orm_schema_change | Python | invoices_637.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='sessions', name='order_id') | NONE | true |
DIFF00000008427 | mentioned_in_comment | Python | sessions_137.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE sessions; -- now deprecated""" | TRUNCATE | false |
DIFF00000008428 | mentioned_in_comment | Python | shipments_472.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE shipments RENAME COLUMN email TO amount_cents; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000008429 | orm_schema_change | Ruby | invoices_386.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :refunds, :status | NONE | true |
DIFF00000008430 | obfuscated_destructive | SQL | products_484.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
employees; | TRUNCATE | true |
DIFF00000008431 | general_code_change | Go | employees_626.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008432 | mentioned_in_comment | Python | orders_304.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE tickets DROP COLUMN score;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000008433 | general_code_change | Java | events_513.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000008434 | raw_sql_safe | SQL | tickets_764.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_shipments_order_id ON shipments (status); | NONE | false |
DIFF00000008435 | raw_sql_destructive | SQL | users_630.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE notifications SET user_id = CONCAT(user_id, score); | UPDATE_CONCAT | true |
DIFF00000008436 | raw_sql_safe | SQL | logs_194.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM products WHERE is_active = 'active'; | NONE | false |
DIFF00000008437 | test_suite_cleanup | SQL | spec/logs_88.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE invoices RENAME COLUMN name TO amount_cents; | ALTER_RENAME | false |
DIFF00000008438 | general_code_change | TypeScript | orders_895.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 |
DIFF00000008439 | obfuscated_destructive | SQL | users_970.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
events
DROP
COLUMN
status; | DROP_COLUMN | true |
DIFF00000008440 | raw_sql_safe | SQL | tickets_877.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_quantity ON notifications (metadata); | NONE | false |
DIFF00000008441 | raw_sql_destructive | SQL | payments_105.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE events SET email = CONCAT(email, amount); | UPDATE_CONCAT | true |
DIFF00000008442 | orm_schema_change | TypeScript | sessions_540.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Shipments { // removed field: amount } | NONE | true |
DIFF00000008443 | general_code_change | Ruby | users_341.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008444 | raw_sql_destructive | SQL | transactions_890.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00000008445 | raw_sql_safe | SQL | accounts_434.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM customers WHERE address = 'active'; | NONE | false |
DIFF00000008446 | general_code_change | JavaScript | subscriptions_724.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 |
DIFF00000008447 | test_suite_cleanup | SQL | spec/logs_389.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN priority; | DROP_COLUMN | false |
DIFF00000008448 | mentioned_in_comment | Python | payments_561.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM products; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000008449 | raw_sql_destructive | SQL | payments_739.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00000008450 | raw_sql_safe | SQL | tickets_658.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_logs_status ON logs (score); | NONE | false |
DIFF00000008451 | general_code_change | JavaScript | inventory_810.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008452 | general_code_change | JavaScript | comments_371.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008453 | general_code_change | TypeScript | transactions_460.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 |
DIFF00000008454 | general_code_change | Python | orders_225.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008455 | general_code_change | JavaScript | transactions_511.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008456 | raw_sql_destructive | SQL | tickets_956.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN metadata TO full_name; | ALTER_RENAME | true |
DIFF00000008457 | obfuscated_destructive | SQL | sessions_620.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
shipments; | DELETE_UNQUALIFIED | true |
DIFF00000008458 | raw_sql_destructive | SQL | users_813.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE invoices SET price = CONCAT(price, name); | UPDATE_CONCAT | true |
DIFF00000008459 | raw_sql_safe | SQL | orders_325.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_accounts_status ON accounts (user_id); | NONE | false |
DIFF00000008460 | obfuscated_destructive | SQL | tickets_544.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTEr TabLE iNvoIces rEnAme COLumn PhOnE TO aMOuNt_CENTs; | ALTER_RENAME | true |
DIFF00000008461 | orm_schema_change | JavaScript | notifications_621.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('users', table => table.dropColumn('order_id')) | NONE | true |
DIFF00000008462 | orm_schema_change | Python | events_417.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='description') | NONE | true |
DIFF00000008463 | general_code_change | Python | tickets_511.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008464 | test_suite_cleanup | SQL | test/logs_934.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN email; | DROP_COLUMN | false |
DIFF00000008465 | orm_schema_change | Ruby | subscriptions_921.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :accounts, :user_id | NONE | true |
DIFF00000008466 | raw_sql_destructive | SQL | inventory_980.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN priority; | DROP_COLUMN | true |
DIFF00000008467 | orm_schema_change | Python | transactions_312.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='quantity') | NONE | true |
DIFF00000008468 | raw_sql_safe | SQL | sessions_127.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE category = 'active'; | NONE | false |
DIFF00000008469 | general_code_change | Python | notifications_594.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008470 | raw_sql_destructive | SQL | invoices_493.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN metadata; | DROP_COLUMN | true |
DIFF00000008471 | orm_schema_change | JavaScript | customers_744.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('products', 'created_at') | NONE | true |
DIFF00000008472 | general_code_change | Go | transactions_672.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008473 | general_code_change | Java | invoices_855.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000008474 | raw_sql_destructive | SQL | payments_107.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE employees; | DROP_TABLE | true |
DIFF00000008475 | orm_schema_change | JavaScript | transactions_165.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'email') | NONE | true |
DIFF00000008476 | raw_sql_destructive | SQL | accounts_414.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE customers SET metadata = CONCAT(metadata, metadata); | UPDATE_CONCAT | true |
DIFF00000008477 | raw_sql_safe | SQL | customers_568.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000008478 | raw_sql_destructive | SQL | comments_871.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE orders SET is_active = CONCAT(is_active, phone); | UPDATE_CONCAT | true |
DIFF00000008479 | general_code_change | Python | products_922.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008480 | test_suite_cleanup | SQL | mysql-test/suite/comments_593.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE inventory; | TRUNCATE | false |
DIFF00000008481 | general_code_change | Go | tickets_943.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008482 | raw_sql_safe | SQL | logs_491.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE events SET score = %s WHERE description = %s; | NONE | false |
DIFF00000008483 | orm_schema_change | TypeScript | logs_964.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Shipments { // removed field: priority } | NONE | true |
DIFF00000008484 | test_suite_cleanup | SQL | test/accounts_820.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | false |
DIFF00000008485 | raw_sql_safe | SQL | transactions_702.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000008486 | general_code_change | JavaScript | products_897.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008487 | general_code_change | Python | sessions_728.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008488 | test_suite_cleanup | SQL | tests/logs_292.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE shipments SET category = CONCAT(category, name); | UPDATE_CONCAT | false |
DIFF00000008489 | raw_sql_destructive | SQL | invoices_424.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM events; | DELETE_UNQUALIFIED | true |
DIFF00000008490 | orm_schema_change | JavaScript | notifications_169.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('shipments', table => table.dropColumn('priority')) | NONE | true |
DIFF00000008491 | general_code_change | JavaScript | events_122.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008492 | general_code_change | JavaScript | users_407.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 |
DIFF00000008493 | mentioned_in_comment | Python | logs_68.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE shipments DROP COLUMN updated_at; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000008494 | general_code_change | Ruby | accounts_6.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008495 | general_code_change | Go | employees_937.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008496 | mentioned_in_comment | Python | products_322.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE events SET status = CONCAT(status, name);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000008497 | orm_schema_change | Ruby | events_493.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :subscriptions, :price | NONE | true |
DIFF00000008498 | raw_sql_destructive | SQL | shipments_707.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | true |
DIFF00000008499 | general_code_change | JavaScript | users_840.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.