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 |
|---|---|---|---|---|---|---|---|
DIFF00099999300 | mentioned_in_comment | Python | orders_282.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM orders;") | DELETE_UNQUALIFIED | false |
DIFF00099999301 | general_code_change | Ruby | refunds_91.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099999302 | orm_schema_change | JavaScript | refunds_268.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('quantity')) | NONE | true |
DIFF00099999303 | general_code_change | Ruby | users_638.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099999304 | general_code_change | JavaScript | refunds_971.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099999305 | general_code_change | TypeScript | comments_768.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 |
DIFF00099999306 | general_code_change | Ruby | reviews_539.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099999307 | orm_schema_change | Python | shipments_913.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='products', name='score') | NONE | true |
DIFF00099999308 | test_suite_cleanup | SQL | mysql-test/suite/tickets_455.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN amount TO full_name; | ALTER_RENAME | false |
DIFF00099999309 | general_code_change | Python | orders_906.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099999310 | general_code_change | Java | accounts_843.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099999311 | raw_sql_destructive | SQL | subscriptions_741.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | true |
DIFF00099999312 | test_suite_cleanup | SQL | spec/logs_905.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | false |
DIFF00099999313 | obfuscated_destructive | SQL | products_423.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTer TABle TRAnSACTIOnS drOP coLUMN catEgOry; | DROP_COLUMN | true |
DIFF00099999314 | general_code_change | Go | accounts_573.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099999315 | raw_sql_safe | SQL | invoices_901.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM notifications WHERE amount = 'active'; | NONE | false |
DIFF00099999316 | raw_sql_destructive | SQL | shipments_731.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | true |
DIFF00099999317 | orm_schema_change | Ruby | notifications_412.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :comments, :name | NONE | true |
DIFF00099999318 | obfuscated_destructive | SQL | payments_913.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
users
SET
price
=
CONCAT(price,
role); | UPDATE_CONCAT | true |
DIFF00099999319 | test_suite_cleanup | SQL | mysql-test/suite/inventory_968.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN priority TO user_role; | ALTER_RENAME | false |
DIFF00099999320 | general_code_change | Java | refunds_777.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099999321 | obfuscated_destructive | SQL | inventory_96.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table inventory rename column priority to contact_email; | ALTER_RENAME | true |
DIFF00099999322 | test_suite_cleanup | SQL | tests/transactions_256.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions RENAME COLUMN name TO full_name; | ALTER_RENAME | false |
DIFF00099999323 | mentioned_in_comment | Python | accounts_320.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE refunds DROP COLUMN priority;") | DROP_COLUMN | false |
DIFF00099999324 | orm_schema_change | JavaScript | reviews_549.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('balance')) | NONE | true |
DIFF00099999325 | raw_sql_destructive | SQL | subscriptions_91.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM reviews; | DELETE_UNQUALIFIED | true |
DIFF00099999326 | general_code_change | TypeScript | events_608.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 |
DIFF00099999327 | orm_schema_change | TypeScript | events_236.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Tickets { // removed field: updated_at } | NONE | true |
DIFF00099999328 | raw_sql_safe | SQL | transactions_992.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_shipments_status ON shipments (description); | NONE | false |
DIFF00099999329 | obfuscated_destructive | SQL | orders_473.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
subscriptions
RENAME
COLUMN
email
TO
user_role; | ALTER_RENAME | true |
DIFF00099999330 | general_code_change | Python | accounts_459.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099999331 | raw_sql_safe | SQL | tickets_864.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE category = 'active'; | NONE | false |
DIFF00099999332 | test_suite_cleanup | SQL | spec/shipments_64.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN score; | DROP_COLUMN | false |
DIFF00099999333 | general_code_change | Python | users_116.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099999334 | raw_sql_safe | SQL | invoices_820.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE users SET amount = %s WHERE price = %s; | NONE | false |
DIFF00099999335 | obfuscated_destructive | SQL | tickets_220.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN amount TO amount_cents; | ALTER_RENAME | true |
DIFF00099999336 | orm_schema_change | JavaScript | shipments_25.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('logs', table => table.dropColumn('score')) | NONE | true |
DIFF00099999337 | raw_sql_safe | SQL | logs_207.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO inventory (category, phone) VALUES (%s, %s); | NONE | false |
DIFF00099999338 | general_code_change | Java | employees_43.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099999339 | orm_schema_change | Ruby | notifications_304.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :events, :user_id | NONE | true |
DIFF00099999340 | mentioned_in_comment | Python | transactions_966.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE events RENAME COLUMN role TO contact_email; -- now deprecated""" | ALTER_RENAME | false |
DIFF00099999341 | raw_sql_destructive | SQL | accounts_498.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE accounts SET balance = CONCAT(balance, email); | UPDATE_CONCAT | true |
DIFF00099999342 | raw_sql_safe | SQL | comments_585.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE email = 'active'; | NONE | false |
DIFF00099999343 | raw_sql_destructive | SQL | orders_439.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00099999344 | mentioned_in_comment | Python | reviews_117.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE users SET phone = CONCAT(phone, role);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099999345 | mentioned_in_comment | Python | orders_367.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE inventory;") | DROP_TABLE | false |
DIFF00099999346 | general_code_change | Python | customers_788.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099999347 | raw_sql_safe | SQL | accounts_281.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO subscriptions (created_at, metadata) VALUES (%s, %s); | NONE | false |
DIFF00099999348 | raw_sql_destructive | SQL | subscriptions_296.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE invoices SET quantity = CONCAT(quantity, role); | UPDATE_CONCAT | true |
DIFF00099999349 | general_code_change | Python | transactions_607.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099999350 | raw_sql_safe | SQL | tickets_455.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_category ON customers (status); | NONE | false |
DIFF00099999351 | general_code_change | JavaScript | payments_242.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099999352 | mentioned_in_comment | Python | refunds_328.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM products;") | DELETE_UNQUALIFIED | false |
DIFF00099999353 | mentioned_in_comment | Python | shipments_120.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE customers RENAME COLUMN priority TO contact_email;") | ALTER_RENAME | false |
DIFF00099999354 | general_code_change | Python | subscriptions_609.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099999355 | orm_schema_change | JavaScript | employees_461.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('inventory', 'balance') | NONE | true |
DIFF00099999356 | raw_sql_safe | SQL | refunds_944.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE reviews SET phone = %s WHERE quantity = %s; | NONE | false |
DIFF00099999357 | general_code_change | JavaScript | refunds_255.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099999358 | mentioned_in_comment | Python | employees_10.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE accounts DROP COLUMN category;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099999359 | general_code_change | Python | notifications_677.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099999360 | mentioned_in_comment | Python | refunds_643.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE reviews RENAME COLUMN amount TO amount_cents;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00099999361 | obfuscated_destructive | SQL | notifications_309.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
customers; | DROP_TABLE | true |
DIFF00099999362 | general_code_change | Ruby | tickets_301.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099999363 | test_suite_cleanup | SQL | test/inventory_653.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN is_active TO contact_email; | ALTER_RENAME | false |
DIFF00099999364 | obfuscated_destructive | SQL | notifications_970.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table transactions drop column user_id; | DROP_COLUMN | true |
DIFF00099999365 | test_suite_cleanup | SQL | test/customers_90.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE shipments SET amount = CONCAT(amount, category); | UPDATE_CONCAT | false |
DIFF00099999366 | test_suite_cleanup | SQL | mysql-test/suite/comments_912.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN updated_at; | DROP_COLUMN | false |
DIFF00099999367 | general_code_change | Go | tickets_639.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099999368 | general_code_change | Python | tickets_128.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099999369 | general_code_change | Go | notifications_785.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099999370 | mentioned_in_comment | Python | logs_14.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE orders;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099999371 | raw_sql_destructive | SQL | employees_401.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions RENAME COLUMN description TO state; | ALTER_RENAME | true |
DIFF00099999372 | orm_schema_change | JavaScript | notifications_84.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('notifications', 'amount') | NONE | true |
DIFF00099999373 | raw_sql_safe | SQL | subscriptions_484.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_users_balance ON users (updated_at); | NONE | false |
DIFF00099999374 | obfuscated_destructive | SQL | sessions_246.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE shipments SET price = CONCAT(price, order_id); | UPDATE_CONCAT | true |
DIFF00099999375 | general_code_change | Python | invoices_38.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099999376 | test_suite_cleanup | SQL | mysql-test/suite/logs_272.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE logs SET status = CONCAT(status, order_id); | UPDATE_CONCAT | false |
DIFF00099999377 | test_suite_cleanup | SQL | spec/payments_215.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE reviews SET role = CONCAT(role, address); | UPDATE_CONCAT | false |
DIFF00099999378 | mentioned_in_comment | Python | inventory_949.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE notifications; -- now deprecated""" | DROP_TABLE | false |
DIFF00099999379 | test_suite_cleanup | SQL | test/payments_766.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | false |
DIFF00099999380 | raw_sql_destructive | SQL | users_831.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE accounts SET order_id = CONCAT(order_id, order_id); | UPDATE_CONCAT | true |
DIFF00099999381 | raw_sql_destructive | SQL | customers_747.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN price; | DROP_COLUMN | true |
DIFF00099999382 | general_code_change | Python | employees_249.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099999383 | raw_sql_safe | SQL | subscriptions_639.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM subscriptions WHERE role = 'active'; | NONE | false |
DIFF00099999384 | mentioned_in_comment | Python | users_41.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE notifications RENAME COLUMN metadata TO amount_cents;") | ALTER_RENAME | false |
DIFF00099999385 | general_code_change | Ruby | inventory_955.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099999386 | orm_schema_change | JavaScript | payments_937.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('score')) | NONE | true |
DIFF00099999387 | raw_sql_safe | SQL | tickets_192.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (price, balance) VALUES (%s, %s); | NONE | false |
DIFF00099999388 | test_suite_cleanup | SQL | tests/logs_359.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE refunds SET description = CONCAT(description, metadata); | UPDATE_CONCAT | false |
DIFF00099999389 | general_code_change | TypeScript | inventory_743.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 |
DIFF00099999390 | test_suite_cleanup | SQL | spec/shipments_228.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | false |
DIFF00099999391 | general_code_change | Java | sessions_206.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099999392 | raw_sql_safe | SQL | invoices_172.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_products_order_id ON products (status); | NONE | false |
DIFF00099999393 | raw_sql_safe | SQL | invoices_306.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE notifications ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099999394 | test_suite_cleanup | SQL | test/subscriptions_738.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE comments SET metadata = CONCAT(metadata, order_id); | UPDATE_CONCAT | false |
DIFF00099999395 | raw_sql_safe | SQL | tickets_746.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_role ON subscriptions (name); | NONE | false |
DIFF00099999396 | general_code_change | JavaScript | tickets_701.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099999397 | general_code_change | Python | invoices_8.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099999398 | general_code_change | Java | employees_946.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099999399 | orm_schema_change | TypeScript | payments_929.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Comments { // removed field: priority } | NONE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.