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
DIFF00099994100
raw_sql_destructive
SQL
subscriptions_552.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE refunds SET updated_at = CONCAT(updated_at, email);
UPDATE_CONCAT
true
DIFF00099994101
raw_sql_destructive
SQL
comments_115.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE invoices RENAME COLUMN phone TO contact_email;
ALTER_RENAME
true
DIFF00099994102
raw_sql_safe
SQL
refunds_298.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE inventory ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00099994103
obfuscated_destructive
SQL
reviews_417.sql
schema cleanup
@@ -1,3 +1,3 @@ +update shipments set role = concat(role, score);
UPDATE_CONCAT
true
DIFF00099994104
general_code_change
JavaScript
customers_832.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
DIFF00099994105
raw_sql_safe
SQL
tickets_90.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO orders (created_at, status) VALUES (%s, %s);
NONE
false
DIFF00099994106
orm_schema_change
Ruby
payments_911.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :reviews, :updated_at
NONE
true
DIFF00099994107
obfuscated_destructive
SQL
notifications_769.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM invoices;
DELETE_UNQUALIFIED
true
DIFF00099994108
orm_schema_change
JavaScript
comments_124.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('subscriptions', table => table.dropColumn('is_active'))
NONE
true
DIFF00099994109
test_suite_cleanup
SQL
test/invoices_447.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE comments;
TRUNCATE
false
DIFF00099994110
general_code_change
JavaScript
subscriptions_510.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099994111
general_code_change
TypeScript
customers_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
DIFF00099994112
orm_schema_change
Python
tickets_260.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='notifications', name='balance')
NONE
true
DIFF00099994113
general_code_change
JavaScript
subscriptions_627.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
DIFF00099994114
general_code_change
Java
accounts_74.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099994115
raw_sql_destructive
SQL
customers_186.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE employees RENAME COLUMN is_active TO full_name;
ALTER_RENAME
true
DIFF00099994116
general_code_change
Python
payments_583.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099994117
raw_sql_destructive
SQL
inventory_419.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE products DROP COLUMN is_active;
DROP_COLUMN
true
DIFF00099994118
obfuscated_destructive
SQL
notifications_892.sql
schema cleanup
@@ -1,3 +1,3 @@ +delete from payments;
DELETE_UNQUALIFIED
true
DIFF00099994119
obfuscated_destructive
SQL
notifications_176.sql
schema cleanup
@@ -1,3 +1,3 @@ +TRUNCATE TABLE payments;
TRUNCATE
true
DIFF00099994120
test_suite_cleanup
SQL
test/reviews_641.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE refunds;
DROP_TABLE
false
DIFF00099994121
general_code_change
Python
orders_101.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099994122
general_code_change
Ruby
sessions_643.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099994123
orm_schema_change
JavaScript
invoices_898.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('reviews', table => table.dropColumn('address'))
NONE
true
DIFF00099994124
general_code_change
Ruby
notifications_211.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099994125
general_code_change
Java
inventory_660.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099994126
test_suite_cleanup
SQL
spec/invoices_903.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM accounts;
DELETE_UNQUALIFIED
false
DIFF00099994127
mentioned_in_comment
Python
reviews_679.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE events RENAME COLUMN phone TO user_role;' manually, handled by migration tool
ALTER_RENAME
false
DIFF00099994128
mentioned_in_comment
Python
accounts_759.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE customers DROP COLUMN quantity;")
DROP_COLUMN
false
DIFF00099994129
general_code_change
Ruby
invoices_436.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099994130
mentioned_in_comment
Python
accounts_85.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DELETE FROM reviews;")
DELETE_UNQUALIFIED
false
DIFF00099994131
obfuscated_destructive
SQL
logs_602.sql
schema cleanup
@@ -1,3 +1,3 @@ +update events set category = concat(category, amount);
UPDATE_CONCAT
true
DIFF00099994132
test_suite_cleanup
SQL
spec/inventory_802.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE notifications SET name = CONCAT(name, name);
UPDATE_CONCAT
false
DIFF00099994133
obfuscated_destructive
SQL
inventory_127.sql
schema cleanup
@@ -1,3 +1,3 @@ +AltER table shipmEnTs RENaMe Column rOle tO amoUnt_CeNTs;
ALTER_RENAME
true
DIFF00099994134
test_suite_cleanup
SQL
test/products_834.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE sessions DROP COLUMN price;
DROP_COLUMN
false
DIFF00099994135
raw_sql_destructive
SQL
orders_381.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE customers DROP COLUMN quantity;
DROP_COLUMN
true
DIFF00099994136
test_suite_cleanup
SQL
spec/reviews_654.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE inventory RENAME COLUMN name TO full_name;
ALTER_RENAME
false
DIFF00099994137
raw_sql_destructive
SQL
events_677.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE transactions DROP COLUMN role;
DROP_COLUMN
true
DIFF00099994138
raw_sql_destructive
SQL
events_357.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE events;
TRUNCATE
true
DIFF00099994139
raw_sql_safe
SQL
tickets_732.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE customers ADD COLUMN amount_cents VARCHAR(255);
NONE
false
DIFF00099994140
test_suite_cleanup
SQL
spec/sessions_23.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE logs DROP COLUMN priority;
DROP_COLUMN
false
DIFF00099994141
test_suite_cleanup
SQL
mysql-test/suite/refunds_455.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE comments;
DROP_TABLE
false
DIFF00099994142
general_code_change
JavaScript
reviews_3.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099994143
general_code_change
Python
reviews_586.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099994144
raw_sql_destructive
SQL
sessions_801.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE sessions RENAME COLUMN price TO full_name;
ALTER_RENAME
true
DIFF00099994145
general_code_change
JavaScript
invoices_521.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099994146
raw_sql_safe
SQL
invoices_405.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM invoices WHERE name = 'active';
NONE
false
DIFF00099994147
mentioned_in_comment
Python
subscriptions_743.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE tickets; -- now deprecated"""
DROP_TABLE
false
DIFF00099994148
raw_sql_safe
SQL
transactions_64.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE refunds ADD COLUMN full_name VARCHAR(255);
NONE
false
DIFF00099994149
orm_schema_change
JavaScript
logs_236.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('tickets', 'phone')
NONE
true
DIFF00099994150
mentioned_in_comment
Python
events_227.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM notifications;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00099994151
mentioned_in_comment
Python
tickets_473.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE refunds RENAME COLUMN description TO amount_cents;")
ALTER_RENAME
false
DIFF00099994152
test_suite_cleanup
SQL
mysql-test/suite/orders_396.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE shipments DROP COLUMN price;
DROP_COLUMN
false
DIFF00099994153
raw_sql_safe
SQL
employees_290.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO reviews (role, price) VALUES (%s, %s);
NONE
false
DIFF00099994154
raw_sql_safe
SQL
customers_529.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM invoices WHERE created_at = 'active';
NONE
false
DIFF00099994155
general_code_change
Ruby
invoices_510.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099994156
raw_sql_safe
SQL
shipments_551.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM inventory WHERE created_at = 'active';
NONE
false
DIFF00099994157
mentioned_in_comment
Python
notifications_797.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE subscriptions DROP COLUMN priority;' manually, handled by migration tool
DROP_COLUMN
false
DIFF00099994158
orm_schema_change
Python
events_551.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='reviews', name='amount')
NONE
true
DIFF00099994159
raw_sql_safe
SQL
products_349.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_sessions_created_at ON sessions (address);
NONE
false
DIFF00099994160
mentioned_in_comment
Python
sessions_363.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'UPDATE logs SET is_active = CONCAT(is_active, category);' manually, handled by migration tool
UPDATE_CONCAT
false
DIFF00099994161
raw_sql_destructive
SQL
logs_859.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE notifications SET role = CONCAT(role, description);
UPDATE_CONCAT
true
DIFF00099994162
obfuscated_destructive
SQL
refunds_545.sql
schema cleanup
@@ -1,3 +1,3 @@ +AlTeR Table SHIPMENTs REnAmE ColuMN SCOre tO COntACT_eMAIL;
ALTER_RENAME
true
DIFF00099994163
obfuscated_destructive
SQL
reviews_163.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE events;
DROP_TABLE
true
DIFF00099994164
raw_sql_safe
SQL
accounts_825.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_refunds_role ON refunds (address);
NONE
false
DIFF00099994165
general_code_change
Go
invoices_12.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099994166
raw_sql_safe
SQL
users_258.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_reviews_user_id ON reviews (phone);
NONE
false
DIFF00099994167
test_suite_cleanup
SQL
test/reviews_807.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE comments RENAME COLUMN created_at TO full_name;
ALTER_RENAME
false
DIFF00099994168
general_code_change
TypeScript
tickets_890.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
DIFF00099994169
raw_sql_safe
SQL
accounts_897.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO sessions (balance, address) VALUES (%s, %s);
NONE
false
DIFF00099994170
raw_sql_safe
SQL
reviews_555.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO refunds (order_id, description) VALUES (%s, %s);
NONE
false
DIFF00099994171
orm_schema_change
Ruby
events_63.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :payments, :score
NONE
true
DIFF00099994172
mentioned_in_comment
Python
employees_554.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DELETE FROM notifications; -- now deprecated"""
DELETE_UNQUALIFIED
false
DIFF00099994173
obfuscated_destructive
SQL
inventory_469.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE refunds RENAME COLUMN created_at TO full_name;
ALTER_RENAME
true
DIFF00099994174
test_suite_cleanup
SQL
mysql-test/suite/customers_721.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE customers RENAME COLUMN phone TO full_name;
ALTER_RENAME
false
DIFF00099994175
general_code_change
Python
payments_798.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099994176
general_code_change
Python
orders_587.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099994177
general_code_change
JavaScript
shipments_643.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
DIFF00099994178
test_suite_cleanup
SQL
tests/users_572.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE invoices DROP COLUMN priority;
DROP_COLUMN
false
DIFF00099994179
orm_schema_change
JavaScript
accounts_823.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('logs', table => table.dropColumn('user_id'))
NONE
true
DIFF00099994180
general_code_change
Go
tickets_849.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099994181
raw_sql_safe
SQL
customers_148.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO customers (score, quantity) VALUES (%s, %s);
NONE
false
DIFF00099994182
orm_schema_change
Python
subscriptions_965.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='employees', name='status')
NONE
true
DIFF00099994183
raw_sql_safe
SQL
refunds_813.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_users_phone ON users (status);
NONE
false
DIFF00099994184
raw_sql_destructive
SQL
tickets_422.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE accounts SET is_active = CONCAT(is_active, score);
UPDATE_CONCAT
true
DIFF00099994185
general_code_change
Python
orders_381.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099994186
raw_sql_destructive
SQL
reviews_556.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE users;
TRUNCATE
true
DIFF00099994187
obfuscated_destructive
SQL
inventory_698.sql
schema cleanup
@@ -1,3 +1,3 @@ +TRUNCATE TABLE refunds;
TRUNCATE
true
DIFF00099994188
raw_sql_safe
SQL
transactions_574.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE orders ADD COLUMN user_role VARCHAR(255);
NONE
false
DIFF00099994189
mentioned_in_comment
Python
accounts_776.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: UPDATE comments SET is_active = CONCAT(is_active, address);")
UPDATE_CONCAT
false
DIFF00099994190
raw_sql_destructive
SQL
refunds_532.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM inventory;
DELETE_UNQUALIFIED
true
DIFF00099994191
raw_sql_safe
SQL
orders_995.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO sessions (phone, status) VALUES (%s, %s);
NONE
false
DIFF00099994192
general_code_change
Python
tickets_10.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099994193
general_code_change
Ruby
events_688.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099994194
raw_sql_safe
SQL
inventory_865.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO events (price, category) VALUES (%s, %s);
NONE
false
DIFF00099994195
general_code_change
TypeScript
events_333.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
DIFF00099994196
raw_sql_safe
SQL
inventory_943.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE products ADD COLUMN user_role VARCHAR(255);
NONE
false
DIFF00099994197
obfuscated_destructive
SQL
products_187.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE comments DROP COLUMN status;
DROP_COLUMN
true
DIFF00099994198
general_code_change
JavaScript
refunds_33.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
DIFF00099994199
obfuscated_destructive
SQL
reviews_335.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE accounts;
DROP_TABLE
true