CloneSet205


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
47210.992class_body_declarations[9]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
16141
E:/TSE/Projects-CloneDR/sql12/plugins/dataimport/src/net/sourceforge/squirrel_sql/plugins/dataimport/prefs/PreferencesManager.java
24738
E:/TSE/Projects-CloneDR/sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/prefs/PreferencesManager.java
Next
Last
Clone Instance
1
Line Count
61
Source Line
41
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/dataimport/src/net/sourceforge/squirrel_sql/plugins/dataimport/prefs/PreferencesManager.java

/** Logger for this class. */
private final static ILogger s_log = LoggerController.createLogger(PreferencesManager.class );

/** Name of preferences file. */
private static final String USER_PREFS_FILE_NAME = "prefs.xml";

/** Folder to store user settings in. */
private static File _userSettingsFolder;

private static DataImportPreferenceBean _prefs = null;

private static IPlugin plugin = null;

/**
 * Initializes the PreferencesManager
 * 
 * @param thePlugin
 * @throws PluginException
 */
public static void initialize(IPlugin thePlugin) throws PluginException {
  plugin = thePlugin;
  // Folder to store user settings.
  try {
    _userSettingsFolder = plugin.getPluginUserSettingsFolder();
  }
  catch (IOException
         ex) {
    throw new PluginException(ex);
  }
  loadPrefs();
}

/**
 * Returns the preferences holder
 * 
 * @return The bean holding the preferences for the dataimport plugin.
 */
public static DataImportPreferenceBean getPreferences() {
  return _prefs;
}

/**
 * Saves the preferences.
 */
public static void unload() {
  savePrefs();
}

/**
 * Save preferences to disk.  Always write to the user settings folder, not
 * the application settings folder.
 */
public static void savePrefs() {
  try {
    XMLBeanWriter wtr = new XMLBeanWriter(_prefs);
    wtr.save(new File(_userSettingsFolder, USER_PREFS_FILE_NAME));
  }
  catch (Exception
         ex) {
    s_log.error("Error occured writing to preferences file: " + USER_PREFS_FILE_NAME, ex);
  }
}


First
Previous
Clone Instance
2
Line Count
47
Source Line
38
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/prefs/PreferencesManager.java

/** Logger for this class. */
private final static ILogger s_log = LoggerController.createLogger(PreferencesManager.class );

/** Name of preferences file. */
private static final String USER_PREFS_FILE_NAME = "prefs.xml";

/** Folder to store user settings in. */
private static File _userSettingsFolder;

private static DBCopyPreferenceBean _prefs = null;

private static IPlugin plugin = null;

public static void initialize(IPlugin thePlugin) throws PluginException {
  plugin = thePlugin;
  // Folder to store user settings.
  try {
    _userSettingsFolder = plugin.getPluginUserSettingsFolder();
  }
  catch (IOException
         ex) {
    throw new PluginException(ex);
  }
  loadPrefs();
}

public static DBCopyPreferenceBean getPreferences() {
  return _prefs;
}

public static void unload() {
  savePrefs();
}

/**
 * Save preferences to disk.  Always write to the user settings folder, not
 * the application settings folder.
 */
public static void savePrefs() {
  try {
    XMLBeanWriter wtr = new XMLBeanWriter(_prefs);
    wtr.save(new File(_userSettingsFolder, USER_PREFS_FILE_NAME));
  }
  catch (Exception
         ex) {
    s_log.error("Error occured writing to preferences file: " + USER_PREFS_FILE_NAME, ex);
  }
}


Clone AbstractionParameter Count: 1Parameter Bindings

/** Logger for this class. */
private final static ILogger s_log = LoggerController.createLogger(PreferencesManager.class );

/** Name of preferences file. */
private static final String USER_PREFS_FILE_NAME = "prefs.xml";

/** Folder to store user settings in. */
private static File _userSettingsFolder;

private static [[#variable18d45720]] _prefs = null;

private static IPlugin plugin = null;

/**
     * Initializes the PreferencesManager
     * 
     * @param thePlugin
     * @throws PluginException
     */
public static void initialize(IPlugin thePlugin) throws PluginException {
  plugin = thePlugin;
  // Folder to store user settings.
  try {
    _userSettingsFolder = plugin.getPluginUserSettingsFolder();
  }
  catch (IOException
         ex) {
    throw new PluginException(ex);
  }
  loadPrefs();
}

/**
     * Returns the preferences holder
     * 
     * @return The bean holding the preferences for the dataimport plugin.
     */
public static [[#variable18d45720]] getPreferences() {
  return _prefs;
}

/**
     * Saves the preferences.
     */
public static void unload() {
  savePrefs();
}

/**
     * Save preferences to disk.  Always write to the user settings folder, not
     * the application settings folder.
     */
public static void savePrefs() {
  try {
    XMLBeanWriter wtr = new XMLBeanWriter(_prefs);
    wtr.save(new File(_userSettingsFolder, USER_PREFS_FILE_NAME));
  }
  catch (Exception
         ex) {
    s_log.error("Error occured writing to preferences file: " + USER_PREFS_FILE_NAME, ex);
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#18d45720]]
DataImportPreferenceBean 
12[[#18d45720]]
DBCopyPreferenceBean