CloneSet87


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
54330.980type_declarations
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
15437
E:/TSE/Projects-CloneDR/sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/ConvertToStringBufferAction.java
25537
E:/TSE/Projects-CloneDR/sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/InQuotesAction.java
35437
E:/TSE/Projects-CloneDR/sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/RemoveQuotesAction.java
Next
Last
Clone Instance
1
Line Count
54
Source Line
37
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/ConvertToStringBufferAction.java

/**
 * This action will convert the SQL string to a StringBuffer.
 *
 * @author  Gerd Wagner
 */
class ConvertToStringBufferAction extends SquirrelAction implements ISQLPanelAction {
  private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(ConvertToStringBufferAction.class );

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

  /** Current session. */
  private ISession _session;

  private EditExtrasPlugin _plugin;

  ConvertToStringBufferAction(IApplication app, EditExtrasPlugin plugin) {
    super(app, plugin.getResources());
    _plugin = plugin;
  }

  public void setSQLPanel(ISQLPanelAPI panel) {
    if (null != panel) {
      _session = panel.getSession();
    }
    else {
      _session = null;
    }
    setEnabled(null != _session);
  }

  public void actionPerformed(ActionEvent evt) {
    if (_session != null) {
      try {
        //new ConvertToStringBufferCommand(_session.getSQLPanelAPI(_plugin)).execute();
        new ConvertToStringBufferCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute();
      }
      catch (Throwable
             ex) {
        // i18n[editextras.convertStringBufErr=Error executing convert to StringBuffer command: {0}]
        final String msg = s_stringMgr.getString("editextras.convertStringBufErr", ex);
        _session.showErrorMessage(msg);
        s_log.error(msg, ex);
      }
    }
  }
}




Next
Previous
Clone Instance
2
Line Count
55
Source Line
37
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/InQuotesAction.java

/**
 * This action will "quote" an SQL string.
 *
 * @author  Gerd Wagner
 */
class InQuotesAction extends SquirrelAction implements ISQLPanelAction {
  private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(InQuotesAction.class );

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

  /** Current session. */
  private ISession _session;

  private EditExtrasPlugin _plugin;

  InQuotesAction(IApplication app, EditExtrasPlugin plugin) {
    super(app, plugin.getResources());
    _plugin = plugin;
  }

  public void setSQLPanel(ISQLPanelAPI panel) {
    if (null != panel) {
      _session = panel.getSession();
    }
    else {
      _session = null;
    }
    setEnabled(null != _session);
  }

  public void actionPerformed(ActionEvent evt) {
    if (_session != null) {
      try {
        //new InQuotesCommand(_session.getSQLPanelAPI(_plugin)).execute();
        new InQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute();
      }
      catch (Throwable
             ex) {
        // i18n[editextras.errorQuoteSql=Error processing Quote SQL command: {0}]
        final String msg = s_stringMgr.getString("editextras.errorQuoteSql", ex);
        _session.showErrorMessage(msg);
        s_log.error(msg, ex);
      }
    }
  }
}




First
Previous
Clone Instance
3
Line Count
54
Source Line
37
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/RemoveQuotesAction.java

/**
 * This action will remove "quote" from an SQL string.
 *
 * @author  Gerd Wagner
 */
class RemoveQuotesAction extends SquirrelAction implements ISQLPanelAction {
  private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(RemoveQuotesAction.class );

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

  /** Current session. */
  private ISession _session;

  private EditExtrasPlugin _plugin;

  RemoveQuotesAction(IApplication app, EditExtrasPlugin plugin) {
    super(app, plugin.getResources());
    _plugin = plugin;
  }

  public void setSQLPanel(ISQLPanelAPI panel) {
    if (null != panel) {
      _session = panel.getSession();
    }
    else {
      _session = null;
    }
    setEnabled(null != _session);
  }

  public void actionPerformed(ActionEvent evt) {
    if (_session != null) {
      try {
        //new RemoveQuotesCommand(_session.getSQLPanelAPI(_plugin)).execute();
        new RemoveQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute();
      }
      catch (Throwable
             ex) {
        // i18n[editextras.errorRemoveQuotes=Error processing Remove Quotes SQL command: {0}]
        final String msg = s_stringMgr.getString("editextras.errorRemoveQuotes", ex);
        _session.showErrorMessage(msg);
        s_log.error(msg, ex);
      }
    }
  }
}




Clone AbstractionParameter Count: 3Parameter Bindings

/**
 * This action will convert the SQL string to a StringBuffer.
 *
 * @author  Gerd Wagner
 */
/**
 * This action will "quote" an SQL string.
 *
 * @author  Gerd Wagner
 */
/**
 * This action will remove "quote" from an SQL string.
 *
 * @author  Gerd Wagner
 */
class [[#variable1904ad20]]extends SquirrelAction implements ISQLPanelAction {
  private static final StringManager s_stringMgr = StringManagerFactory.getStringManager( [[#variable1904ad20]].class );

  /** Logger for this class. */
  private static final ILogger s_log = LoggerController.createLogger( [[#variable1904ad20]].class );

  /** Current session. */
  private ISession _session;

  private EditExtrasPlugin _plugin;

   [[#variable1904ad20]](IApplication app, EditExtrasPlugin plugin) {
    super(app, plugin.getResources());
    _plugin = plugin;
  }

  public void setSQLPanel(ISQLPanelAPI panel) {
    if (null != panel) {
      _session = panel.getSession();
    }
    else {
      _session = null;
    }
    setEnabled(null != _session);
  }

  public void actionPerformed(ActionEvent evt) {
    if (_session != null) {
      try {
        //new ConvertToStringBufferCommand(_session.getSQLPanelAPI(_plugin)).execute();
        //new InQuotesCommand(_session.getSQLPanelAPI(_plugin)).execute();
        //new RemoveQuotesCommand(_session.getSQLPanelAPI(_plugin)).execute();
        new [[#variable1905e920]](FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute();
      }
      catch (Throwable
             ex) {
        // i18n[editextras.convertStringBufErr=Error executing convert to StringBuffer command: {0}]
        // i18n[editextras.errorQuoteSql=Error processing Quote SQL command: {0}]
        // i18n[editextras.errorRemoveQuotes=Error processing Remove Quotes SQL command: {0}]
        final String msg = s_stringMgr.getString( [[#variable18c51d80]], ex);
        _session.showErrorMessage(msg);
        s_log.error(msg, ex);
      }
    }
  }
}


 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1904ad20]]
ConvertToStringBufferAction 
12[[#1904ad20]]
InQuotesAction 
13[[#1904ad20]]
RemoveQuotesAction 
21[[#1905e920]]
ConvertToStringBufferCommand 
22[[#1905e920]]
InQuotesCommand 
23[[#1905e920]]
RemoveQuotesCommand 
31[[#18c51d80]]
"editextras.convertStringBufErr" 
32[[#18c51d80]]
"editextras.errorQuoteSql" 
33[[#18c51d80]]
"editextras.errorRemoveQuotes"