[
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nint* ptr = new int(42);\n// never deleted\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer**\n\n**Fix:**\n```cpp\nstd::unique_ptr<int> ptr = std::make_unique<int>(42);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nWidget* w = new Widget();\n```"
},
{
"role": "assistant",
"content": "**Issue: Memory Leak**\n\n**Fix:**\n```cpp\nauto w = std::make_unique<Widget>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"memory_leak"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nBase* b = static_cast<Base*>(ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Unchecked Cast**\n\n**Fix:**\n```cpp\nBase* b = dynamic_cast<Base*>(ptr);\nif (!b) { /* handle */ }\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"unchecked_cast"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string s;\nfor (auto c : chars) s += c;\n```"
},
{
"role": "assistant",
"content": "**Issue: String Concat**\n\n**Fix:**\n```cpp\nstd::string s;\ns.reserve(chars.size());\nfor (auto c : chars) s += c;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"string_concat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<int> get(){\n std::vector<int> v;\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Copy Instead of Move**\n\n**Fix:**\n```cpp\nreturn std::move(v);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"copy_instead_of_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nif (status == 42){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Magic Number**\n\n**Fix:**\n```cpp\nenum Code { OK = 42 };\nif (status == Code::OK){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"magic_number"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<int> global_data;\n```"
},
{
"role": "assistant",
"content": "**Issue: Global State**\n\n**Fix:**\n```cpp\nclass Manager {\npublic:\n std::vector<int> data;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"global_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(std::string data){}\n```"
},
{
"role": "assistant",
"content": "**Issue: No Const Ref**\n\n**Fix:**\n```cpp\nvoid process(const std::string& data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_const_ref"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid func() throw(std::runtime_error){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Exception Spec**\n\n**Fix:**\n```cpp\nvoid func() noexcept {}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"exception_spec"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nusing namespace std;\n```"
},
{
"role": "assistant",
"content": "**Issue: Using Namespace**\n\n**Fix:**\n```cpp\n// Avoid in headers. Use explicit std::\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"using_namespace"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(p, \"r\");\n```"
},
{
"role": "assistant",
"content": "**Issue: RAII Violation**\n\n**Fix:**\n```cpp\nstd::ifstream f(p);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raii_violation"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nint* p = get();\n*p = 42;\n```"
},
{
"role": "assistant",
"content": "**Issue: Unchecked Return**\n\n**Fix:**\n```cpp\nint* p = get();\nif (p) *p = 42;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"unchecked_return"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nchar buf[64];\nstrcpy(buf, input);\n```"
},
{
"role": "assistant",
"content": "**Issue: Buffer Overflow**\n\n**Fix:**\n```cpp\nstd::string buf(input);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"buffer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nint r = a * b;\n```"
},
{
"role": "assistant",
"content": "**Issue: Integer Overflow**\n\n**Fix:**\n```cpp\nif (a > 0 && b > INT_MAX/a) /* overflow */\nint r = a*b;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"integer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconst char* p = s.c_str();\nreturn p;\n```"
},
{
"role": "assistant",
"content": "**Issue: Dangling Pointer**\n\n**Fix:**\n```cpp\nstd::string s = ...;\nreturn s;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"dangling_pointer"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<user>* v = new std::vector<user>();\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer on Entity**\n\n**Fix:**\n```cpp\nstd::unique_ptr<std::vector<user>> v = std::make_unique<std::vector<user>>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_on_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<product>* v = new std::vector<product>();\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer on Entity**\n\n**Fix:**\n```cpp\nstd::unique_ptr<std::vector<product>> v = std::make_unique<std::vector<product>>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_on_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<order>* v = new std::vector<order>();\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer on Entity**\n\n**Fix:**\n```cpp\nstd::unique_ptr<std::vector<order>> v = std::make_unique<std::vector<order>>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_on_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<payment>* v = new std::vector<payment>();\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer on Entity**\n\n**Fix:**\n```cpp\nstd::unique_ptr<std::vector<payment>> v = std::make_unique<std::vector<payment>>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_on_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<session>* v = new std::vector<session>();\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer on Entity**\n\n**Fix:**\n```cpp\nstd::unique_ptr<std::vector<session>> v = std::make_unique<std::vector<session>>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_on_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<token>* v = new std::vector<token>();\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer on Entity**\n\n**Fix:**\n```cpp\nstd::unique_ptr<std::vector<token>> v = std::make_unique<std::vector<token>>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_on_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<config>* v = new std::vector<config>();\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer on Entity**\n\n**Fix:**\n```cpp\nstd::unique_ptr<std::vector<config>> v = std::make_unique<std::vector<config>>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_on_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<cache>* v = new std::vector<cache>();\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer on Entity**\n\n**Fix:**\n```cpp\nstd::unique_ptr<std::vector<cache>> v = std::make_unique<std::vector<cache>>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_on_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<log>* v = new std::vector<log>();\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer on Entity**\n\n**Fix:**\n```cpp\nstd::unique_ptr<std::vector<log>> v = std::make_unique<std::vector<log>>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_on_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<event>* v = new std::vector<event>();\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer on Entity**\n\n**Fix:**\n```cpp\nstd::unique_ptr<std::vector<event>> v = std::make_unique<std::vector<event>>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_on_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"user.txt\", \"r\");\n```"
},
{
"role": "assistant",
"content": "**Issue: No RAII for Entity File**\n\n**Fix:**\n```cpp\nstd::ifstream f(\"user.txt\");\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_raii_for_entity_file"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"product.txt\", \"r\");\n```"
},
{
"role": "assistant",
"content": "**Issue: No RAII for Entity File**\n\n**Fix:**\n```cpp\nstd::ifstream f(\"product.txt\");\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_raii_for_entity_file"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"order.txt\", \"r\");\n```"
},
{
"role": "assistant",
"content": "**Issue: No RAII for Entity File**\n\n**Fix:**\n```cpp\nstd::ifstream f(\"order.txt\");\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_raii_for_entity_file"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"payment.txt\", \"r\");\n```"
},
{
"role": "assistant",
"content": "**Issue: No RAII for Entity File**\n\n**Fix:**\n```cpp\nstd::ifstream f(\"payment.txt\");\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_raii_for_entity_file"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"session.txt\", \"r\");\n```"
},
{
"role": "assistant",
"content": "**Issue: No RAII for Entity File**\n\n**Fix:**\n```cpp\nstd::ifstream f(\"session.txt\");\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_raii_for_entity_file"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"token.txt\", \"r\");\n```"
},
{
"role": "assistant",
"content": "**Issue: No RAII for Entity File**\n\n**Fix:**\n```cpp\nstd::ifstream f(\"token.txt\");\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_raii_for_entity_file"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"config.txt\", \"r\");\n```"
},
{
"role": "assistant",
"content": "**Issue: No RAII for Entity File**\n\n**Fix:**\n```cpp\nstd::ifstream f(\"config.txt\");\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_raii_for_entity_file"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"cache.txt\", \"r\");\n```"
},
{
"role": "assistant",
"content": "**Issue: No RAII for Entity File**\n\n**Fix:**\n```cpp\nstd::ifstream f(\"cache.txt\");\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_raii_for_entity_file"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"log.txt\", \"r\");\n```"
},
{
"role": "assistant",
"content": "**Issue: No RAII for Entity File**\n\n**Fix:**\n```cpp\nstd::ifstream f(\"log.txt\");\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_raii_for_entity_file"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"event.txt\", \"r\");\n```"
},
{
"role": "assistant",
"content": "**Issue: No RAII for Entity File**\n\n**Fix:**\n```cpp\nstd::ifstream f(\"event.txt\");\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_raii_for_entity_file"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nuser* e = new user();\n```"
},
{
"role": "assistant",
"content": "**Issue: Memory Leak Entity**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<user>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"memory_leak_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nproduct* e = new product();\n```"
},
{
"role": "assistant",
"content": "**Issue: Memory Leak Entity**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<product>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"memory_leak_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\norder* e = new order();\n```"
},
{
"role": "assistant",
"content": "**Issue: Memory Leak Entity**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<order>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"memory_leak_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\npayment* e = new payment();\n```"
},
{
"role": "assistant",
"content": "**Issue: Memory Leak Entity**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<payment>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"memory_leak_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nsession* e = new session();\n```"
},
{
"role": "assistant",
"content": "**Issue: Memory Leak Entity**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<session>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"memory_leak_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntoken* e = new token();\n```"
},
{
"role": "assistant",
"content": "**Issue: Memory Leak Entity**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<token>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"memory_leak_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconfig* e = new config();\n```"
},
{
"role": "assistant",
"content": "**Issue: Memory Leak Entity**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<config>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"memory_leak_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ncache* e = new cache();\n```"
},
{
"role": "assistant",
"content": "**Issue: Memory Leak Entity**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<cache>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"memory_leak_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nlog* e = new log();\n```"
},
{
"role": "assistant",
"content": "**Issue: Memory Leak Entity**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<log>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"memory_leak_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nevent* e = new event();\n```"
},
{
"role": "assistant",
"content": "**Issue: Memory Leak Entity**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<event>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"memory_leak_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(user obj){}\n```"
},
{
"role": "assistant",
"content": "**Issue: No Const for Entity**\n\n**Fix:**\n```cpp\nvoid process(const user& obj){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_const_for_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(product obj){}\n```"
},
{
"role": "assistant",
"content": "**Issue: No Const for Entity**\n\n**Fix:**\n```cpp\nvoid process(const product& obj){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_const_for_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(order obj){}\n```"
},
{
"role": "assistant",
"content": "**Issue: No Const for Entity**\n\n**Fix:**\n```cpp\nvoid process(const order& obj){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_const_for_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(payment obj){}\n```"
},
{
"role": "assistant",
"content": "**Issue: No Const for Entity**\n\n**Fix:**\n```cpp\nvoid process(const payment& obj){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_const_for_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(session obj){}\n```"
},
{
"role": "assistant",
"content": "**Issue: No Const for Entity**\n\n**Fix:**\n```cpp\nvoid process(const session& obj){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_const_for_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(token obj){}\n```"
},
{
"role": "assistant",
"content": "**Issue: No Const for Entity**\n\n**Fix:**\n```cpp\nvoid process(const token& obj){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_const_for_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(config obj){}\n```"
},
{
"role": "assistant",
"content": "**Issue: No Const for Entity**\n\n**Fix:**\n```cpp\nvoid process(const config& obj){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_const_for_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(cache obj){}\n```"
},
{
"role": "assistant",
"content": "**Issue: No Const for Entity**\n\n**Fix:**\n```cpp\nvoid process(const cache& obj){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_const_for_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(log obj){}\n```"
},
{
"role": "assistant",
"content": "**Issue: No Const for Entity**\n\n**Fix:**\n```cpp\nvoid process(const log& obj){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_const_for_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(event obj){}\n```"
},
{
"role": "assistant",
"content": "**Issue: No Const for Entity**\n\n**Fix:**\n```cpp\nvoid process(const event& obj){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_const_for_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<user> get(){\n std::vector<user> v;\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Copy Entity**\n\n**Fix:**\n```cpp\nstd::vector<user> get(){\n std::vector<user> v;\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"copy_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<product> get(){\n std::vector<product> v;\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Copy Entity**\n\n**Fix:**\n```cpp\nstd::vector<product> get(){\n std::vector<product> v;\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"copy_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<order> get(){\n std::vector<order> v;\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Copy Entity**\n\n**Fix:**\n```cpp\nstd::vector<order> get(){\n std::vector<order> v;\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"copy_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<payment> get(){\n std::vector<payment> v;\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Copy Entity**\n\n**Fix:**\n```cpp\nstd::vector<payment> get(){\n std::vector<payment> v;\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"copy_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<session> get(){\n std::vector<session> v;\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Copy Entity**\n\n**Fix:**\n```cpp\nstd::vector<session> get(){\n std::vector<session> v;\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"copy_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<token> get(){\n std::vector<token> v;\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Copy Entity**\n\n**Fix:**\n```cpp\nstd::vector<token> get(){\n std::vector<token> v;\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"copy_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<config> get(){\n std::vector<config> v;\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Copy Entity**\n\n**Fix:**\n```cpp\nstd::vector<config> get(){\n std::vector<config> v;\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"copy_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<cache> get(){\n std::vector<cache> v;\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Copy Entity**\n\n**Fix:**\n```cpp\nstd::vector<cache> get(){\n std::vector<cache> v;\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"copy_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<log> get(){\n std::vector<log> v;\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Copy Entity**\n\n**Fix:**\n```cpp\nstd::vector<log> get(){\n std::vector<log> v;\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"copy_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<event> get(){\n std::vector<event> v;\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Copy Entity**\n\n**Fix:**\n```cpp\nstd::vector<event> get(){\n std::vector<event> v;\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"copy_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nuser** arr = new user*[n];\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer Entity**\n\n**Fix:**\n```cpp\nstd::vector<std::unique_ptr<user>> arr(n);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nproduct** arr = new product*[n];\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer Entity**\n\n**Fix:**\n```cpp\nstd::vector<std::unique_ptr<product>> arr(n);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\norder** arr = new order*[n];\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer Entity**\n\n**Fix:**\n```cpp\nstd::vector<std::unique_ptr<order>> arr(n);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\npayment** arr = new payment*[n];\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer Entity**\n\n**Fix:**\n```cpp\nstd::vector<std::unique_ptr<payment>> arr(n);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nsession** arr = new session*[n];\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer Entity**\n\n**Fix:**\n```cpp\nstd::vector<std::unique_ptr<session>> arr(n);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntoken** arr = new token*[n];\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer Entity**\n\n**Fix:**\n```cpp\nstd::vector<std::unique_ptr<token>> arr(n);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconfig** arr = new config*[n];\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer Entity**\n\n**Fix:**\n```cpp\nstd::vector<std::unique_ptr<config>> arr(n);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ncache** arr = new cache*[n];\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer Entity**\n\n**Fix:**\n```cpp\nstd::vector<std::unique_ptr<cache>> arr(n);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nlog** arr = new log*[n];\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer Entity**\n\n**Fix:**\n```cpp\nstd::vector<std::unique_ptr<log>> arr(n);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nevent** arr = new event*[n];\n```"
},
{
"role": "assistant",
"content": "**Issue: Raw Pointer Entity**\n\n**Fix:**\n```cpp\nstd::vector<std::unique_ptr<event>> arr(n);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"raw_pointer_entity"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<user> global_user_data;\n```"
},
{
"role": "assistant",
"content": "**Issue: Global Entity State**\n\n**Fix:**\n```cpp\nclass userManager {\npublic:\n std::vector<user> data;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"global_entity_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<product> global_product_data;\n```"
},
{
"role": "assistant",
"content": "**Issue: Global Entity State**\n\n**Fix:**\n```cpp\nclass productManager {\npublic:\n std::vector<product> data;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"global_entity_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<order> global_order_data;\n```"
},
{
"role": "assistant",
"content": "**Issue: Global Entity State**\n\n**Fix:**\n```cpp\nclass orderManager {\npublic:\n std::vector<order> data;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"global_entity_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<payment> global_payment_data;\n```"
},
{
"role": "assistant",
"content": "**Issue: Global Entity State**\n\n**Fix:**\n```cpp\nclass paymentManager {\npublic:\n std::vector<payment> data;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"global_entity_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<session> global_session_data;\n```"
},
{
"role": "assistant",
"content": "**Issue: Global Entity State**\n\n**Fix:**\n```cpp\nclass sessionManager {\npublic:\n std::vector<session> data;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"global_entity_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<token> global_token_data;\n```"
},
{
"role": "assistant",
"content": "**Issue: Global Entity State**\n\n**Fix:**\n```cpp\nclass tokenManager {\npublic:\n std::vector<token> data;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"global_entity_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<config> global_config_data;\n```"
},
{
"role": "assistant",
"content": "**Issue: Global Entity State**\n\n**Fix:**\n```cpp\nclass configManager {\npublic:\n std::vector<config> data;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"global_entity_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<cache> global_cache_data;\n```"
},
{
"role": "assistant",
"content": "**Issue: Global Entity State**\n\n**Fix:**\n```cpp\nclass cacheManager {\npublic:\n std::vector<cache> data;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"global_entity_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<log> global_log_data;\n```"
},
{
"role": "assistant",
"content": "**Issue: Global Entity State**\n\n**Fix:**\n```cpp\nclass logManager {\npublic:\n std::vector<log> data;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"global_entity_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<event> global_event_data;\n```"
},
{
"role": "assistant",
"content": "**Issue: Global Entity State**\n\n**Fix:**\n```cpp\nclass eventManager {\npublic:\n std::vector<event> data;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"global_entity_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nuser* e = new user();\nprocess(e);\n// if process throws, leak\n```"
},
{
"role": "assistant",
"content": "**Issue: No Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<user>();\nprocess(e.get());\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nproduct* e = new product();\nprocess(e);\n// if process throws, leak\n```"
},
{
"role": "assistant",
"content": "**Issue: No Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<product>();\nprocess(e.get());\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\norder* e = new order();\nprocess(e);\n// if process throws, leak\n```"
},
{
"role": "assistant",
"content": "**Issue: No Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<order>();\nprocess(e.get());\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\npayment* e = new payment();\nprocess(e);\n// if process throws, leak\n```"
},
{
"role": "assistant",
"content": "**Issue: No Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<payment>();\nprocess(e.get());\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nsession* e = new session();\nprocess(e);\n// if process throws, leak\n```"
},
{
"role": "assistant",
"content": "**Issue: No Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<session>();\nprocess(e.get());\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntoken* e = new token();\nprocess(e);\n// if process throws, leak\n```"
},
{
"role": "assistant",
"content": "**Issue: No Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<token>();\nprocess(e.get());\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconfig* e = new config();\nprocess(e);\n// if process throws, leak\n```"
},
{
"role": "assistant",
"content": "**Issue: No Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<config>();\nprocess(e.get());\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ncache* e = new cache();\nprocess(e);\n// if process throws, leak\n```"
},
{
"role": "assistant",
"content": "**Issue: No Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<cache>();\nprocess(e.get());\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nlog* e = new log();\nprocess(e);\n// if process throws, leak\n```"
},
{
"role": "assistant",
"content": "**Issue: No Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<log>();\nprocess(e.get());\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nevent* e = new event();\nprocess(e);\n// if process throws, leak\n```"
},
{
"role": "assistant",
"content": "**Issue: No Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<event>();\nprocess(e.get());\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"no_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nBase* b = static_cast<Base*>(ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Unchecked Entity Cast**\n\n**Fix:**\n```cpp\nBase* b = dynamic_cast<Base*>(ptr);\nif (!b) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"unchecked_entity_cast"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nBase* b = static_cast<Base*>(ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Unchecked Entity Cast**\n\n**Fix:**\n```cpp\nBase* b = dynamic_cast<Base*>(ptr);\nif (!b) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"unchecked_entity_cast"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nBase* b = static_cast<Base*>(ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Unchecked Entity Cast**\n\n**Fix:**\n```cpp\nBase* b = dynamic_cast<Base*>(ptr);\nif (!b) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"unchecked_entity_cast"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nBase* b = static_cast<Base*>(ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Unchecked Entity Cast**\n\n**Fix:**\n```cpp\nBase* b = dynamic_cast<Base*>(ptr);\nif (!b) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"unchecked_entity_cast"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nBase* b = static_cast<Base*>(ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Unchecked Entity Cast**\n\n**Fix:**\n```cpp\nBase* b = dynamic_cast<Base*>(ptr);\nif (!b) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"unchecked_entity_cast"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nBase* b = static_cast<Base*>(ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Unchecked Entity Cast**\n\n**Fix:**\n```cpp\nBase* b = dynamic_cast<Base*>(ptr);\nif (!b) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"unchecked_entity_cast"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nBase* b = static_cast<Base*>(ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Unchecked Entity Cast**\n\n**Fix:**\n```cpp\nBase* b = dynamic_cast<Base*>(ptr);\nif (!b) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"unchecked_entity_cast"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nBase* b = static_cast<Base*>(ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Unchecked Entity Cast**\n\n**Fix:**\n```cpp\nBase* b = dynamic_cast<Base*>(ptr);\nif (!b) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"unchecked_entity_cast"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nBase* b = static_cast<Base*>(ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Unchecked Entity Cast**\n\n**Fix:**\n```cpp\nBase* b = dynamic_cast<Base*>(ptr);\nif (!b) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"unchecked_entity_cast"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nBase* b = static_cast<Base*>(ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Unchecked Entity Cast**\n\n**Fix:**\n```cpp\nBase* b = dynamic_cast<Base*>(ptr);\nif (!b) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"unchecked_entity_cast"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nchar buf[64];\nstrcpy(buf, user_name);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Buffer Overflow**\n\n**Fix:**\n```cpp\nstd::string buf(user_name);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_buffer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nchar buf[64];\nstrcpy(buf, product_name);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Buffer Overflow**\n\n**Fix:**\n```cpp\nstd::string buf(product_name);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_buffer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nchar buf[64];\nstrcpy(buf, order_name);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Buffer Overflow**\n\n**Fix:**\n```cpp\nstd::string buf(order_name);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_buffer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nchar buf[64];\nstrcpy(buf, payment_name);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Buffer Overflow**\n\n**Fix:**\n```cpp\nstd::string buf(payment_name);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_buffer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nchar buf[64];\nstrcpy(buf, session_name);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Buffer Overflow**\n\n**Fix:**\n```cpp\nstd::string buf(session_name);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_buffer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nchar buf[64];\nstrcpy(buf, token_name);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Buffer Overflow**\n\n**Fix:**\n```cpp\nstd::string buf(token_name);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_buffer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nchar buf[64];\nstrcpy(buf, config_name);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Buffer Overflow**\n\n**Fix:**\n```cpp\nstd::string buf(config_name);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_buffer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nchar buf[64];\nstrcpy(buf, cache_name);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Buffer Overflow**\n\n**Fix:**\n```cpp\nstd::string buf(cache_name);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_buffer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nchar buf[64];\nstrcpy(buf, log_name);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Buffer Overflow**\n\n**Fix:**\n```cpp\nstd::string buf(log_name);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_buffer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nchar buf[64];\nstrcpy(buf, event_name);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Buffer Overflow**\n\n**Fix:**\n```cpp\nstd::string buf(event_name);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_buffer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconst user* ref = &local_user;\nreturn ref;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Dangling Ref**\n\n**Fix:**\n```cpp\nuser result = local_user;\nreturn result;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_dangling_ref"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconst product* ref = &local_product;\nreturn ref;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Dangling Ref**\n\n**Fix:**\n```cpp\nproduct result = local_product;\nreturn result;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_dangling_ref"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconst order* ref = &local_order;\nreturn ref;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Dangling Ref**\n\n**Fix:**\n```cpp\norder result = local_order;\nreturn result;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_dangling_ref"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconst payment* ref = &local_payment;\nreturn ref;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Dangling Ref**\n\n**Fix:**\n```cpp\npayment result = local_payment;\nreturn result;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_dangling_ref"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconst session* ref = &local_session;\nreturn ref;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Dangling Ref**\n\n**Fix:**\n```cpp\nsession result = local_session;\nreturn result;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_dangling_ref"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconst token* ref = &local_token;\nreturn ref;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Dangling Ref**\n\n**Fix:**\n```cpp\ntoken result = local_token;\nreturn result;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_dangling_ref"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconst config* ref = &local_config;\nreturn ref;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Dangling Ref**\n\n**Fix:**\n```cpp\nconfig result = local_config;\nreturn result;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_dangling_ref"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconst cache* ref = &local_cache;\nreturn ref;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Dangling Ref**\n\n**Fix:**\n```cpp\ncache result = local_cache;\nreturn result;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_dangling_ref"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconst log* ref = &local_log;\nreturn ref;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Dangling Ref**\n\n**Fix:**\n```cpp\nlog result = local_log;\nreturn result;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_dangling_ref"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconst event* ref = &local_event;\nreturn ref;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Dangling Ref**\n\n**Fix:**\n```cpp\nevent result = local_event;\nreturn result;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_dangling_ref"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<user> clone(const std::vector<user>& v){\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Move**\n\n**Fix:**\n```cpp\nstd::vector<user> clone(std::vector<user> v){\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<product> clone(const std::vector<product>& v){\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Move**\n\n**Fix:**\n```cpp\nstd::vector<product> clone(std::vector<product> v){\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<order> clone(const std::vector<order>& v){\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Move**\n\n**Fix:**\n```cpp\nstd::vector<order> clone(std::vector<order> v){\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<payment> clone(const std::vector<payment>& v){\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Move**\n\n**Fix:**\n```cpp\nstd::vector<payment> clone(std::vector<payment> v){\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<session> clone(const std::vector<session>& v){\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Move**\n\n**Fix:**\n```cpp\nstd::vector<session> clone(std::vector<session> v){\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<token> clone(const std::vector<token>& v){\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Move**\n\n**Fix:**\n```cpp\nstd::vector<token> clone(std::vector<token> v){\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<config> clone(const std::vector<config>& v){\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Move**\n\n**Fix:**\n```cpp\nstd::vector<config> clone(std::vector<config> v){\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<cache> clone(const std::vector<cache>& v){\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Move**\n\n**Fix:**\n```cpp\nstd::vector<cache> clone(std::vector<cache> v){\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<log> clone(const std::vector<log>& v){\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Move**\n\n**Fix:**\n```cpp\nstd::vector<log> clone(std::vector<log> v){\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<event> clone(const std::vector<event>& v){\n return v;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Move**\n\n**Fix:**\n```cpp\nstd::vector<event> clone(std::vector<event> v){\n return std::move(v);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDatabase db(\"user_db\");\n// manual close needed\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Resource Leak**\n\n**Fix:**\n```cpp\nclass userDB : public std::enable_shared_from_this<userDB> {\npublic:\n ~userDB() { close(); }\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_resource_leak"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDatabase db(\"product_db\");\n// manual close needed\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Resource Leak**\n\n**Fix:**\n```cpp\nclass productDB : public std::enable_shared_from_this<productDB> {\npublic:\n ~productDB() { close(); }\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_resource_leak"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDatabase db(\"order_db\");\n// manual close needed\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Resource Leak**\n\n**Fix:**\n```cpp\nclass orderDB : public std::enable_shared_from_this<orderDB> {\npublic:\n ~orderDB() { close(); }\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_resource_leak"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDatabase db(\"payment_db\");\n// manual close needed\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Resource Leak**\n\n**Fix:**\n```cpp\nclass paymentDB : public std::enable_shared_from_this<paymentDB> {\npublic:\n ~paymentDB() { close(); }\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_resource_leak"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDatabase db(\"session_db\");\n// manual close needed\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Resource Leak**\n\n**Fix:**\n```cpp\nclass sessionDB : public std::enable_shared_from_this<sessionDB> {\npublic:\n ~sessionDB() { close(); }\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_resource_leak"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDatabase db(\"token_db\");\n// manual close needed\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Resource Leak**\n\n**Fix:**\n```cpp\nclass tokenDB : public std::enable_shared_from_this<tokenDB> {\npublic:\n ~tokenDB() { close(); }\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_resource_leak"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDatabase db(\"config_db\");\n// manual close needed\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Resource Leak**\n\n**Fix:**\n```cpp\nclass configDB : public std::enable_shared_from_this<configDB> {\npublic:\n ~configDB() { close(); }\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_resource_leak"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDatabase db(\"cache_db\");\n// manual close needed\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Resource Leak**\n\n**Fix:**\n```cpp\nclass cacheDB : public std::enable_shared_from_this<cacheDB> {\npublic:\n ~cacheDB() { close(); }\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_resource_leak"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDatabase db(\"log_db\");\n// manual close needed\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Resource Leak**\n\n**Fix:**\n```cpp\nclass logDB : public std::enable_shared_from_this<logDB> {\npublic:\n ~logDB() { close(); }\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_resource_leak"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDatabase db(\"event_db\");\n// manual close needed\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Resource Leak**\n\n**Fix:**\n```cpp\nclass eventDB : public std::enable_shared_from_this<eventDB> {\npublic:\n ~eventDB() { close(); }\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_resource_leak"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_user() throw(runtime_error){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Spec**\n\n**Fix:**\n```cpp\nvoid process_user() noexcept(false) {}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_spec"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_product() throw(runtime_error){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Spec**\n\n**Fix:**\n```cpp\nvoid process_product() noexcept(false) {}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_spec"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_order() throw(runtime_error){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Spec**\n\n**Fix:**\n```cpp\nvoid process_order() noexcept(false) {}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_spec"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_payment() throw(runtime_error){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Spec**\n\n**Fix:**\n```cpp\nvoid process_payment() noexcept(false) {}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_spec"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_session() throw(runtime_error){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Spec**\n\n**Fix:**\n```cpp\nvoid process_session() noexcept(false) {}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_spec"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_token() throw(runtime_error){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Spec**\n\n**Fix:**\n```cpp\nvoid process_token() noexcept(false) {}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_spec"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_config() throw(runtime_error){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Spec**\n\n**Fix:**\n```cpp\nvoid process_config() noexcept(false) {}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_spec"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_cache() throw(runtime_error){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Spec**\n\n**Fix:**\n```cpp\nvoid process_cache() noexcept(false) {}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_spec"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_log() throw(runtime_error){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Spec**\n\n**Fix:**\n```cpp\nvoid process_log() noexcept(false) {}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_spec"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_event() throw(runtime_error){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Spec**\n\n**Fix:**\n```cpp\nvoid process_event() noexcept(false) {}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_spec"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nif (user_status == 42){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Magic Number**\n\n**Fix:**\n```cpp\nenum userStatus { OK = 42 };\nif (status == userStatus::OK){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_magic_number"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nif (product_status == 42){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Magic Number**\n\n**Fix:**\n```cpp\nenum productStatus { OK = 42 };\nif (status == productStatus::OK){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_magic_number"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nif (order_status == 42){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Magic Number**\n\n**Fix:**\n```cpp\nenum orderStatus { OK = 42 };\nif (status == orderStatus::OK){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_magic_number"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nif (payment_status == 42){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Magic Number**\n\n**Fix:**\n```cpp\nenum paymentStatus { OK = 42 };\nif (status == paymentStatus::OK){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_magic_number"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nif (session_status == 42){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Magic Number**\n\n**Fix:**\n```cpp\nenum sessionStatus { OK = 42 };\nif (status == sessionStatus::OK){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_magic_number"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nif (token_status == 42){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Magic Number**\n\n**Fix:**\n```cpp\nenum tokenStatus { OK = 42 };\nif (status == tokenStatus::OK){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_magic_number"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nif (config_status == 42){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Magic Number**\n\n**Fix:**\n```cpp\nenum configStatus { OK = 42 };\nif (status == configStatus::OK){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_magic_number"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nif (cache_status == 42){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Magic Number**\n\n**Fix:**\n```cpp\nenum cacheStatus { OK = 42 };\nif (status == cacheStatus::OK){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_magic_number"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nif (log_status == 42){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Magic Number**\n\n**Fix:**\n```cpp\nenum logStatus { OK = 42 };\nif (status == logStatus::OK){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_magic_number"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nif (event_status == 42){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Magic Number**\n\n**Fix:**\n```cpp\nenum eventStatus { OK = 42 };\nif (status == eventStatus::OK){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_magic_number"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nuser* global_user_instance = nullptr;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Global**\n\n**Fix:**\n```cpp\nclass userSingleton {\npublic:\n static userSingleton& instance();\nprivate:\n userSingleton() = default;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_global"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nproduct* global_product_instance = nullptr;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Global**\n\n**Fix:**\n```cpp\nclass productSingleton {\npublic:\n static productSingleton& instance();\nprivate:\n productSingleton() = default;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_global"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\norder* global_order_instance = nullptr;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Global**\n\n**Fix:**\n```cpp\nclass orderSingleton {\npublic:\n static orderSingleton& instance();\nprivate:\n orderSingleton() = default;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_global"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\npayment* global_payment_instance = nullptr;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Global**\n\n**Fix:**\n```cpp\nclass paymentSingleton {\npublic:\n static paymentSingleton& instance();\nprivate:\n paymentSingleton() = default;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_global"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nsession* global_session_instance = nullptr;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Global**\n\n**Fix:**\n```cpp\nclass sessionSingleton {\npublic:\n static sessionSingleton& instance();\nprivate:\n sessionSingleton() = default;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_global"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntoken* global_token_instance = nullptr;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Global**\n\n**Fix:**\n```cpp\nclass tokenSingleton {\npublic:\n static tokenSingleton& instance();\nprivate:\n tokenSingleton() = default;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_global"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconfig* global_config_instance = nullptr;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Global**\n\n**Fix:**\n```cpp\nclass configSingleton {\npublic:\n static configSingleton& instance();\nprivate:\n configSingleton() = default;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_global"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ncache* global_cache_instance = nullptr;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Global**\n\n**Fix:**\n```cpp\nclass cacheSingleton {\npublic:\n static cacheSingleton& instance();\nprivate:\n cacheSingleton() = default;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_global"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nlog* global_log_instance = nullptr;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Global**\n\n**Fix:**\n```cpp\nclass logSingleton {\npublic:\n static logSingleton& instance();\nprivate:\n logSingleton() = default;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_global"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nevent* global_event_instance = nullptr;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Global**\n\n**Fix:**\n```cpp\nclass eventSingleton {\npublic:\n static eventSingleton& instance();\nprivate:\n eventSingleton() = default;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_global"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nuser* ptr = find_user(id);\nptr->process();\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Unchecked**\n\n**Fix:**\n```cpp\nuser* ptr = find_user(id);\nif (!ptr) return;\nptr->process();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_unchecked"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nproduct* ptr = find_product(id);\nptr->process();\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Unchecked**\n\n**Fix:**\n```cpp\nproduct* ptr = find_product(id);\nif (!ptr) return;\nptr->process();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_unchecked"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\norder* ptr = find_order(id);\nptr->process();\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Unchecked**\n\n**Fix:**\n```cpp\norder* ptr = find_order(id);\nif (!ptr) return;\nptr->process();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_unchecked"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\npayment* ptr = find_payment(id);\nptr->process();\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Unchecked**\n\n**Fix:**\n```cpp\npayment* ptr = find_payment(id);\nif (!ptr) return;\nptr->process();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_unchecked"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nsession* ptr = find_session(id);\nptr->process();\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Unchecked**\n\n**Fix:**\n```cpp\nsession* ptr = find_session(id);\nif (!ptr) return;\nptr->process();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_unchecked"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntoken* ptr = find_token(id);\nptr->process();\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Unchecked**\n\n**Fix:**\n```cpp\ntoken* ptr = find_token(id);\nif (!ptr) return;\nptr->process();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_unchecked"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconfig* ptr = find_config(id);\nptr->process();\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Unchecked**\n\n**Fix:**\n```cpp\nconfig* ptr = find_config(id);\nif (!ptr) return;\nptr->process();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_unchecked"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ncache* ptr = find_cache(id);\nptr->process();\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Unchecked**\n\n**Fix:**\n```cpp\ncache* ptr = find_cache(id);\nif (!ptr) return;\nptr->process();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_unchecked"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nlog* ptr = find_log(id);\nptr->process();\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Unchecked**\n\n**Fix:**\n```cpp\nlog* ptr = find_log(id);\nif (!ptr) return;\nptr->process();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_unchecked"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nevent* ptr = find_event(id);\nptr->process();\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Unchecked**\n\n**Fix:**\n```cpp\nevent* ptr = find_event(id);\nif (!ptr) return;\nptr->process();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_unchecked"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nint user_total = user_count * user_size;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Integer Overflow**\n\n**Fix:**\n```cpp\nif (user_count > 0 && user_size > INT_MAX/user_count) /* overflow */\nint user_total = user_count * user_size;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_integer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nint product_total = product_count * product_size;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Integer Overflow**\n\n**Fix:**\n```cpp\nif (product_count > 0 && product_size > INT_MAX/product_count) /* overflow */\nint product_total = product_count * product_size;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_integer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nint order_total = order_count * order_size;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Integer Overflow**\n\n**Fix:**\n```cpp\nif (order_count > 0 && order_size > INT_MAX/order_count) /* overflow */\nint order_total = order_count * order_size;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_integer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nint payment_total = payment_count * payment_size;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Integer Overflow**\n\n**Fix:**\n```cpp\nif (payment_count > 0 && payment_size > INT_MAX/payment_count) /* overflow */\nint payment_total = payment_count * payment_size;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_integer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nint session_total = session_count * session_size;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Integer Overflow**\n\n**Fix:**\n```cpp\nif (session_count > 0 && session_size > INT_MAX/session_count) /* overflow */\nint session_total = session_count * session_size;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_integer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nint token_total = token_count * token_size;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Integer Overflow**\n\n**Fix:**\n```cpp\nif (token_count > 0 && token_size > INT_MAX/token_count) /* overflow */\nint token_total = token_count * token_size;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_integer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nint config_total = config_count * config_size;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Integer Overflow**\n\n**Fix:**\n```cpp\nif (config_count > 0 && config_size > INT_MAX/config_count) /* overflow */\nint config_total = config_count * config_size;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_integer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nint cache_total = cache_count * cache_size;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Integer Overflow**\n\n**Fix:**\n```cpp\nif (cache_count > 0 && cache_size > INT_MAX/cache_count) /* overflow */\nint cache_total = cache_count * cache_size;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_integer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nint log_total = log_count * log_size;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Integer Overflow**\n\n**Fix:**\n```cpp\nif (log_count > 0 && log_size > INT_MAX/log_count) /* overflow */\nint log_total = log_count * log_size;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_integer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nint event_total = event_count * event_size;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Integer Overflow**\n\n**Fix:**\n```cpp\nif (event_count > 0 && event_size > INT_MAX/event_count) /* overflow */\nint event_total = event_count * event_size;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_integer_overflow"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid handle_user(user item){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Const**\n\n**Fix:**\n```cpp\nvoid handle_user(const user& item){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_const"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid handle_product(product item){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Const**\n\n**Fix:**\n```cpp\nvoid handle_product(const product& item){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_const"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid handle_order(order item){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Const**\n\n**Fix:**\n```cpp\nvoid handle_order(const order& item){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_const"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid handle_payment(payment item){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Const**\n\n**Fix:**\n```cpp\nvoid handle_payment(const payment& item){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_const"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid handle_session(session item){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Const**\n\n**Fix:**\n```cpp\nvoid handle_session(const session& item){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_const"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid handle_token(token item){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Const**\n\n**Fix:**\n```cpp\nvoid handle_token(const token& item){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_const"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid handle_config(config item){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Const**\n\n**Fix:**\n```cpp\nvoid handle_config(const config& item){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_const"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid handle_cache(cache item){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Const**\n\n**Fix:**\n```cpp\nvoid handle_cache(const cache& item){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_const"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid handle_log(log item){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Const**\n\n**Fix:**\n```cpp\nvoid handle_log(const log& item){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_const"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid handle_event(event item){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Const**\n\n**Fix:**\n```cpp\nvoid handle_event(const event& item){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_const"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string user_name;\nfor (char c : chars) user_name += c;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity String Concat**\n\n**Fix:**\n```cpp\nstd::string user_name;\nuser_name.reserve(chars.size());\nfor (char c : chars) user_name += c;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_string_concat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string product_name;\nfor (char c : chars) product_name += c;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity String Concat**\n\n**Fix:**\n```cpp\nstd::string product_name;\nproduct_name.reserve(chars.size());\nfor (char c : chars) product_name += c;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_string_concat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string order_name;\nfor (char c : chars) order_name += c;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity String Concat**\n\n**Fix:**\n```cpp\nstd::string order_name;\norder_name.reserve(chars.size());\nfor (char c : chars) order_name += c;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_string_concat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string payment_name;\nfor (char c : chars) payment_name += c;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity String Concat**\n\n**Fix:**\n```cpp\nstd::string payment_name;\npayment_name.reserve(chars.size());\nfor (char c : chars) payment_name += c;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_string_concat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string session_name;\nfor (char c : chars) session_name += c;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity String Concat**\n\n**Fix:**\n```cpp\nstd::string session_name;\nsession_name.reserve(chars.size());\nfor (char c : chars) session_name += c;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_string_concat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string token_name;\nfor (char c : chars) token_name += c;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity String Concat**\n\n**Fix:**\n```cpp\nstd::string token_name;\ntoken_name.reserve(chars.size());\nfor (char c : chars) token_name += c;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_string_concat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string config_name;\nfor (char c : chars) config_name += c;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity String Concat**\n\n**Fix:**\n```cpp\nstd::string config_name;\nconfig_name.reserve(chars.size());\nfor (char c : chars) config_name += c;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_string_concat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string cache_name;\nfor (char c : chars) cache_name += c;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity String Concat**\n\n**Fix:**\n```cpp\nstd::string cache_name;\ncache_name.reserve(chars.size());\nfor (char c : chars) cache_name += c;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_string_concat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string log_name;\nfor (char c : chars) log_name += c;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity String Concat**\n\n**Fix:**\n```cpp\nstd::string log_name;\nlog_name.reserve(chars.size());\nfor (char c : chars) log_name += c;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_string_concat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string event_name;\nfor (char c : chars) event_name += c;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity String Concat**\n\n**Fix:**\n```cpp\nstd::string event_name;\nevent_name.reserve(chars.size());\nfor (char c : chars) event_name += c;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_string_concat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"user.log\", \"a\");\nfprintf(f, \"...\");\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity RAII**\n\n**Fix:**\n```cpp\nstd::ofstream f(\"user.log\", std::ios::app);\nf << \"...\";\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_raii"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"product.log\", \"a\");\nfprintf(f, \"...\");\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity RAII**\n\n**Fix:**\n```cpp\nstd::ofstream f(\"product.log\", std::ios::app);\nf << \"...\";\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_raii"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"order.log\", \"a\");\nfprintf(f, \"...\");\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity RAII**\n\n**Fix:**\n```cpp\nstd::ofstream f(\"order.log\", std::ios::app);\nf << \"...\";\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_raii"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"payment.log\", \"a\");\nfprintf(f, \"...\");\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity RAII**\n\n**Fix:**\n```cpp\nstd::ofstream f(\"payment.log\", std::ios::app);\nf << \"...\";\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_raii"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"session.log\", \"a\");\nfprintf(f, \"...\");\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity RAII**\n\n**Fix:**\n```cpp\nstd::ofstream f(\"session.log\", std::ios::app);\nf << \"...\";\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_raii"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"token.log\", \"a\");\nfprintf(f, \"...\");\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity RAII**\n\n**Fix:**\n```cpp\nstd::ofstream f(\"token.log\", std::ios::app);\nf << \"...\";\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_raii"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"config.log\", \"a\");\nfprintf(f, \"...\");\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity RAII**\n\n**Fix:**\n```cpp\nstd::ofstream f(\"config.log\", std::ios::app);\nf << \"...\";\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_raii"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"cache.log\", \"a\");\nfprintf(f, \"...\");\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity RAII**\n\n**Fix:**\n```cpp\nstd::ofstream f(\"cache.log\", std::ios::app);\nf << \"...\";\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_raii"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"log.log\", \"a\");\nfprintf(f, \"...\");\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity RAII**\n\n**Fix:**\n```cpp\nstd::ofstream f(\"log.log\", std::ios::app);\nf << \"...\";\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_raii"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nFILE* f = fopen(\"event.log\", \"a\");\nfprintf(f, \"...\");\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity RAII**\n\n**Fix:**\n```cpp\nstd::ofstream f(\"event.log\", std::ios::app);\nf << \"...\";\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_raii"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDerived* d = static_cast<Derived*>(base_ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Cast Safety**\n\n**Fix:**\n```cpp\nDerived* d = dynamic_cast<Derived*>(base_ptr);\nif (d) { /* safe */ }\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_cast_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDerived* d = static_cast<Derived*>(base_ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Cast Safety**\n\n**Fix:**\n```cpp\nDerived* d = dynamic_cast<Derived*>(base_ptr);\nif (d) { /* safe */ }\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_cast_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDerived* d = static_cast<Derived*>(base_ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Cast Safety**\n\n**Fix:**\n```cpp\nDerived* d = dynamic_cast<Derived*>(base_ptr);\nif (d) { /* safe */ }\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_cast_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDerived* d = static_cast<Derived*>(base_ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Cast Safety**\n\n**Fix:**\n```cpp\nDerived* d = dynamic_cast<Derived*>(base_ptr);\nif (d) { /* safe */ }\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_cast_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDerived* d = static_cast<Derived*>(base_ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Cast Safety**\n\n**Fix:**\n```cpp\nDerived* d = dynamic_cast<Derived*>(base_ptr);\nif (d) { /* safe */ }\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_cast_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDerived* d = static_cast<Derived*>(base_ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Cast Safety**\n\n**Fix:**\n```cpp\nDerived* d = dynamic_cast<Derived*>(base_ptr);\nif (d) { /* safe */ }\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_cast_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDerived* d = static_cast<Derived*>(base_ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Cast Safety**\n\n**Fix:**\n```cpp\nDerived* d = dynamic_cast<Derived*>(base_ptr);\nif (d) { /* safe */ }\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_cast_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDerived* d = static_cast<Derived*>(base_ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Cast Safety**\n\n**Fix:**\n```cpp\nDerived* d = dynamic_cast<Derived*>(base_ptr);\nif (d) { /* safe */ }\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_cast_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDerived* d = static_cast<Derived*>(base_ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Cast Safety**\n\n**Fix:**\n```cpp\nDerived* d = dynamic_cast<Derived*>(base_ptr);\nif (d) { /* safe */ }\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_cast_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nDerived* d = static_cast<Derived*>(base_ptr);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Cast Safety**\n\n**Fix:**\n```cpp\nDerived* d = dynamic_cast<Derived*>(base_ptr);\nif (d) { /* safe */ }\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_cast_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::unique_ptr<user> create(){\n auto p = std::make_unique<user>();\n return p;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Move**\n\n**Fix:**\n```cpp\nstd::unique_ptr<user> create(){\n return std::make_unique<user>();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::unique_ptr<product> create(){\n auto p = std::make_unique<product>();\n return p;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Move**\n\n**Fix:**\n```cpp\nstd::unique_ptr<product> create(){\n return std::make_unique<product>();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::unique_ptr<order> create(){\n auto p = std::make_unique<order>();\n return p;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Move**\n\n**Fix:**\n```cpp\nstd::unique_ptr<order> create(){\n return std::make_unique<order>();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::unique_ptr<payment> create(){\n auto p = std::make_unique<payment>();\n return p;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Move**\n\n**Fix:**\n```cpp\nstd::unique_ptr<payment> create(){\n return std::make_unique<payment>();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::unique_ptr<session> create(){\n auto p = std::make_unique<session>();\n return p;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Move**\n\n**Fix:**\n```cpp\nstd::unique_ptr<session> create(){\n return std::make_unique<session>();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::unique_ptr<token> create(){\n auto p = std::make_unique<token>();\n return p;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Move**\n\n**Fix:**\n```cpp\nstd::unique_ptr<token> create(){\n return std::make_unique<token>();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::unique_ptr<config> create(){\n auto p = std::make_unique<config>();\n return p;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Move**\n\n**Fix:**\n```cpp\nstd::unique_ptr<config> create(){\n return std::make_unique<config>();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::unique_ptr<cache> create(){\n auto p = std::make_unique<cache>();\n return p;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Move**\n\n**Fix:**\n```cpp\nstd::unique_ptr<cache> create(){\n return std::make_unique<cache>();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::unique_ptr<log> create(){\n auto p = std::make_unique<log>();\n return p;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Move**\n\n**Fix:**\n```cpp\nstd::unique_ptr<log> create(){\n return std::make_unique<log>();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::unique_ptr<event> create(){\n auto p = std::make_unique<event>();\n return p;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Move**\n\n**Fix:**\n```cpp\nstd::unique_ptr<event> create(){\n return std::make_unique<event>();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_move"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nuser* e = new user();\nsetup(e);\n// leak if setup throws\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<user>();\nsetup(e.get());\n// no leak\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nproduct* e = new product();\nsetup(e);\n// leak if setup throws\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<product>();\nsetup(e.get());\n// no leak\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\norder* e = new order();\nsetup(e);\n// leak if setup throws\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<order>();\nsetup(e.get());\n// no leak\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\npayment* e = new payment();\nsetup(e);\n// leak if setup throws\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<payment>();\nsetup(e.get());\n// no leak\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nsession* e = new session();\nsetup(e);\n// leak if setup throws\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<session>();\nsetup(e.get());\n// no leak\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntoken* e = new token();\nsetup(e);\n// leak if setup throws\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<token>();\nsetup(e.get());\n// no leak\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconfig* e = new config();\nsetup(e);\n// leak if setup throws\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<config>();\nsetup(e.get());\n// no leak\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ncache* e = new cache();\nsetup(e);\n// leak if setup throws\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<cache>();\nsetup(e.get());\n// no leak\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nlog* e = new log();\nsetup(e);\n// leak if setup throws\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<log>();\nsetup(e.get());\n// no leak\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nevent* e = new event();\nsetup(e);\n// leak if setup throws\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Exception Safety**\n\n**Fix:**\n```cpp\nauto e = std::make_unique<event>();\nsetup(e.get());\n// no leak\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_exception_safety"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid cleanup(){\n delete user_ptr;\n // forgot to null\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Delete**\n\n**Fix:**\n```cpp\nvoid cleanup(){\n user_ptr.reset();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_delete"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid cleanup(){\n delete product_ptr;\n // forgot to null\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Delete**\n\n**Fix:**\n```cpp\nvoid cleanup(){\n product_ptr.reset();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_delete"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid cleanup(){\n delete order_ptr;\n // forgot to null\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Delete**\n\n**Fix:**\n```cpp\nvoid cleanup(){\n order_ptr.reset();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_delete"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid cleanup(){\n delete payment_ptr;\n // forgot to null\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Delete**\n\n**Fix:**\n```cpp\nvoid cleanup(){\n payment_ptr.reset();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_delete"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid cleanup(){\n delete session_ptr;\n // forgot to null\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Delete**\n\n**Fix:**\n```cpp\nvoid cleanup(){\n session_ptr.reset();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_delete"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid cleanup(){\n delete token_ptr;\n // forgot to null\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Delete**\n\n**Fix:**\n```cpp\nvoid cleanup(){\n token_ptr.reset();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_delete"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid cleanup(){\n delete config_ptr;\n // forgot to null\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Delete**\n\n**Fix:**\n```cpp\nvoid cleanup(){\n config_ptr.reset();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_delete"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid cleanup(){\n delete cache_ptr;\n // forgot to null\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Delete**\n\n**Fix:**\n```cpp\nvoid cleanup(){\n cache_ptr.reset();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_delete"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid cleanup(){\n delete log_ptr;\n // forgot to null\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Delete**\n\n**Fix:**\n```cpp\nvoid cleanup(){\n log_ptr.reset();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_delete"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid cleanup(){\n delete event_ptr;\n // forgot to null\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity No Delete**\n\n**Fix:**\n```cpp\nvoid cleanup(){\n event_ptr.reset();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_no_delete"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nuser shared_user;\n// accessed from multiple threads\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Shared State**\n\n**Fix:**\n```cpp\nstd::shared_mutex user_mutex;\nstd::shared_ptr<user> shared_user;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_shared_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nproduct shared_product;\n// accessed from multiple threads\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Shared State**\n\n**Fix:**\n```cpp\nstd::shared_mutex product_mutex;\nstd::shared_ptr<product> shared_product;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_shared_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\norder shared_order;\n// accessed from multiple threads\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Shared State**\n\n**Fix:**\n```cpp\nstd::shared_mutex order_mutex;\nstd::shared_ptr<order> shared_order;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_shared_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\npayment shared_payment;\n// accessed from multiple threads\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Shared State**\n\n**Fix:**\n```cpp\nstd::shared_mutex payment_mutex;\nstd::shared_ptr<payment> shared_payment;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_shared_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nsession shared_session;\n// accessed from multiple threads\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Shared State**\n\n**Fix:**\n```cpp\nstd::shared_mutex session_mutex;\nstd::shared_ptr<session> shared_session;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_shared_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntoken shared_token;\n// accessed from multiple threads\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Shared State**\n\n**Fix:**\n```cpp\nstd::shared_mutex token_mutex;\nstd::shared_ptr<token> shared_token;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_shared_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconfig shared_config;\n// accessed from multiple threads\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Shared State**\n\n**Fix:**\n```cpp\nstd::shared_mutex config_mutex;\nstd::shared_ptr<config> shared_config;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_shared_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ncache shared_cache;\n// accessed from multiple threads\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Shared State**\n\n**Fix:**\n```cpp\nstd::shared_mutex cache_mutex;\nstd::shared_ptr<cache> shared_cache;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_shared_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nlog shared_log;\n// accessed from multiple threads\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Shared State**\n\n**Fix:**\n```cpp\nstd::shared_mutex log_mutex;\nstd::shared_ptr<log> shared_log;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_shared_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nevent shared_event;\n// accessed from multiple threads\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Shared State**\n\n**Fix:**\n```cpp\nstd::shared_mutex event_mutex;\nstd::shared_ptr<event> shared_event;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_shared_state"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass user {\npublic:\n void process(){\n }\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Virtual**\n\n**Fix:**\n```cpp\nclass user {\npublic:\n virtual ~user() = default;\n virtual void process() = 0;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_virtual"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass product {\npublic:\n void process(){\n }\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Virtual**\n\n**Fix:**\n```cpp\nclass product {\npublic:\n virtual ~product() = default;\n virtual void process() = 0;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_virtual"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass order {\npublic:\n void process(){\n }\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Virtual**\n\n**Fix:**\n```cpp\nclass order {\npublic:\n virtual ~order() = default;\n virtual void process() = 0;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_virtual"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass payment {\npublic:\n void process(){\n }\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Virtual**\n\n**Fix:**\n```cpp\nclass payment {\npublic:\n virtual ~payment() = default;\n virtual void process() = 0;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_virtual"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass session {\npublic:\n void process(){\n }\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Virtual**\n\n**Fix:**\n```cpp\nclass session {\npublic:\n virtual ~session() = default;\n virtual void process() = 0;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_virtual"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass token {\npublic:\n void process(){\n }\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Virtual**\n\n**Fix:**\n```cpp\nclass token {\npublic:\n virtual ~token() = default;\n virtual void process() = 0;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_virtual"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass config {\npublic:\n void process(){\n }\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Virtual**\n\n**Fix:**\n```cpp\nclass config {\npublic:\n virtual ~config() = default;\n virtual void process() = 0;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_virtual"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass cache {\npublic:\n void process(){\n }\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Virtual**\n\n**Fix:**\n```cpp\nclass cache {\npublic:\n virtual ~cache() = default;\n virtual void process() = 0;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_virtual"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass log {\npublic:\n void process(){\n }\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Virtual**\n\n**Fix:**\n```cpp\nclass log {\npublic:\n virtual ~log() = default;\n virtual void process() = 0;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_virtual"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass event {\npublic:\n void process(){\n }\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Virtual**\n\n**Fix:**\n```cpp\nclass event {\npublic:\n virtual ~event() = default;\n virtual void process() = 0;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_virtual"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass user {\n int* data;\n user(const user&);\n user& operator=(const user&);\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Rule of Three**\n\n**Fix:**\n```cpp\n// Implement destructor, copy ctor, copy assign (Rule of Three/Five)\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_rule_of_three"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass product {\n int* data;\n product(const product&);\n product& operator=(const product&);\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Rule of Three**\n\n**Fix:**\n```cpp\n// Implement destructor, copy ctor, copy assign (Rule of Three/Five)\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_rule_of_three"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass order {\n int* data;\n order(const order&);\n order& operator=(const order&);\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Rule of Three**\n\n**Fix:**\n```cpp\n// Implement destructor, copy ctor, copy assign (Rule of Three/Five)\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_rule_of_three"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass payment {\n int* data;\n payment(const payment&);\n payment& operator=(const payment&);\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Rule of Three**\n\n**Fix:**\n```cpp\n// Implement destructor, copy ctor, copy assign (Rule of Three/Five)\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_rule_of_three"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass session {\n int* data;\n session(const session&);\n session& operator=(const session&);\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Rule of Three**\n\n**Fix:**\n```cpp\n// Implement destructor, copy ctor, copy assign (Rule of Three/Five)\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_rule_of_three"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass token {\n int* data;\n token(const token&);\n token& operator=(const token&);\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Rule of Three**\n\n**Fix:**\n```cpp\n// Implement destructor, copy ctor, copy assign (Rule of Three/Five)\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_rule_of_three"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass config {\n int* data;\n config(const config&);\n config& operator=(const config&);\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Rule of Three**\n\n**Fix:**\n```cpp\n// Implement destructor, copy ctor, copy assign (Rule of Three/Five)\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_rule_of_three"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass cache {\n int* data;\n cache(const cache&);\n cache& operator=(const cache&);\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Rule of Three**\n\n**Fix:**\n```cpp\n// Implement destructor, copy ctor, copy assign (Rule of Three/Five)\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_rule_of_three"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass log {\n int* data;\n log(const log&);\n log& operator=(const log&);\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Rule of Three**\n\n**Fix:**\n```cpp\n// Implement destructor, copy ctor, copy assign (Rule of Three/Five)\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_rule_of_three"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass event {\n int* data;\n event(const event&);\n event& operator=(const event&);\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Rule of Three**\n\n**Fix:**\n```cpp\n// Implement destructor, copy ctor, copy assign (Rule of Three/Five)\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_rule_of_three"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nuser** ptr = new user*;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Smart Ptr Choice**\n\n**Fix:**\n```cpp\nstd::unique_ptr<user> ptr = std::make_unique<user>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_smart_ptr_choice"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nproduct** ptr = new product*;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Smart Ptr Choice**\n\n**Fix:**\n```cpp\nstd::unique_ptr<product> ptr = std::make_unique<product>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_smart_ptr_choice"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\norder** ptr = new order*;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Smart Ptr Choice**\n\n**Fix:**\n```cpp\nstd::unique_ptr<order> ptr = std::make_unique<order>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_smart_ptr_choice"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\npayment** ptr = new payment*;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Smart Ptr Choice**\n\n**Fix:**\n```cpp\nstd::unique_ptr<payment> ptr = std::make_unique<payment>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_smart_ptr_choice"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nsession** ptr = new session*;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Smart Ptr Choice**\n\n**Fix:**\n```cpp\nstd::unique_ptr<session> ptr = std::make_unique<session>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_smart_ptr_choice"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntoken** ptr = new token*;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Smart Ptr Choice**\n\n**Fix:**\n```cpp\nstd::unique_ptr<token> ptr = std::make_unique<token>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_smart_ptr_choice"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconfig** ptr = new config*;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Smart Ptr Choice**\n\n**Fix:**\n```cpp\nstd::unique_ptr<config> ptr = std::make_unique<config>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_smart_ptr_choice"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ncache** ptr = new cache*;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Smart Ptr Choice**\n\n**Fix:**\n```cpp\nstd::unique_ptr<cache> ptr = std::make_unique<cache>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_smart_ptr_choice"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nlog** ptr = new log*;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Smart Ptr Choice**\n\n**Fix:**\n```cpp\nstd::unique_ptr<log> ptr = std::make_unique<log>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_smart_ptr_choice"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nevent** ptr = new event*;\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Smart Ptr Choice**\n\n**Fix:**\n```cpp\nstd::unique_ptr<event> ptr = std::make_unique<event>();\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_smart_ptr_choice"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(int n){}\nvoid process(double d){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Overload**\n\n**Fix:**\n```cpp\n// Prefer different function names over overloads\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_overload"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(int n){}\nvoid process(double d){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Overload**\n\n**Fix:**\n```cpp\n// Prefer different function names over overloads\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_overload"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(int n){}\nvoid process(double d){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Overload**\n\n**Fix:**\n```cpp\n// Prefer different function names over overloads\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_overload"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(int n){}\nvoid process(double d){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Overload**\n\n**Fix:**\n```cpp\n// Prefer different function names over overloads\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_overload"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(int n){}\nvoid process(double d){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Overload**\n\n**Fix:**\n```cpp\n// Prefer different function names over overloads\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_overload"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(int n){}\nvoid process(double d){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Overload**\n\n**Fix:**\n```cpp\n// Prefer different function names over overloads\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_overload"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(int n){}\nvoid process(double d){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Overload**\n\n**Fix:**\n```cpp\n// Prefer different function names over overloads\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_overload"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(int n){}\nvoid process(double d){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Overload**\n\n**Fix:**\n```cpp\n// Prefer different function names over overloads\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_overload"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(int n){}\nvoid process(double d){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Overload**\n\n**Fix:**\n```cpp\n// Prefer different function names over overloads\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_overload"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process(int n){}\nvoid process(double d){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Overload**\n\n**Fix:**\n```cpp\n// Prefer different function names over overloads\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_overload"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass userInt {\n int value;\n};\nclass userDouble {\n double value;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Template**\n\n**Fix:**\n```cpp\ntemplate<typename T>\nclass user {\n T value;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_template"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass productInt {\n int value;\n};\nclass productDouble {\n double value;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Template**\n\n**Fix:**\n```cpp\ntemplate<typename T>\nclass product {\n T value;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_template"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass orderInt {\n int value;\n};\nclass orderDouble {\n double value;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Template**\n\n**Fix:**\n```cpp\ntemplate<typename T>\nclass order {\n T value;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_template"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass paymentInt {\n int value;\n};\nclass paymentDouble {\n double value;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Template**\n\n**Fix:**\n```cpp\ntemplate<typename T>\nclass payment {\n T value;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_template"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass sessionInt {\n int value;\n};\nclass sessionDouble {\n double value;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Template**\n\n**Fix:**\n```cpp\ntemplate<typename T>\nclass session {\n T value;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_template"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass tokenInt {\n int value;\n};\nclass tokenDouble {\n double value;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Template**\n\n**Fix:**\n```cpp\ntemplate<typename T>\nclass token {\n T value;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_template"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass configInt {\n int value;\n};\nclass configDouble {\n double value;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Template**\n\n**Fix:**\n```cpp\ntemplate<typename T>\nclass config {\n T value;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_template"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass cacheInt {\n int value;\n};\nclass cacheDouble {\n double value;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Template**\n\n**Fix:**\n```cpp\ntemplate<typename T>\nclass cache {\n T value;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_template"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass logInt {\n int value;\n};\nclass logDouble {\n double value;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Template**\n\n**Fix:**\n```cpp\ntemplate<typename T>\nclass log {\n T value;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_template"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass eventInt {\n int value;\n};\nclass eventDouble {\n double value;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Template**\n\n**Fix:**\n```cpp\ntemplate<typename T>\nclass event {\n T value;\n};\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_template"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n// global user functions\nvoid process_user(){\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Namespace**\n\n**Fix:**\n```cpp\nnamespace user {\n void process();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_namespace"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n// global product functions\nvoid process_product(){\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Namespace**\n\n**Fix:**\n```cpp\nnamespace product {\n void process();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_namespace"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n// global order functions\nvoid process_order(){\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Namespace**\n\n**Fix:**\n```cpp\nnamespace order {\n void process();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_namespace"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n// global payment functions\nvoid process_payment(){\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Namespace**\n\n**Fix:**\n```cpp\nnamespace payment {\n void process();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_namespace"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n// global session functions\nvoid process_session(){\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Namespace**\n\n**Fix:**\n```cpp\nnamespace session {\n void process();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_namespace"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n// global token functions\nvoid process_token(){\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Namespace**\n\n**Fix:**\n```cpp\nnamespace token {\n void process();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_namespace"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n// global config functions\nvoid process_config(){\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Namespace**\n\n**Fix:**\n```cpp\nnamespace config {\n void process();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_namespace"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n// global cache functions\nvoid process_cache(){\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Namespace**\n\n**Fix:**\n```cpp\nnamespace cache {\n void process();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_namespace"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n// global log functions\nvoid process_log(){\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Namespace**\n\n**Fix:**\n```cpp\nnamespace log {\n void process();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_namespace"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n// global event functions\nvoid process_event(){\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Namespace**\n\n**Fix:**\n```cpp\nnamespace event {\n void process();\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_namespace"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ninline void process_user(){\n // complex logic\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Inline**\n\n**Fix:**\n```cpp\n// Don't inline complex functions\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_inline"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ninline void process_product(){\n // complex logic\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Inline**\n\n**Fix:**\n```cpp\n// Don't inline complex functions\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_inline"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ninline void process_order(){\n // complex logic\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Inline**\n\n**Fix:**\n```cpp\n// Don't inline complex functions\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_inline"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ninline void process_payment(){\n // complex logic\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Inline**\n\n**Fix:**\n```cpp\n// Don't inline complex functions\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_inline"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ninline void process_session(){\n // complex logic\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Inline**\n\n**Fix:**\n```cpp\n// Don't inline complex functions\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_inline"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ninline void process_token(){\n // complex logic\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Inline**\n\n**Fix:**\n```cpp\n// Don't inline complex functions\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_inline"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ninline void process_config(){\n // complex logic\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Inline**\n\n**Fix:**\n```cpp\n// Don't inline complex functions\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_inline"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ninline void process_cache(){\n // complex logic\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Inline**\n\n**Fix:**\n```cpp\n// Don't inline complex functions\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_inline"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ninline void process_log(){\n // complex logic\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Inline**\n\n**Fix:**\n```cpp\n// Don't inline complex functions\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_inline"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ninline void process_event(){\n // complex logic\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Inline**\n\n**Fix:**\n```cpp\n// Don't inline complex functions\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_inline"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid get_user_config(){\n static Config c;\n return c;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Static**\n\n**Fix:**\n```cpp\n// Thread-safe static initialization in C++11+\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_static"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid get_product_config(){\n static Config c;\n return c;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Static**\n\n**Fix:**\n```cpp\n// Thread-safe static initialization in C++11+\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_static"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid get_order_config(){\n static Config c;\n return c;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Static**\n\n**Fix:**\n```cpp\n// Thread-safe static initialization in C++11+\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_static"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid get_payment_config(){\n static Config c;\n return c;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Static**\n\n**Fix:**\n```cpp\n// Thread-safe static initialization in C++11+\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_static"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid get_session_config(){\n static Config c;\n return c;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Static**\n\n**Fix:**\n```cpp\n// Thread-safe static initialization in C++11+\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_static"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid get_token_config(){\n static Config c;\n return c;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Static**\n\n**Fix:**\n```cpp\n// Thread-safe static initialization in C++11+\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_static"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid get_config_config(){\n static Config c;\n return c;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Static**\n\n**Fix:**\n```cpp\n// Thread-safe static initialization in C++11+\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_static"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid get_cache_config(){\n static Config c;\n return c;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Static**\n\n**Fix:**\n```cpp\n// Thread-safe static initialization in C++11+\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_static"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid get_log_config(){\n static Config c;\n return c;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Static**\n\n**Fix:**\n```cpp\n// Thread-safe static initialization in C++11+\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_static"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid get_event_config(){\n static Config c;\n return c;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Static**\n\n**Fix:**\n```cpp\n// Thread-safe static initialization in C++11+\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_static"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#include \"full_user_header.h\"\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Forward Decl**\n\n**Fix:**\n```cpp\n// Use forward declaration: class user;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_forward_decl"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#include \"full_product_header.h\"\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Forward Decl**\n\n**Fix:**\n```cpp\n// Use forward declaration: class product;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_forward_decl"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#include \"full_order_header.h\"\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Forward Decl**\n\n**Fix:**\n```cpp\n// Use forward declaration: class order;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_forward_decl"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#include \"full_payment_header.h\"\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Forward Decl**\n\n**Fix:**\n```cpp\n// Use forward declaration: class payment;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_forward_decl"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#include \"full_session_header.h\"\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Forward Decl**\n\n**Fix:**\n```cpp\n// Use forward declaration: class session;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_forward_decl"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#include \"full_token_header.h\"\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Forward Decl**\n\n**Fix:**\n```cpp\n// Use forward declaration: class token;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_forward_decl"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#include \"full_config_header.h\"\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Forward Decl**\n\n**Fix:**\n```cpp\n// Use forward declaration: class config;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_forward_decl"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#include \"full_cache_header.h\"\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Forward Decl**\n\n**Fix:**\n```cpp\n// Use forward declaration: class cache;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_forward_decl"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#include \"full_log_header.h\"\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Forward Decl**\n\n**Fix:**\n```cpp\n// Use forward declaration: class log;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_forward_decl"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#include \"full_event_header.h\"\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Forward Decl**\n\n**Fix:**\n```cpp\n// Use forward declaration: class event;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_forward_decl"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#pragma once\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Include Guard**\n\n**Fix:**\n```cpp\n// Use #ifndef INCLUDE_GUARD for maximum compatibility\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_include_guard"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#pragma once\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Include Guard**\n\n**Fix:**\n```cpp\n// Use #ifndef INCLUDE_GUARD for maximum compatibility\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_include_guard"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#pragma once\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Include Guard**\n\n**Fix:**\n```cpp\n// Use #ifndef INCLUDE_GUARD for maximum compatibility\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_include_guard"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#pragma once\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Include Guard**\n\n**Fix:**\n```cpp\n// Use #ifndef INCLUDE_GUARD for maximum compatibility\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_include_guard"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#pragma once\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Include Guard**\n\n**Fix:**\n```cpp\n// Use #ifndef INCLUDE_GUARD for maximum compatibility\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_include_guard"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#pragma once\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Include Guard**\n\n**Fix:**\n```cpp\n// Use #ifndef INCLUDE_GUARD for maximum compatibility\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_include_guard"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#pragma once\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Include Guard**\n\n**Fix:**\n```cpp\n// Use #ifndef INCLUDE_GUARD for maximum compatibility\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_include_guard"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#pragma once\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Include Guard**\n\n**Fix:**\n```cpp\n// Use #ifndef INCLUDE_GUARD for maximum compatibility\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_include_guard"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#pragma once\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Include Guard**\n\n**Fix:**\n```cpp\n// Use #ifndef INCLUDE_GUARD for maximum compatibility\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_include_guard"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\n#pragma once\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Include Guard**\n\n**Fix:**\n```cpp\n// Use #ifndef INCLUDE_GUARD for maximum compatibility\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_include_guard"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nuser get_user(){\n return user_local;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Const Correct**\n\n**Fix:**\n```cpp\nconst user& get_user(){\n return user_local;\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_const_correct"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nproduct get_product(){\n return product_local;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Const Correct**\n\n**Fix:**\n```cpp\nconst product& get_product(){\n return product_local;\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_const_correct"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\norder get_order(){\n return order_local;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Const Correct**\n\n**Fix:**\n```cpp\nconst order& get_order(){\n return order_local;\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_const_correct"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\npayment get_payment(){\n return payment_local;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Const Correct**\n\n**Fix:**\n```cpp\nconst payment& get_payment(){\n return payment_local;\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_const_correct"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nsession get_session(){\n return session_local;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Const Correct**\n\n**Fix:**\n```cpp\nconst session& get_session(){\n return session_local;\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_const_correct"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntoken get_token(){\n return token_local;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Const Correct**\n\n**Fix:**\n```cpp\nconst token& get_token(){\n return token_local;\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_const_correct"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconfig get_config(){\n return config_local;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Const Correct**\n\n**Fix:**\n```cpp\nconst config& get_config(){\n return config_local;\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_const_correct"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ncache get_cache(){\n return cache_local;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Const Correct**\n\n**Fix:**\n```cpp\nconst cache& get_cache(){\n return cache_local;\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_const_correct"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nlog get_log(){\n return log_local;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Const Correct**\n\n**Fix:**\n```cpp\nconst log& get_log(){\n return log_local;\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_const_correct"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nevent get_event(){\n return event_local;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Const Correct**\n\n**Fix:**\n```cpp\nconst event& get_event(){\n return event_local;\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_const_correct"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nfor (int i = 0; i < user_vec.size(); i++){\n process(user_vec[i]);\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Range Based**\n\n**Fix:**\n```cpp\nfor (const auto& item : user_vec){\n process(item);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_range_based"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nfor (int i = 0; i < product_vec.size(); i++){\n process(product_vec[i]);\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Range Based**\n\n**Fix:**\n```cpp\nfor (const auto& item : product_vec){\n process(item);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_range_based"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nfor (int i = 0; i < order_vec.size(); i++){\n process(order_vec[i]);\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Range Based**\n\n**Fix:**\n```cpp\nfor (const auto& item : order_vec){\n process(item);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_range_based"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nfor (int i = 0; i < payment_vec.size(); i++){\n process(payment_vec[i]);\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Range Based**\n\n**Fix:**\n```cpp\nfor (const auto& item : payment_vec){\n process(item);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_range_based"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nfor (int i = 0; i < session_vec.size(); i++){\n process(session_vec[i]);\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Range Based**\n\n**Fix:**\n```cpp\nfor (const auto& item : session_vec){\n process(item);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_range_based"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nfor (int i = 0; i < token_vec.size(); i++){\n process(token_vec[i]);\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Range Based**\n\n**Fix:**\n```cpp\nfor (const auto& item : token_vec){\n process(item);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_range_based"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nfor (int i = 0; i < config_vec.size(); i++){\n process(config_vec[i]);\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Range Based**\n\n**Fix:**\n```cpp\nfor (const auto& item : config_vec){\n process(item);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_range_based"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nfor (int i = 0; i < cache_vec.size(); i++){\n process(cache_vec[i]);\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Range Based**\n\n**Fix:**\n```cpp\nfor (const auto& item : cache_vec){\n process(item);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_range_based"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nfor (int i = 0; i < log_vec.size(); i++){\n process(log_vec[i]);\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Range Based**\n\n**Fix:**\n```cpp\nfor (const auto& item : log_vec){\n process(item);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_range_based"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nfor (int i = 0; i < event_vec.size(); i++){\n process(event_vec[i]);\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Range Based**\n\n**Fix:**\n```cpp\nfor (const auto& item : event_vec){\n process(item);\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_range_based"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_user(std::function<void(user*)> cb){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Lambda**\n\n**Fix:**\n```cpp\n// Prefer callbacks or event patterns\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_lambda"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_product(std::function<void(product*)> cb){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Lambda**\n\n**Fix:**\n```cpp\n// Prefer callbacks or event patterns\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_lambda"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_order(std::function<void(order*)> cb){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Lambda**\n\n**Fix:**\n```cpp\n// Prefer callbacks or event patterns\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_lambda"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_payment(std::function<void(payment*)> cb){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Lambda**\n\n**Fix:**\n```cpp\n// Prefer callbacks or event patterns\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_lambda"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_session(std::function<void(session*)> cb){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Lambda**\n\n**Fix:**\n```cpp\n// Prefer callbacks or event patterns\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_lambda"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_token(std::function<void(token*)> cb){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Lambda**\n\n**Fix:**\n```cpp\n// Prefer callbacks or event patterns\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_lambda"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_config(std::function<void(config*)> cb){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Lambda**\n\n**Fix:**\n```cpp\n// Prefer callbacks or event patterns\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_lambda"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_cache(std::function<void(cache*)> cb){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Lambda**\n\n**Fix:**\n```cpp\n// Prefer callbacks or event patterns\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_lambda"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_log(std::function<void(log*)> cb){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Lambda**\n\n**Fix:**\n```cpp\n// Prefer callbacks or event patterns\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_lambda"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_event(std::function<void(event*)> cb){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Lambda**\n\n**Fix:**\n```cpp\n// Prefer callbacks or event patterns\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_lambda"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_user() {/* may throw */}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Noexcept**\n\n**Fix:**\n```cpp\nvoid process_user() noexcept {/* no throw */}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_noexcept"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_product() {/* may throw */}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Noexcept**\n\n**Fix:**\n```cpp\nvoid process_product() noexcept {/* no throw */}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_noexcept"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_order() {/* may throw */}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Noexcept**\n\n**Fix:**\n```cpp\nvoid process_order() noexcept {/* no throw */}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_noexcept"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_payment() {/* may throw */}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Noexcept**\n\n**Fix:**\n```cpp\nvoid process_payment() noexcept {/* no throw */}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_noexcept"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_session() {/* may throw */}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Noexcept**\n\n**Fix:**\n```cpp\nvoid process_session() noexcept {/* no throw */}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_noexcept"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_token() {/* may throw */}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Noexcept**\n\n**Fix:**\n```cpp\nvoid process_token() noexcept {/* no throw */}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_noexcept"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_config() {/* may throw */}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Noexcept**\n\n**Fix:**\n```cpp\nvoid process_config() noexcept {/* no throw */}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_noexcept"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_cache() {/* may throw */}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Noexcept**\n\n**Fix:**\n```cpp\nvoid process_cache() noexcept {/* no throw */}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_noexcept"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_log() {/* may throw */}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Noexcept**\n\n**Fix:**\n```cpp\nvoid process_log() noexcept {/* no throw */}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_noexcept"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_event() {/* may throw */}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Noexcept**\n\n**Fix:**\n```cpp\nvoid process_event() noexcept {/* no throw */}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_noexcept"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<user> vec;\n// default allocator\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Allocator**\n\n**Fix:**\n```cpp\nstd::vector<{e>, CustomAllocator<user>> vec;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_allocator"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<product> vec;\n// default allocator\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Allocator**\n\n**Fix:**\n```cpp\nstd::vector<{e>, CustomAllocator<product>> vec;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_allocator"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<order> vec;\n// default allocator\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Allocator**\n\n**Fix:**\n```cpp\nstd::vector<{e>, CustomAllocator<order>> vec;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_allocator"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<payment> vec;\n// default allocator\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Allocator**\n\n**Fix:**\n```cpp\nstd::vector<{e>, CustomAllocator<payment>> vec;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_allocator"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<session> vec;\n// default allocator\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Allocator**\n\n**Fix:**\n```cpp\nstd::vector<{e>, CustomAllocator<session>> vec;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_allocator"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<token> vec;\n// default allocator\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Allocator**\n\n**Fix:**\n```cpp\nstd::vector<{e>, CustomAllocator<token>> vec;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_allocator"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<config> vec;\n// default allocator\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Allocator**\n\n**Fix:**\n```cpp\nstd::vector<{e>, CustomAllocator<config>> vec;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_allocator"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<cache> vec;\n// default allocator\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Allocator**\n\n**Fix:**\n```cpp\nstd::vector<{e>, CustomAllocator<cache>> vec;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_allocator"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<log> vec;\n// default allocator\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Allocator**\n\n**Fix:**\n```cpp\nstd::vector<{e>, CustomAllocator<log>> vec;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_allocator"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::vector<event> vec;\n// default allocator\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Allocator**\n\n**Fix:**\n```cpp\nstd::vector<{e>, CustomAllocator<event>> vec;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_allocator"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_user(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity SFINAE**\n\n**Fix:**\n```cpp\ntemplate<std::enable_if_t<is_user_type<T>, int> = 0>\nvoid process_user(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_sfinae"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_product(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity SFINAE**\n\n**Fix:**\n```cpp\ntemplate<std::enable_if_t<is_product_type<T>, int> = 0>\nvoid process_product(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_sfinae"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_order(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity SFINAE**\n\n**Fix:**\n```cpp\ntemplate<std::enable_if_t<is_order_type<T>, int> = 0>\nvoid process_order(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_sfinae"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_payment(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity SFINAE**\n\n**Fix:**\n```cpp\ntemplate<std::enable_if_t<is_payment_type<T>, int> = 0>\nvoid process_payment(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_sfinae"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_session(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity SFINAE**\n\n**Fix:**\n```cpp\ntemplate<std::enable_if_t<is_session_type<T>, int> = 0>\nvoid process_session(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_sfinae"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_token(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity SFINAE**\n\n**Fix:**\n```cpp\ntemplate<std::enable_if_t<is_token_type<T>, int> = 0>\nvoid process_token(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_sfinae"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_config(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity SFINAE**\n\n**Fix:**\n```cpp\ntemplate<std::enable_if_t<is_config_type<T>, int> = 0>\nvoid process_config(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_sfinae"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_cache(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity SFINAE**\n\n**Fix:**\n```cpp\ntemplate<std::enable_if_t<is_cache_type<T>, int> = 0>\nvoid process_cache(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_sfinae"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_log(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity SFINAE**\n\n**Fix:**\n```cpp\ntemplate<std::enable_if_t<is_log_type<T>, int> = 0>\nvoid process_log(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_sfinae"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_event(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity SFINAE**\n\n**Fix:**\n```cpp\ntemplate<std::enable_if_t<is_event_type<T>, int> = 0>\nvoid process_event(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_sfinae"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_user(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Concepts**\n\n**Fix:**\n```cpp\ntemplate<userConcept T>\nvoid process_user(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_concepts"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_product(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Concepts**\n\n**Fix:**\n```cpp\ntemplate<productConcept T>\nvoid process_product(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_concepts"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_order(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Concepts**\n\n**Fix:**\n```cpp\ntemplate<orderConcept T>\nvoid process_order(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_concepts"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_payment(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Concepts**\n\n**Fix:**\n```cpp\ntemplate<paymentConcept T>\nvoid process_payment(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_concepts"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_session(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Concepts**\n\n**Fix:**\n```cpp\ntemplate<sessionConcept T>\nvoid process_session(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_concepts"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_token(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Concepts**\n\n**Fix:**\n```cpp\ntemplate<tokenConcept T>\nvoid process_token(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_concepts"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_config(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Concepts**\n\n**Fix:**\n```cpp\ntemplate<configConcept T>\nvoid process_config(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_concepts"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_cache(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Concepts**\n\n**Fix:**\n```cpp\ntemplate<cacheConcept T>\nvoid process_cache(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_concepts"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_log(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Concepts**\n\n**Fix:**\n```cpp\ntemplate<logConcept T>\nvoid process_log(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_concepts"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntemplate<typename T>\nvoid process_event(T t){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Concepts**\n\n**Fix:**\n```cpp\ntemplate<eventConcept T>\nvoid process_event(T t){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_concepts"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass user {\n int cmp(const user& o) const;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Three Way**\n\n**Fix:**\n```cpp\nauto operator<=>(const user&) const = default;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_three_way"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass product {\n int cmp(const product& o) const;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Three Way**\n\n**Fix:**\n```cpp\nauto operator<=>(const product&) const = default;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_three_way"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass order {\n int cmp(const order& o) const;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Three Way**\n\n**Fix:**\n```cpp\nauto operator<=>(const order&) const = default;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_three_way"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass payment {\n int cmp(const payment& o) const;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Three Way**\n\n**Fix:**\n```cpp\nauto operator<=>(const payment&) const = default;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_three_way"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass session {\n int cmp(const session& o) const;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Three Way**\n\n**Fix:**\n```cpp\nauto operator<=>(const session&) const = default;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_three_way"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass token {\n int cmp(const token& o) const;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Three Way**\n\n**Fix:**\n```cpp\nauto operator<=>(const token&) const = default;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_three_way"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass config {\n int cmp(const config& o) const;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Three Way**\n\n**Fix:**\n```cpp\nauto operator<=>(const config&) const = default;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_three_way"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass cache {\n int cmp(const cache& o) const;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Three Way**\n\n**Fix:**\n```cpp\nauto operator<=>(const cache&) const = default;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_three_way"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass log {\n int cmp(const log& o) const;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Three Way**\n\n**Fix:**\n```cpp\nauto operator<=>(const log&) const = default;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_three_way"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nclass event {\n int cmp(const event& o) const;\n};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Three Way**\n\n**Fix:**\n```cpp\nauto operator<=>(const event&) const = default;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_three_way"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_user(const user* data, size_t len){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Span**\n\n**Fix:**\n```cpp\nvoid process_user(std::span<const user> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_span"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_product(const product* data, size_t len){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Span**\n\n**Fix:**\n```cpp\nvoid process_product(std::span<const product> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_span"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_order(const order* data, size_t len){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Span**\n\n**Fix:**\n```cpp\nvoid process_order(std::span<const order> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_span"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_payment(const payment* data, size_t len){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Span**\n\n**Fix:**\n```cpp\nvoid process_payment(std::span<const payment> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_span"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_session(const session* data, size_t len){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Span**\n\n**Fix:**\n```cpp\nvoid process_session(std::span<const session> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_span"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_token(const token* data, size_t len){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Span**\n\n**Fix:**\n```cpp\nvoid process_token(std::span<const token> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_span"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_config(const config* data, size_t len){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Span**\n\n**Fix:**\n```cpp\nvoid process_config(std::span<const config> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_span"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_cache(const cache* data, size_t len){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Span**\n\n**Fix:**\n```cpp\nvoid process_cache(std::span<const cache> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_span"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_log(const log* data, size_t len){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Span**\n\n**Fix:**\n```cpp\nvoid process_log(std::span<const log> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_span"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_event(const event* data, size_t len){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Span**\n\n**Fix:**\n```cpp\nvoid process_event(std::span<const event> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_span"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nuser* try_get_user(){\n if (ok) return &found;\n return nullptr;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Expected**\n\n**Fix:**\n```cpp\nstd::expected<user, Error> try_get_user(){\n return ok ? found : Error{};\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_expected"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nproduct* try_get_product(){\n if (ok) return &found;\n return nullptr;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Expected**\n\n**Fix:**\n```cpp\nstd::expected<product, Error> try_get_product(){\n return ok ? found : Error{};\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_expected"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\norder* try_get_order(){\n if (ok) return &found;\n return nullptr;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Expected**\n\n**Fix:**\n```cpp\nstd::expected<order, Error> try_get_order(){\n return ok ? found : Error{};\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_expected"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\npayment* try_get_payment(){\n if (ok) return &found;\n return nullptr;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Expected**\n\n**Fix:**\n```cpp\nstd::expected<payment, Error> try_get_payment(){\n return ok ? found : Error{};\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_expected"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nsession* try_get_session(){\n if (ok) return &found;\n return nullptr;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Expected**\n\n**Fix:**\n```cpp\nstd::expected<session, Error> try_get_session(){\n return ok ? found : Error{};\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_expected"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ntoken* try_get_token(){\n if (ok) return &found;\n return nullptr;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Expected**\n\n**Fix:**\n```cpp\nstd::expected<token, Error> try_get_token(){\n return ok ? found : Error{};\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_expected"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nconfig* try_get_config(){\n if (ok) return &found;\n return nullptr;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Expected**\n\n**Fix:**\n```cpp\nstd::expected<config, Error> try_get_config(){\n return ok ? found : Error{};\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_expected"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\ncache* try_get_cache(){\n if (ok) return &found;\n return nullptr;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Expected**\n\n**Fix:**\n```cpp\nstd::expected<cache, Error> try_get_cache(){\n return ok ? found : Error{};\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_expected"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nlog* try_get_log(){\n if (ok) return &found;\n return nullptr;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Expected**\n\n**Fix:**\n```cpp\nstd::expected<log, Error> try_get_log(){\n return ok ? found : Error{};\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_expected"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nevent* try_get_event(){\n if (ok) return &found;\n return nullptr;\n}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity Expected**\n\n**Fix:**\n```cpp\nstd::expected<event, Error> try_get_event(){\n return ok ? found : Error{};\n}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_expected"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::thread t([](){\n process_user();\n});\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity JThread**\n\n**Fix:**\n```cpp\nstd::jthread t([](){\n process_user();\n});\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_jthread"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::thread t([](){\n process_product();\n});\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity JThread**\n\n**Fix:**\n```cpp\nstd::jthread t([](){\n process_product();\n});\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_jthread"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::thread t([](){\n process_order();\n});\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity JThread**\n\n**Fix:**\n```cpp\nstd::jthread t([](){\n process_order();\n});\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_jthread"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::thread t([](){\n process_payment();\n});\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity JThread**\n\n**Fix:**\n```cpp\nstd::jthread t([](){\n process_payment();\n});\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_jthread"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::thread t([](){\n process_session();\n});\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity JThread**\n\n**Fix:**\n```cpp\nstd::jthread t([](){\n process_session();\n});\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_jthread"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::thread t([](){\n process_token();\n});\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity JThread**\n\n**Fix:**\n```cpp\nstd::jthread t([](){\n process_token();\n});\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_jthread"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::thread t([](){\n process_config();\n});\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity JThread**\n\n**Fix:**\n```cpp\nstd::jthread t([](){\n process_config();\n});\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_jthread"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::thread t([](){\n process_cache();\n});\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity JThread**\n\n**Fix:**\n```cpp\nstd::jthread t([](){\n process_cache();\n});\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_jthread"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::thread t([](){\n process_log();\n});\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity JThread**\n\n**Fix:**\n```cpp\nstd::jthread t([](){\n process_log();\n});\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_jthread"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::thread t([](){\n process_event();\n});\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity JThread**\n\n**Fix:**\n```cpp\nstd::jthread t([](){\n process_event();\n});\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_jthread"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::atomic<bool> stop{false};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StopToken**\n\n**Fix:**\n```cpp\nstd::stop_token st;\nif (st.stop_requested()) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stoptoken"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::atomic<bool> stop{false};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StopToken**\n\n**Fix:**\n```cpp\nstd::stop_token st;\nif (st.stop_requested()) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stoptoken"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::atomic<bool> stop{false};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StopToken**\n\n**Fix:**\n```cpp\nstd::stop_token st;\nif (st.stop_requested()) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stoptoken"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::atomic<bool> stop{false};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StopToken**\n\n**Fix:**\n```cpp\nstd::stop_token st;\nif (st.stop_requested()) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stoptoken"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::atomic<bool> stop{false};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StopToken**\n\n**Fix:**\n```cpp\nstd::stop_token st;\nif (st.stop_requested()) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stoptoken"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::atomic<bool> stop{false};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StopToken**\n\n**Fix:**\n```cpp\nstd::stop_token st;\nif (st.stop_requested()) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stoptoken"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::atomic<bool> stop{false};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StopToken**\n\n**Fix:**\n```cpp\nstd::stop_token st;\nif (st.stop_requested()) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stoptoken"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::atomic<bool> stop{false};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StopToken**\n\n**Fix:**\n```cpp\nstd::stop_token st;\nif (st.stop_requested()) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stoptoken"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::atomic<bool> stop{false};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StopToken**\n\n**Fix:**\n```cpp\nstd::stop_token st;\nif (st.stop_requested()) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stoptoken"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::atomic<bool> stop{false};\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StopToken**\n\n**Fix:**\n```cpp\nstd::stop_token st;\nif (st.stop_requested()) return;\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stoptoken"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_user(double* data, int r, int c){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity MDSpan**\n\n**Fix:**\n```cpp\nvoid process_user(std::mdspan<double, std::dextents<int,2>> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_mdspan"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_product(double* data, int r, int c){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity MDSpan**\n\n**Fix:**\n```cpp\nvoid process_product(std::mdspan<double, std::dextents<int,2>> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_mdspan"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_order(double* data, int r, int c){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity MDSpan**\n\n**Fix:**\n```cpp\nvoid process_order(std::mdspan<double, std::dextents<int,2>> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_mdspan"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_payment(double* data, int r, int c){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity MDSpan**\n\n**Fix:**\n```cpp\nvoid process_payment(std::mdspan<double, std::dextents<int,2>> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_mdspan"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_session(double* data, int r, int c){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity MDSpan**\n\n**Fix:**\n```cpp\nvoid process_session(std::mdspan<double, std::dextents<int,2>> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_mdspan"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_token(double* data, int r, int c){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity MDSpan**\n\n**Fix:**\n```cpp\nvoid process_token(std::mdspan<double, std::dextents<int,2>> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_mdspan"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_config(double* data, int r, int c){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity MDSpan**\n\n**Fix:**\n```cpp\nvoid process_config(std::mdspan<double, std::dextents<int,2>> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_mdspan"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_cache(double* data, int r, int c){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity MDSpan**\n\n**Fix:**\n```cpp\nvoid process_cache(std::mdspan<double, std::dextents<int,2>> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_mdspan"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_log(double* data, int r, int c){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity MDSpan**\n\n**Fix:**\n```cpp\nvoid process_log(std::mdspan<double, std::dextents<int,2>> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_mdspan"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nvoid process_event(double* data, int r, int c){}\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity MDSpan**\n\n**Fix:**\n```cpp\nvoid process_event(std::mdspan<double, std::dextents<int,2>> data){}\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_mdspan"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nprintf(\"user: %d\\n\", val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdPrint**\n\n**Fix:**\n```cpp\nstd::print(\"user: {0}\\n\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdprint"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nprintf(\"product: %d\\n\", val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdPrint**\n\n**Fix:**\n```cpp\nstd::print(\"product: {0}\\n\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdprint"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nprintf(\"order: %d\\n\", val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdPrint**\n\n**Fix:**\n```cpp\nstd::print(\"order: {0}\\n\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdprint"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nprintf(\"payment: %d\\n\", val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdPrint**\n\n**Fix:**\n```cpp\nstd::print(\"payment: {0}\\n\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdprint"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nprintf(\"session: %d\\n\", val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdPrint**\n\n**Fix:**\n```cpp\nstd::print(\"session: {0}\\n\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdprint"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nprintf(\"token: %d\\n\", val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdPrint**\n\n**Fix:**\n```cpp\nstd::print(\"token: {0}\\n\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdprint"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nprintf(\"config: %d\\n\", val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdPrint**\n\n**Fix:**\n```cpp\nstd::print(\"config: {0}\\n\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdprint"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nprintf(\"cache: %d\\n\", val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdPrint**\n\n**Fix:**\n```cpp\nstd::print(\"cache: {0}\\n\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdprint"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nprintf(\"log: %d\\n\", val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdPrint**\n\n**Fix:**\n```cpp\nstd::print(\"log: {0}\\n\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdprint"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nprintf(\"event: %d\\n\", val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdPrint**\n\n**Fix:**\n```cpp\nstd::print(\"event: {0}\\n\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdprint"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string s = \"user: \" + std::to_string(val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdFormat**\n\n**Fix:**\n```cpp\nstd::string s = std::format(\"user: {}\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdformat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string s = \"product: \" + std::to_string(val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdFormat**\n\n**Fix:**\n```cpp\nstd::string s = std::format(\"product: {}\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdformat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string s = \"order: \" + std::to_string(val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdFormat**\n\n**Fix:**\n```cpp\nstd::string s = std::format(\"order: {}\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdformat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string s = \"payment: \" + std::to_string(val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdFormat**\n\n**Fix:**\n```cpp\nstd::string s = std::format(\"payment: {}\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdformat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string s = \"session: \" + std::to_string(val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdFormat**\n\n**Fix:**\n```cpp\nstd::string s = std::format(\"session: {}\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdformat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string s = \"token: \" + std::to_string(val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdFormat**\n\n**Fix:**\n```cpp\nstd::string s = std::format(\"token: {}\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdformat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string s = \"config: \" + std::to_string(val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdFormat**\n\n**Fix:**\n```cpp\nstd::string s = std::format(\"config: {}\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdformat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string s = \"cache: \" + std::to_string(val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdFormat**\n\n**Fix:**\n```cpp\nstd::string s = std::format(\"cache: {}\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdformat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string s = \"log: \" + std::to_string(val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdFormat**\n\n**Fix:**\n```cpp\nstd::string s = std::format(\"log: {}\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdformat"
]
},
{
"messages": [
{
"role": "user",
"content": "Review this cpp code:\n\n```cpp\nstd::string s = \"event: \" + std::to_string(val);\n```"
},
{
"role": "assistant",
"content": "**Issue: Entity StdFormat**\n\n**Fix:**\n```cpp\nstd::string s = std::format(\"event: {}\", val);\n```"
}
],
"source": "fullstack",
"tags": [
"cpp",
"entity_stdformat"
]
}
]