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 |
|---|---|---|---|---|---|---|---|
DIFF00099991900 | general_code_change | JavaScript | inventory_389.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099991901 | general_code_change | JavaScript | employees_35.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 |
DIFF00099991902 | orm_schema_change | Python | events_35.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='comments', name='user_id') | NONE | true |
DIFF00099991903 | raw_sql_safe | SQL | payments_603.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO invoices (updated_at, amount) VALUES (%s, %s); | NONE | false |
DIFF00099991904 | general_code_change | Go | inventory_838.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099991905 | general_code_change | TypeScript | invoices_680.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 |
DIFF00099991906 | mentioned_in_comment | Python | tickets_238.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE payments DROP COLUMN role; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099991907 | orm_schema_change | TypeScript | sessions_127.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Invoices { // removed field: address } | NONE | true |
DIFF00099991908 | raw_sql_safe | SQL | transactions_525.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE employees SET priority = %s WHERE category = %s; | NONE | false |
DIFF00099991909 | raw_sql_destructive | SQL | shipments_909.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | true |
DIFF00099991910 | raw_sql_destructive | SQL | comments_462.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE logs RENAME COLUMN balance TO contact_email; | ALTER_RENAME | true |
DIFF00099991911 | raw_sql_safe | SQL | sessions_163.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_updated_at ON transactions (created_at); | NONE | false |
DIFF00099991912 | obfuscated_destructive | SQL | events_581.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from invoices; | DELETE_UNQUALIFIED | true |
DIFF00099991913 | orm_schema_change | Ruby | subscriptions_31.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :accounts, :description | NONE | true |
DIFF00099991914 | raw_sql_safe | SQL | inventory_465.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_price ON refunds (address); | NONE | false |
DIFF00099991915 | orm_schema_change | JavaScript | subscriptions_377.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('notifications', table => table.dropColumn('role')) | NONE | true |
DIFF00099991916 | test_suite_cleanup | SQL | tests/events_572.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN order_id; | DROP_COLUMN | false |
DIFF00099991917 | raw_sql_destructive | SQL | employees_780.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE products SET score = CONCAT(score, is_active); | UPDATE_CONCAT | true |
DIFF00099991918 | obfuscated_destructive | SQL | subscriptions_465.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table notifications drop column description; | DROP_COLUMN | true |
DIFF00099991919 | general_code_change | JavaScript | refunds_190.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 |
DIFF00099991920 | general_code_change | JavaScript | notifications_370.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 |
DIFF00099991921 | mentioned_in_comment | Python | comments_375.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM sessions;") | DELETE_UNQUALIFIED | false |
DIFF00099991922 | mentioned_in_comment | Python | notifications_746.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM comments; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099991923 | mentioned_in_comment | Python | sessions_213.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM shipments;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00099991924 | obfuscated_destructive | SQL | payments_701.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
subscriptions; | DROP_TABLE | true |
DIFF00099991925 | test_suite_cleanup | SQL | mysql-test/suite/notifications_760.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN category TO contact_email; | ALTER_RENAME | false |
DIFF00099991926 | obfuscated_destructive | SQL | inventory_600.sql | schema cleanup | @@ -1,3 +1,3 @@
+dELeTe from REfuNds; | DELETE_UNQUALIFIED | true |
DIFF00099991927 | general_code_change | JavaScript | inventory_330.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099991928 | raw_sql_safe | SQL | users_939.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_comments_priority ON comments (updated_at); | NONE | false |
DIFF00099991929 | orm_schema_change | Python | transactions_989.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='inventory', name='order_id') | NONE | true |
DIFF00099991930 | general_code_change | JavaScript | shipments_656.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099991931 | orm_schema_change | JavaScript | orders_152.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('address')) | NONE | true |
DIFF00099991932 | general_code_change | Java | comments_108.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099991933 | raw_sql_destructive | SQL | reviews_569.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | true |
DIFF00099991934 | mentioned_in_comment | Python | invoices_536.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM customers;") | DELETE_UNQUALIFIED | false |
DIFF00099991935 | obfuscated_destructive | SQL | inventory_458.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | true |
DIFF00099991936 | raw_sql_destructive | SQL | notifications_458.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN priority; | DROP_COLUMN | true |
DIFF00099991937 | obfuscated_destructive | SQL | invoices_396.sql | schema cleanup | @@ -1,3 +1,3 @@
+tRunCaTe tABLE CustoMErS; | TRUNCATE | true |
DIFF00099991938 | raw_sql_destructive | SQL | customers_501.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE customers SET category = CONCAT(category, created_at); | UPDATE_CONCAT | true |
DIFF00099991939 | raw_sql_safe | SQL | orders_331.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE users ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099991940 | general_code_change | Python | reviews_17.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099991941 | mentioned_in_comment | Python | inventory_919.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE transactions;") | DROP_TABLE | false |
DIFF00099991942 | mentioned_in_comment | Python | inventory_636.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE payments; -- now deprecated""" | TRUNCATE | false |
DIFF00099991943 | test_suite_cleanup | SQL | mysql-test/suite/users_518.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE inventory; | TRUNCATE | false |
DIFF00099991944 | raw_sql_safe | SQL | events_960.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE sessions SET score = %s WHERE created_at = %s; | NONE | false |
DIFF00099991945 | mentioned_in_comment | Python | employees_768.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE tickets RENAME COLUMN category TO user_role; -- now deprecated""" | ALTER_RENAME | false |
DIFF00099991946 | general_code_change | JavaScript | payments_220.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 |
DIFF00099991947 | general_code_change | TypeScript | orders_356.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 |
DIFF00099991948 | orm_schema_change | TypeScript | logs_4.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Invoices { // removed field: price } | NONE | true |
DIFF00099991949 | mentioned_in_comment | Python | transactions_939.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE events DROP COLUMN quantity;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099991950 | raw_sql_destructive | SQL | customers_372.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE accounts SET address = CONCAT(address, is_active); | UPDATE_CONCAT | true |
DIFF00099991951 | obfuscated_destructive | SQL | comments_622.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE shipments SET address = CONCAT(address, role); | UPDATE_CONCAT | true |
DIFF00099991952 | mentioned_in_comment | Python | payments_311.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM comments; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099991953 | general_code_change | Go | users_497.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099991954 | test_suite_cleanup | SQL | test/inventory_124.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE events; | TRUNCATE | false |
DIFF00099991955 | general_code_change | JavaScript | tickets_294.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099991956 | obfuscated_destructive | SQL | employees_288.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
sessions; | TRUNCATE | true |
DIFF00099991957 | raw_sql_safe | SQL | comments_412.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_logs_order_id ON logs (is_active); | NONE | false |
DIFF00099991958 | mentioned_in_comment | Python | users_217.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE sessions RENAME COLUMN metadata TO state; -- now deprecated""" | ALTER_RENAME | false |
DIFF00099991959 | raw_sql_destructive | SQL | notifications_428.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE sessions SET is_active = CONCAT(is_active, balance); | UPDATE_CONCAT | true |
DIFF00099991960 | orm_schema_change | JavaScript | employees_915.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('invoices', table => table.dropColumn('address')) | NONE | true |
DIFF00099991961 | mentioned_in_comment | Python | reviews_338.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM invoices;") | DELETE_UNQUALIFIED | false |
DIFF00099991962 | mentioned_in_comment | Python | inventory_877.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE products;' manually, handled by migration tool | TRUNCATE | false |
DIFF00099991963 | raw_sql_destructive | SQL | subscriptions_105.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE employees; | DROP_TABLE | true |
DIFF00099991964 | general_code_change | Python | employees_601.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099991965 | general_code_change | JavaScript | users_412.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099991966 | orm_schema_change | TypeScript | subscriptions_583.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Products { // removed field: quantity } | NONE | true |
DIFF00099991967 | test_suite_cleanup | SQL | spec/payments_324.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN metadata TO state; | ALTER_RENAME | false |
DIFF00099991968 | raw_sql_destructive | SQL | sessions_392.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | true |
DIFF00099991969 | general_code_change | Ruby | employees_529.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099991970 | orm_schema_change | Ruby | users_551.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :users, :score | NONE | true |
DIFF00099991971 | general_code_change | Go | subscriptions_796.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099991972 | general_code_change | Python | transactions_51.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099991973 | general_code_change | Java | subscriptions_728.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099991974 | raw_sql_safe | SQL | comments_214.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_customers_name ON customers (amount); | NONE | false |
DIFF00099991975 | orm_schema_change | Python | products_734.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='inventory', name='is_active') | NONE | true |
DIFF00099991976 | mentioned_in_comment | Python | products_513.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE accounts DROP COLUMN order_id;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099991977 | raw_sql_destructive | SQL | refunds_455.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE logs RENAME COLUMN phone TO state; | ALTER_RENAME | true |
DIFF00099991978 | raw_sql_safe | SQL | accounts_22.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_sessions_address ON sessions (role); | NONE | false |
DIFF00099991979 | test_suite_cleanup | SQL | test/customers_820.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE comments SET score = CONCAT(score, metadata); | UPDATE_CONCAT | false |
DIFF00099991980 | general_code_change | JavaScript | refunds_936.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 |
DIFF00099991981 | obfuscated_destructive | SQL | notifications_861.sql | schema cleanup | @@ -1,3 +1,3 @@
+TrUNCAte TABlE inVEntOrY; | TRUNCATE | true |
DIFF00099991982 | test_suite_cleanup | SQL | spec/payments_348.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | false |
DIFF00099991983 | test_suite_cleanup | SQL | tests/payments_19.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | false |
DIFF00099991984 | test_suite_cleanup | SQL | mysql-test/suite/customers_688.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE inventory SET user_id = CONCAT(user_id, address); | UPDATE_CONCAT | false |
DIFF00099991985 | test_suite_cleanup | SQL | mysql-test/suite/refunds_551.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN created_at; | DROP_COLUMN | false |
DIFF00099991986 | test_suite_cleanup | SQL | tests/customers_931.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | false |
DIFF00099991987 | general_code_change | TypeScript | sessions_698.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 |
DIFF00099991988 | orm_schema_change | TypeScript | tickets_588.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Accounts { // removed field: price } | NONE | true |
DIFF00099991989 | obfuscated_destructive | SQL | tickets_972.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table transactions; | DROP_TABLE | true |
DIFF00099991990 | mentioned_in_comment | Python | reviews_961.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE customers;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099991991 | orm_schema_change | Ruby | shipments_752.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :sessions, :created_at | NONE | true |
DIFF00099991992 | raw_sql_safe | SQL | orders_609.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE inventory ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00099991993 | obfuscated_destructive | SQL | transactions_651.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
accounts; | DELETE_UNQUALIFIED | true |
DIFF00099991994 | orm_schema_change | JavaScript | users_989.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('subscriptions', 'quantity') | NONE | true |
DIFF00099991995 | general_code_change | Python | events_132.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099991996 | raw_sql_safe | SQL | customers_524.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_name ON subscriptions (name); | NONE | false |
DIFF00099991997 | obfuscated_destructive | SQL | shipments_339.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table accounts; | DROP_TABLE | true |
DIFF00099991998 | general_code_change | TypeScript | invoices_958.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 |
DIFF00099991999 | orm_schema_change | JavaScript | orders_379.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'priority') | NONE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.