Buggy code:
public class ProxyControlGui extends LogicControllerGui implements ActionListener , ItemListener , KeyListener , JMeterGUIComponent , UnsharedComponent { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final long serialVersionUID = 232L ; private JTextField portField ; private JCheckBox httpHeaders ; private JComboBox groupingMode ; private JCheckBox addAssertions ; private JCheckBox useKeepAlive ; private JCheckBox regexMatch ; private JComboBox samplerTypeName ; private JCheckBox samplerRedirectAutomatically ; private JCheckBox samplerFollowRedirects ; private JCheckBox samplerDownloadImages ; private JCheckBox httpsSpoof ; private JTextField httpsMatch ; private JTextField contentTypeInclude ; private JTextField contentTypeExclude ; private JComboBox targetNodes ; private DefaultComboBoxModel targetNodesModel ; private ProxyControl model ; private JTable excludeTable ; private PowerTableModel excludeModel ; private JTable includeTable ; private PowerTableModel includeModel ; private static final String CHANGE_TARGET = "change_target" ; private JButton stop ; private JButton start ; private JButton restart ; private static final String STOP = "stop" ; private static final String START = "start" ; private static final String RESTART = "restart" ; private static final String ENABLE_RESTART = "enable_restart" ; private static final String ADD_INCLUDE = "add_include" ; private static final String ADD_EXCLUDE = "add_exclude" ; private static final String DELETE_INCLUDE = "delete_include" ; private static final String DELETE_EXCLUDE = "delete_exclude" ; private static final String ADD_TO_INCLUDE_FROM_CLIPBOARD = "include_clipboard" ; private static final String ADD_TO_EXCLUDE_FROM_CLIPBOARD = "exclude_clipboard" ; private static final String INCLUDE_COL = "patterns_to_include" ; private static final String EXCLUDE_COL = "patterns_to_exclude" ; private static final String PORTFIELD = "portField" ; public ProxyControlGui ( ) { } @ Override public TestElement createTestElement ( ) { } protected ProxyControl makeProxyControl ( ) { } @ Override public void modifyTestElement ( TestElement el ) { GuiUtils . stopTableEditing ( excludeTable ) ; GuiUtils . stopTableEditing ( includeTable ) ; configureTestElement ( el ) ; if ( el instanceof ProxyControl ) { model = ( ( ProxyControl ) ( el ) ) ; model . setPort ( portField . getText ( ) ) ; setIncludeListInProxyControl ( model ) ; setExcludeListInProxyControl ( model ) ; model . setCaptureHttpHeaders ( httpHeaders . isSelected ( ) ) ; model . setGroupingMode ( groupingMode . getSelectedIndex ( ) ) ; model . setAssertions ( addAssertions . isSelected ( ) ) ; <START_BUG> model . setSamplerTypeName ( samplerTypeName . getSelectedIndex ( ) ) ; <END_BUG> model . setSamplerRedirectAutomatically ( samplerRedirectAutomatically . isSelected ( ) ) ; model . setSamplerFollowRedirects ( samplerFollowRedirects . isSelected ( ) ) ; model . setUseKeepAlive ( useKeepAlive . isSelected ( ) ) ; model . setSamplerDownloadImages ( samplerDownloadImages . isSelected ( ) ) ; model . setRegexMatch ( regexMatch . isSelected ( ) ) ; model . setHttpsSpoof ( httpsSpoof . isSelected ( ) ) ; model . setHttpsSpoofMatch ( httpsMatch . getText ( ) ) ; model . setContentTypeInclude ( contentTypeInclude . getText ( ) ) ; model . setContentTypeExclude ( contentTypeExclude . getText ( ) ) ; TreeNodeWrapper nw = ( ( TreeNodeWrapper ) ( targetNodes . getSelectedItem ( ) ) ) ; if ( nw == null ) { model . setTarget ( null ) ; } else { model . setTarget ( nw . getTreeNode ( ) ) ; } } } protected void setIncludeListInProxyControl ( ProxyControl element ) { } protected void setExcludeListInProxyControl ( ProxyControl element ) { } private List < String > getDataList ( PowerTableModel p_model , String colName ) { } @ Override public String getLabelResource ( ) { } @ Override public Collection < String > getMenuCategories ( ) { } @ Override public void configure ( TestElement element ) { } private void populateTable ( PowerTableModel p_model , PropertyIterator iter ) { } public void itemStateChanged ( ItemEvent e ) { } public void actionPerformed ( ActionEvent action ) { } protected void addFromClipboard ( JTable table ) { } private void startProxy ( ) { } private void enableRestart ( ) { } public void keyPressed ( KeyEvent e ) { } public void keyTyped ( KeyEvent e ) { } public void keyReleased ( KeyEvent e ) { } private void init ( ) { } private JPanel createControls ( ) { } private JPanel createPortPanel ( ) { } private JPanel createTestPlanContentPanel ( ) { } private JPanel createHTTPSamplerPanel ( ) { } private JPanel createTargetPanel ( ) { } private JPanel createGroupingPanel ( ) { } private JPanel createContentTypePanel ( ) { } private JPanel createIncludePanel ( ) { } private JPanel createExcludePanel ( ) { } private JPanel createTableButtonPanel ( String addCommand , String deleteCommand , String copyFromClipboard ) { } private void reinitializeTargetCombo ( ) { } private void buildNodesModel ( JMeterTreeNode node , String parent_name , int level ) { } private String spaces ( int level ) { } }

Fix:
model . setSamplerTypeName ( HTTPSamplerFactory . getImplementations ( ) [ samplerTypeName . getSelectedIndex ( ) ] ) ;