Buggy code:
public class TestRunner extends BaseTestRunner implements TestRunContext { private static Font PLAIN_FONT = StatusLine . PLAIN_FONT ; private static Font BOLD_FONT = StatusLine . BOLD_FONT ; private static final int GAP = 4 ; private static final int HISTORY_LENGTH = 5 ; protected JFrame fFrame ; private Thread fRunner ; private TestResult fTestResult ; private JComboBox fSuiteCombo ; private ProgressBar fProgressIndicator ; private DefaultListModel fFailures ; private JLabel fLogo ; private CounterPanel fCounterPanel ; private JButton fRun ; private JButton fQuitButton ; private JButton fRerunButton ; private StatusLine fStatusLine ; private FailureDetailView fFailureView ; private JTabbedPane fTestViewTab ; private JCheckBox fUseLoadingRunner ; private Vector fTestRunViews = new Vector ( ) ; private static final String TESTCOLLECTOR_KEY = "TestCollectorClass" ; private static final String FAILUREDETAILVIEW_KEY = "FailureViewClass" ; public TestRunner ( ) { } public static void main ( String [ ] args ) { } public static void run ( Class test ) { } public void testFailed ( final int status , final Test test , final Throwable t ) { } public void testStarted ( String testName ) { } public void testEnded ( String stringName ) { } public void setSuite ( String suiteName ) { } private void addToHistory ( final String suite ) { } private void pruneHistory ( ) { } private void appendFailure ( String kind , Test test , Throwable t ) { } private void revealFailure ( Test test ) { } protected void aboutToStart ( final Test testSuite ) { } protected void runFinished ( final Test testSuite ) { } protected CounterPanel createCounterPanel ( ) { } protected JPanel createFailedPanel ( ) { } protected FailureDetailView createFailureDetailView ( ) { } protected JMenu createJUnitMenu ( ) { } protected JFrame createFrame ( String title ) { } protected JLabel createLogo ( ) { } protected void createMenus ( JMenuBar mb ) { } protected JCheckBox createUseLoaderCheckBox ( ) { } protected JButton createQuitButton ( ) { } protected JButton createRunButton ( ) { } protected Component createBrowseButton ( ) { } protected StatusLine createStatusLine ( ) { } protected JComboBox createSuiteCombo ( ) { } protected JTabbedPane createTestRunViews ( ) { } public void testViewChanged ( ) { } protected TestResult createTestResult ( ) { } protected JFrame createUI ( String suiteName ) { } private void addGrid ( JPanel p , Component co , int x , int y , int w , int fill , double wx , int anchor ) { GridBagConstraints c = new GridBagConstraints ( ) ; c . gridx = x ; c . gridy = y ; c . gridwidth = w ; c . anchor = anchor ; c . weightx = wx ; c . fill = fill ; if ( ( fill == ( GridBagConstraints . BOTH ) ) || ( fill == ( GridBagConstraints . VERTICAL ) ) ) c . weighty = 1.0 ; <START_BUG> c . insets = new Insets ( ( y == 0 ? TestRunner . GAP : 0 ) , ( x == 0 ? TestRunner . GAP : 0 ) , TestRunner . GAP , TestRunner . GAP ) ; <END_BUG> p . add ( co , c ) ; } protected String getSuiteText ( ) { } public ListModel getFailures ( ) { } public void insertUpdate ( DocumentEvent event ) { } public void browseTestClasses ( ) { } TestCollector createTestCollector ( ) { } private Image loadFrameIcon ( ) { } private void loadHistory ( JComboBox combo ) throws IOException { } private File getSettingsFile ( ) { } private void postInfo ( final String message ) { } private void postStatus ( final String status ) { } public void removeUpdate ( DocumentEvent event ) { } private void rerun ( ) { } private void rerunTest ( Test test ) { } protected void reset ( ) { } public void run ( ) { } protected void runFailed ( String message ) { } public synchronized void runSuite ( ) { } private boolean shouldReload ( ) { } protected synchronized void runTest ( final Test testSuite ) { } private void doRunTest ( final Test testSuite ) { } private void saveHistory ( ) throws IOException { } private void setButtonLabel ( final JButton button , final String label ) { } private void setLabelValue ( final JTextField label , final int value ) { } public void handleTestSelected ( Test test ) { } private void showFailureDetail ( Test test ) { } private void showInfo ( String message ) { } private void showStatus ( String status ) { } public void start ( String [ ] args ) { } private void start ( final Test test ) { } private void synchUI ( ) { } public void terminate ( ) { } public void textChanged ( ) { } protected void clearStatus ( ) { } public static Icon getIconResource ( Class clazz , String name ) { } private void about ( ) { } }

Fix:
c . insets = new Insets ( ( y == 0 ? 10 : 0 ) , ( x == 0 ? 10 : TestRunner . GAP ) , TestRunner . GAP , TestRunner . GAP ) ;