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 |
|---|---|---|---|---|---|---|---|
DIFF00099997200 | raw_sql_safe | SQL | products_67.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO transactions (priority, amount) VALUES (%s, %s); | NONE | false |
DIFF00099997201 | raw_sql_destructive | SQL | payments_802.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE users; | DROP_TABLE | true |
DIFF00099997202 | general_code_change | JavaScript | payments_990.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997203 | orm_schema_change | JavaScript | refunds_912.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('customers', table => table.dropColumn('category')) | NONE | true |
DIFF00099997204 | orm_schema_change | Ruby | notifications_558.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :comments, :score | NONE | true |
DIFF00099997205 | obfuscated_destructive | SQL | tickets_925.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
events
DROP
COLUMN
order_id; | DROP_COLUMN | true |
DIFF00099997206 | mentioned_in_comment | Python | inventory_460.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE employees SET created_at = CONCAT(created_at, quantity);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099997207 | general_code_change | Ruby | comments_645.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997208 | orm_schema_change | Ruby | payments_840.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :events, :balance | NONE | true |
DIFF00099997209 | raw_sql_safe | SQL | invoices_684.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE inventory ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099997210 | obfuscated_destructive | SQL | payments_969.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
inventory; | TRUNCATE | true |
DIFF00099997211 | obfuscated_destructive | SQL | shipments_879.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table comments drop column price; | DROP_COLUMN | true |
DIFF00099997212 | raw_sql_safe | SQL | accounts_551.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_category ON subscriptions (role); | NONE | false |
DIFF00099997213 | orm_schema_change | TypeScript | accounts_988.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: amount } | NONE | true |
DIFF00099997214 | test_suite_cleanup | SQL | spec/subscriptions_252.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE accounts; | DROP_TABLE | false |
DIFF00099997215 | general_code_change | Python | invoices_363.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997216 | orm_schema_change | JavaScript | reviews_562.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'price') | NONE | true |
DIFF00099997217 | raw_sql_safe | SQL | accounts_527.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE tickets SET email = %s WHERE user_id = %s; | NONE | false |
DIFF00099997218 | raw_sql_destructive | SQL | subscriptions_433.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory DROP COLUMN email; | DROP_COLUMN | true |
DIFF00099997219 | mentioned_in_comment | Python | tickets_817.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM accounts;") | DELETE_UNQUALIFIED | false |
DIFF00099997220 | obfuscated_destructive | SQL | products_666.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLter TAble reFunds ReNAme COlUmn uPdaTed_at to CoNtaCT_EmAiL; | ALTER_RENAME | true |
DIFF00099997221 | mentioned_in_comment | Python | employees_39.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE products SET role = CONCAT(role, created_at);") | UPDATE_CONCAT | false |
DIFF00099997222 | obfuscated_destructive | SQL | logs_278.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
accounts
DROP
COLUMN
quantity; | DROP_COLUMN | true |
DIFF00099997223 | test_suite_cleanup | SQL | tests/transactions_919.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | false |
DIFF00099997224 | raw_sql_safe | SQL | inventory_542.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE updated_at = 'active'; | NONE | false |
DIFF00099997225 | general_code_change | Python | users_453.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997226 | raw_sql_destructive | SQL | products_260.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00099997227 | raw_sql_safe | SQL | refunds_764.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE products SET category = %s WHERE status = %s; | NONE | false |
DIFF00099997228 | general_code_change | Java | payments_505.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997229 | raw_sql_destructive | SQL | events_293.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | true |
DIFF00099997230 | general_code_change | JavaScript | tickets_239.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 |
DIFF00099997231 | raw_sql_safe | SQL | tickets_642.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_invoices_price ON invoices (user_id); | NONE | false |
DIFF00099997232 | general_code_change | TypeScript | orders_761.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 |
DIFF00099997233 | obfuscated_destructive | SQL | invoices_969.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
transactions
DROP
COLUMN
category; | DROP_COLUMN | true |
DIFF00099997234 | obfuscated_destructive | SQL | transactions_540.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE tickets SET user_id = CONCAT(user_id, status); | UPDATE_CONCAT | true |
DIFF00099997235 | obfuscated_destructive | SQL | comments_303.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
users; | DELETE_UNQUALIFIED | true |
DIFF00099997236 | orm_schema_change | TypeScript | employees_420.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: priority } | NONE | true |
DIFF00099997237 | raw_sql_destructive | SQL | sessions_991.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE inventory SET user_id = CONCAT(user_id, quantity); | UPDATE_CONCAT | true |
DIFF00099997238 | raw_sql_safe | SQL | users_353.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO invoices (updated_at, price) VALUES (%s, %s); | NONE | false |
DIFF00099997239 | raw_sql_destructive | SQL | transactions_439.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE payments SET priority = CONCAT(priority, category); | UPDATE_CONCAT | true |
DIFF00099997240 | orm_schema_change | Python | accounts_753.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='address') | NONE | true |
DIFF00099997241 | general_code_change | Ruby | notifications_209.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997242 | orm_schema_change | TypeScript | events_349.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Transactions { // removed field: quantity } | NONE | true |
DIFF00099997243 | obfuscated_destructive | SQL | inventory_492.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
DIFF00099997244 | orm_schema_change | Ruby | tickets_855.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :customers, :category | NONE | true |
DIFF00099997245 | mentioned_in_comment | Python | invoices_776.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE comments DROP COLUMN priority;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099997246 | general_code_change | Go | reviews_16.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997247 | obfuscated_destructive | SQL | employees_768.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table tickets drop column description; | DROP_COLUMN | true |
DIFF00099997248 | raw_sql_destructive | SQL | refunds_946.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE transactions; | DROP_TABLE | true |
DIFF00099997249 | raw_sql_safe | SQL | invoices_397.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_accounts_quantity ON accounts (created_at); | NONE | false |
DIFF00099997250 | mentioned_in_comment | Python | reviews_293.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE comments RENAME COLUMN status TO state;") | ALTER_RENAME | false |
DIFF00099997251 | general_code_change | JavaScript | refunds_493.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 |
DIFF00099997252 | obfuscated_destructive | SQL | transactions_271.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE logs RENAME COLUMN quantity TO full_name; | ALTER_RENAME | true |
DIFF00099997253 | raw_sql_destructive | SQL | logs_406.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | true |
DIFF00099997254 | raw_sql_safe | SQL | customers_171.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM users WHERE description = 'active'; | NONE | false |
DIFF00099997255 | mentioned_in_comment | Python | comments_767.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE invoices;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099997256 | raw_sql_safe | SQL | tickets_158.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_sessions_metadata ON sessions (email); | NONE | false |
DIFF00099997257 | raw_sql_destructive | SQL | customers_145.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE tickets SET name = CONCAT(name, description); | UPDATE_CONCAT | true |
DIFF00099997258 | mentioned_in_comment | Python | shipments_137.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE sessions RENAME COLUMN price TO amount_cents;") | ALTER_RENAME | false |
DIFF00099997259 | test_suite_cleanup | SQL | test/inventory_248.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | false |
DIFF00099997260 | general_code_change | Go | users_946.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997261 | orm_schema_change | JavaScript | events_734.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'address') | NONE | true |
DIFF00099997262 | general_code_change | TypeScript | tickets_415.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 |
DIFF00099997263 | obfuscated_destructive | SQL | comments_791.sql | schema cleanup | @@ -1,3 +1,3 @@
+upDAtE PAymeNTs SET pHone = CoNcaT(Phone, uPDAteD_At); | UPDATE_CONCAT | true |
DIFF00099997264 | general_code_change | JavaScript | logs_447.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997265 | orm_schema_change | Ruby | notifications_459.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :reviews, :amount | NONE | true |
DIFF00099997266 | general_code_change | JavaScript | sessions_548.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 |
DIFF00099997267 | orm_schema_change | Python | sessions_985.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='transactions', name='status') | NONE | true |
DIFF00099997268 | general_code_change | Java | users_50.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997269 | raw_sql_destructive | SQL | reviews_594.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN price; | DROP_COLUMN | true |
DIFF00099997270 | test_suite_cleanup | SQL | tests/shipments_18.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE sessions SET email = CONCAT(email, email); | UPDATE_CONCAT | false |
DIFF00099997271 | orm_schema_change | Python | customers_191.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='tickets', name='email') | NONE | true |
DIFF00099997272 | general_code_change | Python | payments_164.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997273 | orm_schema_change | Ruby | payments_956.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :users, :is_active | NONE | true |
DIFF00099997274 | obfuscated_destructive | SQL | products_293.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | true |
DIFF00099997275 | general_code_change | Ruby | sessions_962.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997276 | raw_sql_destructive | SQL | accounts_595.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN email; | DROP_COLUMN | true |
DIFF00099997277 | test_suite_cleanup | SQL | mysql-test/suite/accounts_823.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE logs SET metadata = CONCAT(metadata, address); | UPDATE_CONCAT | false |
DIFF00099997278 | mentioned_in_comment | Python | shipments_810.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE shipments; -- now deprecated""" | DROP_TABLE | false |
DIFF00099997279 | orm_schema_change | Ruby | products_723.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :description | NONE | true |
DIFF00099997280 | orm_schema_change | Python | transactions_566.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='users', name='category') | NONE | true |
DIFF00099997281 | orm_schema_change | JavaScript | transactions_983.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'price') | NONE | true |
DIFF00099997282 | raw_sql_safe | SQL | subscriptions_183.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE comments SET name = %s WHERE updated_at = %s; | NONE | false |
DIFF00099997283 | general_code_change | TypeScript | inventory_119.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 |
DIFF00099997284 | general_code_change | Python | customers_860.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997285 | general_code_change | Python | comments_878.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997286 | obfuscated_destructive | SQL | employees_719.sql | schema cleanup | @@ -1,3 +1,3 @@
+TrUncaTE tABLE TICkEtS; | TRUNCATE | true |
DIFF00099997287 | raw_sql_destructive | SQL | invoices_217.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions DROP COLUMN name; | DROP_COLUMN | true |
DIFF00099997288 | mentioned_in_comment | Python | customers_878.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE orders;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099997289 | general_code_change | Python | employees_217.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997290 | general_code_change | TypeScript | users_470.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 |
DIFF00099997291 | general_code_change | JavaScript | products_152.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997292 | general_code_change | Python | accounts_726.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997293 | general_code_change | Java | users_275.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997294 | general_code_change | Python | refunds_833.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997295 | obfuscated_destructive | SQL | transactions_502.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
payments; | DELETE_UNQUALIFIED | true |
DIFF00099997296 | orm_schema_change | Python | refunds_535.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='products', name='phone') | NONE | true |
DIFF00099997297 | general_code_change | Go | subscriptions_830.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997298 | general_code_change | JavaScript | comments_752.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997299 | general_code_change | Python | accounts_796.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.