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 |
|---|---|---|---|---|---|---|---|
DIFF00000001200 | orm_schema_change | JavaScript | tickets_193.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('logs', 'order_id') | NONE | true |
DIFF00000001201 | raw_sql_safe | SQL | employees_322.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_quantity ON subscriptions (user_id); | NONE | false |
DIFF00000001202 | general_code_change | Python | accounts_540.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000001203 | obfuscated_destructive | SQL | users_855.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
reviews; | TRUNCATE | true |
DIFF00000001204 | general_code_change | JavaScript | notifications_119.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 |
DIFF00000001205 | mentioned_in_comment | Python | sessions_722.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE inventory DROP COLUMN priority;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000001206 | mentioned_in_comment | Python | payments_263.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE inventory RENAME COLUMN balance TO contact_email;") | ALTER_RENAME | false |
DIFF00000001207 | mentioned_in_comment | Python | invoices_318.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE transactions SET is_active = CONCAT(is_active, user_id); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000001208 | general_code_change | Go | inventory_803.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000001209 | mentioned_in_comment | Python | accounts_636.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE logs;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000001210 | orm_schema_change | Ruby | subscriptions_94.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :accounts, :balance | NONE | true |
DIFF00000001211 | obfuscated_destructive | SQL | orders_423.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
employees
DROP
COLUMN
name; | DROP_COLUMN | true |
DIFF00000001212 | orm_schema_change | JavaScript | subscriptions_785.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('invoices', table => table.dropColumn('description')) | NONE | true |
DIFF00000001213 | orm_schema_change | JavaScript | products_986.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('tickets', table => table.dropColumn('priority')) | NONE | true |
DIFF00000001214 | general_code_change | Java | orders_27.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001215 | raw_sql_safe | SQL | logs_661.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM shipments WHERE price = 'active'; | NONE | false |
DIFF00000001216 | mentioned_in_comment | Python | reviews_416.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM orders;") | DELETE_UNQUALIFIED | false |
DIFF00000001217 | raw_sql_destructive | SQL | logs_571.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE customers SET user_id = CONCAT(user_id, phone); | UPDATE_CONCAT | true |
DIFF00000001218 | raw_sql_safe | SQL | users_667.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (amount, metadata) VALUES (%s, %s); | NONE | false |
DIFF00000001219 | general_code_change | Java | tickets_338.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001220 | orm_schema_change | Ruby | users_603.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :logs, :metadata | NONE | true |
DIFF00000001221 | general_code_change | TypeScript | transactions_264.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 |
DIFF00000001222 | general_code_change | Python | inventory_366.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000001223 | general_code_change | Go | products_737.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000001224 | raw_sql_safe | SQL | subscriptions_739.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE invoices ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000001225 | general_code_change | TypeScript | tickets_135.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 |
DIFF00000001226 | raw_sql_safe | SQL | shipments_981.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM accounts WHERE phone = 'active'; | NONE | false |
DIFF00000001227 | orm_schema_change | JavaScript | accounts_803.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('inventory', table => table.dropColumn('created_at')) | NONE | true |
DIFF00000001228 | raw_sql_safe | SQL | logs_364.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE payments SET balance = %s WHERE quantity = %s; | NONE | false |
DIFF00000001229 | general_code_change | Java | tickets_85.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001230 | raw_sql_safe | SQL | employees_290.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE customers ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000001231 | general_code_change | Go | subscriptions_670.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000001232 | general_code_change | Python | notifications_479.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000001233 | test_suite_cleanup | SQL | mysql-test/suite/orders_552.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | false |
DIFF00000001234 | orm_schema_change | JavaScript | events_854.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('created_at')) | NONE | true |
DIFF00000001235 | general_code_change | Go | reviews_995.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000001236 | raw_sql_destructive | SQL | transactions_722.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | true |
DIFF00000001237 | mentioned_in_comment | Python | invoices_35.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE events SET score = CONCAT(score, metadata);") | UPDATE_CONCAT | false |
DIFF00000001238 | obfuscated_destructive | SQL | subscriptions_803.sql | schema cleanup | @@ -1,3 +1,3 @@
+DelETe FRoM REfUnDs; | DELETE_UNQUALIFIED | true |
DIFF00000001239 | raw_sql_safe | SQL | customers_811.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_orders_user_id ON orders (order_id); | NONE | false |
DIFF00000001240 | obfuscated_destructive | SQL | products_264.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
transactions; | TRUNCATE | true |
DIFF00000001241 | general_code_change | Python | inventory_557.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000001242 | general_code_change | Python | tickets_476.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000001243 | obfuscated_destructive | SQL | customers_623.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELEte froM tRaNsACTIoNs; | DELETE_UNQUALIFIED | true |
DIFF00000001244 | raw_sql_destructive | SQL | comments_161.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM tickets; | DELETE_UNQUALIFIED | true |
DIFF00000001245 | raw_sql_safe | SQL | sessions_486.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_products_metadata ON products (email); | NONE | false |
DIFF00000001246 | raw_sql_safe | SQL | events_919.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM transactions WHERE phone = 'active'; | NONE | false |
DIFF00000001247 | test_suite_cleanup | SQL | mysql-test/suite/products_51.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN balance; | DROP_COLUMN | false |
DIFF00000001248 | raw_sql_destructive | SQL | employees_746.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN role; | DROP_COLUMN | true |
DIFF00000001249 | obfuscated_destructive | SQL | events_762.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET email = CONCAT(email, description); | UPDATE_CONCAT | true |
DIFF00000001250 | raw_sql_safe | SQL | tickets_554.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE payments ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000001251 | test_suite_cleanup | SQL | test/subscriptions_139.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | false |
DIFF00000001252 | mentioned_in_comment | Python | invoices_181.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE accounts SET address = CONCAT(address, priority);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000001253 | obfuscated_destructive | SQL | tickets_692.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
accounts; | DROP_TABLE | true |
DIFF00000001254 | orm_schema_change | JavaScript | shipments_16.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('reviews', 'amount') | NONE | true |
DIFF00000001255 | general_code_change | JavaScript | logs_804.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 |
DIFF00000001256 | mentioned_in_comment | Python | tickets_783.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE invoices SET order_id = CONCAT(order_id, price);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000001257 | raw_sql_destructive | SQL | shipments_271.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | true |
DIFF00000001258 | raw_sql_destructive | SQL | shipments_232.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE logs DROP COLUMN phone; | DROP_COLUMN | true |
DIFF00000001259 | mentioned_in_comment | Python | invoices_888.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE users; -- now deprecated""" | DROP_TABLE | false |
DIFF00000001260 | mentioned_in_comment | Python | customers_727.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE tickets;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000001261 | raw_sql_destructive | SQL | transactions_636.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices RENAME COLUMN role TO contact_email; | ALTER_RENAME | true |
DIFF00000001262 | orm_schema_change | TypeScript | employees_181.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Reviews { // removed field: name } | NONE | true |
DIFF00000001263 | general_code_change | Python | employees_532.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000001264 | obfuscated_destructive | SQL | accounts_508.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table events rename column created_at to amount_cents; | ALTER_RENAME | true |
DIFF00000001265 | mentioned_in_comment | Python | sessions_354.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE customers;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000001266 | general_code_change | TypeScript | notifications_361.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 |
DIFF00000001267 | raw_sql_safe | SQL | comments_168.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO transactions (status, email) VALUES (%s, %s); | NONE | false |
DIFF00000001268 | mentioned_in_comment | Python | events_610.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE customers DROP COLUMN description;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000001269 | raw_sql_safe | SQL | subscriptions_260.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE shipments SET price = %s WHERE email = %s; | NONE | false |
DIFF00000001270 | obfuscated_destructive | SQL | orders_166.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDAtE cOmmENts set mETadaTa = CONcaT(mETAdaTA, NaME); | UPDATE_CONCAT | true |
DIFF00000001271 | test_suite_cleanup | SQL | tests/reviews_145.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE orders SET address = CONCAT(address, balance); | UPDATE_CONCAT | false |
DIFF00000001272 | raw_sql_safe | SQL | customers_258.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE products SET role = %s WHERE address = %s; | NONE | false |
DIFF00000001273 | orm_schema_change | JavaScript | users_964.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('subscriptions', table => table.dropColumn('balance')) | NONE | true |
DIFF00000001274 | raw_sql_destructive | SQL | orders_606.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN address; | DROP_COLUMN | true |
DIFF00000001275 | orm_schema_change | Ruby | accounts_486.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :accounts, :priority | NONE | true |
DIFF00000001276 | general_code_change | JavaScript | payments_739.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 |
DIFF00000001277 | raw_sql_destructive | SQL | invoices_273.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN phone TO state; | ALTER_RENAME | true |
DIFF00000001278 | general_code_change | JavaScript | employees_96.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000001279 | orm_schema_change | Python | comments_295.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='products', name='score') | NONE | true |
DIFF00000001280 | general_code_change | Go | comments_114.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000001281 | test_suite_cleanup | SQL | spec/logs_826.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN email TO state; | ALTER_RENAME | false |
DIFF00000001282 | raw_sql_safe | SQL | subscriptions_3.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE products SET is_active = %s WHERE metadata = %s; | NONE | false |
DIFF00000001283 | raw_sql_destructive | SQL | events_666.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | true |
DIFF00000001284 | orm_schema_change | TypeScript | invoices_740.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Reviews { // removed field: address } | NONE | true |
DIFF00000001285 | mentioned_in_comment | Python | refunds_601.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE subscriptions DROP COLUMN is_active;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000001286 | obfuscated_destructive | SQL | sessions_120.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELete FROm revieWS; | DELETE_UNQUALIFIED | true |
DIFF00000001287 | general_code_change | JavaScript | subscriptions_160.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000001288 | general_code_change | JavaScript | logs_300.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 |
DIFF00000001289 | general_code_change | Go | products_22.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000001290 | general_code_change | TypeScript | logs_730.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 |
DIFF00000001291 | general_code_change | Java | comments_212.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001292 | mentioned_in_comment | Python | logs_269.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE customers RENAME COLUMN user_id TO amount_cents;") | ALTER_RENAME | false |
DIFF00000001293 | orm_schema_change | TypeScript | notifications_789.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Inventory { // removed field: quantity } | NONE | true |
DIFF00000001294 | obfuscated_destructive | SQL | products_260.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
employees
DROP
COLUMN
metadata; | DROP_COLUMN | true |
DIFF00000001295 | orm_schema_change | Python | sessions_745.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='refunds', name='price') | NONE | true |
DIFF00000001296 | raw_sql_safe | SQL | notifications_961.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO notifications (order_id, order_id) VALUES (%s, %s); | NONE | false |
DIFF00000001297 | raw_sql_destructive | SQL | products_154.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | true |
DIFF00000001298 | mentioned_in_comment | Python | refunds_243.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE inventory DROP COLUMN updated_at; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000001299 | raw_sql_safe | SQL | comments_893.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO payments (name, balance) VALUES (%s, %s); | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.