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 |
|---|---|---|---|---|---|---|---|
DIFF00099996200 | mentioned_in_comment | Python | employees_772.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE comments; -- now deprecated""" | TRUNCATE | false |
DIFF00099996201 | general_code_change | Ruby | refunds_383.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996202 | obfuscated_destructive | SQL | refunds_548.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
shipments
SET
price
=
CONCAT(price,
metadata); | UPDATE_CONCAT | true |
DIFF00099996203 | obfuscated_destructive | SQL | accounts_444.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
events
DROP
COLUMN
score; | DROP_COLUMN | true |
DIFF00099996204 | orm_schema_change | JavaScript | comments_694.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('sessions', table => table.dropColumn('user_id')) | NONE | true |
DIFF00099996205 | raw_sql_destructive | SQL | customers_154.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN phone; | DROP_COLUMN | true |
DIFF00099996206 | general_code_change | Python | products_213.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099996207 | raw_sql_safe | SQL | notifications_450.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO users (updated_at, priority) VALUES (%s, %s); | NONE | false |
DIFF00099996208 | orm_schema_change | JavaScript | accounts_514.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'quantity') | NONE | true |
DIFF00099996209 | mentioned_in_comment | Python | payments_435.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM inventory;") | DELETE_UNQUALIFIED | false |
DIFF00099996210 | mentioned_in_comment | Python | logs_155.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE products DROP COLUMN category;") | DROP_COLUMN | false |
DIFF00099996211 | general_code_change | TypeScript | subscriptions_507.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 |
DIFF00099996212 | general_code_change | JavaScript | events_302.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 |
DIFF00099996213 | obfuscated_destructive | SQL | products_184.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from reviews; | DELETE_UNQUALIFIED | true |
DIFF00099996214 | mentioned_in_comment | Python | accounts_26.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE shipments SET user_id = CONCAT(user_id, phone);") | UPDATE_CONCAT | false |
DIFF00099996215 | orm_schema_change | Ruby | accounts_816.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :notifications, :category | NONE | true |
DIFF00099996216 | orm_schema_change | JavaScript | transactions_971.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('customers', 'name') | NONE | true |
DIFF00099996217 | raw_sql_safe | SQL | shipments_843.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (user_id, priority) VALUES (%s, %s); | NONE | false |
DIFF00099996218 | orm_schema_change | Ruby | notifications_569.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :created_at | NONE | true |
DIFF00099996219 | general_code_change | JavaScript | accounts_965.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 |
DIFF00099996220 | general_code_change | Go | products_428.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996221 | raw_sql_safe | SQL | refunds_591.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE status = 'active'; | NONE | false |
DIFF00099996222 | raw_sql_destructive | SQL | transactions_284.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | true |
DIFF00099996223 | test_suite_cleanup | SQL | tests/employees_10.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE inventory DROP COLUMN status; | DROP_COLUMN | false |
DIFF00099996224 | general_code_change | TypeScript | accounts_985.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 |
DIFF00099996225 | test_suite_cleanup | SQL | spec/transactions_232.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE accounts; | DROP_TABLE | false |
DIFF00099996226 | obfuscated_destructive | SQL | payments_9.sql | schema cleanup | @@ -1,3 +1,3 @@
+drOP TAbLe PRoDUctS; | DROP_TABLE | true |
DIFF00099996227 | general_code_change | Go | employees_475.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996228 | raw_sql_safe | SQL | refunds_940.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE reviews SET description = %s WHERE score = %s; | NONE | false |
DIFF00099996229 | general_code_change | Ruby | logs_867.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996230 | general_code_change | JavaScript | accounts_92.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099996231 | mentioned_in_comment | Python | employees_205.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE tickets;") | DROP_TABLE | false |
DIFF00099996232 | raw_sql_destructive | SQL | employees_742.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE inventory SET address = CONCAT(address, metadata); | UPDATE_CONCAT | true |
DIFF00099996233 | orm_schema_change | Python | payments_991.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='category') | NONE | true |
DIFF00099996234 | mentioned_in_comment | Python | customers_35.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE users SET status = CONCAT(status, user_id);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099996235 | general_code_change | Python | refunds_33.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099996236 | raw_sql_destructive | SQL | transactions_326.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | true |
DIFF00099996237 | raw_sql_destructive | SQL | transactions_271.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00099996238 | orm_schema_change | Ruby | refunds_766.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :users, :metadata | NONE | true |
DIFF00099996239 | raw_sql_safe | SQL | customers_697.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE is_active = 'active'; | NONE | false |
DIFF00099996240 | orm_schema_change | JavaScript | payments_461.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('tickets', table => table.dropColumn('email')) | NONE | true |
DIFF00099996241 | orm_schema_change | JavaScript | invoices_761.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('reviews', 'user_id') | NONE | true |
DIFF00099996242 | test_suite_cleanup | SQL | tests/transactions_20.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN description TO amount_cents; | ALTER_RENAME | false |
DIFF00099996243 | general_code_change | TypeScript | events_281.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 |
DIFF00099996244 | raw_sql_destructive | SQL | refunds_977.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | true |
DIFF00099996245 | raw_sql_safe | SQL | accounts_187.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO sessions (balance, user_id) VALUES (%s, %s); | NONE | false |
DIFF00099996246 | general_code_change | Ruby | notifications_665.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996247 | raw_sql_destructive | SQL | comments_891.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE invoices; | TRUNCATE | true |
DIFF00099996248 | raw_sql_safe | SQL | payments_925.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO comments (name, name) VALUES (%s, %s); | NONE | false |
DIFF00099996249 | mentioned_in_comment | Python | accounts_869.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE accounts DROP COLUMN priority; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099996250 | orm_schema_change | Ruby | notifications_183.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :employees, :name | NONE | true |
DIFF00099996251 | orm_schema_change | JavaScript | payments_248.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('transactions', table => table.dropColumn('user_id')) | NONE | true |
DIFF00099996252 | general_code_change | JavaScript | payments_286.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099996253 | mentioned_in_comment | Python | shipments_56.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE reviews SET priority = CONCAT(priority, price);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099996254 | general_code_change | JavaScript | tickets_447.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099996255 | raw_sql_safe | SQL | customers_785.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE customers ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099996256 | raw_sql_safe | SQL | invoices_482.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE price = 'active'; | NONE | false |
DIFF00099996257 | test_suite_cleanup | SQL | test/notifications_550.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions RENAME COLUMN priority TO contact_email; | ALTER_RENAME | false |
DIFF00099996258 | general_code_change | Ruby | notifications_730.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996259 | raw_sql_destructive | SQL | invoices_293.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | true |
DIFF00099996260 | obfuscated_destructive | SQL | orders_678.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
reviews; | DROP_TABLE | true |
DIFF00099996261 | general_code_change | Python | orders_821.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099996262 | obfuscated_destructive | SQL | accounts_541.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | true |
DIFF00099996263 | raw_sql_safe | SQL | subscriptions_646.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE events SET is_active = %s WHERE description = %s; | NONE | false |
DIFF00099996264 | obfuscated_destructive | SQL | products_281.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | true |
DIFF00099996265 | obfuscated_destructive | SQL | orders_989.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table tickets; | DROP_TABLE | true |
DIFF00099996266 | general_code_change | JavaScript | comments_434.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 |
DIFF00099996267 | test_suite_cleanup | SQL | test/comments_71.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM orders; | DELETE_UNQUALIFIED | false |
DIFF00099996268 | raw_sql_safe | SQL | comments_105.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE reviews ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099996269 | test_suite_cleanup | SQL | mysql-test/suite/users_455.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE invoices; | TRUNCATE | false |
DIFF00099996270 | raw_sql_destructive | SQL | products_415.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE notifications SET price = CONCAT(price, price); | UPDATE_CONCAT | true |
DIFF00099996271 | general_code_change | Java | tickets_441.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099996272 | raw_sql_safe | SQL | users_224.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE tickets SET quantity = %s WHERE description = %s; | NONE | false |
DIFF00099996273 | general_code_change | Ruby | customers_654.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996274 | raw_sql_destructive | SQL | reviews_78.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM events; | DELETE_UNQUALIFIED | true |
DIFF00099996275 | mentioned_in_comment | Python | invoices_78.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE customers DROP COLUMN name;") | DROP_COLUMN | false |
DIFF00099996276 | test_suite_cleanup | SQL | spec/tickets_983.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE accounts; | TRUNCATE | false |
DIFF00099996277 | raw_sql_destructive | SQL | orders_52.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions DROP COLUMN created_at; | DROP_COLUMN | true |
DIFF00099996278 | general_code_change | Go | reviews_889.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996279 | orm_schema_change | Ruby | transactions_759.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :payments, :address | NONE | true |
DIFF00099996280 | mentioned_in_comment | Python | logs_892.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE comments; -- now deprecated""" | DROP_TABLE | false |
DIFF00099996281 | general_code_change | Go | accounts_729.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099996282 | orm_schema_change | Python | accounts_34.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='score') | NONE | true |
DIFF00099996283 | raw_sql_safe | SQL | refunds_791.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE transactions ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099996284 | raw_sql_destructive | SQL | inventory_413.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory RENAME COLUMN price TO state; | ALTER_RENAME | true |
DIFF00099996285 | raw_sql_safe | SQL | users_692.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO products (balance, quantity) VALUES (%s, %s); | NONE | false |
DIFF00099996286 | raw_sql_safe | SQL | orders_795.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO inventory (user_id, category) VALUES (%s, %s); | NONE | false |
DIFF00099996287 | raw_sql_safe | SQL | shipments_489.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE email = 'active'; | NONE | false |
DIFF00099996288 | test_suite_cleanup | SQL | test/logs_21.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | false |
DIFF00099996289 | general_code_change | Ruby | products_865.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099996290 | mentioned_in_comment | Python | inventory_956.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE shipments; -- now deprecated""" | DROP_TABLE | false |
DIFF00099996291 | mentioned_in_comment | Python | accounts_985.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE customers DROP COLUMN balance; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099996292 | raw_sql_safe | SQL | users_916.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_role ON transactions (status); | NONE | false |
DIFF00099996293 | test_suite_cleanup | SQL | mysql-test/suite/sessions_709.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | false |
DIFF00099996294 | obfuscated_destructive | SQL | shipments_275.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table sessions; | TRUNCATE | true |
DIFF00099996295 | raw_sql_destructive | SQL | sessions_840.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN status TO user_role; | ALTER_RENAME | true |
DIFF00099996296 | mentioned_in_comment | Python | users_304.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE inventory;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099996297 | raw_sql_destructive | SQL | accounts_727.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00099996298 | orm_schema_change | Python | employees_618.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='customers', name='score') | NONE | true |
DIFF00099996299 | general_code_change | JavaScript | logs_97.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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.