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 |
|---|---|---|---|---|---|---|---|
DIFF00000003000 | general_code_change | Go | orders_698.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003001 | raw_sql_safe | SQL | orders_172.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_status ON transactions (created_at); | NONE | false |
DIFF00000003002 | mentioned_in_comment | Python | tickets_692.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE comments RENAME COLUMN updated_at TO state;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000003003 | orm_schema_change | Ruby | customers_581.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :inventory, :user_id | NONE | true |
DIFF00000003004 | orm_schema_change | Ruby | reviews_805.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :transactions, :priority | NONE | true |
DIFF00000003005 | raw_sql_destructive | SQL | subscriptions_156.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | true |
DIFF00000003006 | orm_schema_change | JavaScript | sessions_703.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('score')) | NONE | true |
DIFF00000003007 | general_code_change | Java | customers_367.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003008 | raw_sql_safe | SQL | transactions_518.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET address = %s WHERE order_id = %s; | NONE | false |
DIFF00000003009 | general_code_change | JavaScript | transactions_977.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003010 | general_code_change | JavaScript | payments_816.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 |
DIFF00000003011 | raw_sql_safe | SQL | inventory_536.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE sessions ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000003012 | orm_schema_change | Ruby | customers_661.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :quantity | NONE | true |
DIFF00000003013 | general_code_change | JavaScript | orders_907.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003014 | general_code_change | TypeScript | invoices_823.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 |
DIFF00000003015 | orm_schema_change | Ruby | invoices_623.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :sessions, :status | NONE | true |
DIFF00000003016 | mentioned_in_comment | Python | sessions_690.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE invoices;") | DROP_TABLE | false |
DIFF00000003017 | raw_sql_destructive | SQL | refunds_966.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN metadata; | DROP_COLUMN | true |
DIFF00000003018 | orm_schema_change | TypeScript | logs_55.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Notifications { // removed field: price } | NONE | true |
DIFF00000003019 | general_code_change | Java | refunds_19.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003020 | mentioned_in_comment | Python | tickets_749.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE subscriptions DROP COLUMN phone;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000003021 | general_code_change | Java | transactions_672.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003022 | raw_sql_destructive | SQL | events_151.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN address TO amount_cents; | ALTER_RENAME | true |
DIFF00000003023 | obfuscated_destructive | SQL | sessions_737.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00000003024 | raw_sql_safe | SQL | comments_829.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO invoices (email, status) VALUES (%s, %s); | NONE | false |
DIFF00000003025 | test_suite_cleanup | SQL | mysql-test/suite/logs_965.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN user_id; | DROP_COLUMN | false |
DIFF00000003026 | raw_sql_destructive | SQL | events_678.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN name; | DROP_COLUMN | true |
DIFF00000003027 | raw_sql_destructive | SQL | refunds_822.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE sessions SET address = CONCAT(address, score); | UPDATE_CONCAT | true |
DIFF00000003028 | general_code_change | Python | orders_372.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003029 | general_code_change | TypeScript | refunds_685.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 |
DIFF00000003030 | raw_sql_safe | SQL | products_696.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE accounts ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000003031 | general_code_change | Python | notifications_405.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003032 | general_code_change | TypeScript | transactions_126.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 |
DIFF00000003033 | orm_schema_change | TypeScript | comments_383.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Events { // removed field: price } | NONE | true |
DIFF00000003034 | raw_sql_safe | SQL | transactions_510.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE reviews SET order_id = %s WHERE phone = %s; | NONE | false |
DIFF00000003035 | general_code_change | Python | events_525.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003036 | raw_sql_safe | SQL | products_680.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000003037 | obfuscated_destructive | SQL | customers_670.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
orders; | TRUNCATE | true |
DIFF00000003038 | mentioned_in_comment | Python | reviews_901.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE tickets DROP COLUMN email;") | DROP_COLUMN | false |
DIFF00000003039 | raw_sql_safe | SQL | employees_17.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE category = 'active'; | NONE | false |
DIFF00000003040 | raw_sql_safe | SQL | notifications_530.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE score = 'active'; | NONE | false |
DIFF00000003041 | general_code_change | Java | accounts_556.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003042 | orm_schema_change | TypeScript | shipments_556.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Transactions { // removed field: balance } | NONE | true |
DIFF00000003043 | raw_sql_destructive | SQL | reviews_379.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications RENAME COLUMN updated_at TO state; | ALTER_RENAME | true |
DIFF00000003044 | raw_sql_safe | SQL | reviews_957.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_score ON transactions (priority); | NONE | false |
DIFF00000003045 | orm_schema_change | Python | subscriptions_193.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='sessions', name='phone') | NONE | true |
DIFF00000003046 | raw_sql_safe | SQL | inventory_591.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO shipments (price, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00000003047 | mentioned_in_comment | Python | events_441.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE events RENAME COLUMN is_active TO full_name;") | ALTER_RENAME | false |
DIFF00000003048 | raw_sql_safe | SQL | users_417.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000003049 | general_code_change | Go | subscriptions_216.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003050 | general_code_change | TypeScript | products_664.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 |
DIFF00000003051 | orm_schema_change | JavaScript | payments_763.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('products', 'updated_at') | NONE | true |
DIFF00000003052 | mentioned_in_comment | Python | payments_674.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE customers;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000003053 | test_suite_cleanup | SQL | spec/invoices_981.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE products SET category = CONCAT(category, balance); | UPDATE_CONCAT | false |
DIFF00000003054 | general_code_change | JavaScript | transactions_407.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 |
DIFF00000003055 | test_suite_cleanup | SQL | test/inventory_547.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | false |
DIFF00000003056 | general_code_change | Python | reviews_343.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003057 | general_code_change | Go | products_241.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003058 | raw_sql_safe | SQL | comments_434.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_sessions_price ON sessions (email); | NONE | false |
DIFF00000003059 | orm_schema_change | TypeScript | events_411.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Events { // removed field: is_active } | NONE | true |
DIFF00000003060 | general_code_change | TypeScript | refunds_539.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 |
DIFF00000003061 | general_code_change | JavaScript | customers_2.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003062 | obfuscated_destructive | SQL | refunds_431.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
employees; | TRUNCATE | true |
DIFF00000003063 | raw_sql_destructive | SQL | reviews_503.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE customers SET score = CONCAT(score, score); | UPDATE_CONCAT | true |
DIFF00000003064 | general_code_change | Java | subscriptions_738.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003065 | orm_schema_change | JavaScript | comments_717.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('logs', 'phone') | NONE | true |
DIFF00000003066 | raw_sql_safe | SQL | subscriptions_50.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000003067 | general_code_change | Python | inventory_671.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003068 | obfuscated_destructive | SQL | employees_878.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLTER TabLE aCcOuntS drOp coLumn METadAta; | DROP_COLUMN | true |
DIFF00000003069 | obfuscated_destructive | SQL | shipments_375.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table accounts rename column metadata to contact_email; | ALTER_RENAME | true |
DIFF00000003070 | general_code_change | JavaScript | sessions_152.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 |
DIFF00000003071 | obfuscated_destructive | SQL | comments_554.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table transactions; | DROP_TABLE | true |
DIFF00000003072 | obfuscated_destructive | SQL | inventory_144.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
shipments; | TRUNCATE | true |
DIFF00000003073 | raw_sql_safe | SQL | transactions_260.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_score ON transactions (role); | NONE | false |
DIFF00000003074 | general_code_change | Java | notifications_911.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003075 | general_code_change | JavaScript | comments_225.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 |
DIFF00000003076 | raw_sql_safe | SQL | reviews_128.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000003077 | raw_sql_destructive | SQL | employees_419.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | true |
DIFF00000003078 | raw_sql_destructive | SQL | events_277.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN amount TO user_role; | ALTER_RENAME | true |
DIFF00000003079 | obfuscated_destructive | SQL | comments_816.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
tickets
DROP
COLUMN
priority; | DROP_COLUMN | true |
DIFF00000003080 | raw_sql_destructive | SQL | users_108.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
DIFF00000003081 | raw_sql_safe | SQL | tickets_656.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE payments ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000003082 | obfuscated_destructive | SQL | shipments_727.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
employees
DROP
COLUMN
category; | DROP_COLUMN | true |
DIFF00000003083 | test_suite_cleanup | SQL | spec/employees_936.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN price; | DROP_COLUMN | false |
DIFF00000003084 | orm_schema_change | Python | sessions_178.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='balance') | NONE | true |
DIFF00000003085 | raw_sql_safe | SQL | customers_765.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO shipments (description, email) VALUES (%s, %s); | NONE | false |
DIFF00000003086 | orm_schema_change | Ruby | employees_607.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :refunds, :quantity | NONE | true |
DIFF00000003087 | general_code_change | Go | accounts_239.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003088 | mentioned_in_comment | Python | users_1.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE orders RENAME COLUMN price TO amount_cents;") | ALTER_RENAME | false |
DIFF00000003089 | raw_sql_destructive | SQL | inventory_953.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | true |
DIFF00000003090 | raw_sql_destructive | SQL | logs_473.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN address; | DROP_COLUMN | true |
DIFF00000003091 | general_code_change | TypeScript | refunds_842.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 |
DIFF00000003092 | orm_schema_change | JavaScript | reviews_947.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'priority') | NONE | true |
DIFF00000003093 | obfuscated_destructive | SQL | orders_423.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from orders; | DELETE_UNQUALIFIED | true |
DIFF00000003094 | raw_sql_safe | SQL | customers_158.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_price ON refunds (phone); | NONE | false |
DIFF00000003095 | raw_sql_safe | SQL | products_950.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000003096 | raw_sql_safe | SQL | transactions_687.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE comments SET name = %s WHERE category = %s; | NONE | false |
DIFF00000003097 | obfuscated_destructive | SQL | sessions_818.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE notifications SET status = CONCAT(status, name); | UPDATE_CONCAT | true |
DIFF00000003098 | raw_sql_safe | SQL | sessions_708.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE amount = 'active'; | NONE | false |
DIFF00000003099 | raw_sql_safe | SQL | reviews_940.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_events_quantity ON events (order_id); | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.