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 |
|---|---|---|---|---|---|---|---|
DIFF00000007300 | obfuscated_destructive | SQL | transactions_43.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table payments drop column quantity; | DROP_COLUMN | true |
DIFF00000007301 | raw_sql_safe | SQL | payments_745.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_shipments_created_at ON shipments (user_id); | NONE | false |
DIFF00000007302 | general_code_change | Python | refunds_409.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000007303 | raw_sql_safe | SQL | tickets_725.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO accounts (status, priority) VALUES (%s, %s); | NONE | false |
DIFF00000007304 | test_suite_cleanup | SQL | mysql-test/suite/comments_724.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE transactions; | TRUNCATE | false |
DIFF00000007305 | raw_sql_safe | SQL | products_478.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE products ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000007306 | general_code_change | TypeScript | refunds_494.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 |
DIFF00000007307 | mentioned_in_comment | Python | subscriptions_306.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE transactions;") | DROP_TABLE | false |
DIFF00000007308 | general_code_change | TypeScript | events_780.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 |
DIFF00000007309 | mentioned_in_comment | Python | tickets_312.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE inventory; -- now deprecated""" | DROP_TABLE | false |
DIFF00000007310 | general_code_change | JavaScript | inventory_873.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007311 | mentioned_in_comment | Python | users_997.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE refunds RENAME COLUMN email TO state; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000007312 | raw_sql_safe | SQL | transactions_132.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE sessions ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000007313 | orm_schema_change | JavaScript | inventory_980.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('shipments', table => table.dropColumn('price')) | NONE | true |
DIFF00000007314 | orm_schema_change | JavaScript | reviews_945.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('employees', table => table.dropColumn('created_at')) | NONE | true |
DIFF00000007315 | obfuscated_destructive | SQL | events_692.sql | schema cleanup | @@ -1,3 +1,3 @@
+trUNCate table oRdERS; | TRUNCATE | true |
DIFF00000007316 | raw_sql_destructive | SQL | employees_357.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE comments SET is_active = CONCAT(is_active, name); | UPDATE_CONCAT | true |
DIFF00000007317 | orm_schema_change | JavaScript | comments_369.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('users', table => table.dropColumn('price')) | NONE | true |
DIFF00000007318 | raw_sql_safe | SQL | transactions_376.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_reviews_order_id ON reviews (name); | NONE | false |
DIFF00000007319 | orm_schema_change | JavaScript | payments_410.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('refunds', 'created_at') | NONE | true |
DIFF00000007320 | orm_schema_change | TypeScript | reviews_88.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Invoices { // removed field: phone } | NONE | true |
DIFF00000007321 | mentioned_in_comment | Python | events_858.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM payments; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000007322 | raw_sql_destructive | SQL | accounts_266.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | true |
DIFF00000007323 | raw_sql_safe | SQL | sessions_635.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE refunds SET name = %s WHERE updated_at = %s; | NONE | false |
DIFF00000007324 | raw_sql_safe | SQL | events_809.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO refunds (status, name) VALUES (%s, %s); | NONE | false |
DIFF00000007325 | raw_sql_safe | SQL | tickets_197.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_metadata ON refunds (price); | NONE | false |
DIFF00000007326 | raw_sql_safe | SQL | payments_637.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE role = 'active'; | NONE | false |
DIFF00000007327 | general_code_change | Go | accounts_214.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007328 | general_code_change | JavaScript | orders_463.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 |
DIFF00000007329 | orm_schema_change | JavaScript | products_374.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('tickets', 'amount') | NONE | true |
DIFF00000007330 | raw_sql_destructive | SQL | shipments_722.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | true |
DIFF00000007331 | obfuscated_destructive | SQL | inventory_378.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE inventory; | DROP_TABLE | true |
DIFF00000007332 | raw_sql_safe | SQL | products_858.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_name ON customers (order_id); | NONE | false |
DIFF00000007333 | orm_schema_change | JavaScript | employees_152.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'name') | NONE | true |
DIFF00000007334 | general_code_change | Python | tickets_215.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000007335 | orm_schema_change | JavaScript | accounts_154.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('refunds', 'quantity') | NONE | true |
DIFF00000007336 | general_code_change | TypeScript | sessions_102.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 |
DIFF00000007337 | general_code_change | Go | invoices_748.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007338 | raw_sql_destructive | SQL | customers_73.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00000007339 | raw_sql_safe | SQL | users_56.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE score = 'active'; | NONE | false |
DIFF00000007340 | general_code_change | TypeScript | comments_796.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 |
DIFF00000007341 | general_code_change | Go | shipments_612.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007342 | obfuscated_destructive | SQL | tickets_125.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
users
SET
created_at
=
CONCAT(created_at,
email); | UPDATE_CONCAT | true |
DIFF00000007343 | orm_schema_change | JavaScript | products_795.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'address') | NONE | true |
DIFF00000007344 | test_suite_cleanup | SQL | tests/shipments_606.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE orders SET role = CONCAT(role, is_active); | UPDATE_CONCAT | false |
DIFF00000007345 | raw_sql_destructive | SQL | products_383.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | true |
DIFF00000007346 | obfuscated_destructive | SQL | invoices_522.sql | schema cleanup | @@ -1,3 +1,3 @@
+update invoices set updated_at = concat(updated_at, quantity); | UPDATE_CONCAT | true |
DIFF00000007347 | mentioned_in_comment | Python | tickets_646.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE products SET created_at = CONCAT(created_at, order_id);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000007348 | test_suite_cleanup | SQL | spec/employees_897.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE users RENAME COLUMN order_id TO amount_cents; | ALTER_RENAME | false |
DIFF00000007349 | raw_sql_safe | SQL | shipments_971.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET email = %s WHERE email = %s; | NONE | false |
DIFF00000007350 | general_code_change | Python | events_116.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000007351 | orm_schema_change | Ruby | logs_669.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :tickets, :metadata | NONE | true |
DIFF00000007352 | general_code_change | JavaScript | orders_779.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 |
DIFF00000007353 | obfuscated_destructive | SQL | payments_984.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table notifications; | TRUNCATE | true |
DIFF00000007354 | test_suite_cleanup | SQL | test/users_448.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | false |
DIFF00000007355 | mentioned_in_comment | Python | shipments_185.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM tickets;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000007356 | mentioned_in_comment | Python | transactions_372.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE invoices; -- now deprecated""" | TRUNCATE | false |
DIFF00000007357 | orm_schema_change | JavaScript | invoices_615.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'role') | NONE | true |
DIFF00000007358 | general_code_change | Python | notifications_654.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007359 | raw_sql_safe | SQL | subscriptions_885.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM reviews WHERE description = 'active'; | NONE | false |
DIFF00000007360 | mentioned_in_comment | Python | comments_556.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM reviews; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000007361 | mentioned_in_comment | Python | comments_995.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE accounts;") | DROP_TABLE | false |
DIFF00000007362 | obfuscated_destructive | SQL | employees_242.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00000007363 | general_code_change | Go | sessions_161.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007364 | test_suite_cleanup | SQL | mysql-test/suite/notifications_606.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | false |
DIFF00000007365 | mentioned_in_comment | Python | comments_899.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE shipments RENAME COLUMN category TO user_role;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000007366 | general_code_change | JavaScript | events_181.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007367 | general_code_change | TypeScript | invoices_315.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 |
DIFF00000007368 | orm_schema_change | JavaScript | transactions_935.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'metadata') | NONE | true |
DIFF00000007369 | orm_schema_change | Python | transactions_165.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='metadata') | NONE | true |
DIFF00000007370 | general_code_change | JavaScript | transactions_990.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 |
DIFF00000007371 | raw_sql_safe | SQL | comments_115.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM tickets WHERE role = 'active'; | NONE | false |
DIFF00000007372 | raw_sql_safe | SQL | orders_771.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000007373 | general_code_change | Java | inventory_254.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000007374 | obfuscated_destructive | SQL | customers_459.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table employees drop column price; | DROP_COLUMN | true |
DIFF00000007375 | raw_sql_destructive | SQL | inventory_6.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN address TO amount_cents; | ALTER_RENAME | true |
DIFF00000007376 | test_suite_cleanup | SQL | test/users_444.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | false |
DIFF00000007377 | mentioned_in_comment | Python | comments_548.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE refunds;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000007378 | orm_schema_change | TypeScript | employees_825.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Payments { // removed field: name } | NONE | true |
DIFF00000007379 | general_code_change | Python | comments_465.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007380 | raw_sql_safe | SQL | payments_386.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO refunds (role, metadata) VALUES (%s, %s); | NONE | false |
DIFF00000007381 | orm_schema_change | TypeScript | refunds_889.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Tickets { // removed field: role } | NONE | true |
DIFF00000007382 | raw_sql_safe | SQL | tickets_257.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_logs_description ON logs (phone); | NONE | false |
DIFF00000007383 | orm_schema_change | Ruby | accounts_846.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :products, :score | NONE | true |
DIFF00000007384 | raw_sql_destructive | SQL | sessions_905.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE sessions SET is_active = CONCAT(is_active, email); | UPDATE_CONCAT | true |
DIFF00000007385 | test_suite_cleanup | SQL | spec/logs_758.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE tickets SET priority = CONCAT(priority, role); | UPDATE_CONCAT | false |
DIFF00000007386 | test_suite_cleanup | SQL | mysql-test/suite/refunds_492.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | false |
DIFF00000007387 | test_suite_cleanup | SQL | test/invoices_869.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | false |
DIFF00000007388 | general_code_change | Python | inventory_197.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000007389 | raw_sql_destructive | SQL | events_468.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | true |
DIFF00000007390 | general_code_change | JavaScript | invoices_828.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 |
DIFF00000007391 | general_code_change | Python | shipments_708.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007392 | test_suite_cleanup | SQL | test/reviews_557.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | false |
DIFF00000007393 | general_code_change | TypeScript | employees_192.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 |
DIFF00000007394 | raw_sql_safe | SQL | invoices_728.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM tickets WHERE name = 'active'; | NONE | false |
DIFF00000007395 | raw_sql_destructive | SQL | orders_359.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE products SET quantity = CONCAT(quantity, created_at); | UPDATE_CONCAT | true |
DIFF00000007396 | test_suite_cleanup | SQL | mysql-test/suite/reviews_494.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE users RENAME COLUMN balance TO amount_cents; | ALTER_RENAME | false |
DIFF00000007397 | general_code_change | Python | reviews_979.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000007398 | mentioned_in_comment | Python | inventory_596.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE invoices SET user_id = CONCAT(user_id, priority);") | UPDATE_CONCAT | false |
DIFF00000007399 | obfuscated_destructive | SQL | employees_808.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
products
RENAME
COLUMN
score
TO
state; | ALTER_RENAME | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.