Bug 145594 Typo in javadoc: ResourceSelectionDialog.java
In the Javadoc for org.eclipse.ui.dialogs.ResourceSelectionDialog, the example says: dialog.setInitialSelections(selectedResources)); note the extra ')'. I noticed when trying to paste this example into my own code.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ResourceSelectionDialog.java
return new WorkbenchContentProvider() {
            public Object[] getChildren(Object o) {
                if (o instanceof IContainer) {
                    IResource[] members = null;
                    try {
                        members = ((IContainer) o).members();
                    } catch (CoreException e) {
                        
                        return new Object[0];
                    }
                    
                    ArrayList results = new ArrayList();
                    for (int i = 0; i < members.length; i++) {
                        
                        if ((members[i].getType() & resourceType) > 0) {
                            results.add(members[i]);
                        }
                    }
                    return results.toArray();
                }
                
                if (o instanceof ArrayList) {
                    return ((ArrayList) o).toArray();
                } 
                return new Object[0];
            }
        };
    }
    /**
     * Initializes this dialog's controls.