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
DIFF00099993000
raw_sql_safe
SQL
tickets_878.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO accounts (balance, role) VALUES (%s, %s);
NONE
false
DIFF00099993001
orm_schema_change
Ruby
refunds_897.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :sessions, :description
NONE
true
DIFF00099993002
general_code_change
Ruby
notifications_354.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099993003
mentioned_in_comment
Python
payments_739.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE tickets DROP COLUMN address; -- now deprecated"""
DROP_COLUMN
false
DIFF00099993004
raw_sql_safe
SQL
tickets_529.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE transactions SET order_id = %s WHERE email = %s;
NONE
false
DIFF00099993005
obfuscated_destructive
SQL
accounts_18.sql
schema cleanup
@@ -1,3 +1,3 @@ +drOP TABLE orDErs;
DROP_TABLE
true
DIFF00099993006
obfuscated_destructive
SQL
invoices_921.sql
schema cleanup
@@ -1,3 +1,3 @@ +delete from notifications;
DELETE_UNQUALIFIED
true
DIFF00099993007
general_code_change
Ruby
users_376.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099993008
mentioned_in_comment
Python
logs_267.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DROP TABLE payments;")
DROP_TABLE
false
DIFF00099993009
mentioned_in_comment
Python
invoices_150.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DELETE FROM users; -- now deprecated"""
DELETE_UNQUALIFIED
false
DIFF00099993010
raw_sql_safe
SQL
users_852.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM sessions WHERE user_id = 'active';
NONE
false
DIFF00099993011
raw_sql_destructive
SQL
invoices_47.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE shipments;
TRUNCATE
true
DIFF00099993012
raw_sql_destructive
SQL
inventory_439.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE reviews RENAME COLUMN metadata TO full_name;
ALTER_RENAME
true
DIFF00099993013
general_code_change
JavaScript
inventory_572.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
DIFF00099993014
general_code_change
JavaScript
invoices_528.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
DIFF00099993015
test_suite_cleanup
SQL
test/accounts_239.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE shipments DROP COLUMN email;
DROP_COLUMN
false
DIFF00099993016
test_suite_cleanup
SQL
spec/orders_457.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE products;
DROP_TABLE
false
DIFF00099993017
orm_schema_change
JavaScript
accounts_558.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('users', 'description')
NONE
true
DIFF00099993018
general_code_change
Ruby
shipments_231.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099993019
general_code_change
Ruby
employees_879.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099993020
orm_schema_change
Python
shipments_74.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='products', name='order_id')
NONE
true
DIFF00099993021
test_suite_cleanup
SQL
test/customers_347.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE users DROP COLUMN metadata;
DROP_COLUMN
false
DIFF00099993022
general_code_change
Java
subscriptions_518.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099993023
general_code_change
TypeScript
payments_173.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
DIFF00099993024
obfuscated_destructive
SQL
payments_149.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE shipments DROP COLUMN metadata;
DROP_COLUMN
true
DIFF00099993025
test_suite_cleanup
SQL
mysql-test/suite/logs_500.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE logs SET category = CONCAT(category, role);
UPDATE_CONCAT
false
DIFF00099993026
obfuscated_destructive
SQL
transactions_452.sql
schema cleanup
@@ -1,3 +1,3 @@ +aLtEr TAble PayMENtS dROp cOLUmN uSEr_ID;
DROP_COLUMN
true
DIFF00099993027
raw_sql_destructive
SQL
payments_978.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE comments SET metadata = CONCAT(metadata, metadata);
UPDATE_CONCAT
true
DIFF00099993028
mentioned_in_comment
Python
refunds_302.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: TRUNCATE TABLE notifications; -- now deprecated"""
TRUNCATE
false
DIFF00099993029
orm_schema_change
TypeScript
comments_528.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Comments { // removed field: amount }
NONE
true
DIFF00099993030
obfuscated_destructive
SQL
notifications_712.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE payments DROP COLUMN category;
DROP_COLUMN
true
DIFF00099993031
test_suite_cleanup
SQL
tests/orders_362.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE tickets DROP COLUMN priority;
DROP_COLUMN
false
DIFF00099993032
obfuscated_destructive
SQL
employees_738.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE users RENAME COLUMN amount TO amount_cents;
ALTER_RENAME
true
DIFF00099993033
general_code_change
Go
inventory_560.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099993034
orm_schema_change
Ruby
accounts_440.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :logs, :description
NONE
true
DIFF00099993035
general_code_change
Python
inventory_299.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099993036
mentioned_in_comment
Python
comments_307.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DROP TABLE events;")
DROP_TABLE
false
DIFF00099993037
raw_sql_destructive
SQL
users_907.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE sessions;
DROP_TABLE
true
DIFF00099993038
general_code_change
Ruby
invoices_677.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099993039
orm_schema_change
JavaScript
tickets_746.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('sessions', table => table.dropColumn('category'))
NONE
true
DIFF00099993040
general_code_change
Java
sessions_27.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099993041
mentioned_in_comment
Python
inventory_601.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'TRUNCATE TABLE events;' manually, handled by migration tool
TRUNCATE
false
DIFF00099993042
raw_sql_destructive
SQL
transactions_833.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE tickets;
DROP_TABLE
true
DIFF00099993043
test_suite_cleanup
SQL
spec/orders_504.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE comments RENAME COLUMN updated_at TO contact_email;
ALTER_RENAME
false
DIFF00099993044
mentioned_in_comment
Python
logs_839.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE products DROP COLUMN address; -- now deprecated"""
DROP_COLUMN
false
DIFF00099993045
orm_schema_change
JavaScript
payments_4.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('subscriptions', table => table.dropColumn('is_active'))
NONE
true
DIFF00099993046
mentioned_in_comment
Python
refunds_579.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DROP TABLE inventory;' manually, handled by migration tool
DROP_TABLE
false
DIFF00099993047
raw_sql_safe
SQL
users_90.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE invoices ADD COLUMN amount_cents VARCHAR(255);
NONE
false
DIFF00099993048
general_code_change
Ruby
products_655.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099993049
mentioned_in_comment
Python
invoices_258.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE logs DROP COLUMN score;' manually, handled by migration tool
DROP_COLUMN
false
DIFF00099993050
obfuscated_destructive
SQL
employees_105.sql
schema cleanup
@@ -1,3 +1,3 @@ +alter table employees rename column order_id to amount_cents;
ALTER_RENAME
true
DIFF00099993051
orm_schema_change
JavaScript
inventory_148.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('accounts', table => table.dropColumn('amount'))
NONE
true
DIFF00099993052
raw_sql_destructive
SQL
logs_384.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM logs;
DELETE_UNQUALIFIED
true
DIFF00099993053
raw_sql_safe
SQL
orders_122.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE shipments SET user_id = %s WHERE user_id = %s;
NONE
false
DIFF00099993054
mentioned_in_comment
Python
subscriptions_97.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM logs;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00099993055
test_suite_cleanup
SQL
tests/events_185.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE inventory;
TRUNCATE
false
DIFF00099993056
mentioned_in_comment
Python
products_927.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE reviews; -- now deprecated"""
DROP_TABLE
false
DIFF00099993057
general_code_change
Ruby
accounts_377.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099993058
orm_schema_change
TypeScript
events_439.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Users { // removed field: user_id }
NONE
true
DIFF00099993059
orm_schema_change
JavaScript
users_328.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('logs', 'priority')
NONE
true
DIFF00099993060
raw_sql_safe
SQL
employees_181.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO tickets (amount, order_id) VALUES (%s, %s);
NONE
false
DIFF00099993061
mentioned_in_comment
Python
reviews_696.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DROP TABLE transactions;' manually, handled by migration tool
DROP_TABLE
false
DIFF00099993062
obfuscated_destructive
SQL
subscriptions_784.sql
schema cleanup
@@ -1,3 +1,3 @@ +delEte from cUSToMErS;
DELETE_UNQUALIFIED
true
DIFF00099993063
obfuscated_destructive
SQL
logs_366.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE users;
DROP_TABLE
true
DIFF00099993064
test_suite_cleanup
SQL
mysql-test/suite/events_679.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE orders DROP COLUMN role;
DROP_COLUMN
false
DIFF00099993065
raw_sql_safe
SQL
logs_90.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_accounts_quantity ON accounts (description);
NONE
false
DIFF00099993066
raw_sql_safe
SQL
orders_242.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE accounts ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00099993067
raw_sql_safe
SQL
users_311.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM shipments WHERE amount = 'active';
NONE
false
DIFF00099993068
general_code_change
Go
comments_744.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099993069
raw_sql_safe
SQL
invoices_724.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE sessions ADD COLUMN user_role VARCHAR(255);
NONE
false
DIFF00099993070
orm_schema_change
JavaScript
reviews_812.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('orders', table => table.dropColumn('created_at'))
NONE
true
DIFF00099993071
mentioned_in_comment
Python
employees_173.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DELETE FROM logs;")
DELETE_UNQUALIFIED
false
DIFF00099993072
test_suite_cleanup
SQL
mysql-test/suite/reviews_360.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE inventory DROP COLUMN name;
DROP_COLUMN
false
DIFF00099993073
orm_schema_change
JavaScript
transactions_482.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('subscriptions', 'phone')
NONE
true
DIFF00099993074
obfuscated_destructive
SQL
orders_603.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE invoices;
DROP_TABLE
true
DIFF00099993075
raw_sql_destructive
SQL
reviews_579.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE sessions RENAME COLUMN is_active TO full_name;
ALTER_RENAME
true
DIFF00099993076
general_code_change
TypeScript
accounts_640.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
DIFF00099993077
test_suite_cleanup
SQL
spec/accounts_433.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM accounts;
DELETE_UNQUALIFIED
false
DIFF00099993078
orm_schema_change
JavaScript
products_468.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('tickets', table => table.dropColumn('email'))
NONE
true
DIFF00099993079
mentioned_in_comment
Python
users_27.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: UPDATE products SET user_id = CONCAT(user_id, phone);")
UPDATE_CONCAT
false
DIFF00099993080
mentioned_in_comment
Python
users_586.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE subscriptions; -- now deprecated"""
DROP_TABLE
false
DIFF00099993081
raw_sql_destructive
SQL
accounts_61.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE orders;
DROP_TABLE
true
DIFF00099993082
mentioned_in_comment
Python
users_49.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE employees RENAME COLUMN is_active TO amount_cents;")
ALTER_RENAME
false
DIFF00099993083
raw_sql_destructive
SQL
employees_394.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE inventory DROP COLUMN phone;
DROP_COLUMN
true
DIFF00099993084
general_code_change
JavaScript
tickets_522.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
DIFF00099993085
raw_sql_safe
SQL
sessions_715.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE logs SET price = %s WHERE balance = %s;
NONE
false
DIFF00099993086
raw_sql_destructive
SQL
refunds_357.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE sessions RENAME COLUMN email TO user_role;
ALTER_RENAME
true
DIFF00099993087
raw_sql_safe
SQL
orders_229.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE shipments ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00099993088
test_suite_cleanup
SQL
spec/transactions_284.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE payments SET role = CONCAT(role, category);
UPDATE_CONCAT
false
DIFF00099993089
general_code_change
JavaScript
events_482.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
DIFF00099993090
raw_sql_destructive
SQL
refunds_406.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE transactions RENAME COLUMN updated_at TO contact_email;
ALTER_RENAME
true
DIFF00099993091
general_code_change
Java
employees_471.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099993092
orm_schema_change
TypeScript
orders_127.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Employees { // removed field: amount }
NONE
true
DIFF00099993093
mentioned_in_comment
Python
products_652.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE reviews RENAME COLUMN role TO amount_cents; -- now deprecated"""
ALTER_RENAME
false
DIFF00099993094
general_code_change
Python
refunds_194.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099993095
general_code_change
Ruby
payments_408.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099993096
general_code_change
JavaScript
customers_103.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099993097
raw_sql_safe
SQL
products_340.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE shipments SET name = %s WHERE category = %s;
NONE
false
DIFF00099993098
test_suite_cleanup
SQL
test/refunds_330.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE transactions;
TRUNCATE
false
DIFF00099993099
test_suite_cleanup
SQL
test/sessions_20.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE subscriptions DROP COLUMN metadata;
DROP_COLUMN
false