You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.
Found a 22line (172 tokens) duplication in the following files:
Starting at line 1918 of /home/kfilipek/Development/work/pmemkv/src/engines-experimental/stree/persistent_b_tree.h
Starting at line 1960 of /home/kfilipek/Development/work/pmemkv/src/engines-experimental/stree/persistent_b_tree.h
b_tree_base<Key, T, Compare, degree>::split_leaf_node(pool_base &pop,
leaf_pptr &split_leaf, K &&key,
M &&obj)
{
assert(split_leaf->full());
leaf_pptr node;
std::pair<iterator, bool> result(nullptr, false);
auto middle = split_leaf->begin() + split_leaf->size() / 2;
bool less = compare(std::forward<K>(key), middle->first);
// move second half into node and insert new element where neededpmem::obj::transaction::run(pop, [&] {
node = allocate_leaf();
node->move(pop, split_leaf, compare);
/* insert entry(key, obj) into needed half */if (less) {
result = internal_insert(split_leaf, std::forward<K>(key),
std::forward<M>(obj));
} else {
result = internal_insert(node, std::forward<K>(key),
std::forward<M>(obj));
}
The text was updated successfully, but these errors were encountered:
ISSUE: Duplication reported by PMD tool
Environment Information
Please provide a reproduction of the bug:
./bin/run.sh cpd --minimum-tokens 100 --files ~/Development/work/pmemkv/src/ --language cpp
Details
I removed API related duplications.
The text was updated successfully, but these errors were encountered: