CloneSet9


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
76230.988class_body_declarations[11]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
17646
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/Help.java
27446
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/ReportHelp.java
Next
Last
Clone Instance
1
Line Count
76
Source Line
46
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/Help.java

private static final String HELP_DOCS = "file:///" // $NON-NLS-1$
                                         + JMeterUtils.getJMeterHome() + "/printable_docs/usermanual/"; // $NON-NLS-1$

private static final String HELP_PAGE = HELP_DOCS + "component_reference.html"; // $NON-NLS-1$

public static final String HELP_FUNCTIONS = HELP_DOCS + "functions.html"; // $NON-NLS-1$

private static JDialog helpWindow;

private static HtmlPane helpDoc;

private static JScrollPane scroller;

private static String currentPage;

static {
  commands.add(ActionNames.HELP);
  helpDoc = new HtmlPane();
  scroller = new JScrollPane(helpDoc);
  helpDoc.setEditable(false);
  try {
    helpDoc.setPage(HELP_PAGE);
    currentPage = HELP_PAGE;
  }
  catch (IOException
         err) {
    String msg = "Couldn\'t load help file " + err.toString();
    log.error(msg);
    currentPage = ""; // Avoid NPE in resetPage() // $NON-NLS-1$
  }
}

/**
 * @see org.apache.jmeter.gui.action.Command#doAction(ActionEvent)
 */
public void doAction(ActionEvent e) {
  if (helpWindow == null) {
    helpWindow = new JDialog(new Frame(), // independent frame to
                              
                             // allow it to be overlaid
                             // by the main frame
                             JMeterUtils.getResString("help"), //$NON-NLS-1$
                              false);
    helpWindow.getContentPane().setLayout(new GridLayout(1, 1));
    ComponentUtil.centerComponentInWindow(helpWindow, 60);
  }
  helpWindow.getContentPane().removeAll();
  helpWindow.getContentPane().add(scroller);
  helpWindow.show();
  if (e.getSource() instanceof String[]) {
    String[] source = (String[]) e.getSource();
    resetPage(source[0]);
    helpDoc.scrollToReference(source[1]);
  }
  else {
    resetPage(HELP_PAGE);
    helpDoc.scrollToReference(GuiPackage.getInstance().getTreeListener().getCurrentNode().getDocAnchor());
  }
}

private void resetPage(String source) {
  if ( !currentPage.equals(source)) {
    try {
      helpDoc.setPage(source);
      currentPage = source;
    }
    catch (IOException
           err) {
      log.error(err.toString());
      JMeterUtils.reportErrorToUser("Problem loading a help page - see log for details");
      currentPage = ""; // $NON-NLS-1$
    }
  }
}

/**
 * @see org.apache.jmeter.gui.action.Command#getActionNames()
 */
public Set getActionNames() {
  return commands;
}


First
Previous
Clone Instance
2
Line Count
74
Source Line
46
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/ReportHelp.java

public static final String HELP_DOCS = "file:///" + JMeterUtils.getJMeterHome() + "/printable_docs/usermanual/";

public static final String HELP_PAGE = HELP_DOCS + "component_reference.html";

public static final String HELP_FUNCTIONS = HELP_DOCS + "functions.html";

private static JDialog helpWindow;

private static HtmlPane helpDoc;

private static JScrollPane scroller;

private static String currentPage;

static {
  commands.add(HELP);
  helpDoc = new HtmlPane();
  scroller = new JScrollPane(helpDoc);
  helpDoc.setEditable(false);
  try {
    helpDoc.setPage(HELP_PAGE);
    currentPage = HELP_PAGE;
  }
  catch (IOException
         err) {
    String msg = "Couldn\'t load help file " + err.toString();
    log.error(msg);
    currentPage = ""; // Avoid NPE in resetPage()
  }
}

/**
 * @see org.apache.jmeter.gui.action.Command#doAction(ActionEvent)
 */
