Buggy code:
public final class ReportGuiPackage implements LocaleChangeListener { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final Object LOCK = new Object ( ) ; private static volatile ReportGuiPackage guiPack ; private boolean dirty = false ; private Map < TestElement , JMeterGUIComponent > nodesToGui = new HashMap < TestElement , JMeterGUIComponent > ( ) ; private Map < Class < ? > , JMeterGUIComponent > guis = new HashMap < Class < ? > , JMeterGUIComponent > ( ) ; private Map < Class < ? > , JMeterGUIComponent > testBeanGUIs = new HashMap < Class < ? > , JMeterGUIComponent > ( ) ; private ReportTreeNode currentNode = null ; private boolean currentNodeUpdated = false ; private ReportTreeModel treeModel ; private ReportTreeListener treeListener ; private ReportMainFrame mainFrame ; private ReportGuiPackage ( ) { } public static ReportGuiPackage getInstance ( ) { } public static ReportGuiPackage getInstance ( ReportTreeListener listener , ReportTreeModel treeModel ) { } public JMeterGUIComponent getGui ( TestElement node ) { } public JMeterGUIComponent getGui ( TestElement node , Class < ? > guiClass , Class < ? > testClass ) { } public void removeNode ( TestElement node ) { } public JMeterGUIComponent getCurrentGui ( ) { } public ReportTreeNode getNodeOf ( TestElement userObject ) { } public TestElement createTestElement ( Class < ? > guiClass , Class < ? > testClass ) { } public TestElement createTestElement ( String objClass ) { } private JMeterGUIComponent getGuiFromCache ( Class < ? > guiClass , Class < ? > testClass ) throws IllegalAccessException , InstantiationException { } public void updateCurrentGui ( ) { } public void updateCurrentNode ( ) { } public ReportTreeNode getCurrentNode ( ) { } public TestElement getCurrentElement ( ) { } public void setDirty ( boolean dirty ) { } public boolean isDirty ( ) { } public HashTree addSubTree ( HashTree subTree ) throws IllegalUserActionException { } public HashTree getCurrentSubTree ( ) { } public ReportTreeModel getTreeModel ( ) { } public void setTreeModel ( ReportTreeModel newTreeModel ) { } public ValueReplacer getReplacer ( ) { } public void setMainFrame ( ReportMainFrame newMainFrame ) { } public ReportMainFrame getMainFrame ( ) { } public void setTreeListener ( ReportTreeListener newTreeListener ) { } public ReportTreeListener getTreeListener ( ) { } public void displayPopUp ( MouseEvent e , JPopupMenu popup ) { } public void displayPopUp ( Component invoker , MouseEvent e , JPopupMenu popup ) { if ( popup != null ) { ReportGuiPackage . log . debug ( ( ( ( ( ( "Showing<seq2seq4repair_space>pop<seq2seq4repair_space>up<seq2seq4repair_space>for<seq2seq4repair_space>" + invoker ) + "<seq2seq4repair_space>at<seq2seq4repair_space>x,y<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( e . getX ( ) ) ) + "," ) + ( e . getY ( ) ) ) ) ; popup . pack ( ) ; popup . show ( invoker , e . getX ( ) , e . getY ( ) ) ; popup . setVisible ( true ) ; <START_BUG> popup . requestFocus ( ) ; <END_BUG> } } @ Override public void localeChanged ( LocaleChangeEvent event ) { } private String reportPlanFile ; public void setReportPlanFile ( String f ) { } public String getReportPlanFile ( ) { } }

Fix:
popup . requestFocusInWindow ( ) ;