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 |
|---|---|---|---|---|---|---|---|
DIFF00099995800 | orm_schema_change | JavaScript | payments_484.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('sessions', table => table.dropColumn('score')) | NONE | true |
DIFF00099995801 | obfuscated_destructive | SQL | notifications_179.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
reviews; | DROP_TABLE | true |
DIFF00099995802 | mentioned_in_comment | Python | inventory_77.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE logs;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099995803 | general_code_change | Go | employees_941.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099995804 | raw_sql_safe | SQL | shipments_992.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_phone ON transactions (user_id); | NONE | false |
DIFF00099995805 | mentioned_in_comment | Python | users_781.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE events SET order_id = CONCAT(order_id, email);") | UPDATE_CONCAT | false |
DIFF00099995806 | raw_sql_destructive | SQL | tickets_478.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM reviews; | DELETE_UNQUALIFIED | true |
DIFF00099995807 | test_suite_cleanup | SQL | tests/tickets_657.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | false |
DIFF00099995808 | general_code_change | Ruby | orders_60.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995809 | general_code_change | Python | comments_48.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099995810 | general_code_change | TypeScript | users_833.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 |
DIFF00099995811 | general_code_change | JavaScript | customers_772.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099995812 | raw_sql_safe | SQL | accounts_885.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE order_id = 'active'; | NONE | false |
DIFF00099995813 | orm_schema_change | TypeScript | inventory_384.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Orders { // removed field: quantity } | NONE | true |
DIFF00099995814 | orm_schema_change | TypeScript | reviews_93.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Comments { // removed field: order_id } | NONE | true |
DIFF00099995815 | obfuscated_destructive | SQL | subscriptions_948.sql | schema cleanup | @@ -1,3 +1,3 @@
+tRunCATe tAbLE prODuCTS; | TRUNCATE | true |
DIFF00099995816 | orm_schema_change | JavaScript | customers_943.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00099995817 | general_code_change | Java | notifications_370.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099995818 | obfuscated_destructive | SQL | transactions_939.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
accounts
SET
email
=
CONCAT(email,
is_active); | UPDATE_CONCAT | true |
DIFF00099995819 | orm_schema_change | Python | sessions_668.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='logs', name='role') | NONE | true |
DIFF00099995820 | orm_schema_change | JavaScript | users_647.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('tickets', 'status') | NONE | true |
DIFF00099995821 | raw_sql_destructive | SQL | payments_578.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00099995822 | test_suite_cleanup | SQL | test/invoices_948.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | false |
DIFF00099995823 | orm_schema_change | JavaScript | inventory_45.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'balance') | NONE | true |
DIFF00099995824 | obfuscated_destructive | SQL | sessions_677.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table tickets; | DROP_TABLE | true |
DIFF00099995825 | mentioned_in_comment | Python | subscriptions_629.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE reviews; -- now deprecated""" | DROP_TABLE | false |
DIFF00099995826 | raw_sql_destructive | SQL | accounts_317.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE payments SET updated_at = CONCAT(updated_at, metadata); | UPDATE_CONCAT | true |
DIFF00099995827 | raw_sql_safe | SQL | comments_359.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE payments ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099995828 | mentioned_in_comment | Python | events_9.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE employees SET status = CONCAT(status, category);") | UPDATE_CONCAT | false |
DIFF00099995829 | raw_sql_destructive | SQL | sessions_837.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN user_id TO amount_cents; | ALTER_RENAME | true |
DIFF00099995830 | obfuscated_destructive | SQL | inventory_178.sql | schema cleanup | @@ -1,3 +1,3 @@
+droP tABlE Customers; | DROP_TABLE | true |
DIFF00099995831 | obfuscated_destructive | SQL | payments_243.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | true |
DIFF00099995832 | mentioned_in_comment | Python | invoices_248.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM products;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00099995833 | general_code_change | Python | subscriptions_973.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099995834 | raw_sql_safe | SQL | comments_391.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099995835 | raw_sql_safe | SQL | products_423.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_employees_email ON employees (description); | NONE | false |
DIFF00099995836 | raw_sql_destructive | SQL | employees_333.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | true |
DIFF00099995837 | test_suite_cleanup | SQL | test/sessions_910.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | false |
DIFF00099995838 | obfuscated_destructive | SQL | reviews_122.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00099995839 | mentioned_in_comment | Python | subscriptions_574.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE products;") | DROP_TABLE | false |
DIFF00099995840 | mentioned_in_comment | Python | accounts_700.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE comments;") | DROP_TABLE | false |
DIFF00099995841 | orm_schema_change | Python | products_258.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='inventory', name='created_at') | NONE | true |
DIFF00099995842 | general_code_change | Ruby | orders_299.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995843 | general_code_change | Java | payments_625.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099995844 | general_code_change | Java | payments_328.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099995845 | obfuscated_destructive | SQL | inventory_118.sql | schema cleanup | @@ -1,3 +1,3 @@
+update subscriptions set updated_at = concat(updated_at, phone); | UPDATE_CONCAT | true |
DIFF00099995846 | general_code_change | JavaScript | comments_696.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099995847 | orm_schema_change | JavaScript | orders_85.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('events', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00099995848 | raw_sql_safe | SQL | products_738.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099995849 | raw_sql_safe | SQL | orders_6.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE events SET address = %s WHERE amount = %s; | NONE | false |
DIFF00099995850 | raw_sql_safe | SQL | accounts_239.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE tickets ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099995851 | mentioned_in_comment | Python | shipments_990.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE refunds RENAME COLUMN updated_at TO full_name;") | ALTER_RENAME | false |
DIFF00099995852 | test_suite_cleanup | SQL | test/orders_780.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE logs RENAME COLUMN description TO state; | ALTER_RENAME | false |
DIFF00099995853 | general_code_change | Java | transactions_610.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099995854 | obfuscated_destructive | SQL | products_964.sql | schema cleanup | @@ -1,3 +1,3 @@
+altER tAblE INvoIcES drop columN Is_aCtIve; | DROP_COLUMN | true |
DIFF00099995855 | general_code_change | Java | employees_940.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099995856 | general_code_change | Ruby | sessions_117.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995857 | raw_sql_destructive | SQL | reviews_200.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews RENAME COLUMN address TO amount_cents; | ALTER_RENAME | true |
DIFF00099995858 | raw_sql_safe | SQL | logs_993.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_name ON refunds (status); | NONE | false |
DIFF00099995859 | raw_sql_safe | SQL | sessions_810.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE events SET price = %s WHERE description = %s; | NONE | false |
DIFF00099995860 | orm_schema_change | Python | users_1.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='employees', name='amount') | NONE | true |
DIFF00099995861 | orm_schema_change | Python | sessions_767.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='created_at') | NONE | true |
DIFF00099995862 | general_code_change | JavaScript | accounts_494.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099995863 | general_code_change | TypeScript | transactions_148.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 |
DIFF00099995864 | raw_sql_safe | SQL | employees_865.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE shipments SET priority = %s WHERE updated_at = %s; | NONE | false |
DIFF00099995865 | orm_schema_change | Python | transactions_790.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='updated_at') | NONE | true |
DIFF00099995866 | raw_sql_safe | SQL | customers_809.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO comments (email, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00099995867 | raw_sql_destructive | SQL | notifications_81.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00099995868 | orm_schema_change | Python | employees_753.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='customers', name='phone') | NONE | true |
DIFF00099995869 | general_code_change | JavaScript | sessions_331.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 |
DIFF00099995870 | general_code_change | Ruby | users_3.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995871 | raw_sql_destructive | SQL | subscriptions_804.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE logs SET address = CONCAT(address, status); | UPDATE_CONCAT | true |
DIFF00099995872 | raw_sql_destructive | SQL | notifications_613.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN user_id; | DROP_COLUMN | true |
DIFF00099995873 | general_code_change | Ruby | tickets_810.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099995874 | test_suite_cleanup | SQL | test/comments_511.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | false |
DIFF00099995875 | raw_sql_destructive | SQL | invoices_554.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE inventory; | TRUNCATE | true |
DIFF00099995876 | general_code_change | Go | reviews_597.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099995877 | mentioned_in_comment | Python | products_213.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE customers RENAME COLUMN category TO contact_email;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00099995878 | obfuscated_destructive | SQL | inventory_639.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | true |
DIFF00099995879 | test_suite_cleanup | SQL | test/transactions_685.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM refunds; | DELETE_UNQUALIFIED | false |
DIFF00099995880 | raw_sql_destructive | SQL | orders_587.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE notifications SET metadata = CONCAT(metadata, created_at); | UPDATE_CONCAT | true |
DIFF00099995881 | raw_sql_safe | SQL | products_814.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE inventory ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099995882 | raw_sql_safe | SQL | refunds_553.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE invoices ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099995883 | orm_schema_change | JavaScript | transactions_536.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('tickets', 'price') | NONE | true |
DIFF00099995884 | raw_sql_destructive | SQL | transactions_248.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices RENAME COLUMN email TO full_name; | ALTER_RENAME | true |
DIFF00099995885 | general_code_change | JavaScript | orders_918.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099995886 | raw_sql_safe | SQL | inventory_228.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM accounts WHERE balance = 'active'; | NONE | false |
DIFF00099995887 | orm_schema_change | TypeScript | shipments_505.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Employees { // removed field: priority } | NONE | true |
DIFF00099995888 | orm_schema_change | Python | logs_771.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='sessions', name='phone') | NONE | true |
DIFF00099995889 | test_suite_cleanup | SQL | mysql-test/suite/sessions_519.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE payments SET role = CONCAT(role, metadata); | UPDATE_CONCAT | false |
DIFF00099995890 | mentioned_in_comment | Python | customers_38.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE logs RENAME COLUMN user_id TO contact_email;") | ALTER_RENAME | false |
DIFF00099995891 | test_suite_cleanup | SQL | test/products_25.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE notifications RENAME COLUMN quantity TO state; | ALTER_RENAME | false |
DIFF00099995892 | mentioned_in_comment | Python | products_145.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE logs;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099995893 | raw_sql_safe | SQL | events_341.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO products (priority, is_active) VALUES (%s, %s); | NONE | false |
DIFF00099995894 | mentioned_in_comment | Python | accounts_228.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE comments SET price = CONCAT(price, created_at);") | UPDATE_CONCAT | false |
DIFF00099995895 | orm_schema_change | TypeScript | orders_854.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Notifications { // removed field: priority } | NONE | true |
DIFF00099995896 | raw_sql_safe | SQL | tickets_466.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE notifications ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099995897 | orm_schema_change | JavaScript | inventory_571.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('notifications', 'quantity') | NONE | true |
DIFF00099995898 | raw_sql_safe | SQL | sessions_836.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_updated_at ON customers (priority); | NONE | false |
DIFF00099995899 | orm_schema_change | Ruby | notifications_800.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :employees, :priority | NONE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.