code: private static UserPreferences readUserPreferences(IProject project) throws CoreException {
          IFile userPrefsFile = getUserPreferencesFile(project);
          if (!userPrefsFile.exists()) {
              return null;
          }
          try {
              // force is preventing us for out-of-sync exception if file was
              // changed externally
              InputStream in = userPrefsFile.getContents(true);
              UserPreferences userPrefs = FindBugsPreferenceInitializer.createDefaultUserPreferences();
              userPrefs.read(in);
              return userPrefs;
          } catch (IOException e) {
              FindbugsPlugin.getDefault().logException(e, "Could not read user preferences for project");
              return null;
          }
      }
docs: Read UserPreferences for project from the file in the project directory.
  Returns null if the preferences have not been saved to a file, or if
  there is an error reading the preferences file.
  
  @param project
  the project to get the UserPreferences for
  @return the UserPreferences, or null if the UserPreferences file could
  not be read
  @throws CoreException