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 |
|---|---|---|---|---|---|---|---|
DIFF00000002100 | general_code_change | Ruby | accounts_910.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000002101 | general_code_change | JavaScript | refunds_50.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002102 | raw_sql_safe | SQL | products_181.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE payments ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000002103 | general_code_change | Python | reviews_107.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000002104 | general_code_change | JavaScript | employees_860.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 |
DIFF00000002105 | general_code_change | Ruby | events_235.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000002106 | test_suite_cleanup | SQL | tests/events_369.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN user_id TO amount_cents; | ALTER_RENAME | false |
DIFF00000002107 | orm_schema_change | JavaScript | products_468.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('is_active')) | NONE | true |
DIFF00000002108 | raw_sql_destructive | SQL | customers_315.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | true |
DIFF00000002109 | mentioned_in_comment | Python | tickets_74.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE refunds;") | DROP_TABLE | false |
DIFF00000002110 | mentioned_in_comment | Python | accounts_298.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE subscriptions;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000002111 | obfuscated_destructive | SQL | subscriptions_402.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE transactions SET metadata = CONCAT(metadata, email); | UPDATE_CONCAT | true |
DIFF00000002112 | orm_schema_change | Python | events_510.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='metadata') | NONE | true |
DIFF00000002113 | orm_schema_change | JavaScript | subscriptions_899.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('accounts', 'balance') | NONE | true |
DIFF00000002114 | general_code_change | JavaScript | employees_367.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 |
DIFF00000002115 | orm_schema_change | Python | customers_909.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='address') | NONE | true |
DIFF00000002116 | general_code_change | JavaScript | products_726.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 |
DIFF00000002117 | raw_sql_destructive | SQL | notifications_186.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE users SET status = CONCAT(status, role); | UPDATE_CONCAT | true |
DIFF00000002118 | general_code_change | TypeScript | inventory_144.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 |
DIFF00000002119 | mentioned_in_comment | Python | comments_611.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE reviews;") | DROP_TABLE | false |
DIFF00000002120 | general_code_change | Ruby | products_531.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000002121 | general_code_change | TypeScript | notifications_95.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 |
DIFF00000002122 | test_suite_cleanup | SQL | spec/subscriptions_350.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN balance; | DROP_COLUMN | false |
DIFF00000002123 | raw_sql_safe | SQL | payments_276.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO customers (balance, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00000002124 | orm_schema_change | TypeScript | notifications_298.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Shipments { // removed field: balance } | NONE | true |
DIFF00000002125 | raw_sql_safe | SQL | tickets_816.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE employees ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000002126 | obfuscated_destructive | SQL | accounts_764.sql | schema cleanup | @@ -1,3 +1,3 @@
+DEleTE FrOM NoTificatIoNS; | DELETE_UNQUALIFIED | true |
DIFF00000002127 | raw_sql_destructive | SQL | refunds_378.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00000002128 | test_suite_cleanup | SQL | spec/subscriptions_952.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions DROP COLUMN name; | DROP_COLUMN | false |
DIFF00000002129 | raw_sql_destructive | SQL | accounts_188.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE inventory; | DROP_TABLE | true |
DIFF00000002130 | mentioned_in_comment | Python | notifications_391.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE events SET address = CONCAT(address, balance);") | UPDATE_CONCAT | false |
DIFF00000002131 | general_code_change | TypeScript | transactions_920.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 |
DIFF00000002132 | raw_sql_destructive | SQL | customers_779.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN email; | DROP_COLUMN | true |
DIFF00000002133 | mentioned_in_comment | Python | accounts_587.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE shipments SET is_active = CONCAT(is_active, category); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000002134 | raw_sql_destructive | SQL | employees_332.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00000002135 | orm_schema_change | Ruby | logs_782.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :user_id | NONE | true |
DIFF00000002136 | general_code_change | Python | products_799.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000002137 | raw_sql_destructive | SQL | payments_588.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM payments; | DELETE_UNQUALIFIED | true |
DIFF00000002138 | raw_sql_safe | SQL | payments_990.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE users SET balance = %s WHERE price = %s; | NONE | false |
DIFF00000002139 | obfuscated_destructive | SQL | employees_969.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | true |
DIFF00000002140 | general_code_change | Python | logs_227.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000002141 | general_code_change | Java | payments_959.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002142 | general_code_change | Python | transactions_250.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000002143 | raw_sql_safe | SQL | sessions_174.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_users_address ON users (is_active); | NONE | false |
DIFF00000002144 | general_code_change | Java | subscriptions_739.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002145 | orm_schema_change | Python | invoices_120.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='metadata') | NONE | true |
DIFF00000002146 | raw_sql_safe | SQL | reviews_379.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_products_status ON products (order_id); | NONE | false |
DIFF00000002147 | raw_sql_destructive | SQL | comments_756.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | true |
DIFF00000002148 | general_code_change | TypeScript | comments_949.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 |
DIFF00000002149 | mentioned_in_comment | Python | users_405.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE shipments DROP COLUMN status; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000002150 | orm_schema_change | TypeScript | inventory_577.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Customers { // removed field: order_id } | NONE | true |
DIFF00000002151 | raw_sql_safe | SQL | transactions_906.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE shipments ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000002152 | orm_schema_change | JavaScript | users_319.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'amount') | NONE | true |
DIFF00000002153 | raw_sql_destructive | SQL | invoices_148.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00000002154 | orm_schema_change | JavaScript | tickets_10.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'status') | NONE | true |
DIFF00000002155 | raw_sql_safe | SQL | tickets_113.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM sessions WHERE score = 'active'; | NONE | false |
DIFF00000002156 | test_suite_cleanup | SQL | spec/reviews_901.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | false |
DIFF00000002157 | obfuscated_destructive | SQL | notifications_672.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
payments
RENAME
COLUMN
created_at
TO
contact_email; | ALTER_RENAME | true |
DIFF00000002158 | raw_sql_safe | SQL | inventory_429.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_tickets_status ON tickets (is_active); | NONE | false |
DIFF00000002159 | raw_sql_destructive | SQL | notifications_201.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | true |
DIFF00000002160 | raw_sql_destructive | SQL | inventory_672.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN description; | DROP_COLUMN | true |
DIFF00000002161 | raw_sql_destructive | SQL | employees_670.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN phone; | DROP_COLUMN | true |
DIFF00000002162 | obfuscated_destructive | SQL | refunds_710.sql | schema cleanup | @@ -1,3 +1,3 @@
+delEtE fROM REvIews; | DELETE_UNQUALIFIED | true |
DIFF00000002163 | raw_sql_safe | SQL | products_600.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM reviews WHERE price = 'active'; | NONE | false |
DIFF00000002164 | raw_sql_safe | SQL | tickets_147.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (order_id, order_id) VALUES (%s, %s); | NONE | false |
DIFF00000002165 | obfuscated_destructive | SQL | products_645.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table events rename column status to contact_email; | ALTER_RENAME | true |
DIFF00000002166 | raw_sql_safe | SQL | subscriptions_386.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE inventory SET score = %s WHERE quantity = %s; | NONE | false |
DIFF00000002167 | obfuscated_destructive | SQL | sessions_840.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
payments; | TRUNCATE | true |
DIFF00000002168 | raw_sql_destructive | SQL | subscriptions_706.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE accounts; | DROP_TABLE | true |
DIFF00000002169 | obfuscated_destructive | SQL | tickets_706.sql | schema cleanup | @@ -1,3 +1,3 @@
+dRoP TAbLE SubScRIPtiONs; | DROP_TABLE | true |
DIFF00000002170 | raw_sql_safe | SQL | tickets_803.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO accounts (address, user_id) VALUES (%s, %s); | NONE | false |
DIFF00000002171 | orm_schema_change | Ruby | logs_295.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :payments, :category | NONE | true |
DIFF00000002172 | general_code_change | JavaScript | accounts_689.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000002173 | mentioned_in_comment | Python | comments_916.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE payments;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000002174 | raw_sql_safe | SQL | payments_491.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE tickets ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000002175 | mentioned_in_comment | Python | refunds_122.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE invoices;") | DROP_TABLE | false |
DIFF00000002176 | mentioned_in_comment | Python | employees_854.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM accounts;") | DELETE_UNQUALIFIED | false |
DIFF00000002177 | general_code_change | TypeScript | customers_76.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 |
DIFF00000002178 | general_code_change | Java | comments_960.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002179 | orm_schema_change | TypeScript | products_163.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Comments { // removed field: email } | NONE | true |
DIFF00000002180 | obfuscated_destructive | SQL | invoices_505.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table shipments; | DROP_TABLE | true |
DIFF00000002181 | test_suite_cleanup | SQL | test/shipments_22.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | false |
DIFF00000002182 | general_code_change | Ruby | tickets_274.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000002183 | raw_sql_destructive | SQL | events_892.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE logs DROP COLUMN priority; | DROP_COLUMN | true |
DIFF00000002184 | test_suite_cleanup | SQL | mysql-test/suite/inventory_981.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | false |
DIFF00000002185 | raw_sql_destructive | SQL | customers_379.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds RENAME COLUMN metadata TO full_name; | ALTER_RENAME | true |
DIFF00000002186 | raw_sql_destructive | SQL | events_340.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN quantity; | DROP_COLUMN | true |
DIFF00000002187 | raw_sql_safe | SQL | users_139.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE comments SET price = %s WHERE description = %s; | NONE | false |
DIFF00000002188 | general_code_change | TypeScript | refunds_410.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 |
DIFF00000002189 | general_code_change | Python | products_690.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000002190 | general_code_change | Java | inventory_688.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000002191 | mentioned_in_comment | Python | transactions_851.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM employees; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000002192 | obfuscated_destructive | SQL | reviews_258.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table logs; | TRUNCATE | true |
DIFF00000002193 | mentioned_in_comment | Python | sessions_677.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE comments;") | TRUNCATE | false |
DIFF00000002194 | raw_sql_safe | SQL | transactions_132.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO subscriptions (status, description) VALUES (%s, %s); | NONE | false |
DIFF00000002195 | raw_sql_safe | SQL | reviews_7.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM transactions WHERE phone = 'active'; | NONE | false |
DIFF00000002196 | mentioned_in_comment | Python | tickets_741.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM comments;") | DELETE_UNQUALIFIED | false |
DIFF00000002197 | orm_schema_change | JavaScript | invoices_140.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('reviews', 'category') | NONE | true |
DIFF00000002198 | test_suite_cleanup | SQL | tests/comments_906.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN is_active; | DROP_COLUMN | false |
DIFF00000002199 | general_code_change | Python | refunds_457.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.