Where do I find the results for Code Clone in Polyspace Bug Finder in MATLAB 2023b?

1 次查看(过去 30 天)
I installed Polyspace 2023b as it was said to support Duplicated Code and Partially duplicated code detection by running Bug Finder.
But once the analysis is completed, I don't see a result pane. Where is it available?

回答(1 个)

Ruchika Parag
Ruchika Parag 2025-7-9
Hi @Ridhi, when you run a Polyspace Bug Finder analysis in R2023b that includes duplicate-code detection, the results aren't shown in the usual Bug Viewer pane. Instead, they appear in a separate “Code Clone” section within the analysis report.
Here’s how you can view them:
  1. Open the Polyspace Bug Finder Results Browser (this is usually shown after analysis completes, or can be launched via the toolbar).
  2. Look for a “Code Clone” or “Duplicate Code” tab or section alongside other result categories (such as “Alarms” or “No Early Return”).
  3. Click that tab to see all the instances of fully duplicated and partially duplicated code—Polyspace groups similarities by mirrored code blocks.
The key point is: the duplicate-code findings are not mixed into the usual bug or alarm list; they are accessed via a separate tab in the Bug Finder report viewer.
If you do not see the Code Clone tab:
  • Ensure that in your analysis “Duplicate code detection” was enabled.
  • In case you still can’t find it, reopen the report using:
spres = ps.report.open('your_analysis_report.psr');
and then search the report object for code clone findings:
clones = spres.find('Category','CodeClone');
Hope this helps!

产品


版本

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by