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
I am trying to use SmellDetectionCaller in order to identify design smells from exclusively from source code files in Java projects.
I have forked SmellDetectionCaller repository and analyze projects through SmellDetectionHelper.analyseCodeLevelModelFromJavaSourceFilesEclipse()
However, code smells with inherited-related symptoms, e.g. BaseClassKnowsDerivedClass are not detected at all. For instance, the smell should have been detected in class DefaultAxisEditor
I traced SmellDetectionCaller execution and realized that some metrics (e.g. NOC, DIT) are not properly calculated, e.g. when metric calculation is invoked in sad.codesmell.detection.repository.BaseClassKnowsDerivedClass.HasChildrenDetection
public void detect(final IAbstractLevelModel anAbstractLevelModel) {
final Set classesHasChildren = new HashSet();
final Iterator iter = anAbstractLevelModel.getIteratorOnTopLevelEntities();
while (iter.hasNext()) {
final IEntity entity = (IEntity) iter.next();
if (entity instanceof IClass) {
final IClass aClass = (IClass) entity;
final double NOC = ((IUnaryMetric) MetricsRepository.getInstance()
.getMetric("NOC")).compute(anAbstractLevelModel, aClass);
// ...
For instance NOC for DefaultAxisEditor is 0, while it should have been 2.
Hello to all, thanks for sharing ptidej tools!
I am trying to use SmellDetectionCaller in order to identify design smells from exclusively from source code files in Java projects.
I have forked SmellDetectionCaller repository and analyze projects through
SmellDetectionHelper.analyseCodeLevelModelFromJavaSourceFilesEclipse()
However, code smells with inherited-related symptoms, e.g. BaseClassKnowsDerivedClass are not detected at all. For instance, the smell should have been detected in class DefaultAxisEditor
I traced SmellDetectionCaller execution and realized that some metrics (e.g. NOC, DIT) are not properly calculated, e.g. when metric calculation is invoked in
sad.codesmell.detection.repository.BaseClassKnowsDerivedClass.HasChildrenDetection
For instance NOC for DefaultAxisEditor is 0, while it should have been 2.
Is this a ICodeLevelModel configuration issue related to SmellDetectionHelper.analyseCodeLevelModelFromJavaSourceFilesEclipse or SmellDetectionHelper.analyseCodeLevelModel ?
Thank you in advance
Vassilis Zafeiris
The text was updated successfully, but these errors were encountered: