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 |
|---|---|---|---|---|---|---|---|
DIFF00000004100 | orm_schema_change | JavaScript | accounts_314.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'created_at') | NONE | true |
DIFF00000004101 | raw_sql_safe | SQL | employees_815.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE phone = 'active'; | NONE | false |
DIFF00000004102 | raw_sql_safe | SQL | subscriptions_889.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM customers WHERE is_active = 'active'; | NONE | false |
DIFF00000004103 | test_suite_cleanup | SQL | mysql-test/suite/inventory_122.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE events; | TRUNCATE | false |
DIFF00000004104 | general_code_change | Ruby | customers_693.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000004105 | general_code_change | Go | reviews_490.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000004106 | general_code_change | TypeScript | subscriptions_105.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 |
DIFF00000004107 | obfuscated_destructive | SQL | employees_795.sql | schema cleanup | @@ -1,3 +1,3 @@
+update accounts set quantity = concat(quantity, category); | UPDATE_CONCAT | true |
DIFF00000004108 | raw_sql_safe | SQL | employees_521.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE invoices SET price = %s WHERE phone = %s; | NONE | false |
DIFF00000004109 | raw_sql_destructive | SQL | accounts_741.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN amount; | DROP_COLUMN | true |
DIFF00000004110 | raw_sql_safe | SQL | shipments_28.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000004111 | raw_sql_destructive | SQL | transactions_229.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | true |
DIFF00000004112 | general_code_change | Java | inventory_807.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000004113 | test_suite_cleanup | SQL | tests/invoices_385.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN balance TO amount_cents; | ALTER_RENAME | false |
DIFF00000004114 | obfuscated_destructive | SQL | customers_120.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN created_at; | DROP_COLUMN | true |
DIFF00000004115 | mentioned_in_comment | Python | refunds_405.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE tickets SET role = CONCAT(role, description);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000004116 | orm_schema_change | JavaScript | payments_606.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('subscriptions', table => table.dropColumn('category')) | NONE | true |
DIFF00000004117 | raw_sql_safe | SQL | accounts_925.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE notifications SET description = %s WHERE phone = %s; | NONE | false |
DIFF00000004118 | general_code_change | TypeScript | payments_246.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 |
DIFF00000004119 | orm_schema_change | Ruby | comments_858.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :events, :status | NONE | true |
DIFF00000004120 | orm_schema_change | JavaScript | users_79.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('user_id')) | NONE | true |
DIFF00000004121 | raw_sql_destructive | SQL | products_91.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | true |
DIFF00000004122 | mentioned_in_comment | Python | sessions_697.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM subscriptions;") | DELETE_UNQUALIFIED | false |
DIFF00000004123 | orm_schema_change | JavaScript | sessions_366.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('inventory', table => table.dropColumn('address')) | NONE | true |
DIFF00000004124 | mentioned_in_comment | Python | shipments_438.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE shipments SET category = CONCAT(category, status); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000004125 | general_code_change | Python | products_897.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000004126 | general_code_change | TypeScript | comments_345.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 |
DIFF00000004127 | orm_schema_change | TypeScript | refunds_531.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: metadata } | NONE | true |
DIFF00000004128 | general_code_change | JavaScript | invoices_508.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 |
DIFF00000004129 | mentioned_in_comment | Python | inventory_605.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE logs;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000004130 | test_suite_cleanup | SQL | tests/transactions_398.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN updated_at; | DROP_COLUMN | false |
DIFF00000004131 | orm_schema_change | JavaScript | invoices_620.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'balance') | NONE | true |
DIFF00000004132 | raw_sql_safe | SQL | accounts_870.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM orders WHERE order_id = 'active'; | NONE | false |
DIFF00000004133 | orm_schema_change | JavaScript | events_131.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('customers', 'category') | NONE | true |
DIFF00000004134 | raw_sql_safe | SQL | products_712.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO invoices (amount, created_at) VALUES (%s, %s); | NONE | false |
DIFF00000004135 | general_code_change | TypeScript | accounts_381.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 |
DIFF00000004136 | general_code_change | Python | comments_432.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000004137 | test_suite_cleanup | SQL | tests/users_435.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE inventory SET address = CONCAT(address, is_active); | UPDATE_CONCAT | false |
DIFF00000004138 | raw_sql_safe | SQL | tickets_753.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO tickets (updated_at, role) VALUES (%s, %s); | NONE | false |
DIFF00000004139 | raw_sql_destructive | SQL | tickets_554.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM events; | DELETE_UNQUALIFIED | true |
DIFF00000004140 | mentioned_in_comment | Python | shipments_200.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE customers SET created_at = CONCAT(created_at, quantity);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000004141 | general_code_change | Java | tickets_580.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000004142 | raw_sql_safe | SQL | products_853.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE customers ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000004143 | orm_schema_change | Ruby | reviews_204.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :reviews, :description | NONE | true |
DIFF00000004144 | raw_sql_destructive | SQL | notifications_2.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE users; | TRUNCATE | true |
DIFF00000004145 | mentioned_in_comment | Python | subscriptions_580.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE users;") | DROP_TABLE | false |
DIFF00000004146 | raw_sql_safe | SQL | shipments_799.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM customers WHERE description = 'active'; | NONE | false |
DIFF00000004147 | test_suite_cleanup | SQL | mysql-test/suite/subscriptions_916.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN status; | DROP_COLUMN | false |
DIFF00000004148 | raw_sql_destructive | SQL | customers_467.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00000004149 | obfuscated_destructive | SQL | reviews_773.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table sessions; | TRUNCATE | true |
DIFF00000004150 | general_code_change | Ruby | comments_877.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000004151 | raw_sql_safe | SQL | subscriptions_649.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE price = 'active'; | NONE | false |
DIFF00000004152 | general_code_change | JavaScript | logs_602.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 |
DIFF00000004153 | test_suite_cleanup | SQL | tests/sessions_862.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | false |
DIFF00000004154 | general_code_change | Go | accounts_438.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000004155 | general_code_change | JavaScript | transactions_694.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 |
DIFF00000004156 | raw_sql_safe | SQL | tickets_570.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE inventory ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000004157 | mentioned_in_comment | Python | notifications_25.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE inventory;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000004158 | mentioned_in_comment | Python | sessions_273.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE tickets;") | DROP_TABLE | false |
DIFF00000004159 | general_code_change | Java | notifications_649.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000004160 | orm_schema_change | Ruby | transactions_606.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :employees, :quantity | NONE | true |
DIFF00000004161 | mentioned_in_comment | Python | events_510.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE transactions DROP COLUMN status;") | DROP_COLUMN | false |
DIFF00000004162 | general_code_change | Go | refunds_593.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000004163 | raw_sql_safe | SQL | customers_809.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_users_email ON users (score); | NONE | false |
DIFF00000004164 | orm_schema_change | Ruby | logs_23.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :tickets, :created_at | NONE | true |
DIFF00000004165 | mentioned_in_comment | Python | logs_147.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE accounts;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000004166 | raw_sql_destructive | SQL | shipments_736.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | true |
DIFF00000004167 | obfuscated_destructive | SQL | comments_429.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table products rename column category to full_name; | ALTER_RENAME | true |
DIFF00000004168 | mentioned_in_comment | Python | logs_576.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE refunds RENAME COLUMN created_at TO state; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000004169 | raw_sql_safe | SQL | refunds_667.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM comments WHERE phone = 'active'; | NONE | false |
DIFF00000004170 | raw_sql_safe | SQL | invoices_481.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_tickets_balance ON tickets (role); | NONE | false |
DIFF00000004171 | raw_sql_destructive | SQL | comments_424.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | true |
DIFF00000004172 | raw_sql_safe | SQL | refunds_36.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE tickets SET description = %s WHERE role = %s; | NONE | false |
DIFF00000004173 | raw_sql_safe | SQL | invoices_664.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO employees (is_active, price) VALUES (%s, %s); | NONE | false |
DIFF00000004174 | general_code_change | Python | customers_150.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000004175 | raw_sql_safe | SQL | inventory_368.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE shipments SET priority = %s WHERE price = %s; | NONE | false |
DIFF00000004176 | general_code_change | Ruby | payments_687.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000004177 | raw_sql_safe | SQL | comments_718.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (is_active, address) VALUES (%s, %s); | NONE | false |
DIFF00000004178 | general_code_change | Java | notifications_224.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000004179 | raw_sql_destructive | SQL | users_6.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | true |
DIFF00000004180 | general_code_change | Python | orders_192.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000004181 | obfuscated_destructive | SQL | accounts_276.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
subscriptions
SET
address
=
CONCAT(address,
role); | UPDATE_CONCAT | true |
DIFF00000004182 | general_code_change | Ruby | events_76.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000004183 | obfuscated_destructive | SQL | reviews_1.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions RENAME COLUMN phone TO state; | ALTER_RENAME | true |
DIFF00000004184 | orm_schema_change | JavaScript | products_275.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('inventory', table => table.dropColumn('quantity')) | NONE | true |
DIFF00000004185 | raw_sql_safe | SQL | inventory_90.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (amount, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00000004186 | general_code_change | Ruby | notifications_266.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000004187 | general_code_change | Python | payments_104.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000004188 | raw_sql_destructive | SQL | transactions_144.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE logs SET category = CONCAT(category, balance); | UPDATE_CONCAT | true |
DIFF00000004189 | mentioned_in_comment | Python | notifications_76.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE shipments RENAME COLUMN email TO contact_email; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000004190 | orm_schema_change | Python | payments_175.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='employees', name='phone') | NONE | true |
DIFF00000004191 | raw_sql_safe | SQL | comments_174.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM accounts WHERE phone = 'active'; | NONE | false |
DIFF00000004192 | general_code_change | Go | comments_403.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000004193 | raw_sql_safe | SQL | logs_227.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO users (updated_at, priority) VALUES (%s, %s); | NONE | false |
DIFF00000004194 | obfuscated_destructive | SQL | tickets_828.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | true |
DIFF00000004195 | obfuscated_destructive | SQL | transactions_218.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table shipments; | TRUNCATE | true |
DIFF00000004196 | obfuscated_destructive | SQL | customers_920.sql | schema cleanup | @@ -1,3 +1,3 @@
+AltER TaBLE EVeNTs rEname coLUmN STaTUS to FulL_NaME; | ALTER_RENAME | true |
DIFF00000004197 | raw_sql_safe | SQL | reviews_594.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE logs SET user_id = %s WHERE price = %s; | NONE | false |
DIFF00000004198 | raw_sql_destructive | SQL | tickets_671.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN created_at; | DROP_COLUMN | true |
DIFF00000004199 | general_code_change | Python | reviews_758.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.