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 |
|---|---|---|---|---|---|---|---|
DIFF00099997300 | general_code_change | Go | orders_247.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997301 | raw_sql_safe | SQL | reviews_356.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM customers WHERE category = 'active'; | NONE | false |
DIFF00099997302 | raw_sql_safe | SQL | orders_412.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE invoices ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099997303 | raw_sql_safe | SQL | refunds_554.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM reviews WHERE address = 'active'; | NONE | false |
DIFF00099997304 | general_code_change | TypeScript | invoices_503.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 |
DIFF00099997305 | obfuscated_destructive | SQL | logs_493.sql | schema cleanup | @@ -1,3 +1,3 @@
+dRoP TAblE LoGS; | DROP_TABLE | true |
DIFF00099997306 | orm_schema_change | Ruby | subscriptions_18.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :comments, :quantity | NONE | true |
DIFF00099997307 | orm_schema_change | JavaScript | refunds_591.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('name')) | NONE | true |
DIFF00099997308 | general_code_change | JavaScript | tickets_885.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 |
DIFF00099997309 | obfuscated_destructive | SQL | reviews_667.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
orders; | TRUNCATE | true |
DIFF00099997310 | general_code_change | Ruby | notifications_323.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997311 | mentioned_in_comment | Python | notifications_600.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE comments;") | TRUNCATE | false |
DIFF00099997312 | general_code_change | Ruby | orders_689.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997313 | raw_sql_safe | SQL | subscriptions_801.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE employees SET order_id = %s WHERE priority = %s; | NONE | false |
DIFF00099997314 | raw_sql_safe | SQL | invoices_248.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_employees_created_at ON employees (price); | NONE | false |
DIFF00099997315 | general_code_change | Python | employees_331.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997316 | general_code_change | JavaScript | transactions_666.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 |
DIFF00099997317 | orm_schema_change | JavaScript | invoices_412.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('reviews', table => table.dropColumn('role')) | NONE | true |
DIFF00099997318 | orm_schema_change | JavaScript | shipments_311.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'name') | NONE | true |
DIFF00099997319 | raw_sql_safe | SQL | events_274.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE accounts ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099997320 | orm_schema_change | TypeScript | reviews_320.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Orders { // removed field: updated_at } | NONE | true |
DIFF00099997321 | raw_sql_safe | SQL | reviews_127.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099997322 | obfuscated_destructive | SQL | reviews_680.sql | schema cleanup | @@ -1,3 +1,3 @@
+tRuNCAte tablE TRANsACTIOns; | TRUNCATE | true |
DIFF00099997323 | test_suite_cleanup | SQL | mysql-test/suite/inventory_211.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | false |
DIFF00099997324 | raw_sql_destructive | SQL | comments_734.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET user_id = CONCAT(user_id, score); | UPDATE_CONCAT | true |
DIFF00099997325 | orm_schema_change | TypeScript | refunds_541.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Accounts { // removed field: role } | NONE | true |
DIFF00099997326 | orm_schema_change | JavaScript | payments_106.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('logs', 'created_at') | NONE | true |
DIFF00099997327 | general_code_change | Go | logs_972.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997328 | orm_schema_change | JavaScript | logs_376.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('reviews', table => table.dropColumn('is_active')) | NONE | true |
DIFF00099997329 | raw_sql_safe | SQL | shipments_286.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM tickets WHERE score = 'active'; | NONE | false |
DIFF00099997330 | test_suite_cleanup | SQL | spec/events_606.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE transactions; | TRUNCATE | false |
DIFF00099997331 | raw_sql_destructive | SQL | reviews_350.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions DROP COLUMN address; | DROP_COLUMN | true |
DIFF00099997332 | raw_sql_destructive | SQL | sessions_632.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN balance TO amount_cents; | ALTER_RENAME | true |
DIFF00099997333 | mentioned_in_comment | Python | shipments_230.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE products DROP COLUMN metadata; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099997334 | orm_schema_change | JavaScript | reviews_331.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('notifications', table => table.dropColumn('priority')) | NONE | true |
DIFF00099997335 | test_suite_cleanup | SQL | spec/sessions_746.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN email TO full_name; | ALTER_RENAME | false |
DIFF00099997336 | raw_sql_safe | SQL | inventory_573.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE payments ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099997337 | raw_sql_destructive | SQL | products_811.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE inventory; | TRUNCATE | true |
DIFF00099997338 | general_code_change | TypeScript | comments_267.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 |
DIFF00099997339 | orm_schema_change | JavaScript | events_642.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('accounts', 'price') | NONE | true |
DIFF00099997340 | mentioned_in_comment | Python | refunds_767.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE inventory;") | DROP_TABLE | false |
DIFF00099997341 | test_suite_cleanup | SQL | test/notifications_570.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN is_active TO state; | ALTER_RENAME | false |
DIFF00099997342 | raw_sql_destructive | SQL | users_207.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN updated_at TO state; | ALTER_RENAME | true |
DIFF00099997343 | raw_sql_destructive | SQL | employees_717.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM events; | DELETE_UNQUALIFIED | true |
DIFF00099997344 | raw_sql_destructive | SQL | tickets_483.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE logs SET order_id = CONCAT(order_id, price); | UPDATE_CONCAT | true |
DIFF00099997345 | raw_sql_safe | SQL | employees_668.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099997346 | raw_sql_destructive | SQL | refunds_982.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN created_at TO user_role; | ALTER_RENAME | true |
DIFF00099997347 | raw_sql_destructive | SQL | transactions_21.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET score = CONCAT(score, priority); | UPDATE_CONCAT | true |
DIFF00099997348 | orm_schema_change | JavaScript | invoices_143.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('sessions', table => table.dropColumn('created_at')) | NONE | true |
DIFF00099997349 | test_suite_cleanup | SQL | mysql-test/suite/sessions_585.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | false |
DIFF00099997350 | raw_sql_destructive | SQL | events_957.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE transactions; | TRUNCATE | true |
DIFF00099997351 | general_code_change | Go | sessions_807.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997352 | orm_schema_change | JavaScript | transactions_694.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('refunds', 'role') | NONE | true |
DIFF00099997353 | test_suite_cleanup | SQL | tests/customers_930.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE inventory; | DROP_TABLE | false |
DIFF00099997354 | general_code_change | Python | products_712.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997355 | orm_schema_change | JavaScript | comments_824.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('inventory', 'balance') | NONE | true |
DIFF00099997356 | general_code_change | Java | transactions_994.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997357 | raw_sql_safe | SQL | events_589.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099997358 | orm_schema_change | TypeScript | accounts_606.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Products { // removed field: phone } | NONE | true |
DIFF00099997359 | test_suite_cleanup | SQL | spec/logs_771.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | false |
DIFF00099997360 | raw_sql_destructive | SQL | notifications_957.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN user_id; | DROP_COLUMN | true |
DIFF00099997361 | orm_schema_change | TypeScript | products_374.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Notifications { // removed field: category } | NONE | true |
DIFF00099997362 | general_code_change | JavaScript | sessions_346.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 |
DIFF00099997363 | orm_schema_change | JavaScript | comments_468.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('shipments', table => table.dropColumn('is_active')) | NONE | true |
DIFF00099997364 | raw_sql_safe | SQL | refunds_642.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099997365 | raw_sql_safe | SQL | refunds_217.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE users ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099997366 | raw_sql_safe | SQL | subscriptions_1.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO sessions (balance, category) VALUES (%s, %s); | NONE | false |
DIFF00099997367 | general_code_change | Python | notifications_510.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997368 | general_code_change | Go | inventory_393.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997369 | raw_sql_destructive | SQL | customers_911.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN email TO full_name; | ALTER_RENAME | true |
DIFF00099997370 | general_code_change | TypeScript | tickets_650.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 |
DIFF00099997371 | raw_sql_destructive | SQL | orders_116.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | true |
DIFF00099997372 | raw_sql_safe | SQL | orders_91.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_invoices_score ON invoices (priority); | NONE | false |
DIFF00099997373 | mentioned_in_comment | Python | invoices_830.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE orders;") | TRUNCATE | false |
DIFF00099997374 | mentioned_in_comment | Python | refunds_135.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE notifications;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099997375 | mentioned_in_comment | Python | comments_16.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM products;") | DELETE_UNQUALIFIED | false |
DIFF00099997376 | raw_sql_safe | SQL | tickets_555.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_payments_priority ON payments (priority); | NONE | false |
DIFF00099997377 | general_code_change | Ruby | events_58.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997378 | raw_sql_safe | SQL | comments_177.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE payments ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099997379 | mentioned_in_comment | Python | events_243.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE customers SET balance = CONCAT(balance, quantity);") | UPDATE_CONCAT | false |
DIFF00099997380 | raw_sql_safe | SQL | reviews_769.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_comments_order_id ON comments (price); | NONE | false |
DIFF00099997381 | general_code_change | Python | invoices_611.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997382 | mentioned_in_comment | Python | users_351.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM subscriptions;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00099997383 | raw_sql_destructive | SQL | shipments_82.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00099997384 | raw_sql_safe | SQL | tickets_453.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_payments_updated_at ON payments (phone); | NONE | false |
DIFF00099997385 | orm_schema_change | JavaScript | logs_183.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('employees', table => table.dropColumn('name')) | NONE | true |
DIFF00099997386 | test_suite_cleanup | SQL | tests/inventory_803.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | false |
DIFF00099997387 | general_code_change | Python | invoices_340.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997388 | raw_sql_safe | SQL | transactions_627.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE employees ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099997389 | general_code_change | Go | inventory_286.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997390 | general_code_change | Java | refunds_178.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997391 | general_code_change | Python | shipments_496.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997392 | general_code_change | Java | comments_369.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997393 | mentioned_in_comment | Python | events_170.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE invoices SET role = CONCAT(role, amount);") | UPDATE_CONCAT | false |
DIFF00099997394 | general_code_change | Go | events_346.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997395 | general_code_change | Ruby | subscriptions_329.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997396 | obfuscated_destructive | SQL | employees_515.sql | schema cleanup | @@ -1,3 +1,3 @@
+update transactions set status = concat(status, role); | UPDATE_CONCAT | true |
DIFF00099997397 | orm_schema_change | JavaScript | orders_439.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('tickets', table => table.dropColumn('balance')) | NONE | true |
DIFF00099997398 | general_code_change | JavaScript | comments_523.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 |
DIFF00099997399 | test_suite_cleanup | SQL | mysql-test/suite/refunds_680.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN description; | DROP_COLUMN | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.