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 |
|---|---|---|---|---|---|---|---|
DIFF00099994400 | test_suite_cleanup | SQL | test/payments_65.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE invoices SET role = CONCAT(role, quantity); | UPDATE_CONCAT | false |
DIFF00099994401 | orm_schema_change | Ruby | invoices_784.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :reviews, :created_at | NONE | true |
DIFF00099994402 | general_code_change | Python | orders_944.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099994403 | orm_schema_change | JavaScript | events_918.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('description')) | NONE | true |
DIFF00099994404 | obfuscated_destructive | SQL | transactions_374.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETe fRoM tRaNsActioNS; | DELETE_UNQUALIFIED | true |
DIFF00099994405 | orm_schema_change | Ruby | events_633.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :score | NONE | true |
DIFF00099994406 | orm_schema_change | Ruby | users_156.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :employees, :category | NONE | true |
DIFF00099994407 | general_code_change | JavaScript | inventory_809.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 |
DIFF00099994408 | raw_sql_safe | SQL | payments_968.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE products ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099994409 | general_code_change | Java | employees_311.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099994410 | general_code_change | JavaScript | employees_779.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994411 | general_code_change | Ruby | customers_510.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099994412 | general_code_change | Go | sessions_979.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099994413 | raw_sql_safe | SQL | employees_452.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_priority ON customers (amount); | NONE | false |
DIFF00099994414 | test_suite_cleanup | SQL | spec/accounts_509.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | false |
DIFF00099994415 | obfuscated_destructive | SQL | customers_866.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table logs; | DROP_TABLE | true |
DIFF00099994416 | orm_schema_change | TypeScript | reviews_621.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: name } | NONE | true |
DIFF00099994417 | general_code_change | Ruby | subscriptions_975.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099994418 | raw_sql_safe | SQL | users_150.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE users ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099994419 | general_code_change | JavaScript | orders_513.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 |
DIFF00099994420 | raw_sql_safe | SQL | logs_747.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE inventory SET description = %s WHERE description = %s; | NONE | false |
DIFF00099994421 | orm_schema_change | JavaScript | employees_812.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('customers', table => table.dropColumn('amount')) | NONE | true |
DIFF00099994422 | raw_sql_safe | SQL | inventory_297.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_invoices_score ON invoices (user_id); | NONE | false |
DIFF00099994423 | raw_sql_safe | SQL | notifications_147.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_reviews_amount ON reviews (balance); | NONE | false |
DIFF00099994424 | obfuscated_destructive | SQL | events_121.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE fRoM REviEwS; | DELETE_UNQUALIFIED | true |
DIFF00099994425 | raw_sql_safe | SQL | orders_668.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE tickets ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099994426 | obfuscated_destructive | SQL | shipments_673.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table events rename column amount to contact_email; | ALTER_RENAME | true |
DIFF00099994427 | test_suite_cleanup | SQL | test/refunds_608.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN description TO full_name; | ALTER_RENAME | false |
DIFF00099994428 | raw_sql_safe | SQL | comments_526.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM reviews WHERE order_id = 'active'; | NONE | false |
DIFF00099994429 | raw_sql_safe | SQL | notifications_860.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE invoices SET user_id = %s WHERE address = %s; | NONE | false |
DIFF00099994430 | test_suite_cleanup | SQL | spec/logs_572.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE sessions SET address = CONCAT(address, name); | UPDATE_CONCAT | false |
DIFF00099994431 | orm_schema_change | TypeScript | transactions_302.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Comments { // removed field: quantity } | NONE | true |
DIFF00099994432 | raw_sql_destructive | SQL | transactions_647.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE transactions; | DROP_TABLE | true |
DIFF00099994433 | raw_sql_safe | SQL | notifications_101.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO refunds (email, balance) VALUES (%s, %s); | NONE | false |
DIFF00099994434 | general_code_change | Ruby | accounts_471.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099994435 | general_code_change | TypeScript | products_244.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 |
DIFF00099994436 | general_code_change | Go | logs_233.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099994437 | raw_sql_destructive | SQL | refunds_579.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users RENAME COLUMN priority TO state; | ALTER_RENAME | true |
DIFF00099994438 | general_code_change | Java | payments_998.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099994439 | general_code_change | Ruby | users_837.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099994440 | obfuscated_destructive | SQL | orders_712.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | true |
DIFF00099994441 | obfuscated_destructive | SQL | payments_590.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE sessions DROP COLUMN order_id; | DROP_COLUMN | true |
DIFF00099994442 | general_code_change | JavaScript | logs_567.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994443 | test_suite_cleanup | SQL | test/orders_860.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN category TO state; | ALTER_RENAME | false |
DIFF00099994444 | raw_sql_destructive | SQL | customers_554.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | true |
DIFF00099994445 | test_suite_cleanup | SQL | tests/orders_156.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE inventory; | TRUNCATE | false |
DIFF00099994446 | general_code_change | Go | accounts_953.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099994447 | mentioned_in_comment | Python | payments_56.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE tickets SET role = CONCAT(role, amount); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00099994448 | general_code_change | Go | users_826.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099994449 | obfuscated_destructive | SQL | tickets_841.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table reviews rename column metadata to contact_email; | ALTER_RENAME | true |
DIFF00099994450 | raw_sql_destructive | SQL | logs_422.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN user_id TO state; | ALTER_RENAME | true |
DIFF00099994451 | test_suite_cleanup | SQL | tests/invoices_210.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | false |
DIFF00099994452 | test_suite_cleanup | SQL | tests/logs_344.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | false |
DIFF00099994453 | general_code_change | Python | products_434.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099994454 | raw_sql_destructive | SQL | notifications_608.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE events SET amount = CONCAT(amount, address); | UPDATE_CONCAT | true |
DIFF00099994455 | mentioned_in_comment | Python | reviews_751.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE customers DROP COLUMN status; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099994456 | obfuscated_destructive | SQL | employees_8.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
DIFF00099994457 | general_code_change | Go | events_691.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099994458 | obfuscated_destructive | SQL | users_104.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
comments
DROP
COLUMN
balance; | DROP_COLUMN | true |
DIFF00099994459 | general_code_change | Go | orders_266.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099994460 | mentioned_in_comment | Python | payments_315.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM employees; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099994461 | mentioned_in_comment | Python | invoices_169.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM users; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099994462 | mentioned_in_comment | Python | orders_605.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE invoices SET metadata = CONCAT(metadata, category);") | UPDATE_CONCAT | false |
DIFF00099994463 | orm_schema_change | TypeScript | users_560.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Shipments { // removed field: role } | NONE | true |
DIFF00099994464 | mentioned_in_comment | Python | users_338.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE refunds;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099994465 | general_code_change | Python | subscriptions_440.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099994466 | raw_sql_safe | SQL | transactions_246.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM transactions WHERE phone = 'active'; | NONE | false |
DIFF00099994467 | raw_sql_safe | SQL | refunds_989.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_phone ON refunds (role); | NONE | false |
DIFF00099994468 | general_code_change | JavaScript | orders_68.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994469 | raw_sql_safe | SQL | transactions_872.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE name = 'active'; | NONE | false |
DIFF00099994470 | orm_schema_change | Ruby | subscriptions_210.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :comments, :updated_at | NONE | true |
DIFF00099994471 | orm_schema_change | JavaScript | payments_229.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('accounts', table => table.dropColumn('phone')) | NONE | true |
DIFF00099994472 | obfuscated_destructive | SQL | logs_55.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00099994473 | orm_schema_change | JavaScript | invoices_975.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('tickets', 'category') | NONE | true |
DIFF00099994474 | orm_schema_change | JavaScript | reviews_381.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'email') | NONE | true |
DIFF00099994475 | general_code_change | JavaScript | comments_792.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994476 | mentioned_in_comment | Python | inventory_795.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE employees; -- now deprecated""" | DROP_TABLE | false |
DIFF00099994477 | general_code_change | Java | sessions_652.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099994478 | orm_schema_change | Ruby | accounts_618.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :comments, :amount | NONE | true |
DIFF00099994479 | orm_schema_change | JavaScript | notifications_295.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('orders', 'is_active') | NONE | true |
DIFF00099994480 | raw_sql_destructive | SQL | employees_904.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds RENAME COLUMN amount TO state; | ALTER_RENAME | true |
DIFF00099994481 | mentioned_in_comment | Python | sessions_861.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE shipments;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099994482 | general_code_change | JavaScript | sessions_639.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994483 | raw_sql_destructive | SQL | users_164.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00099994484 | general_code_change | JavaScript | payments_103.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994485 | orm_schema_change | Python | inventory_403.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='comments', name='name') | NONE | true |
DIFF00099994486 | raw_sql_safe | SQL | notifications_564.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO products (status, phone) VALUES (%s, %s); | NONE | false |
DIFF00099994487 | general_code_change | JavaScript | transactions_709.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994488 | general_code_change | Ruby | inventory_948.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099994489 | raw_sql_destructive | SQL | customers_212.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN created_at; | DROP_COLUMN | true |
DIFF00099994490 | raw_sql_destructive | SQL | accounts_720.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | true |
DIFF00099994491 | orm_schema_change | Ruby | refunds_511.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :phone | NONE | true |
DIFF00099994492 | test_suite_cleanup | SQL | tests/employees_955.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN amount; | DROP_COLUMN | false |
DIFF00099994493 | raw_sql_safe | SQL | shipments_188.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE sessions ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099994494 | general_code_change | Ruby | users_143.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099994495 | test_suite_cleanup | SQL | tests/transactions_818.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE orders SET description = CONCAT(description, order_id); | UPDATE_CONCAT | false |
DIFF00099994496 | general_code_change | Python | accounts_267.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099994497 | obfuscated_destructive | SQL | products_503.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
notifications; | TRUNCATE | true |
DIFF00099994498 | general_code_change | JavaScript | products_335.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994499 | raw_sql_safe | SQL | events_1.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_inventory_balance ON inventory (score); | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.