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 |
|---|---|---|---|---|---|---|---|
DIFF00000008200 | general_code_change | Python | invoices_722.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008201 | test_suite_cleanup | SQL | tests/shipments_797.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | false |
DIFF00000008202 | obfuscated_destructive | SQL | orders_646.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLtEr tABLe SUBsCRiPtIoNs rEname cOluMn orDEr_Id To CONTACT_EMaiL; | ALTER_RENAME | true |
DIFF00000008203 | general_code_change | TypeScript | comments_971.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 |
DIFF00000008204 | test_suite_cleanup | SQL | tests/refunds_876.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | false |
DIFF00000008205 | raw_sql_destructive | SQL | refunds_485.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | true |
DIFF00000008206 | orm_schema_change | JavaScript | accounts_670.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('notifications', 'role') | NONE | true |
DIFF00000008207 | orm_schema_change | JavaScript | customers_896.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('logs', table => table.dropColumn('status')) | NONE | true |
DIFF00000008208 | general_code_change | Python | subscriptions_127.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008209 | raw_sql_destructive | SQL | reviews_364.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | true |
DIFF00000008210 | orm_schema_change | JavaScript | orders_842.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('orders', table => table.dropColumn('name')) | NONE | true |
DIFF00000008211 | raw_sql_safe | SQL | refunds_984.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_user_id ON transactions (balance); | NONE | false |
DIFF00000008212 | obfuscated_destructive | SQL | transactions_54.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE tickets DROP COLUMN is_active; | DROP_COLUMN | true |
DIFF00000008213 | mentioned_in_comment | Python | shipments_358.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE logs DROP COLUMN email; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000008214 | test_suite_cleanup | SQL | test/accounts_507.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE inventory RENAME COLUMN role TO contact_email; | ALTER_RENAME | false |
DIFF00000008215 | orm_schema_change | Ruby | transactions_292.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :customers, :address | NONE | true |
DIFF00000008216 | general_code_change | Java | invoices_85.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000008217 | obfuscated_destructive | SQL | notifications_229.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter tAbLe ticketS dRop cOlUMN pHONE; | DROP_COLUMN | true |
DIFF00000008218 | mentioned_in_comment | Python | payments_824.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE subscriptions SET role = CONCAT(role, updated_at);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000008219 | general_code_change | Go | subscriptions_221.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008220 | obfuscated_destructive | SQL | transactions_813.sql | schema cleanup | @@ -1,3 +1,3 @@
+AlTEr tABle pROdUCts REnAme CoLUmN SCore to FUlL_namE; | ALTER_RENAME | true |
DIFF00000008221 | raw_sql_safe | SQL | comments_276.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_is_active ON refunds (score); | NONE | false |
DIFF00000008222 | general_code_change | JavaScript | payments_290.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008223 | general_code_change | Go | users_513.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008224 | orm_schema_change | TypeScript | products_33.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Orders { // removed field: metadata } | NONE | true |
DIFF00000008225 | general_code_change | Go | employees_807.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008226 | orm_schema_change | Ruby | sessions_119.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :sessions, :created_at | NONE | true |
DIFF00000008227 | raw_sql_destructive | SQL | logs_464.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00000008228 | mentioned_in_comment | Python | subscriptions_716.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE logs DROP COLUMN phone;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000008229 | raw_sql_destructive | SQL | products_246.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
DIFF00000008230 | raw_sql_destructive | SQL | events_887.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00000008231 | raw_sql_safe | SQL | users_431.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE users ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000008232 | orm_schema_change | JavaScript | refunds_921.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'metadata') | NONE | true |
DIFF00000008233 | raw_sql_safe | SQL | subscriptions_28.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM shipments WHERE address = 'active'; | NONE | false |
DIFF00000008234 | general_code_change | Python | notifications_162.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008235 | mentioned_in_comment | Python | events_187.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM subscriptions; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000008236 | mentioned_in_comment | Python | notifications_340.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE users SET updated_at = CONCAT(updated_at, created_at);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000008237 | general_code_change | Go | comments_969.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008238 | general_code_change | JavaScript | transactions_580.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 |
DIFF00000008239 | orm_schema_change | JavaScript | logs_815.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('phone')) | NONE | true |
DIFF00000008240 | test_suite_cleanup | SQL | tests/inventory_722.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | false |
DIFF00000008241 | raw_sql_destructive | SQL | shipments_610.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00000008242 | mentioned_in_comment | Python | customers_378.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM payments;") | DELETE_UNQUALIFIED | false |
DIFF00000008243 | mentioned_in_comment | Python | notifications_375.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE sessions;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000008244 | raw_sql_safe | SQL | sessions_121.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_logs_price ON logs (created_at); | NONE | false |
DIFF00000008245 | raw_sql_destructive | SQL | reviews_342.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts DROP COLUMN quantity; | DROP_COLUMN | true |
DIFF00000008246 | general_code_change | Go | inventory_259.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008247 | general_code_change | JavaScript | payments_152.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008248 | general_code_change | Python | products_108.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008249 | raw_sql_destructive | SQL | reviews_785.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00000008250 | raw_sql_safe | SQL | tickets_465.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000008251 | raw_sql_safe | SQL | tickets_860.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE shipments ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000008252 | test_suite_cleanup | SQL | tests/transactions_746.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE users; | TRUNCATE | false |
DIFF00000008253 | test_suite_cleanup | SQL | test/transactions_881.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN score; | DROP_COLUMN | false |
DIFF00000008254 | mentioned_in_comment | Python | shipments_808.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE events RENAME COLUMN description TO state;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000008255 | general_code_change | Go | notifications_898.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008256 | raw_sql_destructive | SQL | subscriptions_487.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE events SET name = CONCAT(name, quantity); | UPDATE_CONCAT | true |
DIFF00000008257 | orm_schema_change | Ruby | customers_503.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :accounts, :is_active | NONE | true |
DIFF00000008258 | obfuscated_destructive | SQL | refunds_280.sql | schema cleanup | @@ -1,3 +1,3 @@
+DeletE From EveNtS; | DELETE_UNQUALIFIED | true |
DIFF00000008259 | general_code_change | Go | products_104.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000008260 | raw_sql_destructive | SQL | sessions_742.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN name; | DROP_COLUMN | true |
DIFF00000008261 | orm_schema_change | JavaScript | comments_646.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'address') | NONE | true |
DIFF00000008262 | mentioned_in_comment | Python | accounts_983.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE shipments RENAME COLUMN user_id TO amount_cents; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000008263 | raw_sql_destructive | SQL | invoices_323.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN price TO amount_cents; | ALTER_RENAME | true |
DIFF00000008264 | raw_sql_destructive | SQL | customers_989.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | true |
DIFF00000008265 | test_suite_cleanup | SQL | tests/sessions_859.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN status TO amount_cents; | ALTER_RENAME | false |
DIFF00000008266 | general_code_change | JavaScript | users_148.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000008267 | raw_sql_safe | SQL | transactions_149.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM users WHERE name = 'active'; | NONE | false |
DIFF00000008268 | test_suite_cleanup | SQL | tests/users_554.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | false |
DIFF00000008269 | test_suite_cleanup | SQL | test/inventory_277.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE employees; | DROP_TABLE | false |
DIFF00000008270 | test_suite_cleanup | SQL | tests/sessions_957.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | false |
DIFF00000008271 | mentioned_in_comment | Python | tickets_653.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE customers;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000008272 | test_suite_cleanup | SQL | spec/users_863.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN quantity; | DROP_COLUMN | false |
DIFF00000008273 | test_suite_cleanup | SQL | mysql-test/suite/orders_884.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | false |
DIFF00000008274 | raw_sql_safe | SQL | tickets_202.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO inventory (balance, score) VALUES (%s, %s); | NONE | false |
DIFF00000008275 | test_suite_cleanup | SQL | test/products_897.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN is_active; | DROP_COLUMN | false |
DIFF00000008276 | mentioned_in_comment | Python | employees_69.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE products;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000008277 | raw_sql_destructive | SQL | tickets_901.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00000008278 | mentioned_in_comment | Python | users_212.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE refunds SET phone = CONCAT(phone, phone);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000008279 | orm_schema_change | TypeScript | transactions_720.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Transactions { // removed field: metadata } | NONE | true |
DIFF00000008280 | obfuscated_destructive | SQL | orders_762.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from comments; | DELETE_UNQUALIFIED | true |
DIFF00000008281 | general_code_change | Python | refunds_387.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008282 | raw_sql_safe | SQL | users_465.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM reviews WHERE is_active = 'active'; | NONE | false |
DIFF00000008283 | general_code_change | Java | products_179.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000008284 | raw_sql_destructive | SQL | reviews_275.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions DROP COLUMN amount; | DROP_COLUMN | true |
DIFF00000008285 | raw_sql_safe | SQL | tickets_495.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE reviews ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000008286 | test_suite_cleanup | SQL | tests/shipments_234.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM payments; | DELETE_UNQUALIFIED | false |
DIFF00000008287 | orm_schema_change | JavaScript | invoices_542.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('notifications', 'order_id') | NONE | true |
DIFF00000008288 | raw_sql_safe | SQL | sessions_384.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM accounts WHERE order_id = 'active'; | NONE | false |
DIFF00000008289 | test_suite_cleanup | SQL | spec/shipments_327.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE notifications SET score = CONCAT(score, order_id); | UPDATE_CONCAT | false |
DIFF00000008290 | obfuscated_destructive | SQL | orders_521.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN score TO state; | ALTER_RENAME | true |
DIFF00000008291 | general_code_change | Python | transactions_955.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000008292 | orm_schema_change | JavaScript | logs_678.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('tickets', table => table.dropColumn('quantity')) | NONE | true |
DIFF00000008293 | general_code_change | Python | products_132.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000008294 | general_code_change | Ruby | payments_783.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000008295 | mentioned_in_comment | Python | refunds_895.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE inventory SET role = CONCAT(role, created_at); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000008296 | general_code_change | TypeScript | invoices_671.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 |
DIFF00000008297 | raw_sql_safe | SQL | comments_204.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE price = 'active'; | NONE | false |
DIFF00000008298 | general_code_change | TypeScript | customers_652.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 |
DIFF00000008299 | raw_sql_destructive | SQL | reviews_312.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.