Buggy code:
public void mouseTransformEditPointsButton_clicked ( ) { } public void mouseTransformViewButton_clicked ( ) { } public void undoAction ( ) { } public void redoAction ( ) { } @ Override public void saveUndoPoint ( ) { } private boolean undoDebug = false ; private void enableUndoControls ( ) { } public void grabPaletteFromImageButton_actionPerformed ( ActionEvent e ) { } public void selectImageForGradientButton_actionPerformed ( ActionEvent e ) { } public void clearImageForGradientButton_actionPerformed ( ActionEvent e ) { } public void paletteInvertBtn_clicked ( ) { } public void paletteReverseBtn_clicked ( ) { } public void showStatusMessage ( String pStatus ) { } public void showStatusMessage ( Flame pFlame , String pStatus ) { } public void showStatusMessage ( RGBPalette pGradient , String pStatus ) { } public void snapshotButton_clicked ( ) { } public void quicksaveButton_clicked ( ) { } public void toggleTransparencyButton_clicked ( ) { } public void flameTransparencyCbx_changed ( ) { } public DancingFractalsController getDancingFractalsController ( ) { } private RenderMainFlameThread mainRenderThread = null ; private void enableMainRenderControls ( ) { } public void renderImageButton_actionPerformed ( ) { } public void spatialFilterKernelCmb_changed ( ) { } public void quickMutateButton_clicked ( ) { } public MutaGenController getMutaGenController ( ) { } public MeshGenController getMeshGenController ( ) { } public void paletteSortBtn_clicked ( ) { } public void editFlameTitleBtn_clicked ( ) { } public void editTransformCaptionBtn_clicked ( ) { } public void mouseTransformRotateTrianglesButton_clicked ( ) { } public void mouseTransformScaleTrianglesButton_clicked ( ) { } public JWFScriptController getJwfScriptController ( ) { } public FlameBrowserController getFlameBrowserController ( ) { } public GradientController getGradientController ( ) { } public AnimationController getAnimationController ( ) { } public void mouseTransformEditGradientButton_clicked ( ) { } public void gradientFadeBtn_clicked ( ) { } public void gradientInvertBtn_clicked ( ) { } public void gradientReverseBtn_clicked ( ) { } public void gradientSortBtn_clicked ( ) { } public void gradientSelectAllBtn_clicked ( ) { } public void gradientApplyBalancingBtn_clicked ( ) { } public void gradientApplyTXBtn_clicked ( ) { } private static final GradientSelectionProvider dfltGradientSelection = new DefaultGradientSelectionProvider ( ) ; @ Override public int getFrom ( ) { } @ Override public int getTo ( ) { } public void gradientCopyRangeBtn_clicked ( ) { } public void gradientPasteRangeBtn_clicked ( ) { } public void gradientEraseRangeBtn_clicked ( ) { } public void gradientMononchromeBtn_clicked ( ) { } public void gradientFadeAllBtn_clicked ( ) { } public void backgroundColorBtn_clicked ( ) { } private void refreshBGColorIndicator ( ) { } private List < MutationType > createRandomMutationTypes ( ) { } private SimpleImage renderRandomizedFlame ( Flame pFlame , Dimension pImgSize ) { } public void randomizeBtn_clicked ( ) { } public void layersTableClicked ( ) { } public void addLayerBtn_clicked ( ) { } public void duplicateLayerBtn_clicked ( ) { } public void deleteLayerBtn_clicked ( ) { } public void layerWeightREd_changed ( ) { } public void layerVisibilityButton_clicked ( ) { } @ Override public Layer getLayer ( ) { } public void layerHideAllOthersButton_clicked ( ) { } public void layerShowAllButton_clicked ( ) { } public void layerAppendModeBtnClicked ( ) { } public void layerPreviewBtnClicked ( ) { } public boolean isNoRefresh ( ) { } public void setNoRefresh ( boolean noRefresh ) { } private void registerMotionPropertyControls ( ) { } public FlameControlsDelegate getFlameControls ( ) { } public XFormControlsDelegate getXFormControls ( ) { } public ChannelMixerControlsDelegate getChannelMixerControls ( ) { } public void triangleStyleCmb_changed ( ) { } public void toggleDrawGridButton_clicked ( ) { } public void editorFractalBrightnessSliderChanged ( ) { } public void mouseTransformTriangleViewButton_clicked ( ) { } public void toggleTriangleWithColorsButton_clicked ( ) { } public void nonlinearVarEditMotionCurve ( int pIdx ) { } public void nonlinearParamsEditMotionCurve ( int pIdx ) { } protected TinaControllerData getData ( ) { } public void setVariationControlsDelegates ( VariationControlsDelegate [ ] pVariationControlsDelegates ) { } public void xFormModGammaRandomizeBtn_Clicked ( boolean pWholeFractal ) { } public void xFormModGammaResetBtn_Clicked ( boolean pWholeFractal ) { } public BatchRendererController getBatchRendererController ( ) { } public MainController getMainController ( ) { } protected ErrorHandler getErrorHandler ( ) { } public void bokehBtn_clicked ( ) { } public void resetCameraSettings ( ) { } public void resetDOFSettings ( ) { } public void resetBokehSettings ( ) { } public void resetColoringSettings ( ) { } public void resetAntialiasingSettings ( ) { } public void resetShadingSettings ( ) { } public void resetStereo3DSettings ( ) { } public void resetPostSymmetrySettings ( ) { } public void resetMotionBlurSettings ( ) { } public void xaosViewAsChanged ( ) { } public void toggleDrawGuidesButton_clicked ( ) { } public GradientControlsDelegate getGradientControls ( ) { } final int DFLT_VERT_TOOLBAR_SIZE = 52 ; public void refreshMacroButtonsPanel ( ) { } public void refreshMacroButtonsPanelVertical ( ) { } public void refreshMacroButtonsPanelHorizontal ( ) { } public void runScript ( String filename , boolean internal ) { } public void resetGridToDefaults ( ) { } DetachedPreviewWindow detachedPreviewWindow ; DetachedPreviewController detachedPreviewController ; public void openDetachedPreview ( ) { closeDetachedPreview ( ) ; detachedPreviewWindow = new DetachedPreviewWindow ( ) ; <START_BUG> detachedPreviewController = new DetachedPreviewController ( detachedPreviewWindow , data . toggleDetachedPreviewButton ) ; <END_BUG> detachedPreviewWindow . setController ( detachedPreviewController ) ; detachedPreviewWindow . getFrame ( ) . setVisible ( true ) ; detachedPreviewController . setFlame ( getCurrFlame ( ) ) ; } public void closeDetachedPreview ( ) { } public void gradientResetBtn_clicked ( ) { } private RGBPalette getLastGradient ( ) { } public void affineEditPlaneCmb_changed ( ) { } public void selectImageForBackgroundButton_actionPerformed ( ActionEvent e ) { } public void removeBackgroundImageButton_actionPerformed ( ActionEvent e ) { } public void gradientColorMapHorizOffsetREd_changed ( ) { } public void gradientColorMapHorizOffsetSlider_changed ( ) { } public void gradientColorMapHorizScaleREd_changed ( ) { } public void gradientColorMapHorizScaleSlider_changed ( ) { } public void gradientColorMapVertOffsetREd_changed ( ) { } public void gradientColorMapVertOffsetSlider_changed ( ) { } public void gradientColorMapVertScaleREd_changed ( ) { } public void gradientColorMapVertScaleSlider_changed ( ) { } public void gradientColorMapLocalColorAddREd_changed ( ) { } public void gradientColorMapLocalColorAddSlider_changed ( ) { } public void gradientColorMapLocalColorScaleREd_changed ( ) { } public void gradientColorMapLocalColorScaleSlider_changed ( ) { } }

Fix:
detachedPreviewController = new DetachedPreviewController ( this , detachedPreviewWindow , data . toggleDetachedPreviewButton ) ;