Dataset Viewer
Auto-converted to Parquet Duplicate
project_main_language
stringclasses
10 values
pr_url
stringclasses
151 values
pr_source_commit
stringclasses
150 values
pr_target_commit
stringclasses
151 values
pr_change_line_count
int64
5
971
pr_category
stringclasses
9 values
is_ai_comment
bool
2 classes
note
stringlengths
66
2.22k
path
stringlengths
6
160
side
stringclasses
1 value
source_model
stringclasses
7 values
from_line
int64
1
29.4k
to_line
int64
3
29.4k
category
stringclasses
4 values
context
stringclasses
3 values
label
int64
1
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19411
0c65673a6fd2421be8fbe613116077120adea068
a050e422e23ce3eaee960b75ceff236b34f369b9
862
Code Refactoring / Architectural Improvement
true
Optimization suggestion: `getDirsFromFront(t)` is currently called for every view in the loop. If multiple views share the same `ProjDirection` `t`, this results in redundant calculations. Consider checking if `t` is already in `saveVals` before calling `getDirsFromFront`.
src/Mod/TechDraw/App/DrawProjGroup.cpp
right
Gemini-3-Pro
1,123
1,126
Performance
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19411
0c65673a6fd2421be8fbe613116077120adea068
a050e422e23ce3eaee960b75ceff236b34f369b9
862
Code Refactoring / Architectural Improvement
true
Potential C++ standard violation: The forward declarations specify the underlying type as `: int`, but the actual enum definitions in DrawViewPart.h do not specify an underlying type. According to C++ rules, forward declarations must match the definition exactly. Either remove `: int` from these forward declarations in...
src/Mod/TechDraw/App/DrawProjGroup.h
right
GLM-4.7
46
48
Code Defect
Repo Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19411
0c65673a6fd2421be8fbe613116077120adea068
a050e422e23ce3eaee960b75ceff236b34f369b9
862
Code Refactoring / Architectural Improvement
true
Using separate if statements instead of else-if may evaluate both conditions unnecessarily. Consider using else if to ensure mutual exclusivity.
src/Mod/TechDraw/App/DrawViewPart.cpp
right
Qwen-Coder-480B
1,300
1,303
Performance
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19411
0c65673a6fd2421be8fbe613116077120adea068
a050e422e23ce3eaee960b75ceff236b34f369b9
862
Code Refactoring / Architectural Improvement
true
Directly casting an integer preference value to ArrowType without bounds/validation risks creating invalid enum states. Consider validating input against known ArrowType limits.
src/Mod/TechDraw/App/Preferences.cpp
right
Qwen-Coder-480B
180
181
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19411
0c65673a6fd2421be8fbe613116077120adea068
a050e422e23ce3eaee960b75ceff236b34f369b9
862
Code Refactoring / Architectural Improvement
true
Potential typo: Should return DimensionGeometry::isVertical instead of isHorizontal
src/Mod/TechDraw/Gui/DimensionValidators.cpp
right
Qwen-Coder-480B
391
392
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19411
0c65673a6fd2421be8fbe613116077120adea068
a050e422e23ce3eaee960b75ceff236b34f369b9
862
Code Refactoring / Architectural Improvement
true
Bug: This should return `DimensionGeometry::isVertical` instead of `DimensionGeometry::isHorizontal`. When `line.x` is near zero (FLT_EPSILON), the line is vertical, not horizontal. The condition checks `fabs(line.x) < FLT_EPSILON` which means the x-component is negligible, making the line vertical. **Fix needed:** `...
src/Mod/TechDraw/Gui/DimensionValidators.cpp
right
Claude-Code/Claude-4.5-Sonnet
435
437
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19411
0c65673a6fd2421be8fbe613116077120adea068
a050e422e23ce3eaee960b75ceff236b34f369b9
862
Code Refactoring / Architectural Improvement
true
Bug: This should return `DimensionGeometry::isVertical` instead of `DimensionGeometry::isHorizontal`. When `line.x` is near zero (FLT_EPSILON), the line is vertical, not horizontal. The condition checks `fabs(line.x) < FLT_EPSILON` which means the x-component is negligible, making the line vertical. **Fix needed:** `...
src/Mod/TechDraw/Gui/DimensionValidators.cpp
right
Claude-Code/Claude-4.5-Sonnet
675
677
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19411
0c65673a6fd2421be8fbe613116077120adea068
a050e422e23ce3eaee960b75ceff236b34f369b9
862
Code Refactoring / Architectural Improvement
true
`prefBalloonArrow()` now returns `TechDraw::ArrowType` and is cast to an int for `setCurrentIndex()`. Consider validating the resulting index against the combobox range to handle corrupted/unknown stored preference values (or enum changes across versions). Without a guard, Qt may end up with an invalid index (-1) and t...
src/Mod/TechDraw/Gui/DlgPrefsTechDrawAnnotationImp.cpp
right
GPT-5.2
169
169
Code Defect
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19411
0c65673a6fd2421be8fbe613116077120adea068
a050e422e23ce3eaee960b75ceff236b34f369b9
862
Code Refactoring / Architectural Improvement
true
`prefArrowStyle()` returning `TechDraw::ArrowType` improves type safety, but `setCurrentIndex(static_cast<int>(prefArrowStyle()))` assumes the enum values match the combobox ordering and are within range. If the stored preference is out-of-range/unknown (e.g., older config or manual edits), this can set an invalid inde...
src/Mod/TechDraw/Gui/DlgPrefsTechDrawDimensionsImp.cpp
right
GPT-5.2
150
150
Code Defect
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19411
0c65673a6fd2421be8fbe613116077120adea068
a050e422e23ce3eaee960b75ceff236b34f369b9
862
Code Refactoring / Architectural Improvement
true
Consider initializing m_style explicitly (e.g., to a sensible default like TechDraw::ArrowType::FILLED_TRIANGLE or preference value) to avoid uninitialized enum usage. Changing from int to enum makes it easier to assume validity, but it still needs initialization in the constructor/initializer list.
src/Mod/TechDraw/Gui/QGIArrow.h
right
GPT-5.2
86
86
Code Defect
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19411
0c65673a6fd2421be8fbe613116077120adea068
a050e422e23ce3eaee960b75ceff236b34f369b9
862
Code Refactoring / Architectural Improvement
true
The commented-out code block should be removed entirely rather than left as a TODO comment. Dead code in comments can cause confusion and should be cleaned up.
src/Mod/TechDraw/App/DrawProjGroup.cpp
right
Claude-Code/Claude-4.5-Sonnet
1,127
1,132
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19411
0c65673a6fd2421be8fbe613116077120adea068
a050e422e23ce3eaee960b75ceff236b34f369b9
862
Code Refactoring / Architectural Improvement
true
Enums should typically be passed by value (they are small integral types). Passing by `const&` adds indirection and can complicate usage; also keep naming consistent (`rotationdirection` vs type `RotationMotion`).
src/Mod/TechDraw/App/DrawProjGroup.h
right
GPT-5.2
133
134
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19411
0c65673a6fd2421be8fbe613116077120adea068
a050e422e23ce3eaee960b75ceff236b34f369b9
862
Code Refactoring / Architectural Improvement
false
Commented-out type alias `ProjDirection` should be removed as it creates unnecessary code clutter and provides no functional value.
src/Mod/TechDraw/App/DrawViewPart.cpp
right
96
96
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19411
0c65673a6fd2421be8fbe613116077120adea068
a050e422e23ce3eaee960b75ceff236b34f369b9
862
Code Refactoring / Architectural Improvement
true
Commenting out the error handling branch removes fallback behavior for unknown projection types. Verify this is intentional.
src/Mod/TechDraw/App/DrawViewPart.cpp
right
Qwen-Coder-480B
1,385
1,393
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/21257
17e56f6570a97aa9803b502b23cf27dc8be1da70
eb761fd69cf1fb9c674e385bb1d419814526ba5a
672
Bug Fix
true
Same as above: `ResolveLink|Transform` can change plane orientation/position vs. previous behavior. If the goal is strictly to compare *geometric* parallelism irrespective of placement, you may want to avoid `Transform`; if the goal is compare in world coordinates, keep it but consider making that intent explicit (help...
src/Mod/Measure/App/Measurement.cpp
right
GPT-5.2
761
767
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/21257
17e56f6570a97aa9803b502b23cf27dc8be1da70
eb761fd69cf1fb9c674e385bb1d419814526ba5a
672
Bug Fix
true
Critical syntax error: Mismatched parentheses in the flag combination expression. Line 1 has `(Feature::ResolveLink * resolveLink) |` but the closing parenthesis is missing. Line 3 has `...transform)) |` with an extra closing parenthesis. This will cause a compilation error. ```suggestion bool resolveLink = (r...
src/Mod/Part/App/AppPartPy.cpp
right
GLM-4.7
2,292
2,297
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/21257
17e56f6570a97aa9803b502b23cf27dc8be1da70
eb761fd69cf1fb9c674e385bb1d419814526ba5a
672
Bug Fix
true
Inconsistent options flags: The getTopoShape() call uses default options (ResolveLink | Transform), while the getShape() calls below explicitly include NeedSubElement flag. For consistency and to ensure sub-element access in measurement operations, consider explicitly specifying options here as well: `Part::Feature::ge...
src/Mod/Part/App/MeasureClient.cpp
right
Claude-Code/Claude-4.5-Sonnet
101
101
Code Defect
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/21257
17e56f6570a97aa9803b502b23cf27dc8be1da70
eb761fd69cf1fb9c674e385bb1d419814526ba5a
672
Bug Fix
true
There is a duplicate entry of TopAbs_SHELL in the simplificationPriority array. This means TopAbs_SHELL will be checked twice while TopAbs_EDGE will never be checked. Should remove one instance of TopAbs_SHELL and add TopAbs_EDGE.
src/Mod/Part/App/PartFeature.cpp
right
Qwen-Coder-480B
1,328
1,335
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/21257
17e56f6570a97aa9803b502b23cf27dc8be1da70
eb761fd69cf1fb9c674e385bb1d419814526ba5a
672
Bug Fix
true
Variable assignment error: This should assign to curve1, not curve2. When subnames1 has one element, it should populate curve1. Currently curve1 is only populated when subnames1 is empty.
src/Mod/Part/Gui/Command.cpp
right
Qwen-Coder-480B
1,974
1,980
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/21257
17e56f6570a97aa9803b502b23cf27dc8be1da70
eb761fd69cf1fb9c674e385bb1d419814526ba5a
672
Bug Fix
true
This change switches from the previous overload/defaults to an explicit signature with `pmat/owner` as `nullptr` and a custom `options` mask. Two concerns: 1) Behavior change risk: previously the call used a `bool` (likely mapping to a different overload or default options). Now it forces `NeedSubElement | ResolveLink ...
src/Mod/Part/Gui/TaskCheckGeometry.cpp
right
GPT-5.2
446
452
Performance
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/21257
17e56f6570a97aa9803b502b23cf27dc8be1da70
eb761fd69cf1fb9c674e385bb1d419814526ba5a
672
Bug Fix
true
Bug: The loop iterator `it` is defined but not used. Inside the loop, `subnames[0].c_str()` is always called, which means only the first element of `subnames` is processed in every iteration. This should be `it->c_str()` or `(*it).c_str()` to process each element correctly.
src/Mod/Part/Gui/TaskSweep.cpp
right
GLM-4.7
301
307
Code Defect
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/21257
17e56f6570a97aa9803b502b23cf27dc8be1da70
eb761fd69cf1fb9c674e385bb1d419814526ba5a
672
Bug Fix
true
Consider verifying whether passing explicit nullptr values here adheres to intended API behavior. If these parameters are meant to be optional, prefer using default arguments in the function declaration instead of manually specifying nullptr.
src/Mod/Part/App/FeatureMirroring.cpp
right
Qwen-Coder-480B
174
178
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/21257
17e56f6570a97aa9803b502b23cf27dc8be1da70
eb761fd69cf1fb9c674e385bb1d419814526ba5a
672
Bug Fix
false
Add parentheses around `options & NeedSubElement` to improve code clarity and explicitly show the intended evaluation order, as bitwise operations in conditionals can be ambiguous to readers despite correct operator precedence.
src/Mod/Part/App/PartFeature.cpp
right
1,269
1,269
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/21257
17e56f6570a97aa9803b502b23cf27dc8be1da70
eb761fd69cf1fb9c674e385bb1d419814526ba5a
672
Bug Fix
false
The `simplifyCompound` function could be improved by replacing the manual loop with `std::ranges::find_if` for more idiomatic C++ code that clearly expresses the search intent through the priority array. This would enhance readability while maintaining the same functionality of selecting the highest priority single sub...
src/Mod/Part/App/PartFeature.cpp
right
1,337
1,342
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/21257
17e56f6570a97aa9803b502b23cf27dc8be1da70
eb761fd69cf1fb9c674e385bb1d419814526ba5a
672
Bug Fix
false
The current function signature placement of the options parameter as the fifth argument forces call sites to pass multiple consecutive nullptr arguments, obscuring parameter intent. Relocate the options parameter to the third position to improve readability and clarify call-site semantics.
src/Mod/Part/App/PartFeature.h
right
143
145
Maintainability and Readability
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/21257
17e56f6570a97aa9803b502b23cf27dc8be1da70
eb761fd69cf1fb9c674e385bb1d419814526ba5a
672
Bug Fix
false
The `options` parameter in `getShape` should use a strongly-typed enum (`GetShapeOptions`) instead of a raw `int` to enforce type safety and avoid magic values. This change replaces boolean flags with bitmask options but requires proper enumeration typing.
src/Mod/Part/App/PartFeature.h
right
145
145
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/21257
17e56f6570a97aa9803b502b23cf27dc8be1da70
eb761fd69cf1fb9c674e385bb1d419814526ba5a
672
Bug Fix
true
Minor: `if (subString.length() > 0)` can be simplified to `if (!subString.empty())` for clarity and avoids size_t/int comparisons.
src/Mod/Part/Gui/Mirroring.cpp
right
GPT-5.2
102
109
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/21257
17e56f6570a97aa9803b502b23cf27dc8be1da70
eb761fd69cf1fb9c674e385bb1d419814526ba5a
672
Bug Fix
true
Multiplying a boolean with an enum value `(Part::Feature::NeedSubElement * (!sub.empty()))` to conditionally set a flag relies on implicit conversion and can be less readable. Consider using a ternary operator for clarity: `(!sub.empty() ? Part::Feature::NeedSubElement : 0)` or `(!sub.empty() ? Part::Feature::NeedSubEl...
src/Mod/PartDesign/App/FeatureSketchBased.cpp
right
Gemini-3-Pro
217
223
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20612
79008331b30d098b2c32e59752e24e0705b350bc
ec3da2e93e3fd8f69f113ca14abf892dfb86c11b
80
Code Refactoring / Architectural Improvement
false
The function `isCosmeticVertex` should accept the string parameter by `const std::string&` instead of by value to prevent unnecessary string copying and enforce immutability of the input.
src/Mod/TechDraw/App/DrawViewPart.cpp
right
1,502
1,502
Performance
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20612
79008331b30d098b2c32e59752e24e0705b350bc
ec3da2e93e3fd8f69f113ca14abf892dfb86c11b
80
Code Refactoring / Architectural Improvement
false
The string parameter in `isCosmeticVertex` should be passed by const reference instead of by value to avoid unnecessary copying. Change `std::string element` to `const std::string& element` for better performance.
src/Mod/TechDraw/App/DrawViewPart.h
right
242
242
Performance
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20612
79008331b30d098b2c32e59752e24e0705b350bc
ec3da2e93e3fd8f69f113ca14abf892dfb86c11b
80
Code Refactoring / Architectural Improvement
false
The newly added member functions `isCosmeticVertex`, `isCosmeticEdge`, and `isCenterLine` are incorrectly declared as `static` with an unnecessary `owner` parameter; remove `static` and the `App::DocumentObject* owner` argument to correctly implement them as non-static member functions operating on the current instance...
src/Mod/TechDraw/App/DrawViewPart.h
right
242
245
Code Defect
Repo Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20336
16968aa3ee1bc7f2caf4ce592d13066aa8755a80
290bdc79d1ad92669431458a62205d694522586e
98
Bug Fix
true
Consider using smart pointers instead of raw pointers and manual delete operations. This would provide automatic memory management and exception safety.
src/Gui/WorkbenchManipulatorPython.cpp
right
Deepseek-V3.2
160
161
Code Defect
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20336
16968aa3ee1bc7f2caf4ce592d13066aa8755a80
290bdc79d1ad92669431458a62205d694522586e
98
Bug Fix
true
Consider using smart pointers instead of raw pointers and manual delete operations. This would provide automatic memory management and exception safety.
src/Gui/WorkbenchManipulatorPython.cpp
right
Deepseek-V3.2
321
322
Code Defect
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20336
16968aa3ee1bc7f2caf4ce592d13066aa8755a80
290bdc79d1ad92669431458a62205d694522586e
98
Bug Fix
true
The `edge_t` type (boost::adjacency_list edge descriptor) contains three members: `m_source`, `m_target`, and `m_eproperty`. Only `m_source` and `m_target` are initialized here, but `m_eproperty` is left uninitialized. This could lead to undefined behavior if the property is accessed. Consider using `{}` to zero-initia...
src/Mod/TechDraw/App/EdgeWalker.cpp
right
GLM-4.7
453
458
Code Defect
Repo Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20336
16968aa3ee1bc7f2caf4ce592d13066aa8755a80
290bdc79d1ad92669431458a62205d694522586e
98
Bug Fix
true
Constructor initializes only ed.m_source/ed.m_target via assignment in the body. Prefer a member-initializer list for correct/efficient initialization, and consider initializing the other WalkerEdge members (e.g., v1/v2/idx) here as well—otherwise they may remain indeterminate and later reads (e.g., dump(), weCompare()...
src/Mod/TechDraw/App/EdgeWalker.cpp
right
GPT-5.2
453
458
Code Defect
Repo Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20336
16968aa3ee1bc7f2caf4ce592d13066aa8755a80
290bdc79d1ad92669431458a62205d694522586e
98
Bug Fix
true
The edge_t member 'ed' is only partially initialized here. Consider ensuring all members of edge_t are properly initialized to prevent undefined behavior.
src/Mod/TechDraw/App/EdgeWalker.h
right
Qwen-Coder-480B
81
81
Code Defect
Repo Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20336
16968aa3ee1bc7f2caf4ce592d13066aa8755a80
290bdc79d1ad92669431458a62205d694522586e
98
Bug Fix
true
Consider declaring `maxEnumValue` as `const auto` since it's never modified after initialization. This improves const correctness and makes the intent clearer.
src/App/PropertyStandard.cpp
right
Claude-Code/Claude-4.5-Sonnet
604
604
Maintainability and Readability
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Copy constructor is defined but copy assignment operator is missing. This violates the rule of three/five. Consider adding a copy assignment operator for consistency.
src/Mod/Material/App/Library.cpp
right
Deepseek-V3.2
37
43
Code Defect
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Tuple elements should be extracted by const reference to avoid unnecessary copies. Use `const auto&` instead of `auto` to prevent copying QString objects, which can be expensive.
src/Mod/Material/App/ModelLibrary.cpp
right
Claude-Code/Claude-4.5-Sonnet
75
79
Performance
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
`models` is a shared pointer that could be null (e.g., if the library is not found or an error occurs). It is safer to check if `models` is valid before dereferencing it.
src/Mod/Material/App/ModelLibrary.cpp
right
Gemini-3-Pro
75
76
Code Defect
Repo Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
`path.split("/")` can generate empty segments for leading/trailing/double slashes and create empty folder nodes. Consider `Qt::SkipEmptyParts` (and/or normalizing separators) to keep the tree stable across different path formats/platforms. ```suggestion QStringList list = path.split(QStringLiteral("/"), Qt...
src/Mod/Material/App/ModelLibrary.cpp
right
GPT-5.2
83
83
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Design/RAII: `_modelPathMap` is only initialized in `ModelLibraryLocal` now. This is safe only if no `ModelLibrary` (non-local) method ever touches `_modelPathMap`. Consider moving `_modelPathMap` entirely into `ModelLibraryLocal` (as a direct member `std::map<...>` rather than `unique_ptr`) to avoid optional-pointer s...
src/Mod/Material/App/ModelLibrary.cpp
right
GPT-5.2
118
118
Code Defect
Repo Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
New member `_local` is introduced but there is no in-class initializer here. If any constructor forgets to initialize it, `isLocal()` may read an indeterminate value. Prefer an in-class default (e.g. `false`) or ensure all constructors set it explicitly. ```suggestion private: bool _local{false}; ```
src/Mod/Material/App/ModelLibrary.h
right
GPT-5.2
69
70
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
The header file (ModelLoader.h) declares `getModelFromPath` with parameter type `std::shared_ptr<ModelLibrary>`, but the implementation uses `std::static_pointer_cast<ModelLibraryLocal>` to cast it. This is inconsistent and unsafe - if a non-local ModelLibrary is passed, the static_cast will result in undefined behavio...
src/Mod/Material/App/ModelLoader.cpp
right
GLM-4.7
124
125
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
`model->getLibrary()` is dereferenced before storing into `library` and without a null-check. Also `getLibrary()` is called twice. Prefer fetching once and validating pointer before calling `isLocal()`. This avoids a potential crash and keeps the code simpler. ```suggestion auto yamlModel = model->getModel(); ...
src/Mod/Material/App/ModelLoader.cpp
right
GPT-5.2
231
235
Code Defect
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
**Potential unsafe string comparison** The code uses `strcmp(Reason, "UseExternal")` to compare the Reason parameter. Issues: 1. If `Reason` is not null-terminated or is a nullptr, this will crash 2. The type `ParameterGrp::MessageType` needs to be verified as a safe C-string **Suggested fix:** Add a null check befo...
src/Mod/Material/App/ModelManager.cpp
right
Claude-Code/Claude-4.5-Sonnet
97
97
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Loop variable 'libEntry' causes unnecessary copy of map entry. Use 'const auto&' to iterate efficiently over map entries.
src/Mod/Material/App/ModelManager.cpp
right
Qwen-Coder-480B
149
151
Performance
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
The `createLibrary` function unconditionally calls `_externalManager->createLibrary` when `BUILD_MATERIAL_EXTERNAL` is defined, ignoring the `_useExternal` flag. If `_useExternal` is false, the created library will be created externally but will not be visible in `getLibraries` (which filters based on `_useExternal`), ...
src/Mod/Material/App/ModelManager.cpp
right
Gemini-3-Pro
161
166
Code Defect
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
false
The `isLocalLibrary` function incorrectly assumes absence from the external manager implies local existence without verifying the library actually exists in the local manager, potentially misclassifying non-existent libraries as local. This logic fails to distinguish between libraries that are genuinely local versus th...
src/Mod/Material/App/ModelManager.cpp
right
226
237
Code Defect
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
The loop variable 'entry' should be a const reference to avoid unnecessary copies: 'const auto& entry'. Since externalLibraries is a shared_ptr to a vector of shared_ptr, copying each entry is inefficient. The Library class has a copy constructor, but using const reference is more efficient and idiomatic. ```suggestio...
src/Mod/Material/App/ModelManagerExternal.cpp
right
GLM-4.7
79
80
Performance
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Pass parameter by const reference to avoid unnecessary copying, especially for QString which can be expensive to copy.
src/Mod/Material/App/ModelManagerExternal.cpp
right
Qwen-Coder-480B
126
126
Performance
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Potential null dereference: `model` is a shared_ptr parameter but used without a null check. If callers pass nullptr, this will crash. Add a guard (`if (!model) throw ...;`) or document/ASSERT the non-null contract.
src/Mod/Material/App/ModelManagerExternal.cpp
right
GPT-5.2
157
158
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
false
Explicit copy constructor is redundant; rely on the compiler-generated default as all member types support trivial copying.
src/Mod/Material/App/Library.cpp
right
37
43
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Commenting out parameter names reduces code clarity. Consider using [[maybe_unused]] attribute or removing unused parameters entirely.
src/Mod/Material/App/MaterialManager.cpp
right
Deepseek-V3.2
205
205
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Commenting out parameter names reduces code clarity. Consider using [[maybe_unused]] attribute or removing unused parameters entirely.
src/Mod/Material/App/MaterialManager.cpp
right
Deepseek-V3.2
247
247
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Loop variable should be `const auto&` instead of `auto&` since it's only being read and not modified. This improves const correctness and makes the intent clearer.
src/Mod/Material/App/ModelLibrary.cpp
right
Claude-Code/Claude-4.5-Sonnet
87
87
Maintainability and Readability
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
false
Member variable `_modelPathMap` is initialized in `ModelLibraryLocal` constructor rather than at declaration; consider moving initialization to header file for cleaner class definition.
src/Mod/Material/App/ModelLibrary.cpp
right
118
118
Maintainability and Readability
Repo Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Exception should be caught by const reference (`const std::out_of_range&`) instead of non-const reference. This follows C++ best practices for exception handling and prevents unnecessary copying.
src/Mod/Material/App/ModelLibrary.cpp
right
Claude-Code/Claude-4.5-Sonnet
146
148
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Copy is deleted in `ModelLibrary`, but there is no explicit move policy. If this type needs to be stored in containers or returned by value, consider explicitly defaulting move ctor/assignment or deleting them intentionally for clarity (Rule of 5). Also, adding `ModelLibrary(const Library& other)` suggests slicing/copy...
src/Mod/Material/App/ModelLibrary.h
right
GPT-5.2
49
54
Maintainability and Readability
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
false
Changing the constructor parameter from base class `ModelLibrary` to derived class `ModelLibraryLocal` unnecessarily restricts functionality to local libraries, breaking polymorphism and potential compatibility with other library implementations.
src/Mod/Material/App/ModelLoader.cpp
right
42
42
Maintainability and Readability
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Commented out code suggests unfinished implementation. If this refresh call is needed, uncomment it; otherwise remove the comment to avoid confusion.
src/Mod/Material/App/ModelManager.cpp
right
Deepseek-V3.2
100
100
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Getter-style method does not modify object state and should likely be declared const to allow invocation on const instances.
src/Mod/Material/App/ModelManager.cpp
right
Qwen-Coder-480B
168
168
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Consider using `const auto&` instead of `auto&` since the elements are not being modified. This improves const correctness and makes the read-only intent clear.
src/Mod/Material/App/ModelManager.cpp
right
Claude-Code/Claude-4.5-Sonnet
259
262
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
false
Replace the `std::tuple<QString, QString, QString>` with a struct to encapsulate model data (uuid, path, name) and implement a `toString()` method, eliminating duplicated logging code in `migrateToExternal` and `validateMigration`.
src/Mod/Material/App/ModelManager.cpp
right
344
350
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
The cleanup() function is empty but declared in the header. If cleanup functionality is not needed, consider removing the function from both the header and implementation. If it's a placeholder for future functionality, add a comment explaining its intended purpose. ```suggestion void ModelManagerExternal::cleanup() {...
src/Mod/Material/App/ModelManagerExternal.cpp
right
GLM-4.7
59
61
Maintainability and Readability
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
The modelHitRate() member function does not modify any member variables and should be marked as const. This allows it to be called on const instances of ModelManagerExternal and better expresses the function's intent.
src/Mod/Material/App/ModelManagerExternal.cpp
right
GLM-4.7
180
182
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20825
01241245a1d92a8db69fab0db4c2053b5e1227c1
870d7f5385af5d377994479ce6ad017465bdad3d
776
New Feature Additions
true
Directly changing the container type suggests a design issue. Prefer polymorphism through base class pointers instead of concrete derived class containers.
src/Mod/Material/App/ModelManagerLocal.cpp
right
Qwen-Coder-480B
56
56
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19977
b59cd794274c8c007b2ef16c3a06fecf30c0aef1
39c5968bdc6c0b20d94d4a629cd43eafee1e56d0
306
Code Style, Linting, Formatting Fixes
false
The lambda parameter `str` is unnecessarily defined as `std::string` when it could use string literals directly, creating redundant string conversions. While string concatenation requires one string type, the implementation should optimize for minimal object creation by using C-style strings where possible.
src/App/Application.cpp
right
402
402
Performance
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19977
b59cd794274c8c007b2ef16c3a06fecf30c0aef1
39c5968bdc6c0b20d94d4a629cd43eafee1e56d0
306
Code Style, Linting, Formatting Fixes
true
Potential namespace/qualification regression: the old code assigned to `Base::PyExc_*` globals, but the new code assigns to unqualified `PyExc_FC_*`. If these variables live in `Base::` (as before), this will either fail to compile or silently assign different symbols (if there are similarly named globals in another na...
src/App/Application.cpp
right
GPT-5.2
409
411
Code Defect
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19977
b59cd794274c8c007b2ef16c3a06fecf30c0aef1
39c5968bdc6c0b20d94d4a629cd43eafee1e56d0
306
Code Style, Linting, Formatting Fixes
true
According to the RAII principle and smart pointer usage guidelines, this code uses manual `new` and `delete` to manage dynamic memory. If `realpath` throws an exception or if there's another code path that exits the scope before `delete [] buf`, it would cause a memory leak. Consider using `std::unique_ptr<char[]>` to ...
src/App/Application.cpp
right
GLM-4.7
3,488
3,491
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19977
b59cd794274c8c007b2ef16c3a06fecf30c0aef1
39c5968bdc6c0b20d94d4a629cd43eafee1e56d0
306
Code Style, Linting, Formatting Fixes
true
The init-capture `str {"Base."}` creates a non-const copy of the string. Since this value is never modified within the lambda, it should be marked as `const` for better const correctness. Change `str {"Base."}` to `const str {"Base."}` or use a more explicit syntax.
src/App/Application.cpp
right
GLM-4.7
402
402
Maintainability and Readability
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19977
b59cd794274c8c007b2ef16c3a06fecf30c0aef1
39c5968bdc6c0b20d94d4a629cd43eafee1e56d0
306
Code Style, Linting, Formatting Fixes
false
Replace the manual null or empty string check `if(!path || path[0] == '\0')` with the existing `isNullOrEmpty()` helper function for consistency and readability.
src/App/Application.cpp
right
681
681
Maintainability and Readability
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20156
382720b82e4c6c81f7e1cdd3a33272047d7a3642
699b45c086f53858897aa8c688bbedaf570c644f
56
Code Style, Linting, Formatting Fixes
true
Format specifier mismatch: `size` and `result` are `DWORD` (unsigned 32-bit), but `%ld` is for `long` (signed). Use `%lu` for unsigned types to avoid potential undefined behavior with large values. Same issue applies to other DWORD variables throughout the file. ```suggestion "%s:%s (%p), size: %lu...
src/Base/StackWalker.cpp
right
GLM-4.7
1,473
1,473
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20156
382720b82e4c6c81f7e1cdd3a33272047d7a3642
699b45c086f53858897aa8c688bbedaf570c644f
56
Code Style, Linting, Formatting Fixes
true
Format specifier mismatch: `ver.dwMajorVersion`, `ver.dwMinorVersion`, `ver.dwBuildNumber` are `DWORD` (unsigned), but `%ld` is for signed `long`. Use `%lu` for unsigned types. ```suggestion "OS-Version: %lu.%lu.%lu (%s) 0x%x-0x%x\n", ```
src/Base/StackWalker.cpp
right
GLM-4.7
1,609
1,609
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20156
382720b82e4c6c81f7e1cdd3a33272047d7a3642
699b45c086f53858897aa8c688bbedaf570c644f
56
Code Style, Linting, Formatting Fixes
true
`std::roundf` already takes a floating-point argument; casting `value` to `float` is fine but consider whether the intent is to avoid `long`->`float` narrowing for large `value` (precision loss). If exact percent conversion is required for large integers, prefer doing the division in integer/long double domain (e.g., `...
src/Base/Tools.h
right
GPT-5.2
148
148
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20156
382720b82e4c6c81f7e1cdd3a33272047d7a3642
699b45c086f53858897aa8c688bbedaf570c644f
56
Code Style, Linting, Formatting Fixes
true
The 'f' suffix is unnecessary here. QColor::setAlphaF() expects a qreal parameter (typically double on most platforms). Using '0.15f' (float literal) instead of '0.15' (double literal) introduces an unnecessary implicit conversion from float to double. The original code without the 'f' suffix was more appropriate.
src/Gui/DAGView/DAGRectItem.cpp
right
Claude-Code/Claude-4.5-Sonnet
67
67
Performance
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20156
382720b82e4c6c81f7e1cdd3a33272047d7a3642
699b45c086f53858897aa8c688bbedaf570c644f
56
Code Style, Linting, Formatting Fixes
true
For consistency and to fully benefit from float arithmetic, consider using float literal `2.0f` instead of double literal `2.0`. The current code still performs double arithmetic (2.0 * float) before adding to the float variable.
src/Gui/SoDatumLabel.cpp
right
Claude-Code/Claude-4.5-Sonnet
84
84
Performance
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20156
382720b82e4c6c81f7e1cdd3a33272047d7a3642
699b45c086f53858897aa8c688bbedaf570c644f
56
Code Style, Linting, Formatting Fixes
true
For consistency and to fully benefit from float arithmetic, consider using float literal `2.0f` instead of double literal `2.`. The current code still performs double arithmetic (2. * float) before adding to the float variable.
src/Gui/SoDatumLabel.cpp
right
Claude-Code/Claude-4.5-Sonnet
552
552
Performance
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20156
382720b82e4c6c81f7e1cdd3a33272047d7a3642
699b45c086f53858897aa8c688bbedaf570c644f
56
Code Style, Linting, Formatting Fixes
false
The `NumSymTypes` case in the symbol type switch should implement `assert(false && "Unreachable")` to explicitly enforce unreachable semantics and facilitate future C++23 migration to `std::unreachable()`.
src/Base/StackWalker.cpp
right
813
813
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20156
382720b82e4c6c81f7e1cdd3a33272047d7a3642
699b45c086f53858897aa8c688bbedaf570c644f
56
Code Style, Linting, Formatting Fixes
true
Format specifier mismatch: `v1`, `v2`, `v3`, `v4` are `DWORD` (unsigned), but `%ld` is for signed `long`. Use `%lu` for unsigned types.
src/Base/StackWalker.cpp
right
GLM-4.7
1,490
1,490
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20156
382720b82e4c6c81f7e1cdd3a33272047d7a3642
699b45c086f53858897aa8c688bbedaf570c644f
56
Code Style, Linting, Formatting Fixes
true
Format specifier mismatch: `entry.lineNumber` is `DWORD` (unsigned), but `%ld` is for signed `long`. Use `%lu` for unsigned types.
src/Base/StackWalker.cpp
right
GLM-4.7
1,540
1,540
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20156
382720b82e4c6c81f7e1cdd3a33272047d7a3642
699b45c086f53858897aa8c688bbedaf570c644f
56
Code Style, Linting, Formatting Fixes
true
Format specifier mismatch: `gle` is `DWORD` (unsigned), but `%ld` is for signed `long`. Use `%lu` for unsigned types. ```suggestion "ERROR: %s, GetLastError: %lu (Address: %p)\n", ```
src/Base/StackWalker.cpp
right
GLM-4.7
1,559
1,559
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20156
382720b82e4c6c81f7e1cdd3a33272047d7a3642
699b45c086f53858897aa8c688bbedaf570c644f
56
Code Style, Linting, Formatting Fixes
true
Format specifier mismatch: `symOptions` is `DWORD` (unsigned), but `%ld` is for signed `long`. Use `%lu` for unsigned types. ```suggestion "SymInit: Symbol-SearchPath: '%s', symOptions: %lu, UserName: '%s'\n", ```
src/Base/StackWalker.cpp
right
GLM-4.7
1,576
1,576
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20156
382720b82e4c6c81f7e1cdd3a33272047d7a3642
699b45c086f53858897aa8c688bbedaf570c644f
56
Code Style, Linting, Formatting Fixes
true
Logic issue: Using std::roundf on an integer value (after casting to float) is redundant. Since 'value' is already a 'long' (integer type), it doesn't need rounding. The std::roundf call serves no purpose here and should be removed.
src/Base/Tools.h
right
Claude-Code/Claude-4.5-Sonnet
148
148
Maintainability and Readability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/20156
382720b82e4c6c81f7e1cdd3a33272047d7a3642
699b45c086f53858897aa8c688bbedaf570c644f
56
Code Style, Linting, Formatting Fixes
true
The variable `nearClippingPlane` is initialized but never modified. Consider marking it as `const` to improve const correctness and make the intent clearer.
src/Gui/View3DInventor.cpp
right
Claude-Code/Claude-4.5-Sonnet
794
794
Maintainability and Readability
File Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
true
Potential resource leak: If FemVTKTools::frdToVTK() throws an exception (e.g., Base::FileException when file is not readable), the memory allocated by PyArg_ParseTuple for 'filename' will not be freed because PyMem_Free(filename) is after the function call. This violates the RAII principle. Consider using RAII wrapper ...
src/Mod/Fem/App/AppFemPy.cpp
right
GLM-4.7
259
265
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
false
The code unnecessarily converts the filename from a C-string to `std::string` and immediately back to a C-string for the `frdToVTK` call; use the original `filename` pointer directly after validation.
src/Mod/Fem/App/AppFemPy.cpp
right
262
265
Performance
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
true
Consider using std::array or constexpr functions for these mappings if the keys are dense integers, as it could provide better performance than std::map.
src/Mod/Fem/App/FemVTKTools.cpp
right
Qwen-Coder-480B
1,040
1,053
Performance
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
true
Potential buffer overflow risk: Creating `string_view` with fixed `digits` length without checking if enough characters remain. If the input line is shorter than expected, this could access invalid memory. Consider adding bounds checking.
src/Mod/Fem/App/FemVTKTools.cpp
right
GLM-4.7
1,091
1,096
Security Vulnerability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
true
These functions don't handle conversion errors. std::strtol and std::strtof can fail silently. Consider checking errno or the end pointer to validate successful conversion.
src/Mod/Fem/App/FemVTKTools.cpp
right
Qwen-Coder-480B
1,091
1,102
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
true
`valueFromLine` uses `std::string_view::iterator` and then builds a view via `std::string_view sub(&*it, digits);`. This relies on contiguous storage and that `it` points into a `std::string`-backed view; it’s also unsafe if fewer than `digits` characters remain (can read past end). Prefer a signature like `(std::strin...
src/Mod/Fem/App/FemVTKTools.cpp
right
GPT-5.2
1,091
1,102
Security Vulnerability
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
true
Bug: Using `std::strtof` for double conversion will lose precision. Should use `std::strtod` instead. `strtof` converts to float (32-bit), while the function is supposed to handle double (64-bit) values.
src/Mod/Fem/App/FemVTKTools.cpp
right
Claude-Code/Claude-4.5-Sonnet
1,098
1,102
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
true
Consider using std::make_unique or std::make_shared for creating smart pointers instead of New() method for better resource management and exception safety.
src/Mod/Fem/App/FemVTKTools.cpp
right
Qwen-Coder-480B
1,108
1,108
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
true
Accessing mapCcxToVtk[type] multiple times in the loop is inefficient. Consider caching the reference to the vector outside the loop.
src/Mod/Fem/App/FemVTKTools.cpp
right
Qwen-Coder-480B
1,110
1,113
Performance
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
true
`fillCell` has no `default` case. Unknown/unsupported CalculiX element types will be silently ignored, but the surrounding logic may still advance `elemID` and/or keep stale `topoElem` contents in some scenarios. Suggestion: add a `default:` that logs a warning and clears `topoElem` (or rejects the element) to avoid p...
src/Mod/Fem/App/FemVTKTools.cpp
right
GPT-5.2
1,123
1,172
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
true
The `lines` parameter is passed by value (std::string) but is only read from. This causes an unnecessary copy. Consider passing by const reference: `const std::string& lines`
src/Mod/Fem/App/FemVTKTools.cpp
right
GLM-4.7
1,214
1,215
Performance
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
true
The condition checking topoElem.size() against mapCcxTypeNodes[info[0]] could lead to undefined behavior if info[0] is not a valid key in the map. Consider using map::at() or checking if the key exists before accessing.
src/Mod/Fem/App/FemVTKTools.cpp
right
Qwen-Coder-480B
1,311
1,312
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
true
The `dataSetName` variable is extracted but not validated. Consider adding validation to ensure the name is not empty or contains only whitespace before using it to set the array name.
src/Mod/Fem/App/FemVTKTools.cpp
right
GLM-4.7
1,371
1,373
Code Defect
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
true
Potential performance issue: using std::find in inner loop with O(n) complexity
src/Mod/Fem/App/FemVTKTools.cpp
right
Deepseek-V3.2
1,470
1,470
Performance
Diff Level
1
C++
https://github.com/FreeCAD/FreeCAD/pull/19426
f001b8a10ac2206458f7db457a45c9b2853e7bff
e59692501d1a08e7306189fed5c31b02553f7746
725
New Feature Additions
true
In the `code2` branch, `countScaPos` is not incremented while consuming the additional values. This makes scalar/vector classification wrong for multi-line node records (values from continuation lines will all be treated as the same position), leading to mis-populated arrays. Fix: increment `countScaPos` as you iterat...
src/Mod/Fem/App/FemVTKTools.cpp
right
GPT-5.2
1,484
1,497
Code Defect
File Level
1
End of preview. Expand in Data Studio

Dataset for Running AACR-Bench

English | 简体中文

This is a test set designed for automated code review reflection models, primarily aiming to evaluate the extent to which a model can intercept low-quality review comments. The v1 version of the dataset contains 2,145 code review comments, consisting of 1,505 expert-verified correct comments and 640 incorrect comments. The v2 version is a positive-only subset of v1, retaining a selection of v1's high-value review comments: 151 pull requests and 944 review comments.

This data is part of the AACR-Bench project and is provided by the Alibaba Aone team.

Repositories

  • GitHub: alibaba/aacr-bench — evaluation code and dataset JSON.
  • Hugging Face datasets: this repository — dataset files for each version under data/v*/.
  • Hugging Face snapshots: Alibaba-Aone/aacr-bench-repos — source repository snapshots for all AACR-Bench dataset versions.

Data Sample

Each sample in the dataset contains the following fields:

{
    "project_main_language": "Main programing language of the project",
    "pr_url": "Github URL of the pull request",
    "pr_source_commit": "Source commit of PR",
    "pr_target_commit": "Commit of the selected revision in the PR",
    "pr_change_line_count": "Total change line count of the PR",
    "pr_category": "Category of the PR's problem domain",
    "is_ai_comment": "Whether the review comment is from an AI model",
    "note": "Content of the review comment",
    "path": "Path of the reviewed file",
    "side": "Whether the review comment is from the left or right side of the diff",
    "source_model": "The AI model that produced the review comment, empty if the comment is from human",
    "from_line": "Start line no of the reviewed code",
    "to_line": "End line no of the reviewed code",
    "category": "Issue type the review comment points out",
    "context": "The context level that the review comment demands",
    "label": "Whether the review comment is correct or not, 1 for correct and 0 for incorrect"
}

Citation

If you use this dataset in your research, please cite our paper:

@misc{zhang2026aacrbenchevaluatingautomaticcode,
      title={AACR-Bench: Evaluating Automatic Code Review with Holistic Repository-Level Context}, 
      author={Lei Zhang and Yongda Yu and Minghui Yu and Xinxin Guo and Zhengqi Zhuang and Guoping Rong and Dong Shao and Haifeng Shen and Hongyu Kuang and Zhengfeng Li and Boge Wang and Guoan Zhang and Bangyu Xiang and Xiaobin Xu},
      year={2026},
      eprint={2601.19494},
      archivePrefix={arXiv},
      primaryClass={cs.SE},
      url={https://arxiv.org/abs/2601.19494}, 
}
Downloads last month
604

Paper for Alibaba-Aone/aacr-bench