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 |
|---|---|---|---|---|---|---|---|
DIFF00099997100 | test_suite_cleanup | SQL | test/sessions_505.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE orders SET priority = CONCAT(priority, created_at); | UPDATE_CONCAT | false |
DIFF00099997101 | raw_sql_destructive | SQL | products_385.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN order_id; | DROP_COLUMN | true |
DIFF00099997102 | mentioned_in_comment | Python | reviews_73.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM logs; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099997103 | general_code_change | JavaScript | shipments_898.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 |
DIFF00099997104 | test_suite_cleanup | SQL | test/accounts_709.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | false |
DIFF00099997105 | general_code_change | Java | subscriptions_942.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997106 | general_code_change | Ruby | subscriptions_635.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997107 | test_suite_cleanup | SQL | tests/subscriptions_355.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM events; | DELETE_UNQUALIFIED | false |
DIFF00099997108 | raw_sql_safe | SQL | inventory_208.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE shipments SET role = %s WHERE user_id = %s; | NONE | false |
DIFF00099997109 | raw_sql_destructive | SQL | users_856.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE notifications SET status = CONCAT(status, amount); | UPDATE_CONCAT | true |
DIFF00099997110 | orm_schema_change | JavaScript | transactions_547.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('payments', 'price') | NONE | true |
DIFF00099997111 | test_suite_cleanup | SQL | spec/sessions_197.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE reviews SET name = CONCAT(name, updated_at); | UPDATE_CONCAT | false |
DIFF00099997112 | mentioned_in_comment | Python | customers_623.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM invoices; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099997113 | raw_sql_safe | SQL | logs_154.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE transactions SET price = %s WHERE quantity = %s; | NONE | false |
DIFF00099997114 | raw_sql_destructive | SQL | employees_402.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN category; | DROP_COLUMN | true |
DIFF00099997115 | test_suite_cleanup | SQL | test/payments_410.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN created_at; | DROP_COLUMN | false |
DIFF00099997116 | general_code_change | Python | refunds_477.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997117 | raw_sql_safe | SQL | transactions_313.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE notifications ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099997118 | orm_schema_change | JavaScript | sessions_129.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('logs', table => table.dropColumn('metadata')) | NONE | true |
DIFF00099997119 | orm_schema_change | JavaScript | users_842.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'status') | NONE | true |
DIFF00099997120 | raw_sql_safe | SQL | orders_155.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO inventory (category, name) VALUES (%s, %s); | NONE | false |
DIFF00099997121 | orm_schema_change | TypeScript | inventory_451.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Employees { // removed field: priority } | NONE | true |
DIFF00099997122 | general_code_change | Ruby | tickets_428.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997123 | mentioned_in_comment | Python | employees_906.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM transactions; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099997124 | general_code_change | JavaScript | subscriptions_274.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 |
DIFF00099997125 | general_code_change | JavaScript | users_554.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997126 | obfuscated_destructive | SQL | users_317.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
users; | DELETE_UNQUALIFIED | true |
DIFF00099997127 | mentioned_in_comment | Python | notifications_790.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE logs DROP COLUMN quantity; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099997128 | obfuscated_destructive | SQL | comments_517.sql | schema cleanup | @@ -1,3 +1,3 @@
+update users set balance = concat(balance, score); | UPDATE_CONCAT | true |
DIFF00099997129 | obfuscated_destructive | SQL | payments_900.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
sessions; | DELETE_UNQUALIFIED | true |
DIFF00099997130 | raw_sql_safe | SQL | notifications_550.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM refunds WHERE status = 'active'; | NONE | false |
DIFF00099997131 | orm_schema_change | Ruby | payments_924.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :status | NONE | true |
DIFF00099997132 | test_suite_cleanup | SQL | mysql-test/suite/orders_260.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | false |
DIFF00099997133 | test_suite_cleanup | SQL | tests/events_333.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN quantity TO user_role; | ALTER_RENAME | false |
DIFF00099997134 | mentioned_in_comment | Python | orders_193.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM reviews;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00099997135 | general_code_change | TypeScript | subscriptions_704.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 |
DIFF00099997136 | orm_schema_change | JavaScript | employees_227.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('users', table => table.dropColumn('quantity')) | NONE | true |
DIFF00099997137 | test_suite_cleanup | SQL | tests/shipments_411.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | false |
DIFF00099997138 | mentioned_in_comment | Python | refunds_610.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE invoices DROP COLUMN metadata;") | DROP_COLUMN | false |
DIFF00099997139 | raw_sql_safe | SQL | reviews_47.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET metadata = %s WHERE amount = %s; | NONE | false |
DIFF00099997140 | mentioned_in_comment | Python | sessions_204.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE invoices SET status = CONCAT(status, phone);") | UPDATE_CONCAT | false |
DIFF00099997141 | orm_schema_change | JavaScript | transactions_215.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('sessions', table => table.dropColumn('phone')) | NONE | true |
DIFF00099997142 | test_suite_cleanup | SQL | mysql-test/suite/invoices_27.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN quantity; | DROP_COLUMN | false |
DIFF00099997143 | general_code_change | Ruby | tickets_760.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997144 | general_code_change | Python | accounts_134.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997145 | test_suite_cleanup | SQL | tests/comments_993.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE transactions; | TRUNCATE | false |
DIFF00099997146 | raw_sql_safe | SQL | products_439.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099997147 | general_code_change | JavaScript | notifications_308.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 |
DIFF00099997148 | obfuscated_destructive | SQL | accounts_771.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE events SET status = CONCAT(status, price); | UPDATE_CONCAT | true |
DIFF00099997149 | general_code_change | Python | shipments_130.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997150 | raw_sql_safe | SQL | comments_331.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_orders_created_at ON orders (address); | NONE | false |
DIFF00099997151 | raw_sql_safe | SQL | inventory_210.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (phone, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00099997152 | raw_sql_destructive | SQL | invoices_355.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE tickets SET name = CONCAT(name, phone); | UPDATE_CONCAT | true |
DIFF00099997153 | raw_sql_destructive | SQL | refunds_227.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN priority TO amount_cents; | ALTER_RENAME | true |
DIFF00099997154 | general_code_change | Python | events_45.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997155 | obfuscated_destructive | SQL | payments_669.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
tickets
DROP
COLUMN
balance; | DROP_COLUMN | true |
DIFF00099997156 | raw_sql_destructive | SQL | transactions_232.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | true |
DIFF00099997157 | orm_schema_change | Python | shipments_866.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='comments', name='updated_at') | NONE | true |
DIFF00099997158 | orm_schema_change | Ruby | subscriptions_927.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :products, :order_id | NONE | true |
DIFF00099997159 | general_code_change | Python | users_144.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997160 | raw_sql_destructive | SQL | shipments_596.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET status = CONCAT(status, updated_at); | UPDATE_CONCAT | true |
DIFF00099997161 | mentioned_in_comment | Python | notifications_699.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE reviews;") | DROP_TABLE | false |
DIFF00099997162 | mentioned_in_comment | Python | events_409.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM customers; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099997163 | general_code_change | Python | reviews_774.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997164 | orm_schema_change | JavaScript | users_662.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('priority')) | NONE | true |
DIFF00099997165 | general_code_change | Python | reviews_898.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997166 | general_code_change | TypeScript | customers_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 |
DIFF00099997167 | raw_sql_destructive | SQL | orders_352.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM events; | DELETE_UNQUALIFIED | true |
DIFF00099997168 | general_code_change | Java | notifications_749.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997169 | general_code_change | JavaScript | orders_131.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997170 | general_code_change | Python | products_318.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997171 | mentioned_in_comment | Python | products_914.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE comments RENAME COLUMN order_id TO amount_cents;") | ALTER_RENAME | false |
DIFF00099997172 | obfuscated_destructive | SQL | refunds_99.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table refunds; | TRUNCATE | true |
DIFF00099997173 | general_code_change | Go | refunds_594.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997174 | test_suite_cleanup | SQL | test/reviews_148.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE orders SET balance = CONCAT(balance, amount); | UPDATE_CONCAT | false |
DIFF00099997175 | raw_sql_destructive | SQL | refunds_106.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE logs DROP COLUMN address; | DROP_COLUMN | true |
DIFF00099997176 | raw_sql_destructive | SQL | sessions_422.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | true |
DIFF00099997177 | test_suite_cleanup | SQL | tests/customers_199.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM refunds; | DELETE_UNQUALIFIED | false |
DIFF00099997178 | raw_sql_safe | SQL | customers_41.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099997179 | general_code_change | Java | logs_891.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099997180 | orm_schema_change | Ruby | logs_332.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :events, :created_at | NONE | true |
DIFF00099997181 | orm_schema_change | Ruby | sessions_576.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :comments, :address | NONE | true |
DIFF00099997182 | general_code_change | JavaScript | subscriptions_728.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 |
DIFF00099997183 | test_suite_cleanup | SQL | spec/notifications_242.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN description; | DROP_COLUMN | false |
DIFF00099997184 | orm_schema_change | Ruby | transactions_350.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :name | NONE | true |
DIFF00099997185 | orm_schema_change | Ruby | payments_172.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :name | NONE | true |
DIFF00099997186 | raw_sql_destructive | SQL | products_375.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN name; | DROP_COLUMN | true |
DIFF00099997187 | raw_sql_safe | SQL | inventory_453.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE price = 'active'; | NONE | false |
DIFF00099997188 | test_suite_cleanup | SQL | test/products_818.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE accounts; | TRUNCATE | false |
DIFF00099997189 | general_code_change | Python | subscriptions_156.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997190 | orm_schema_change | JavaScript | products_170.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('logs', 'category') | NONE | true |
DIFF00099997191 | orm_schema_change | JavaScript | customers_909.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('shipments', table => table.dropColumn('is_active')) | NONE | true |
DIFF00099997192 | raw_sql_safe | SQL | orders_398.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_logs_phone ON logs (created_at); | NONE | false |
DIFF00099997193 | raw_sql_destructive | SQL | shipments_625.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00099997194 | general_code_change | Go | employees_68.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997195 | orm_schema_change | JavaScript | reviews_443.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('subscriptions', 'metadata') | NONE | true |
DIFF00099997196 | mentioned_in_comment | Python | shipments_357.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE employees SET priority = CONCAT(priority, status);") | UPDATE_CONCAT | false |
DIFF00099997197 | orm_schema_change | TypeScript | customers_11.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: balance } | NONE | true |
DIFF00099997198 | raw_sql_safe | SQL | comments_400.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO inventory (name, metadata) VALUES (%s, %s); | NONE | false |
DIFF00099997199 | obfuscated_destructive | SQL | refunds_149.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE invoices RENAME COLUMN updated_at TO full_name; | ALTER_RENAME | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.