public void doAction(ActionEvent e) {
  if (helpWindow == null) {
    helpWindow = new JDialog(new Frame(), // independent frame to
                              
                             // allow it to be overlaid
                             // by the main frame
                             JMeterUtils.getResString("help"), //$NON-NLS-1$
                              false);
    helpWindow.getContentPane().setLayout(new GridLayout(1, 1));
    ComponentUtil.centerComponentInWindow(helpWindow, 60);
  }
  helpWindow.getContentPane().removeAll();
  helpWindow.getContentPane().add(scroller);
  helpWindow.show();
  if (e.getSource() instanceof String[]) {
    String[] source = (String[]) e.getSource();
    resetPage(source[0]);
    helpDoc.scrollToReference(source[1]);
  }
  else {
    resetPage(HELP_PAGE);
    helpDoc.scrollToReference(ReportGuiPackage.getInstance().getTreeListener().getCurrentNode().getDocAnchor());
  }
}

private void resetPage(String source) {
  if ( !currentPage.equals(source)) {
    try {
      helpDoc.setPage(source);
      currentPage = source;
    }
    catch (IOException
           err) {
      log.error(err.toString());
      JMeterUtils.reportErrorToUser("Problem loading a help page - see log for details");
      currentPage = "";
    }
  }
}

/**
 * @see org.apache.jmeter.gui.action.Command#getActionNames()
 */
public Set getActionNames() {
  return commands;
}


Clone AbstractionParameter Count: 3Parameter Bindings

 [[#variablee055720]]static final String HELP_DOCS = "file:///" // $NON-NLS-1$
                                                      + JMeterUtils.getJMeterHome() + "/printable_docs/usermanual/"; // $NON-NLS-1$

 [[#variablee055720]]static final String HELP_PAGE = HELP_DOCS + "component_reference.html"; // $NON-NLS-1$

public static final String HELP_FUNCTIONS = HELP_DOCS + "functions.html"; // $NON-NLS-1$

private static JDialog helpWindow;

private static HtmlPane helpDoc;

private static JScrollPane scroller;

private static String currentPage;

static {
  commands.add( [[#variablee054e00]]);
  helpDoc = new HtmlPane();
  scroller = new JScrollPane(helpDoc);
  helpDoc.setEditable(false);
  try {
    helpDoc.setPage(HELP_PAGE);
    currentPage = HELP_PAGE;
  }
  catch (IOException
         err) {
    String msg = "Couldn\'t load help file " + err.toString();
    log.error(msg);
    currentPage = ""; // Avoid NPE in resetPage() // $NON-NLS-1$ // Avoid NPE in resetPage()
  }
}

/**
         * @see org.apache.jmeter.gui.action.Command#doAction(ActionEvent)
         */
public void doAction(ActionEvent e) {
  if (helpWindow == null) {
    helpWindow = new JDialog(new Frame(), // independent frame to
                              
                             // allow it to be overlaid
                             // by the main frame
                             JMeterUtils.getResString("help"), //$NON-NLS-1$
                              false);
    helpWindow.getContentPane().setLayout(new GridLayout(1, 1));
    ComponentUtil.centerComponentInWindow(helpWindow, 60);
  }
  helpWindow.getContentPane().removeAll();
  helpWindow.getContentPane().add(scroller);
  helpWindow.show();
  if (e.getSource() instanceof String[]) {
    String[] source = (String[]) e.getSource();
    resetPage(source[0]);
    helpDoc.scrollToReference(source[1]);
  }
  else {
    resetPage(HELP_PAGE);
    helpDoc.scrollToReference( [[#variablee0556a0]].getInstance().getTreeListener().getCurrentNode().getDocAnchor());
  }
}

private void resetPage(String source) {
  if ( !currentPage.equals(source)) {
    try {
      helpDoc.setPage(source);
      currentPage = source;
    }
    catch (IOException
           err) {
      log.error(err.toString());
      JMeterUtils.reportErrorToUser("Problem loading a help page - see log for details");
      currentPage = ""; // $NON-NLS-1$
    }
  }
}

/**
         * @see org.apache.jmeter.gui.action.Command#getActionNames()
         */
public Set getActionNames() {
  return commands;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#e055720]]
private 
12[[#e055720]]
public 
21[[#e054e00]]
ActionNames.HELP 
22[[#e054e00]]
HELP 
31[[#e0556a0]]
GuiPackage 
32[[#e0556a0]]
ReportGuiPackage