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 |
|---|---|---|---|---|---|---|---|
DIFF00000007200 | test_suite_cleanup | SQL | mysql-test/suite/products_202.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE invoices SET score = CONCAT(score, email); | UPDATE_CONCAT | false |
DIFF00000007201 | raw_sql_safe | SQL | logs_796.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE accounts ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000007202 | obfuscated_destructive | SQL | logs_128.sql | schema cleanup | @@ -1,3 +1,3 @@
+updaTe REvieWs seT emaIL = CoNCAt(emaIL, PRice); | UPDATE_CONCAT | true |
DIFF00000007203 | raw_sql_destructive | SQL | customers_732.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE inventory SET metadata = CONCAT(metadata, priority); | UPDATE_CONCAT | true |
DIFF00000007204 | general_code_change | TypeScript | shipments_473.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 |
DIFF00000007205 | orm_schema_change | JavaScript | logs_723.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('sessions', 'score') | NONE | true |
DIFF00000007206 | general_code_change | Ruby | shipments_466.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007207 | orm_schema_change | TypeScript | notifications_550.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Inventory { // removed field: balance } | NONE | true |
DIFF00000007208 | raw_sql_destructive | SQL | users_502.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN role TO state; | ALTER_RENAME | true |
DIFF00000007209 | raw_sql_safe | SQL | reviews_317.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000007210 | general_code_change | JavaScript | accounts_58.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007211 | obfuscated_destructive | SQL | inventory_701.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN created_at; | DROP_COLUMN | true |
DIFF00000007212 | obfuscated_destructive | SQL | invoices_611.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from refunds; | DELETE_UNQUALIFIED | true |
DIFF00000007213 | orm_schema_change | Ruby | comments_713.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :users, :status | NONE | true |
DIFF00000007214 | raw_sql_safe | SQL | invoices_815.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_tickets_address ON tickets (balance); | NONE | false |
DIFF00000007215 | orm_schema_change | Ruby | invoices_152.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :orders, :name | NONE | true |
DIFF00000007216 | raw_sql_safe | SQL | customers_185.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET order_id = %s WHERE price = %s; | NONE | false |
DIFF00000007217 | obfuscated_destructive | SQL | shipments_544.sql | schema cleanup | @@ -1,3 +1,3 @@
+DElETe FrOM SHIpMENTS; | DELETE_UNQUALIFIED | true |
DIFF00000007218 | raw_sql_destructive | SQL | subscriptions_739.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN is_active; | DROP_COLUMN | true |
DIFF00000007219 | raw_sql_destructive | SQL | notifications_665.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE events; | TRUNCATE | true |
DIFF00000007220 | mentioned_in_comment | Python | notifications_890.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE refunds RENAME COLUMN address TO full_name;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000007221 | obfuscated_destructive | SQL | products_359.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table notifications rename column price to user_role; | ALTER_RENAME | true |
DIFF00000007222 | raw_sql_destructive | SQL | notifications_264.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE employees SET name = CONCAT(name, amount); | UPDATE_CONCAT | true |
DIFF00000007223 | raw_sql_safe | SQL | invoices_136.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE products SET description = %s WHERE created_at = %s; | NONE | false |
DIFF00000007224 | raw_sql_safe | SQL | employees_428.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000007225 | obfuscated_destructive | SQL | reviews_775.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
notifications; | TRUNCATE | true |
DIFF00000007226 | mentioned_in_comment | Python | sessions_410.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE refunds;") | TRUNCATE | false |
DIFF00000007227 | obfuscated_destructive | SQL | inventory_501.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
shipments
RENAME
COLUMN
category
TO
full_name; | ALTER_RENAME | true |
DIFF00000007228 | raw_sql_destructive | SQL | orders_703.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | true |
DIFF00000007229 | general_code_change | Python | notifications_291.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000007230 | obfuscated_destructive | SQL | payments_558.sql | schema cleanup | @@ -1,3 +1,3 @@
+upDatE tiCKETs set EMaiL = cONCaT(eMAil, NAmE); | UPDATE_CONCAT | true |
DIFF00000007231 | raw_sql_destructive | SQL | inventory_835.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM events; | DELETE_UNQUALIFIED | true |
DIFF00000007232 | mentioned_in_comment | Python | invoices_550.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE employees DROP COLUMN order_id;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000007233 | mentioned_in_comment | Python | employees_623.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE transactions; -- now deprecated""" | DROP_TABLE | false |
DIFF00000007234 | general_code_change | JavaScript | notifications_573.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007235 | raw_sql_safe | SQL | subscriptions_998.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE reviews ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000007236 | raw_sql_destructive | SQL | tickets_415.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE users; | DROP_TABLE | true |
DIFF00000007237 | orm_schema_change | Ruby | comments_363.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :price | NONE | true |
DIFF00000007238 | general_code_change | Go | shipments_780.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007239 | general_code_change | JavaScript | employees_279.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000007240 | orm_schema_change | Ruby | orders_526.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :subscriptions, :created_at | NONE | true |
DIFF00000007241 | mentioned_in_comment | Python | sessions_186.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE events RENAME COLUMN category TO contact_email;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000007242 | orm_schema_change | TypeScript | sessions_224.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: is_active } | NONE | true |
DIFF00000007243 | raw_sql_destructive | SQL | shipments_944.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00000007244 | obfuscated_destructive | SQL | invoices_126.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE tickets DROP COLUMN metadata; | DROP_COLUMN | true |
DIFF00000007245 | raw_sql_safe | SQL | orders_77.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO invoices (score, amount) VALUES (%s, %s); | NONE | false |
DIFF00000007246 | test_suite_cleanup | SQL | spec/notifications_196.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE events; | TRUNCATE | false |
DIFF00000007247 | orm_schema_change | Ruby | users_560.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :orders, :address | NONE | true |
DIFF00000007248 | orm_schema_change | JavaScript | logs_917.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('invoices', table => table.dropColumn('priority')) | NONE | true |
DIFF00000007249 | mentioned_in_comment | Python | orders_131.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE inventory DROP COLUMN amount; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000007250 | raw_sql_destructive | SQL | shipments_354.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00000007251 | mentioned_in_comment | Python | reviews_470.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE users SET user_id = CONCAT(user_id, score);") | UPDATE_CONCAT | false |
DIFF00000007252 | general_code_change | TypeScript | refunds_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 |
DIFF00000007253 | raw_sql_destructive | SQL | orders_592.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds RENAME COLUMN user_id TO amount_cents; | ALTER_RENAME | true |
DIFF00000007254 | orm_schema_change | TypeScript | users_819.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Tickets { // removed field: user_id } | NONE | true |
DIFF00000007255 | mentioned_in_comment | Python | employees_243.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE orders;") | DROP_TABLE | false |
DIFF00000007256 | orm_schema_change | Python | employees_415.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='tickets', name='balance') | NONE | true |
DIFF00000007257 | raw_sql_destructive | SQL | products_273.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | true |
DIFF00000007258 | general_code_change | Go | inventory_115.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000007259 | raw_sql_safe | SQL | transactions_382.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_invoices_address ON invoices (score); | NONE | false |
DIFF00000007260 | raw_sql_safe | SQL | notifications_883.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE reviews ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000007261 | obfuscated_destructive | SQL | events_64.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM orders; | DELETE_UNQUALIFIED | true |
DIFF00000007262 | raw_sql_destructive | SQL | logs_104.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | true |
DIFF00000007263 | raw_sql_safe | SQL | customers_167.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (name, amount) VALUES (%s, %s); | NONE | false |
DIFF00000007264 | raw_sql_destructive | SQL | products_680.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN category TO amount_cents; | ALTER_RENAME | true |
DIFF00000007265 | orm_schema_change | Ruby | shipments_210.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :refunds, :quantity | NONE | true |
DIFF00000007266 | mentioned_in_comment | Python | shipments_972.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE tickets DROP COLUMN role; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000007267 | raw_sql_safe | SQL | reviews_650.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE users ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000007268 | raw_sql_destructive | SQL | sessions_502.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE users; | DROP_TABLE | true |
DIFF00000007269 | raw_sql_destructive | SQL | refunds_454.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM payments; | DELETE_UNQUALIFIED | true |
DIFF00000007270 | general_code_change | JavaScript | customers_955.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 |
DIFF00000007271 | raw_sql_destructive | SQL | events_111.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | true |
DIFF00000007272 | obfuscated_destructive | SQL | logs_280.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00000007273 | obfuscated_destructive | SQL | sessions_514.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | true |
DIFF00000007274 | raw_sql_safe | SQL | payments_763.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO subscriptions (status, priority) VALUES (%s, %s); | NONE | false |
DIFF00000007275 | raw_sql_safe | SQL | products_113.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO products (description, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00000007276 | obfuscated_destructive | SQL | tickets_206.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00000007277 | obfuscated_destructive | SQL | subscriptions_134.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNcAte tabLe noTificAtioNs; | TRUNCATE | true |
DIFF00000007278 | raw_sql_destructive | SQL | orders_799.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET order_id = CONCAT(order_id, order_id); | UPDATE_CONCAT | true |
DIFF00000007279 | raw_sql_destructive | SQL | shipments_430.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices RENAME COLUMN updated_at TO contact_email; | ALTER_RENAME | true |
DIFF00000007280 | general_code_change | Java | inventory_122.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000007281 | mentioned_in_comment | Python | customers_581.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE comments SET price = CONCAT(price, quantity);") | UPDATE_CONCAT | false |
DIFF00000007282 | raw_sql_destructive | SQL | orders_329.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00000007283 | test_suite_cleanup | SQL | mysql-test/suite/customers_979.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE transactions; | DROP_TABLE | false |
DIFF00000007284 | general_code_change | Ruby | comments_295.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000007285 | obfuscated_destructive | SQL | inventory_13.sql | schema cleanup | @@ -1,3 +1,3 @@
+DeLeTe FROm notiFicAtiOnS; | DELETE_UNQUALIFIED | true |
DIFF00000007286 | mentioned_in_comment | Python | users_610.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE tickets;") | DROP_TABLE | false |
DIFF00000007287 | general_code_change | Python | orders_781.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000007288 | general_code_change | TypeScript | comments_779.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 |
DIFF00000007289 | mentioned_in_comment | Python | payments_290.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM accounts;") | DELETE_UNQUALIFIED | false |
DIFF00000007290 | orm_schema_change | TypeScript | customers_202.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Comments { // removed field: role } | NONE | true |
DIFF00000007291 | mentioned_in_comment | Python | sessions_773.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE customers; -- now deprecated""" | DROP_TABLE | false |
DIFF00000007292 | test_suite_cleanup | SQL | spec/invoices_287.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN category TO user_role; | ALTER_RENAME | false |
DIFF00000007293 | raw_sql_destructive | SQL | refunds_658.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | true |
DIFF00000007294 | general_code_change | TypeScript | invoices_767.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 |
DIFF00000007295 | raw_sql_destructive | SQL | products_487.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE transactions; | TRUNCATE | true |
DIFF00000007296 | raw_sql_destructive | SQL | accounts_355.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN order_id TO full_name; | ALTER_RENAME | true |
DIFF00000007297 | raw_sql_safe | SQL | logs_31.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET score = %s WHERE status = %s; | NONE | false |
DIFF00000007298 | raw_sql_destructive | SQL | transactions_194.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | true |
DIFF00000007299 | raw_sql_destructive | SQL | sessions_528.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN order_id 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.