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 |
|---|---|---|---|---|---|---|---|
DIFF00000009200 | orm_schema_change | JavaScript | orders_806.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('customers', table => table.dropColumn('price')) | NONE | true |
DIFF00000009201 | raw_sql_destructive | SQL | products_585.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00000009202 | raw_sql_destructive | SQL | employees_501.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN category TO contact_email; | ALTER_RENAME | true |
DIFF00000009203 | raw_sql_safe | SQL | payments_996.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE customers SET metadata = %s WHERE description = %s; | NONE | false |
DIFF00000009204 | raw_sql_safe | SQL | products_774.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET price = %s WHERE user_id = %s; | NONE | false |
DIFF00000009205 | raw_sql_destructive | SQL | payments_983.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE sessions SET user_id = CONCAT(user_id, email); | UPDATE_CONCAT | true |
DIFF00000009206 | raw_sql_safe | SQL | invoices_245.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE transactions ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000009207 | obfuscated_destructive | SQL | comments_751.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table invoices; | DROP_TABLE | true |
DIFF00000009208 | raw_sql_safe | SQL | invoices_985.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE inventory SET score = %s WHERE address = %s; | NONE | false |
DIFF00000009209 | test_suite_cleanup | SQL | test/reviews_633.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM orders; | DELETE_UNQUALIFIED | false |
DIFF00000009210 | raw_sql_destructive | SQL | transactions_486.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN status; | DROP_COLUMN | true |
DIFF00000009211 | orm_schema_change | TypeScript | payments_570.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Payments { // removed field: description } | NONE | true |
DIFF00000009212 | test_suite_cleanup | SQL | spec/payments_781.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN status TO contact_email; | ALTER_RENAME | false |
DIFF00000009213 | raw_sql_safe | SQL | shipments_769.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (updated_at, description) VALUES (%s, %s); | NONE | false |
DIFF00000009214 | orm_schema_change | TypeScript | reviews_85.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Events { // removed field: balance } | NONE | true |
DIFF00000009215 | orm_schema_change | TypeScript | customers_84.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Employees { // removed field: name } | NONE | true |
DIFF00000009216 | raw_sql_destructive | SQL | inventory_346.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions DROP COLUMN status; | DROP_COLUMN | true |
DIFF00000009217 | general_code_change | Java | customers_19.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000009218 | mentioned_in_comment | Python | products_438.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE shipments;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000009219 | mentioned_in_comment | Python | transactions_321.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE orders;") | TRUNCATE | false |
DIFF00000009220 | orm_schema_change | Ruby | users_688.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :orders, :description | NONE | true |
DIFF00000009221 | general_code_change | Java | logs_560.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000009222 | general_code_change | Python | payments_203.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009223 | orm_schema_change | JavaScript | subscriptions_498.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('price')) | NONE | true |
DIFF00000009224 | general_code_change | JavaScript | orders_55.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 |
DIFF00000009225 | test_suite_cleanup | SQL | tests/payments_482.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN balance; | DROP_COLUMN | false |
DIFF00000009226 | orm_schema_change | Ruby | transactions_121.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :quantity | NONE | true |
DIFF00000009227 | raw_sql_destructive | SQL | payments_925.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN email TO state; | ALTER_RENAME | true |
DIFF00000009228 | general_code_change | JavaScript | notifications_138.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000009229 | test_suite_cleanup | SQL | tests/employees_239.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE invoices SET price = CONCAT(price, metadata); | UPDATE_CONCAT | false |
DIFF00000009230 | obfuscated_destructive | SQL | invoices_534.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLter tablE sUbsCriptions ReNamE COlUmn EmAIL TO fULl_NAMe; | ALTER_RENAME | true |
DIFF00000009231 | raw_sql_destructive | SQL | refunds_236.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | true |
DIFF00000009232 | obfuscated_destructive | SQL | users_323.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
notifications; | DELETE_UNQUALIFIED | true |
DIFF00000009233 | orm_schema_change | JavaScript | employees_149.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('subscriptions', 'created_at') | NONE | true |
DIFF00000009234 | general_code_change | Ruby | notifications_816.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000009235 | test_suite_cleanup | SQL | tests/reviews_430.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN category TO contact_email; | ALTER_RENAME | false |
DIFF00000009236 | mentioned_in_comment | Python | invoices_377.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE refunds; -- now deprecated""" | DROP_TABLE | false |
DIFF00000009237 | raw_sql_destructive | SQL | notifications_132.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN metadata; | DROP_COLUMN | true |
DIFF00000009238 | raw_sql_safe | SQL | subscriptions_193.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_orders_updated_at ON orders (priority); | NONE | false |
DIFF00000009239 | general_code_change | TypeScript | employees_785.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 |
DIFF00000009240 | general_code_change | TypeScript | users_676.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 |
DIFF00000009241 | raw_sql_destructive | SQL | reviews_545.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN phone TO state; | ALTER_RENAME | true |
DIFF00000009242 | general_code_change | JavaScript | notifications_255.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000009243 | orm_schema_change | Python | subscriptions_57.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='comments', name='priority') | NONE | true |
DIFF00000009244 | orm_schema_change | Python | notifications_229.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='logs', name='email') | NONE | true |
DIFF00000009245 | raw_sql_safe | SQL | users_369.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE comments SET score = %s WHERE is_active = %s; | NONE | false |
DIFF00000009246 | raw_sql_destructive | SQL | comments_7.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | true |
DIFF00000009247 | raw_sql_safe | SQL | tickets_532.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000009248 | test_suite_cleanup | SQL | test/orders_348.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE employees SET name = CONCAT(name, name); | UPDATE_CONCAT | false |
DIFF00000009249 | raw_sql_safe | SQL | shipments_640.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE inventory ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000009250 | orm_schema_change | TypeScript | users_50.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Inventory { // removed field: quantity } | NONE | true |
DIFF00000009251 | orm_schema_change | JavaScript | customers_405.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('subscriptions', table => table.dropColumn('priority')) | NONE | true |
DIFF00000009252 | mentioned_in_comment | Python | sessions_503.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE notifications;") | TRUNCATE | false |
DIFF00000009253 | obfuscated_destructive | SQL | transactions_829.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table invoices rename column description to full_name; | ALTER_RENAME | true |
DIFF00000009254 | general_code_change | Python | notifications_385.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009255 | general_code_change | Python | products_40.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009256 | mentioned_in_comment | Python | orders_61.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE transactions;") | TRUNCATE | false |
DIFF00000009257 | general_code_change | Python | comments_229.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009258 | general_code_change | Java | refunds_89.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000009259 | obfuscated_destructive | SQL | products_857.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
payments; | DELETE_UNQUALIFIED | true |
DIFF00000009260 | general_code_change | TypeScript | accounts_61.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 |
DIFF00000009261 | orm_schema_change | JavaScript | shipments_599.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('user_id')) | NONE | true |
DIFF00000009262 | mentioned_in_comment | Python | accounts_116.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE orders DROP COLUMN role;") | DROP_COLUMN | false |
DIFF00000009263 | raw_sql_safe | SQL | products_487.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (balance, category) VALUES (%s, %s); | NONE | false |
DIFF00000009264 | raw_sql_safe | SQL | customers_410.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO accounts (phone, metadata) VALUES (%s, %s); | NONE | false |
DIFF00000009265 | orm_schema_change | Ruby | transactions_144.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :transactions, :address | NONE | true |
DIFF00000009266 | raw_sql_safe | SQL | users_406.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000009267 | general_code_change | Java | products_515.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000009268 | raw_sql_safe | SQL | shipments_178.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE shipments ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000009269 | obfuscated_destructive | SQL | logs_170.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN user_id TO user_role; | ALTER_RENAME | true |
DIFF00000009270 | obfuscated_destructive | SQL | tickets_642.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from shipments; | DELETE_UNQUALIFIED | true |
DIFF00000009271 | raw_sql_safe | SQL | users_966.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000009272 | test_suite_cleanup | SQL | spec/shipments_784.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN price; | DROP_COLUMN | false |
DIFF00000009273 | orm_schema_change | Python | customers_581.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='products', name='score') | NONE | true |
DIFF00000009274 | raw_sql_safe | SQL | sessions_805.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE comments SET email = %s WHERE name = %s; | NONE | false |
DIFF00000009275 | orm_schema_change | Ruby | events_180.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :notifications, :balance | NONE | true |
DIFF00000009276 | raw_sql_safe | SQL | orders_623.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_score ON customers (address); | NONE | false |
DIFF00000009277 | test_suite_cleanup | SQL | test/accounts_947.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE transactions; | DROP_TABLE | false |
DIFF00000009278 | general_code_change | Python | accounts_994.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009279 | raw_sql_safe | SQL | events_447.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE quantity = 'active'; | NONE | false |
DIFF00000009280 | general_code_change | TypeScript | events_172.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 |
DIFF00000009281 | raw_sql_safe | SQL | orders_573.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000009282 | raw_sql_safe | SQL | inventory_238.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE payments ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000009283 | general_code_change | Python | inventory_889.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009284 | orm_schema_change | JavaScript | comments_434.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('invoices', 'amount') | NONE | true |
DIFF00000009285 | raw_sql_safe | SQL | orders_767.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_is_active ON notifications (name); | NONE | false |
DIFF00000009286 | test_suite_cleanup | SQL | tests/transactions_947.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM refunds; | DELETE_UNQUALIFIED | false |
DIFF00000009287 | obfuscated_destructive | SQL | users_249.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPdatE REvIEWs seT cAtegORY = cONcAT(caTegoRY, pHONe); | UPDATE_CONCAT | true |
DIFF00000009288 | general_code_change | Java | sessions_128.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000009289 | mentioned_in_comment | Python | tickets_773.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE users RENAME COLUMN email TO full_name;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000009290 | obfuscated_destructive | SQL | reviews_210.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE events SET created_at = CONCAT(created_at, score); | UPDATE_CONCAT | true |
DIFF00000009291 | general_code_change | Python | users_166.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009292 | general_code_change | Ruby | invoices_556.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000009293 | general_code_change | TypeScript | payments_521.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 |
DIFF00000009294 | raw_sql_destructive | SQL | customers_630.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | true |
DIFF00000009295 | obfuscated_destructive | SQL | products_594.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRuNCaTe tablE AcCounTs; | TRUNCATE | true |
DIFF00000009296 | general_code_change | TypeScript | products_496.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 |
DIFF00000009297 | mentioned_in_comment | Python | products_128.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE users; -- now deprecated""" | TRUNCATE | false |
DIFF00000009298 | orm_schema_change | Ruby | logs_74.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :sessions, :status | NONE | true |
DIFF00000009299 | obfuscated_destructive | SQL | notifications_612.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
payments
SET
price
=
CONCAT(price,
score); | UPDATE_CONCAT | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.