Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341175 - Address FindBugs issues in debug.core and debug.ui
Summary: Address FindBugs issues in debug.core and debug.ui
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: John Cortell CLA
QA Contact: Ken Ryall CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-28 19:10 EDT by John Cortell CLA
Modified: 2011-05-19 20:41 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Cortell CLA 2011-03-28 19:10:06 EDT
The FindBugs EclipseCON talk pointed out some embarrassing bugs in shipped production code of some well known and heavily used technologies. I decided to try running it on two CDT debug projects and, sure enough, a few nasty things turned up. Most of the flagged items were inefficiencies, but there were several more serious ones--things that would for sure throw an exception if the code was exercised.

This was just a trial-run. Hopefully this will inspire other committers to try FindBugs on the plugins they work with.
Comment 1 CDT Genie CLA 2011-03-28 19:23:03 EDT
*** cdt cvs genie on behalf of jcortell ***
Bug 341175 - Address FindBugs issues in debug.core and debug.ui

[*] CValue.java 1.84 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java?root=Tools_Project&r1=1.83&r2=1.84
[*] CDebugElement.java 1.36 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java?root=Tools_Project&r1=1.35&r2=1.36
[*] CModule.java 1.17 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModule.java?root=Tools_Project&r1=1.16&r2=1.17
[*] DisassemblyInstruction.java 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyInstruction.java?root=Tools_Project&r1=1.1&r2=1.2
[*] CDebugTarget.java 1.239 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java?root=Tools_Project&r1=1.238&r2=1.239
[*] CType.java 1.8 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CType.java?root=Tools_Project&r1=1.7&r2=1.8

[*] CGlobalVariableManager.java 1.12 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CGlobalVariableManager.java?root=Tools_Project&r1=1.11&r2=1.12
[*] CBreakpointManager.java 1.101 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java?root=Tools_Project&r1=1.100&r2=1.101

[*] CSourceLookupDirector.java 1.23 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java?root=Tools_Project&r1=1.22&r2=1.23

[*] BreakpointActionManager.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/BreakpointActionManager.java?root=Tools_Project&r1=1.5&r2=1.6

[*] SelectionButtonDialogFieldGroup.java 1.8 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogfields/SelectionButtonDialogFieldGroup.java?root=Tools_Project&r1=1.7&r2=1.8

[*] SoundAction.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/SoundAction.java?root=Tools_Project&r1=1.5&r2=1.6
[*] ExternalToolActionComposite.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ExternalToolActionComposite.java?root=Tools_Project&r1=1.2&r2=1.3
[*] SoundActionPage.java 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/SoundActionPage.java?root=Tools_Project&r1=1.1&r2=1.2
[*] LogAction.java 1.5 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/LogAction.java?root=Tools_Project&r1=1.4&r2=1.5
[*] ExternalToolAction.java 1.5 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ExternalToolAction.java?root=Tools_Project&r1=1.4&r2=1.5
[*] ResumeAction.java 1.5 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ResumeAction.java?root=Tools_Project&r1=1.4&r2=1.5

[*] ModuleProperties.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/propertypages/ModuleProperties.java?root=Tools_Project&r1=1.3&r2=1.4

[*] CDebugModelPresentation.java 1.40 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java?root=Tools_Project&r1=1.39&r2=1.40

[*] DisassemblyDisplayModeHandler.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/commands/DisassemblyDisplayModeHandler.java?root=Tools_Project&r1=1.3&r2=1.4

[*] BaseViewer.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/BaseViewer.java?root=Tools_Project&r1=1.3&r2=1.4

[*] AddMemoryBlockDialog.java 1.8 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlockDialog.java?root=Tools_Project&r1=1.7&r2=1.8

[*] CDebugPreferencePage.java 1.34 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java?root=Tools_Project&r1=1.33&r2=1.34

[*] AddWatchpointDialog.java 1.15 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddWatchpointDialog.java?root=Tools_Project&r1=1.14&r2=1.15

[*] ViewIDCounterManager.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/ViewIDCounterManager.java?root=Tools_Project&r1=1.2&r2=1.3

[*] AbstractImportExecutableWizard.java 1.10 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/AbstractImportExecutableWizard.java?root=Tools_Project&r1=1.9&r2=1.10
Comment 2 Marc Khouzam CLA 2011-03-29 11:16:22 EDT
(In reply to comment #0)
> The FindBugs EclipseCON talk pointed out some embarrassing bugs in shipped
> production code of some well known and heavily used technologies.

Apparently, DSF-GDB was cited in an unflattering fashion in that respect :-O

I'll try to find time to run in on the DSF/DSF-GDB plugins.
Comment 3 Pawel Piech CLA 2011-03-29 11:41:19 EDT
(In reply to comment #2)
> Apparently, DSF-GDB was cited in an unflattering fashion in that respect :-O

O say it ain't so! and please try not to hurt my ego ;-)
Comment 4 John Cortell CLA 2011-03-29 11:58:46 EDT
(In reply to comment #3)
> O say it ain't so! and please try not to hurt my ego ;-)

The guy who wrote "Effective Java" was reported to have coded a programming gotchya that he warns about in his book! Apparently, someone ran FindBugs on code he had written. So, I think it's safe to say everyone makes coding mistakes. Thankfully there are tools that help catch some of the more obvious/detectable ones.
Comment 5 John Cortell CLA 2011-04-14 10:12:06 EDT
Fixed