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
DIFF00000008000
general_code_change
Java
customers_677.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000008001
orm_schema_change
JavaScript
products_197.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('transactions', table => table.dropColumn('address'))
NONE
true
DIFF00000008002
general_code_change
TypeScript
logs_249.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
DIFF00000008003
raw_sql_safe
SQL
users_588.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO payments (user_id, address) VALUES (%s, %s);
NONE
false
DIFF00000008004
raw_sql_safe
SQL
accounts_719.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE invoices ADD COLUMN full_name VARCHAR(255);
NONE
false
DIFF00000008005
test_suite_cleanup
SQL
tests/subscriptions_981.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE sessions RENAME COLUMN quantity TO contact_email;
ALTER_RENAME
false
DIFF00000008006
mentioned_in_comment
Python
accounts_483.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM logs;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00000008007
orm_schema_change
Ruby
orders_537.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :subscriptions, :role
NONE
true
DIFF00000008008
raw_sql_safe
SQL
sessions_826.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE inventory SET address = %s WHERE status = %s;
NONE
false
DIFF00000008009
orm_schema_change
JavaScript
accounts_176.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('customers', 'metadata')
NONE
true
DIFF00000008010
raw_sql_safe
SQL
logs_629.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE inventory SET metadata = %s WHERE role = %s;
NONE
false
DIFF00000008011
mentioned_in_comment
Python
logs_143.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE transactions DROP COLUMN priority; -- now deprecated"""
DROP_COLUMN
false
DIFF00000008012
orm_schema_change
JavaScript
logs_278.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('refunds', 'price')
NONE
true
DIFF00000008013
raw_sql_safe
SQL
employees_794.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_employees_order_id ON employees (amount);
NONE
false
DIFF00000008014
raw_sql_safe
SQL
products_534.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE invoices SET order_id = %s WHERE description = %s;
NONE
false
DIFF00000008015
raw_sql_safe
SQL
inventory_568.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE customers SET role = %s WHERE order_id = %s;
NONE
false
DIFF00000008016
mentioned_in_comment
Python
products_848.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE invoices RENAME COLUMN name TO state;' manually, handled by migration tool
ALTER_RENAME
false
DIFF00000008017
mentioned_in_comment
Python
reviews_684.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM orders;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00000008018
general_code_change
Ruby
notifications_531.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000008019
raw_sql_destructive
SQL
accounts_109.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE payments SET email = CONCAT(email, balance);
UPDATE_CONCAT
true
DIFF00000008020
general_code_change
Go
inventory_793.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000008021
general_code_change
JavaScript
refunds_451.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000008022
raw_sql_safe
SQL
accounts_373.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM subscriptions WHERE balance = 'active';
NONE
false
DIFF00000008023
orm_schema_change
JavaScript
comments_94.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('customers', table => table.dropColumn('priority'))
NONE
true
DIFF00000008024
raw_sql_safe
SQL
logs_151.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM logs WHERE metadata = 'active';
NONE
false
DIFF00000008025
orm_schema_change
Python
subscriptions_114.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='employees', name='order_id')
NONE
true
DIFF00000008026
test_suite_cleanup
SQL
mysql-test/suite/subscriptions_109.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE sessions DROP COLUMN description;
DROP_COLUMN
false
DIFF00000008027
orm_schema_change
TypeScript
employees_508.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Subscriptions { // removed field: quantity }
NONE
true
DIFF00000008028
orm_schema_change
JavaScript
inventory_744.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('inventory', 'price')
NONE
true
DIFF00000008029
raw_sql_safe
SQL
refunds_454.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_tickets_email ON tickets (phone);
NONE
false
DIFF00000008030
general_code_change
Java
inventory_347.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000008031
orm_schema_change
JavaScript
events_982.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('reviews', 'priority')
NONE
true
DIFF00000008032
raw_sql_destructive
SQL
orders_699.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE logs DROP COLUMN quantity;
DROP_COLUMN
true
DIFF00000008033
general_code_change
Python
reviews_161.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00000008034
raw_sql_destructive
SQL
comments_746.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE inventory;
TRUNCATE
true
DIFF00000008035
raw_sql_destructive
SQL
employees_756.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE subscriptions RENAME COLUMN quantity TO amount_cents;
ALTER_RENAME
true
DIFF00000008036
obfuscated_destructive
SQL
users_580.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE shipments DROP COLUMN priority;
DROP_COLUMN
true
DIFF00000008037
raw_sql_safe
SQL
customers_677.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE events SET price = %s WHERE amount = %s;
NONE
false
DIFF00000008038
test_suite_cleanup
SQL
spec/tickets_768.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE sessions;
TRUNCATE
false
DIFF00000008039
orm_schema_change
JavaScript
orders_513.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('transactions', 'price')
NONE
true
DIFF00000008040
orm_schema_change
TypeScript
accounts_624.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Accounts { // removed field: metadata }
NONE
true
DIFF00000008041
general_code_change
Python
refunds_752.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00000008042
raw_sql_destructive
SQL
invoices_970.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE accounts;
DROP_TABLE
true
DIFF00000008043
obfuscated_destructive
SQL
subscriptions_632.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM events;
DELETE_UNQUALIFIED
true
DIFF00000008044
raw_sql_safe
SQL
employees_226.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO transactions (created_at, score) VALUES (%s, %s);
NONE
false
DIFF00000008045
raw_sql_destructive
SQL
users_862.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE logs;
DROP_TABLE
true
DIFF00000008046
test_suite_cleanup
SQL
tests/comments_121.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE orders DROP COLUMN price;
DROP_COLUMN
false
DIFF00000008047
obfuscated_destructive
SQL
comments_801.sql
schema cleanup
@@ -1,3 +1,3 @@ +alter table comments drop column amount;
DROP_COLUMN
true
DIFF00000008048
mentioned_in_comment
Python
events_945.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE orders DROP COLUMN description;' manually, handled by migration tool
DROP_COLUMN
false
DIFF00000008049
general_code_change
TypeScript
refunds_959.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
DIFF00000008050
raw_sql_safe
SQL
products_146.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_logs_address ON logs (is_active);
NONE
false
DIFF00000008051
raw_sql_safe
SQL
events_989.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO subscriptions (score, score) VALUES (%s, %s);
NONE
false
DIFF00000008052
raw_sql_safe
SQL
users_136.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM notifications WHERE name = 'active';
NONE
false
DIFF00000008053
general_code_change
TypeScript
tickets_884.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
DIFF00000008054
test_suite_cleanup
SQL
tests/payments_106.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE orders DROP COLUMN created_at;
DROP_COLUMN
false
DIFF00000008055
test_suite_cleanup
SQL
mysql-test/suite/payments_201.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE refunds;
TRUNCATE
false
DIFF00000008056
test_suite_cleanup
SQL
test/users_91.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE sessions DROP COLUMN category;
DROP_COLUMN
false
DIFF00000008057
raw_sql_safe
SQL
customers_59.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO shipments (price, balance) VALUES (%s, %s);
NONE
false
DIFF00000008058
raw_sql_destructive
SQL
orders_954.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE invoices;
DROP_TABLE
true
DIFF00000008059
orm_schema_change
Python
subscriptions_40.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='shipments', name='score')
NONE
true
DIFF00000008060
raw_sql_destructive
SQL
products_635.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE invoices DROP COLUMN phone;
DROP_COLUMN
true
DIFF00000008061
raw_sql_destructive
SQL
notifications_397.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM tickets;
DELETE_UNQUALIFIED
true
DIFF00000008062
raw_sql_destructive
SQL
payments_480.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM reviews;
DELETE_UNQUALIFIED
true
DIFF00000008063
raw_sql_safe
SQL
comments_711.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM shipments WHERE is_active = 'active';
NONE
false
DIFF00000008064
raw_sql_destructive
SQL
users_11.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE reviews;
TRUNCATE
true
DIFF00000008065
mentioned_in_comment
Python
logs_818.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM tickets;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00000008066
general_code_change
Ruby
orders_610.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000008067
mentioned_in_comment
Python
logs_966.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: TRUNCATE TABLE employees;")
TRUNCATE
false
DIFF00000008068
general_code_change
JavaScript
payments_469.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000008069
general_code_change
TypeScript
refunds_558.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
DIFF00000008070
obfuscated_destructive
SQL
transactions_940.sql
schema cleanup
@@ -1,3 +1,3 @@ +alter table logs drop column amount;
DROP_COLUMN
true
DIFF00000008071
general_code_change
Ruby
customers_912.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000008072
test_suite_cleanup
SQL
tests/employees_496.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE logs;
TRUNCATE
false
DIFF00000008073
general_code_change
JavaScript
invoices_694.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000008074
raw_sql_safe
SQL
orders_246.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE products SET price = %s WHERE role = %s;
NONE
false
DIFF00000008075
obfuscated_destructive
SQL
logs_254.sql
schema cleanup
@@ -1,3 +1,3 @@ +TRuncAte TAbLe EVeNts;
TRUNCATE
true
DIFF00000008076
general_code_change
Python
employees_277.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00000008077
general_code_change
TypeScript
reviews_921.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
DIFF00000008078
test_suite_cleanup
SQL
test/tickets_40.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE users;
DROP_TABLE
false
DIFF00000008079
test_suite_cleanup
SQL
mysql-test/suite/tickets_622.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE employees RENAME COLUMN phone TO state;
ALTER_RENAME
false
DIFF00000008080
orm_schema_change
Ruby
employees_136.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :comments, :email
NONE
true
DIFF00000008081
raw_sql_safe
SQL
employees_856.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO payments (status, price) VALUES (%s, %s);
NONE
false
DIFF00000008082
raw_sql_destructive
SQL
invoices_804.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM employees;
DELETE_UNQUALIFIED
true
DIFF00000008083
raw_sql_destructive
SQL
inventory_75.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE transactions DROP COLUMN user_id;
DROP_COLUMN
true
DIFF00000008084
raw_sql_safe
SQL
logs_932.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE users SET address = %s WHERE phone = %s;
NONE
false
DIFF00000008085
orm_schema_change
JavaScript
inventory_885.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('logs', 'category')
NONE
true
DIFF00000008086
obfuscated_destructive
SQL
customers_514.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE users RENAME COLUMN is_active TO amount_cents;
ALTER_RENAME
true
DIFF00000008087
test_suite_cleanup
SQL
spec/comments_67.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE orders DROP COLUMN is_active;
DROP_COLUMN
false
DIFF00000008088
obfuscated_destructive
SQL
orders_865.sql
schema cleanup
@@ -1,3 +1,3 @@ +dEletE FrOm LOGs;
DELETE_UNQUALIFIED
true
DIFF00000008089
raw_sql_safe
SQL
sessions_678.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_transactions_price ON transactions (email);
NONE
false
DIFF00000008090
mentioned_in_comment
Python
sessions_66.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE accounts DROP COLUMN phone; -- now deprecated"""
DROP_COLUMN
false
DIFF00000008091
raw_sql_destructive
SQL
shipments_72.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM products;
DELETE_UNQUALIFIED
true
DIFF00000008092
raw_sql_safe
SQL
sessions_504.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_payments_order_id ON payments (priority);
NONE
false
DIFF00000008093
raw_sql_safe
SQL
users_332.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_reviews_user_id ON reviews (email);
NONE
false
DIFF00000008094
general_code_change
JavaScript
notifications_294.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
DIFF00000008095
mentioned_in_comment
Python
subscriptions_893.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: UPDATE comments SET category = CONCAT(category, address);")
UPDATE_CONCAT
false
DIFF00000008096
general_code_change
Ruby
logs_194.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000008097
general_code_change
JavaScript
payments_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
DIFF00000008098
raw_sql_destructive
SQL
orders_333.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM refunds;
DELETE_UNQUALIFIED
true
DIFF00000008099
orm_schema_change
JavaScript
users_557.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('products', 'user_id')
NONE
true