Program: 69216
Project: 69216
Buggy source:
private void buildInputAreaButton(int type){
  Listener listener=new Listener(){
    @Override public void handleEvent(    Event event){
      if (event.data instanceof String[]) {
        preview(DEUtil.removeQuote(((String[])event.data)[1]));
      }
    }
  }
;
  if (type == URI_TYPE) {
    ExpressionButtonUtil.createExpressionButton(inputArea,uriEditor,new ExpressionProvider(inputImage),listener,true,SWT.PUSH);
    new Label(inputArea,SWT.NONE);
  }
 else   if (type == FILE_TYPE) {
    inputButton=new Button(inputArea,SWT.PUSH);
    setOpenFileButtonImage(inputButton);
    inputButton.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent event){
        openResourceBrowser();
      }
    }
);
    inputButton.setToolTipText(BUTTON_BROWSE_TOOLTIP);
    ExpressionButtonUtil.createExpressionButton(inputArea,uriEditor,new ExpressionProvider(inputImage),listener,true,SWT.PUSH);
  }
 else   if (type == EMBEDDED_TYPE) {
    importButton=new Button(inputArea,SWT.PUSH);
    importButton.setText(BUTTON_IMPORT);
    importButton.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_END));
    importButton.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent event){
        FileDialog fileChooser=new FileDialog(getShell(),SWT.OPEN);
        fileChooser.setText(Messages.getString("String_Node_Str"));
        fileChooser.setFilterExtensions(IMAGE_FILEFILTERS);
        try {
          String fullPath=fileChooser.open();
          if (fullPath != null) {
            String fileName=fileChooser.getFileName();
            if (fileName != null) {
              if (embeddedImageList.indexOf(fileName) != -1) {
                ExceptionHandler.openMessageBox(DLG_TITLE_IMPORT_FAIL,DLG_ERROR_MSG_FILE_EXISTS,SWT.ICON_WARNING);
                return;
              }
              if (checkExtensions(fileName) == false) {
                ExceptionHandler.openErrorMessageBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
                return;
              }
              previewCanvas.loadImage(ImageManager.getInstance().loadImage(inputImage.getModuleHandle(),fullPath));
              BirtImageLoader imageLoader=new BirtImageLoader();
              EmbeddedImage image=imageLoader.save(getModuleHandle(),fullPath,fileName);
              embeddedImageList.add(image.getName());
              embeddedImageList.select(embeddedImageList.indexOf(image.getName()));
              updateButtons();
            }
          }
        }
 catch (        Throwable e) {
          preview();
          if (e instanceof OutOfMemoryError) {
            e=GUIException.createGUIException(ReportPlugin.REPORT_UI,e);
          }
          ExceptionHandler.handle(e,DLG_TITLE_LOADING_FAIL,DLG_ERROR_MSG_LOADING_FAIL);
        }
      }
    }
);
    new Label(inputArea,SWT.NONE);
    new Label(inputArea,SWT.NONE);
  }
 else   if (type == BLOB_TYPE) {
    inputButton=new Button(inputArea,SWT.PUSH);
    inputButton.setText(BUTTON_SELECT_IMAGE_DATA);
    inputButton.setEnabled(!getModuleHandle().getVisibleDataSets().isEmpty());
    inputButton.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent event){
        openBidingDialog();
      }
    }
);
    new Label(inputArea,SWT.NONE);
    new Label(inputArea,SWT.NONE);
  }
}

Fixed version (ground truth):
private void buildInputAreaButton(int type){
  Listener listener=new Listener(){
    public void handleEvent(    Event event){
      if (event.data instanceof String[]) {
        preview(DEUtil.removeQuote(((String[])event.data)[1]));
      }
    }
  }
;
  if (type == URI_TYPE) {
    ExpressionButtonUtil.createExpressionButton(inputArea,uriEditor,new ExpressionProvider(inputImage),listener,true,SWT.PUSH);
    new Label(inputArea,SWT.NONE);
  }
 else   if (type == FILE_TYPE) {
    inputButton=new Button(inputArea,SWT.PUSH);
    setOpenFileButtonImage(inputButton);
    inputButton.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent event){
        openResourceBrowser();
      }
    }
);
    inputButton.setToolTipText(BUTTON_BROWSE_TOOLTIP);
    ExpressionButtonUtil.createExpressionButton(inputArea,uriEditor,new ExpressionProvider(inputImage),listener,true,SWT.PUSH);
  }
 else   if (type == EMBEDDED_TYPE) {
    importButton=new Button(inputArea,SWT.PUSH);
    importButton.setText(BUTTON_IMPORT);
    importButton.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_END));
    importButton.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent event){
        FileDialog fileChooser=new FileDialog(getShell(),SWT.OPEN);
        fileChooser.setText(Messages.getString("String_Node_Str"));
        fileChooser.setFilterExtensions(IMAGE_FILEFILTERS);
        try {
          String fullPath=fileChooser.open();
          if (fullPath != null) {
            String fileName=fileChooser.getFileName();
            if (fileName != null) {
              if (embeddedImageList.indexOf(fileName) != -1) {
                ExceptionHandler.openMessageBox(DLG_TITLE_IMPORT_FAIL,DLG_ERROR_MSG_FILE_EXISTS,SWT.ICON_WARNING);
                return;
              }
              if (checkExtensions(fileName) == false) {
                ExceptionHandler.openErrorMessageBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
                return;
              }
              previewCanvas.loadImage(ImageManager.getInstance().loadImage(inputImage.getModuleHandle(),fullPath));
              BirtImageLoader imageLoader=new BirtImageLoader();
              EmbeddedImage image=imageLoader.save(getModuleHandle(),fullPath,fileName);
              embeddedImageList.add(image.getName());
              embeddedImageList.select(embeddedImageList.indexOf(image.getName()));
              updateButtons();
            }
          }
        }
 catch (        Throwable e) {
          preview();
          if (e instanceof OutOfMemoryError) {
            e=GUIException.createGUIException(ReportPlugin.REPORT_UI,e);
          }
          ExceptionHandler.handle(e,DLG_TITLE_LOADING_FAIL,DLG_ERROR_MSG_LOADING_FAIL);
        }
      }
    }
);
    new Label(inputArea,SWT.NONE);
    new Label(inputArea,SWT.NONE);
  }
 else   if (type == BLOB_TYPE) {
    inputButton=new Button(inputArea,SWT.PUSH);
    inputButton.setText(BUTTON_SELECT_IMAGE_DATA);
    inputButton.setEnabled(!getModuleHandle().getVisibleDataSets().isEmpty());
    inputButton.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent event){
        openBidingDialog();
      }
    }
);
    new Label(inputArea,SWT.NONE);
    new Label(inputArea,SWT.NONE);
  }
}