nus-yam/ex-repair huggingface dataset:
Program: 118999
Project: 118999
Buggy source:
protected void changeFinishButtonAction(String newAction){
  finishButtonAction=newAction;
  if (FINISH_ACTION_OPEN_PROJECT.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_UPDATE.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_UPDATE_DETAILS.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_CREATE_SANDBOX.equals(newAction)) {
  }
 else   if (FINISH_ACTION_IMPORT_DEMO_PROJECT.equals(newAction)) {
  }
 else   if (FINISH_ACTION_IMPORT_LOCAL_PROJECT.equals(newAction)) {
  }
 else   if (FINISH_ACTION_CREATE_NEW_PROJECT.equals(newAction)) {
  }
 else {
    finishButton.setText(Messages.getString("String_Node_Str"));
    finishButtonAction=FINISH_ACTION_RESTART;
  }
  updateButtonLayoutSize(finishButton);
  navigateArea.layout();
}

Fixed version (ground truth):
protected void changeFinishButtonAction(String newAction){
  finishButtonAction=newAction;
  if (FINISH_ACTION_OPEN_PROJECT.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_UPDATE.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_UPDATE_DETAILS.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_CREATE_SANDBOX.equals(newAction)) {
  }
 else   if (FINISH_ACTION_IMPORT_DEMO_PROJECT.equals(newAction)) {
  }
 else   if (FINISH_ACTION_IMPORT_LOCAL_PROJECT.equals(newAction)) {
  }
 else   if (FINISH_ACTION_CREATE_NEW_PROJECT.equals(newAction)) {
  }
 else {
    finishButton.setText(Messages.getString("String_Node_Str"));
    finishButtonAction=FINISH_ACTION_RESTART;
  }
  refreshUIFinishButtonEnable();
  updateButtonLayoutSize(finishButton);
  navigateArea.layout();
}
Program: 119000
Project: 119000
Buggy source:
@Override protected DragTracker createDragTracker(){
  if (this.mainConnector == null) {
    this.mainConnector=new NodeConnectorTool(nodePart).getConnector();
  }
  final INodeConnector connector=this.mainConnector;
  if (connector == null) {
    return null;
  }
  final List<Object> listArgs=new ArrayList<Object>();
  listArgs.add(null);
  listArgs.add(null);
  listArgs.add(null);
  TalendCreateConnectionTool myConnectTool=new TalendCreateConnectionTool(new CreationFactory(){
    @Override public Object getNewObject(){
      return listArgs;
    }
    @Override public Object getObjectType(){
      return connector.getName();
    }
  }
,nodePart);
  return myConnectTool;
}

Fixed version (ground truth):
@Override protected DragTracker createDragTracker(){
  if (this.mainConnector == null) {
    this.mainConnector=new NodeConnectorTool(nodePart).getConnector();
  }
  if (this.mainConnector == null) {
    return null;
  }
  final List<Object> listArgs=new ArrayList<Object>();
  listArgs.add(null);
  listArgs.add(null);
  listArgs.add(null);
  TalendCreateConnectionTool myConnectTool=new TalendCreateConnectionTool(new CreationFactory(){
    @Override public Object getNewObject(){
      return listArgs;
    }
    @Override public Object getObjectType(){
      mainConnector=new NodeConnectorTool(nodePart).getConnector();
      if (mainConnector == null) {
        Node node=(Node)nodePart.getModel();
        mainConnector=node.getConnectorFromType(EConnectionType.ON_COMPONENT_OK);
        listArgs.set(1,mainConnector.getLinkName());
      }
 else {
        listArgs.set(1,null);
      }
      return mainConnector.getName();
    }
  }
,nodePart);
  return myConnectTool;
}
Program: 119001
Project: 119001
Buggy source:
@Override public Object getObjectType(){
  return connector.getName();
}

Fixed version (ground truth):
@Override public Object getObjectType(){
  mainConnector=new NodeConnectorTool(nodePart).getConnector();
  if (mainConnector == null) {
    Node node=(Node)nodePart.getModel();
    mainConnector=node.getConnectorFromType(EConnectionType.ON_COMPONENT_OK);
    listArgs.set(1,mainConnector.getLinkName());
  }
 else {
    listArgs.set(1,null);
  }
  return mainConnector.getName();
}
Program: 119002
Project: 119002
Buggy source:
@Override public void figureMoved(IFigure source){
  List selectedEditPart=getHost().getViewer().getSelectedEditParts();
  if (selectedEditPart.contains(getHost())) {
    showFeedback(true);
  }
}

Fixed version (ground truth):
@Override public void figureMoved(IFigure source){
  List selectedEditPart=getHost().getViewer().getSelectedEditParts();
  if (selectedEditPart.contains(getHost())) {
    showFeedback(true,null);
  }
}
Program: 119003
Project: 119003
Buggy source:
private void showFeedback(boolean isMove){
  if (this.layer == null) {
    this.layer=getLayer(TALEND_FEEDBACK_LAYER);
  }
  if (isHideHandle()) {
    return;
  }
  if (figureIsDisplayed()) {
    if (isMove) {
      if (handle.getLocator() == null) {
        TalendConnectionHandleLocator locator=new TalendConnectionHandleLocator(getHostFigure());
        handle.setLocator(locator);
      }
    }
    return;
  }
  if (getHost().getModel() instanceof Node) {
    if (handle == null) {
      handle=new TalendConnectionHandle(this.nodePart);
      TalendConnectionHandleLocator locator=new TalendConnectionHandleLocator(getHostFigure());
      handle.setLocator(locator);
    }
 else {
      if (handle.getLocator() == null) {
        TalendConnectionHandleLocator locator=new TalendConnectionHandleLocator(getHostFigure());
        handle.setLocator(locator);
      }
    }
    layer.add(handle);
    if (!isMove) {
      handle.getLocator().relocate(handle);
    }
    getHost().getViewer().getVisualPartMap().put(handle,getHost());
  }
}

Fixed version (ground truth):
private void showFeedback(boolean isMove,INodeConnector connector){
  if (this.layer == null) {
    this.layer=getLayer(TALEND_FEEDBACK_LAYER);
  }
  if (isHideHandle()) {
    return;
  }
  if (figureIsDisplayed()) {
    if (isMove) {
      if (handle.getLocator() == null) {
        TalendConnectionHandleLocator locator=new TalendConnectionHandleLocator(getHostFigure());
        handle.setLocator(locator);
      }
    }
    return;
  }
  if (getHost().getModel() instanceof Node) {
    if (handle == null) {
      handle=new TalendConnectionHandle(this.nodePart);
      TalendConnectionHandleLocator locator=new TalendConnectionHandleLocator(getHostFigure());
      handle.setLocator(locator);
    }
 else {
      if (handle.getLocator() == null) {
        TalendConnectionHandleLocator locator=new TalendConnectionHandleLocator(getHostFigure());
        handle.setLocator(locator);
      }
    }
    handle.setMainNodeConnector(connector);
    layer.add(handle);
    if (!isMove) {
      handle.getLocator().relocate(handle);
    }
    getHost().getViewer().getVisualPartMap().put(handle,getHost());
  }
}
Program: 119004
Project: 119004
Buggy source:
@Override public void showSelection(){
  if (this.sourceFigure == null) {
    this.sourceFigure=getHostFigure();
    this.sourceFigure.addFigureListener(this.figureListener);
  }
  INodeConnector connector=new NodeConnectorTool(nodePart).getConnector();
  if (connector == null) {
    this.setHideHandle(true);
    return;
  }
 else {
    this.setHideHandle(false);
  }
  showFeedback(false);
}

Fixed version (ground truth):
@Override public void showSelection(){
  if (this.sourceFigure == null) {
    this.sourceFigure=getHostFigure();
    this.sourceFigure.addFigureListener(this.figureListener);
  }
  INodeConnector connector=new NodeConnectorTool(nodePart).getConnector();
  if (connector == null) {
    this.setHideHandle(true);
    return;
  }
 else {
    this.setHideHandle(false);
  }
  showFeedback(false,connector);
}
Program: 119005
Project: 119005
Buggy source:
public SelectionFeedbackEditPolicy(NodePart nodePart){
  this.nodePart=nodePart;
  this.figureListener=new FigureListener(){
    @Override public void figureMoved(    IFigure source){
      List selectedEditPart=getHost().getViewer().getSelectedEditParts();
      if (selectedEditPart.contains(getHost())) {
        showFeedback(true);
      }
    }
  }
;
}

Fixed version (ground truth):
public SelectionFeedbackEditPolicy(NodePart nodePart){
  this.nodePart=nodePart;
  this.figureListener=new FigureListener(){
    @Override public void figureMoved(    IFigure source){
      List selectedEditPart=getHost().getViewer().getSelectedEditParts();
      if (selectedEditPart.contains(getHost())) {
        showFeedback(true,null);
      }
    }
  }
;
}
Program: 119006
Project: 119006
Buggy source:
public MissingSettingsMultiThreadDynamicComposite(Composite parentComposite,int styles,EComponentCategory section,Element element,boolean isCompactView){
  super(parentComposite,styles,section,element,isCompactView);
}

Fixed version (ground truth):
public MissingSettingsMultiThreadDynamicComposite(Composite parentComposite,int styles,EComponentCategory section,Element element,boolean isCompactView){
  super(parentComposite,styles,section,element,isCompactView);
  ModulesNeededProvider.addChangedLibrariesListener(this);
}
Program: 119007
Project: 119007
Buggy source:
private boolean isConnectorValid(INodeConnector mainConnector){
  if (mainConnector == null) {
    return false;
  }
  if (mainConnector.getMaxLinkOutput() != -1) {
    if (mainConnector.getCurLinkNbOutput() >= mainConnector.getMaxLinkOutput()) {
      return false;
    }
  }
  if (mainConnector.getMaxLinkOutput() == 0) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean isConnectorValid(INodeConnector mainConnector){
  if (mainConnector == null) {
    return false;
  }
  if (!mainConnector.isShow()) {
    return false;
  }
  if (mainConnector.getMaxLinkOutput() != -1) {
    if (mainConnector.getCurLinkNbOutput() >= mainConnector.getMaxLinkOutput()) {
      return false;
    }
  }
  if (mainConnector.getMaxLinkOutput() == 0) {
    return false;
  }
  return true;
}
Program: 119008
Project: 119008
Buggy source:
/** 
 * Starts monitoring.
 */
private void startMonitoring(){
  if (timer != null) {
    timer.cancel();
  }
  timer=new Timer(true);
  TimerTask timerTask=new TimerTask(){
    @Override public void run(){
      try {
        updatesActiveJvms();
      }
 catch (      Throwable t) {
        Activator.log(IStatus.ERROR,Messages.updateTimerCanceledMsg,t);
        timer.cancel();
      }
    }
  }
;
  long period=Activator.getDefault().getPreferenceStore().getLong(IConstants.UPDATE_PERIOD);
  if (period == 0) {
    period=1000;
  }
  timer.scheduleAtFixedRate(timerTask,0,period);
}

Fixed version (ground truth):
/** 
 * Starts monitoring.
 */
private void startMonitoring(){
  if (timer != null) {
    timer.cancel();
  }
  timer=new Timer(true);
  TimerTask timerTask=new TimerTask(){
    @Override public void run(){
      try {
        updatesActiveJvms();
      }
 catch (      Throwable t) {
        Activator.log(IStatus.WARNING,Messages.updateTimerCanceledMsg,t);
        timer.cancel();
      }
    }
  }
;
  long period=Activator.getDefault().getPreferenceStore().getLong(IConstants.UPDATE_PERIOD);
  if (period == 0) {
    period=1000;
  }
  timer.scheduleAtFixedRate(timerTask,0,period);
}
Program: 119009
Project: 119009
Buggy source:
@Override public void run(){
  try {
    updatesActiveJvms();
  }
 catch (  Throwable t) {
    Activator.log(IStatus.ERROR,Messages.updateTimerCanceledMsg,t);
    timer.cancel();
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    updatesActiveJvms();
  }
 catch (  Throwable t) {
    Activator.log(IStatus.WARNING,Messages.updateTimerCanceledMsg,t);
    timer.cancel();
  }
}
Program: 119012
Project: 119012
Buggy source:
private void addFileInputDelimitedParameters(List<IElementParameter> elemParamList,INode node){
  IElementParameter newParam=new ElementParameter(node);
  newParam.setName(EParameterName.IMPLICIT_TCONTEXTLOAD_FILE.getName());
  newParam.setFieldType(EParameterFieldType.TEXT);
  newParam.setValue("String_Node_Str");
  elemParamList.add(newParam);
  newParam=new ElementParameter(node);
  newParam.setName(JobSettingsConstants.IMPLICIT_TCONTEXTLOAD_REGEX);
  newParam.setFieldType(EParameterFieldType.TEXT);
  newParam.setValue("String_Node_Str");
  elemParamList.add(newParam);
}

Fixed version (ground truth):
private void addFileInputDelimitedParameters(List<IElementParameter> elemParamList,INode node){
  IElementParameter newParam=new ElementParameter(node);
  newParam.setName(EParameterName.IMPLICIT_TCONTEXTLOAD_FILE.getName());
  newParam.setFieldType(EParameterFieldType.TEXT);
  newParam.setValue("String_Node_Str");
  elemParamList.add(newParam);
  newParam=new ElementParameter(node);
  newParam.setName(JobSettingsConstants.IMPLICIT_TCONTEXTLOAD_REGEX);
  newParam.setFieldType(EParameterFieldType.TEXT);
  newParam.setValue("String_Node_Str");
  elemParamList.add(newParam);
  newParam=new ElementParameter(node);
  newParam.setName("String_Node_Str");
  newParam.setFieldType(EParameterFieldType.CHECK);
  newParam.setValue("String_Node_Str");
  elemParamList.add(newParam);
}
Program: 119014
Project: 119014
Buggy source:
/** 
 * @see org.talend.repository.ui.wizards.newproject.NewProjectWizardPage#checkFieldsValue
 */
protected void validateNewProjectName(){
  if (!createNewProject.getSelection()) {
    return;
  }
  LoginProjectPageErrorManager loginProjectPageErrorManager=getErrorManager();
  loginProjectPageErrorManager.clearCreateNewProjectError();
  String projectNameErrorMessage=null;
  String strNewProjectName=newProjectName.getText();
  if (strNewProjectName.length() == 0) {
    projectNameErrorMessage=Messages.getString("String_Node_Str");
  }
 else {
    if (ProjectUtils.isNotValidProjectName(strNewProjectName)) {
      projectNameErrorMessage=Messages.getString("String_Node_Str");
    }
 else {
      if (isProjectNameAlreadyUsed(strNewProjectName)) {
        projectNameErrorMessage=Messages.getString("String_Node_Str");
      }
    }
  }
  if (projectNameErrorMessage != null) {
    loginProjectPageErrorManager.setCreateNewProjectError(projectNameErrorMessage);
    newProjectName.setToolTipText(projectNameErrorMessage);
    newProjectName.setBackground(LoginDialogV2.RED_COLOR);
    executeCreateNewProject.setEnabled(false);
    refreshUIFinishButtonEnable(false);
  }
 else {
    newProjectName.setToolTipText(strNewProjectName);
    newProjectName.setBackground(null);
    executeCreateNewProject.setEnabled(true);
    refreshUIFinishButtonEnable(true);
    executeCreateNewProject.getShell().setDefaultButton(executeCreateNewProject);
  }
}

Fixed version (ground truth):
/** 
 * @see org.talend.repository.ui.wizards.newproject.NewProjectWizardPage#checkFieldsValue
 */
protected void validateNewProjectName(){
  if (!createNewProject.getSelection()) {
    return;
  }
  LoginProjectPageErrorManager loginProjectPageErrorManager=getErrorManager();
  loginProjectPageErrorManager.clearCreateNewProjectError();
  String projectNameErrorMessage=null;
  String strNewProjectName=newProjectName.getText();
  if (strNewProjectName.length() == 0) {
    projectNameErrorMessage=Messages.getString("String_Node_Str");
  }
 else {
    if (ProjectUtils.isNotValidProjectName(strNewProjectName)) {
      projectNameErrorMessage=Messages.getString("String_Node_Str");
    }
 else {
      if (isProjectNameAlreadyUsed(strNewProjectName)) {
        projectNameErrorMessage=Messages.getString("String_Node_Str");
      }
    }
  }
  if (projectNameErrorMessage != null) {
    loginProjectPageErrorManager.setCreateNewProjectError(projectNameErrorMessage);
    newProjectName.setToolTipText(projectNameErrorMessage);
    newProjectName.setBackground(LoginDialogV2.RED_COLOR);
    executeCreateNewProject.setEnabled(false);
  }
 else {
    newProjectName.setToolTipText(strNewProjectName);
    newProjectName.setBackground(null);
    executeCreateNewProject.setEnabled(true);
    executeCreateNewProject.getShell().setDefaultButton(executeCreateNewProject);
  }
}
Program: 119015
Project: 119015
Buggy source:
protected void changeFinishButtonAction(String newAction){
  finishButtonAction=newAction;
  if (FINISH_ACTION_OPEN_PROJECT.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_UPDATE.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_UPDATE_DETAILS.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_CREATE_SANDBOX.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_IMPORT_DEMO_PROJECT.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_IMPORT_LOCAL_PROJECT.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_CREATE_NEW_PROJECT.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else {
    finishButton.setText(Messages.getString("String_Node_Str"));
    finishButtonAction=FINISH_ACTION_RESTART;
  }
  updateButtonLayoutSize(finishButton);
  navigateArea.layout();
}

Fixed version (ground truth):
protected void changeFinishButtonAction(String newAction){
  finishButtonAction=newAction;
  if (FINISH_ACTION_OPEN_PROJECT.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_UPDATE.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_UPDATE_DETAILS.equals(newAction)) {
    finishButton.setText(Messages.getString("String_Node_Str"));
  }
 else   if (FINISH_ACTION_CREATE_SANDBOX.equals(newAction)) {
  }
 else   if (FINISH_ACTION_IMPORT_DEMO_PROJECT.equals(newAction)) {
  }
 else   if (FINISH_ACTION_IMPORT_LOCAL_PROJECT.equals(newAction)) {
  }
 else   if (FINISH_ACTION_CREATE_NEW_PROJECT.equals(newAction)) {
  }
 else {
    finishButton.setText(Messages.getString("String_Node_Str"));
    finishButtonAction=FINISH_ACTION_RESTART;
  }
  updateButtonLayoutSize(finishButton);
  navigateArea.layout();
}
Program: 119016
Project: 119016
Buggy source:
protected void resetProjectOperationSelection(){
  selectExistingProject.setSelection(true);
  refreshProjectListAreaEnable(selectExistingProject.isEnabled());
  importDemoProject.setSelection(false);
  executeImportDemoProject.setVisible(false);
  importLocalProject.setSelection(false);
  executeImportLocalProject.setVisible(false);
  createSandBoxProject.setSelection(false);
  executeCreateSandBoxProject.setVisible(false);
  createNewProject.setSelection(false);
  createNewProject.setText(Messages.getString("String_Node_Str"));
  newProjectName.setVisible(false);
  executeCreateNewProject.setVisible(false);
  changeFinishButtonAction();
  refreshUIFinishButtonEnable();
  finishButton.getShell().setDefaultButton(finishButton);
}

Fixed version (ground truth):
protected void resetProjectOperationSelection(final boolean needCheckError){
  selectExistingProject.setSelection(true);
  refreshProjectListAreaEnable(selectExistingProject.isEnabled());
  importDemoProject.setSelection(false);
  executeImportDemoProject.setVisible(false);
  importLocalProject.setSelection(false);
  executeImportLocalProject.setVisible(false);
  createSandBoxProject.setSelection(false);
  executeCreateSandBoxProject.setVisible(false);
  createNewProject.setSelection(false);
  createNewProject.setText(Messages.getString("String_Node_Str"));
  newProjectName.setVisible(false);
  executeCreateNewProject.setVisible(false);
  if (needCheckError) {
    try {
      checkErrors();
    }
 catch (    PersistenceException e) {
      CommonExceptionHandler.process(e);
    }
  }
 else {
    changeFinishButtonAction();
    refreshUIFinishButtonEnable();
    finishButton.getShell().setDefaultButton(finishButton);
  }
}
Program: 119017
Project: 119017
Buggy source:
protected void createNewProject(){
  IProxyRepositoryFactory repositoryFactory=ProxyRepositoryFactory.getInstance();
  Context ctx=CorePlugin.getContext();
  RepositoryContext repositoryContext=(RepositoryContext)ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);
  try {
    Project projectInfor=ProjectHelper.createProject(newProjectName.getText().trim().replace(' ','_'),"String_Node_Str",ECodeLanguage.JAVA.getName(),repositoryContext.getUser());
    Project project=repositoryFactory.createProject(projectInfor);
    resetProjectOperationSelectionWithBusyCursor();
    fillUIProjectListWithBusyCursor();
    selectProject(project.getLabel());
    checkErrors();
    newProjectName.setText("String_Node_Str");
  }
 catch (  PersistenceException e) {
    MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    MessageBoxExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
protected void createNewProject(){
  IProxyRepositoryFactory repositoryFactory=ProxyRepositoryFactory.getInstance();
  Context ctx=CorePlugin.getContext();
  RepositoryContext repositoryContext=(RepositoryContext)ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);
  try {
    Project projectInfor=ProjectHelper.createProject(newProjectName.getText().trim().replace(' ','_'),"String_Node_Str",ECodeLanguage.JAVA.getName(),repositoryContext.getUser());
    Project project=repositoryFactory.createProject(projectInfor);
    resetProjectOperationSelectionWithBusyCursor(false);
    fillUIProjectListWithBusyCursor();
    selectProject(project.getLabel());
    checkErrors();
    newProjectName.setText("String_Node_Str");
  }
 catch (  PersistenceException e) {
    MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    MessageBoxExceptionHandler.process(e);
  }
}
Program: 119019
Project: 119019
Buggy source:
/** 
 * @see org.talend.repository.ui.login.LoginComposite#setStatusArea()
 * @throws PersistenceException
 */
public void checkErrors() throws PersistenceException {
  try {
    errorManager.clearAllMessages();
    if (getConnection() != null) {
      final boolean localConn=getConnection().getRepositoryId() == null || getConnection().getRepositoryId().equals(RepositoryConstants.REPOSITORY_LOCAL_ID);
      boolean visible=PluginChecker.isSVNProviderPluginLoaded() && !localConn;
      if (!isWorkSpaceSame()) {
        errorManager.setErrMessage(Messages.getString("String_Node_Str"));
      }
 else       if (projectViewer == null || projectViewer.getList().getItemCount() > 0) {
      }
 else {
        if (LoginHelper.isRemoteConnection(getConnection())) {
          errorManager.setErrMessage(Messages.getString("String_Node_Str"));
        }
 else {
          errorManager.setErrMessage(Messages.getString("String_Node_Str"));
        }
      }
    }
 else {
      errorManager.setErrMessage(Messages.getString("String_Node_Str"));
    }
  }
  finally {
    updateFinishButtonStatus();
  }
}

Fixed version (ground truth):
/** 
 * @see org.talend.repository.ui.login.LoginComposite#setStatusArea()
 * @throws PersistenceException
 */
public void checkErrors() throws PersistenceException {
  try {
    if (getConnection() != null) {
      final boolean localConn=getConnection().getRepositoryId() == null || getConnection().getRepositoryId().equals(RepositoryConstants.REPOSITORY_LOCAL_ID);
      boolean visible=PluginChecker.isSVNProviderPluginLoaded() && !localConn;
      if (!isWorkSpaceSame()) {
        errorManager.setErrMessage(Messages.getString("String_Node_Str"));
      }
 else       if (projectViewer == null || projectViewer.getList().getItemCount() > 0) {
        errorManager.clearAllMessages();
      }
 else {
        if (LoginHelper.isRemoteConnection(getConnection())) {
          errorManager.setErrMessage(Messages.getString("String_Node_Str"));
        }
 else {
          errorManager.setErrMessage(Messages.getString("String_Node_Str"));
        }
      }
    }
 else {
      errorManager.setErrMessage(Messages.getString("String_Node_Str"));
    }
  }
  finally {
    updateFinishButtonStatus();
  }
}
Program: 119020
Project: 119020
Buggy source:
/** 
 * @see org.talend.repository.ui.wizards.newproject.NewProjectWizardPage#checkFieldsValue
 */
protected void validateNewProjectName(){
  if (!createNewProject.getSelection()) {
    return;
  }
  LoginProjectPageErrorManager loginProjectPageErrorManager=getErrorManager();
  loginProjectPageErrorManager.clearCreateNewProjectError();
  String projectNameErrorMessage=null;
  String strNewProjectName=newProjectName.getText();
  if (strNewProjectName.length() == 0) {
    projectNameErrorMessage=Messages.getString("String_Node_Str");
  }
 else {
    if (ProjectUtils.isNotValidProjectName(strNewProjectName)) {
      projectNameErrorMessage=Messages.getString("String_Node_Str");
    }
 else {
      if (isProjectNameAlreadyUsed(strNewProjectName)) {
        projectNameErrorMessage=Messages.getString("String_Node_Str");
      }
    }
  }
  if (projectNameErrorMessage != null) {
    loginProjectPageErrorManager.setCreateNewProjectError(projectNameErrorMessage);
    newProjectName.setToolTipText(projectNameErrorMessage);
    newProjectName.setBackground(LoginDialogV2.RED_COLOR);
    executeCreateNewProject.setEnabled(false);
  }
 else {
    newProjectName.setToolTipText(strNewProjectName);
    newProjectName.setBackground(null);
    executeCreateNewProject.setEnabled(true);
    executeCreateNewProject.getShell().setDefaultButton(executeCreateNewProject);
  }
}

Fixed version (ground truth):
/** 
 * @see org.talend.repository.ui.wizards.newproject.NewProjectWizardPage#checkFieldsValue
 */
protected void validateNewProjectName(){
  if (!createNewProject.getSelection()) {
    return;
  }
  LoginProjectPageErrorManager loginProjectPageErrorManager=getErrorManager();
  String projectNameErrorMessage=null;
  String strNewProjectName=newProjectName.getText();
  if (strNewProjectName.length() == 0) {
    projectNameErrorMessage=Messages.getString("String_Node_Str");
  }
 else {
    if (ProjectUtils.isNotValidProjectName(strNewProjectName)) {
      projectNameErrorMessage=Messages.getString("String_Node_Str");
    }
 else {
      if (isProjectNameAlreadyUsed(strNewProjectName)) {
        projectNameErrorMessage=Messages.getString("String_Node_Str");
      }
    }
  }
  if (projectNameErrorMessage != null) {
    loginProjectPageErrorManager.setCreateNewProjectError(projectNameErrorMessage);
    newProjectName.setToolTipText(projectNameErrorMessage);
    newProjectName.setBackground(LoginDialogV2.RED_COLOR);
    executeCreateNewProject.setEnabled(false);
  }
 else {
    String createNewProjectError=loginProjectPageErrorManager.getCreateNewProjectError();
    if (createNewProjectError != null && !createNewProjectError.isEmpty()) {
      loginProjectPageErrorManager.clearCreateNewProjectError();
    }
    newProjectName.setToolTipText(strNewProjectName);
    newProjectName.setBackground(null);
    executeCreateNewProject.setEnabled(true);
    executeCreateNewProject.getShell().setDefaultButton(executeCreateNewProject);
  }
}
Program: 119021
Project: 119021
Buggy source:
protected void resetProjectOperationSelectionWithBusyCursor(){
  BusyIndicator.showWhile(getDisplay(),new Runnable(){
    @Override public void run(){
      resetProjectOperationSelection();
    }
  }
);
}

Fixed version (ground truth):
protected void resetProjectOperationSelectionWithBusyCursor(final boolean needCheckError){
  BusyIndicator.showWhile(getDisplay(),new Runnable(){
    @Override public void run(){
      resetProjectOperationSelection(needCheckError);
    }
  }
);
}
Program: 119022
Project: 119022
Buggy source:
public void clearCreateNewProjectError(){
  createNewProjectErrorMsg=null;
  loginDialog.clearErrorMessage();
  showErrorMessage();
}

Fixed version (ground truth):
public void clearCreateNewProjectError(){
  createNewProjectErrorMsg=null;
  if (!showErrorMessage()) {
    loginDialog.clearErrorMessage();
  }
}
Program: 119023
Project: 119023
Buggy source:
@Override public void afterCreateControl(){
  resetProjectOperationSelectionWithBusyCursor();
  alwaysAsk.setSelection(LoginHelper.isAlwaysAskAtStartup());
  previousButton.setVisible(false);
}

Fixed version (ground truth):
@Override public void afterCreateControl(){
  resetProjectOperationSelectionWithBusyCursor(false);
  alwaysAsk.setSelection(LoginHelper.isAlwaysAskAtStartup());
  previousButton.setVisible(false);
}
Program: 119025
Project: 119025
Buggy source:
protected void updateStudio(){
  try {
    if (FINISH_ACTION_UPDATE.equals(finishButtonAction)) {
      ICoreTisService tisService=(ICoreTisService)GlobalServiceRegister.getDefault().getService(ICoreTisService.class);
      afterUpdate=false;
      if (tisService != null) {
        tisService.downLoadAndInstallUpdates(getConnection().getUser(),getConnection().getPassword(),getAdminURL());
        afterUpdate=true;
        tisService.setNeedResartAfterUpdate(afterUpdate);
      }
      isRestart=true;
      loginHelper.saveLastConnectionBean(getConnection());
      finishPressed();
    }
 else {
      String[] buttons=new String[]{IDialogConstants.OK_LABEL};
      String message=Messages.getString("String_Node_Str");
      ArchivaErrorDialog archivaDialog=new ArchivaErrorDialog(getShell(),"String_Node_Str",null,message,MessageDialog.WARNING,buttons,0);
      archivaDialog.open();
    }
  }
 catch (  Exception e1) {
    CommonExceptionHandler.process(e1);
  }
}

Fixed version (ground truth):
protected void updateStudio(){
  try {
    if (FINISH_ACTION_UPDATE.equals(finishButtonAction)) {
      ICoreTisService tisService=(ICoreTisService)GlobalServiceRegister.getDefault().getService(ICoreTisService.class);
      afterUpdate=false;
      if (tisService != null) {
        tisService.downLoadAndInstallUpdates(getConnection().getUser(),getConnection().getPassword(),getAdminURL());
        afterUpdate=true;
        tisService.setNeedResartAfterUpdate(afterUpdate);
      }
      LoginHelper.isRestart=true;
      loginHelper.saveLastConnectionBean(getConnection());
      finishPressed();
    }
 else {
      String[] buttons=new String[]{IDialogConstants.OK_LABEL};
      String message=Messages.getString("String_Node_Str");
      ArchivaErrorDialog archivaDialog=new ArchivaErrorDialog(getShell(),"String_Node_Str",null,message,MessageDialog.WARNING,buttons,0);
      archivaDialog.open();
    }
  }
 catch (  Exception e1) {
    CommonExceptionHandler.process(e1);
  }
}
Program: 119026
Project: 119026
Buggy source:
@Override protected Composite createCustomArea(Composite parent){
  Composite helpComposite=new Composite(parent,SWT.NONE);
  GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
  gridData.minimumHeight=45;
  helpComposite.setLayoutData(gridData);
  GC gc=new GC(helpComposite);
  String linkLabel=Messages.getString("String_Node_Str");
  Point linkSize=gc.stringExtent(linkLabel);
  Font font=new Font(null,LoginComposite.FONT_ARIAL,9,SWT.NORMAL);
  Hyperlink link=new Hyperlink(helpComposite,SWT.NONE);
  link.setText(linkLabel);
  link.setSize(linkSize.x + 15,30);
  link.setBackground(helpComposite.getBackground());
  link.setUnderlined(true);
  link.setFont(font);
  GridData gridData1=new GridData(SWT.FILL,SWT.CENTER,true,false);
  gridData1.widthHint=this.getMinimumMessageWidth();
  link.setLayoutData(gridData1);
  gc.dispose();
  link.addHyperlinkListener(new HyperlinkAdapter(){
    @Override public void linkActivated(    HyperlinkEvent e){
      String url="String_Node_Str";
      TalendBrowserLaunchHelper.openURL(url);
    }
  }
);
  return helpComposite;
}

Fixed version (ground truth):
@Override protected Composite createCustomArea(Composite parent){
  Composite helpComposite=new Composite(parent,SWT.NONE);
  GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
  gridData.minimumHeight=45;
  helpComposite.setLayoutData(gridData);
  GC gc=new GC(helpComposite);
  String linkLabel=Messages.getString("String_Node_Str");
  Point linkSize=gc.stringExtent(linkLabel);
  Font font=new Font(null,LoginDialogV2.FONT_ARIAL,9,SWT.NORMAL);
  Hyperlink link=new Hyperlink(helpComposite,SWT.NONE);
  link.setText(linkLabel);
  link.setSize(linkSize.x + 15,30);
  link.setBackground(helpComposite.getBackground());
  link.setUnderlined(true);
  link.setFont(font);
  GridData gridData1=new GridData(SWT.FILL,SWT.CENTER,true,false);
  gridData1.widthHint=this.getMinimumMessageWidth();
  link.setLayoutData(gridData1);
  gc.dispose();
  link.addHyperlinkListener(new HyperlinkAdapter(){
    @Override public void linkActivated(    HyperlinkEvent e){
      String url="String_Node_Str";
      TalendBrowserLaunchHelper.openURL(url);
    }
  }
);
  return helpComposite;
}
Program: 119027
Project: 119027
Buggy source:
public void finishPressed(){
  if (isRestart) {
    loginDialog.okPressed();
  }
 else {
    boolean isLogInOk=loginHelper.logIn(getConnection(),getProject());
    if (isLogInOk) {
      LoginHelper.setAlwaysAskAtStartup(alwaysAsk.getSelection());
      loginDialog.okPressed();
    }
 else {
      fillUIProjectListWithBusyCursor();
    }
  }
}

Fixed version (ground truth):
public void finishPressed(){
  if (LoginHelper.isRestart) {
    loginDialog.okPressed();
  }
 else {
    boolean isLogInOk=loginHelper.logIn(getConnection(),getProject());
    if (isLogInOk) {
      LoginHelper.setAlwaysAskAtStartup(alwaysAsk.getSelection());
      loginDialog.okPressed();
    }
 else {
      fillUIProjectListWithBusyCursor();
    }
  }
}
Program: 119028
Project: 119028
Buggy source:
protected void restartStudio(){
  isRestart=true;
  ConnectionBean iBean=getConnection();
  loginHelper.saveLastConnectionBean(iBean);
  String workspace=iBean.getWorkSpace();
  if (workspace != null) {
    workspace=workspace.replaceAll("String_Node_Str","String_Node_Str");
  }
  EclipseCommandLine.updateOrCreateExitDataPropertyWithCommand("String_Node_Str",workspace,false);
  ChooseWorkspaceData workspaceData=new ChooseWorkspaceData("String_Node_Str");
  workspaceData.workspaceSelected(iBean.getWorkSpace());
  workspaceData.writePersistedData();
  finishPressed();
}

Fixed version (ground truth):
protected void restartStudio(){
  LoginHelper.isRestart=true;
  ConnectionBean iBean=getConnection();
  loginHelper.saveLastConnectionBean(iBean);
  String workspace=iBean.getWorkSpace();
  if (workspace != null) {
    workspace=workspace.replaceAll("String_Node_Str","String_Node_Str");
  }
  EclipseCommandLine.updateOrCreateExitDataPropertyWithCommand("String_Node_Str",workspace,false);
  ChooseWorkspaceData workspaceData=new ChooseWorkspaceData("String_Node_Str");
  workspaceData.workspaceSelected(iBean.getWorkSpace());
  workspaceData.writePersistedData();
  finishPressed();
}
Program: 119029
Project: 119029
Buggy source:
private void showHideTexts(){
  if (connection != null) {
    IRepositoryFactory factory=RepositoryFactoryProvider.getRepositoriyById(connection.getRepositoryId());
    if (factory != null) {
      boolean authenticationNeeded=factory.isAuthenticationNeeded();
      if (authenticationNeeded) {
        passwordText.setEnabled(true);
        passwordText.setEditable(true);
        passwordText.setBackground(LoginComposite.WHITE_COLOR);
        hideControl(passwordText,false,false);
        hideControl(passwordLabel,false,false);
      }
 else {
        passwordText.setText("String_Node_Str");
        passwordText.setEnabled(false);
        passwordText.setEditable(false);
        passwordText.setBackground(LoginComposite.GREY_COLOR);
        hideControl(passwordText,true,false);
        hideControl(passwordLabel,true,false);
      }
      passwordText.getParent().layout();
    }
  }
}

Fixed version (ground truth):
private void showHideTexts(){
  if (connection != null) {
    IRepositoryFactory factory=RepositoryFactoryProvider.getRepositoriyById(connection.getRepositoryId());
    if (factory != null) {
      boolean authenticationNeeded=factory.isAuthenticationNeeded();
      if (authenticationNeeded) {
        passwordText.setEnabled(true);
        passwordText.setEditable(true);
        passwordText.setBackground(LoginDialogV2.WHITE_COLOR);
        hideControl(passwordText,false,false);
        hideControl(passwordLabel,false,false);
      }
 else {
        passwordText.setText("String_Node_Str");
        passwordText.setEnabled(false);
        passwordText.setEditable(false);
        passwordText.setBackground(LoginDialogV2.GREY_COLOR);
        hideControl(passwordText,true,false);
        hideControl(passwordLabel,true,false);
      }
      passwordText.getParent().layout();
    }
  }
}
Program: 119031
Project: 119031
Buggy source:
public boolean isWorkSpaceSame(){
  ConnectionBean iBean=getConnection();
  if (iBean == null) {
    return false;
  }
  String workspace=iBean.getWorkSpace();
  String defaultPath=new Path(Platform.getInstanceLocation().getURL().getPath()).toFile().getPath();
  if (EnvironmentUtils.isWindowsSystem()) {
    return workspace.equalsIgnoreCase(defaultPath);
  }
 else {
    return workspace.equals(defaultPath);
  }
}

Fixed version (ground truth):
public boolean isWorkSpaceSame(){
  ConnectionBean iBean=getConnection();
  if (iBean == null) {
    return false;
  }
  if (RepositoryPlugin.getDefault().getBundle().getBundleContext().getProperty("String_Node_Str") != null) {
    return true;
  }
  String workspace=iBean.getWorkSpace();
  String defaultPath=new Path(Platform.getInstanceLocation().getURL().getPath()).toFile().getPath();
  if (EnvironmentUtils.isWindowsSystem()) {
    return workspace.equalsIgnoreCase(defaultPath);
  }
 else {
    return workspace.equals(defaultPath);
  }
}
Program: 119035
Project: 119035
Buggy source:
@Override public Set<JobInfo> getBuildChildrenJobs(){
  if (buildChildrenJobs == null || buildChildrenJobs.isEmpty()) {
    buildChildrenJobs=new HashSet<JobInfo>();
    if (property != null) {
      Set<JobInfo> infos=ProcessorUtilities.getChildrenJobInfo((ProcessItem)property.getItem());
      for (      JobInfo jobInfo : infos) {
        buildChildrenJobs.add(jobInfo);
      }
    }
  }
  return this.buildChildrenJobs;
}

Fixed version (ground truth):
@Override public Set<JobInfo> getBuildChildrenJobs(){
  if (buildChildrenJobs == null || buildChildrenJobs.isEmpty()) {
    buildChildrenJobs=new HashSet<JobInfo>();
    if (property != null) {
      Set<JobInfo> infos=ProcessorUtilities.getChildrenJobInfo((ProcessItem)property.getItem());
      for (      JobInfo jobInfo : infos) {
        if (jobInfo.isTestContainer() && !ProcessUtils.isOptionChecked(getArguments(),TalendProcessArgumentConstant.ARG_GENERATE_OPTION,TalendProcessOptionConstants.GENERATE_TESTS)) {
          continue;
        }
        buildChildrenJobs.add(jobInfo);
      }
    }
  }
  return this.buildChildrenJobs;
}
Program: 119036
Project: 119036
Buggy source:
/** 
 * create component at current position, according to select proposal label DOC talend2 Comment method "createComponent".
 * @param componentName
 * @param location
 */
protected void acceptProposal(){
  String componentName=assistText.getText().trim();
  org.eclipse.swt.graphics.Point componentLocation=assistText.getLocation();
  componentLocation.y+=assistText.getLineHeight();
  disposeAssistText();
  Object createdNode=createComponent(components.get(componentName),componentLocation);
  selectComponent(createdNode);
}

Fixed version (ground truth):
protected void acceptProposal(IComponent component){
  org.eclipse.swt.graphics.Point componentLocation=assistText.getLocation();
  componentLocation.y+=assistText.getLineHeight();
  disposeAssistText();
  Object createdNode=createComponent(component,componentLocation);
  selectComponent(createdNode);
}
Program: 119037
Project: 119037
Buggy source:
private void createAssistText(org.eclipse.swt.graphics.Point cursorRelativePosition){
  if (bindingService != null) {
    bindingService.setKeyFilterEnabled(false);
  }
  highlightOveredConnection(cursorRelativePosition);
  assistText=new Text((Composite)graphicControl,SWT.BORDER);
  assistText.setLocation(cursorRelativePosition.x,cursorRelativePosition.y - assistText.getLineHeight());
  assistText.setSize(200,assistText.computeSize(SWT.DEFAULT,SWT.DEFAULT).y);
  assistText.setFocus();
  TalendEditorComponentProposalProvider proposalProvider=new TalendEditorComponentProposalProvider(components);
  contentProposalAdapter=new ContentProposalAdapter(assistText,new TextContentAdapter(),proposalProvider,null,null);
  contentProposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
  contentProposalAdapter.setLabelProvider(new TalendEditorComponentLabelProvider(components));
}

Fixed version (ground truth):
private void createAssistText(org.eclipse.swt.graphics.Point cursorRelativePosition){
  if (bindingService != null) {
    bindingService.setKeyFilterEnabled(false);
  }
  highlightOveredConnection(cursorRelativePosition);
  assistText=new Text((Composite)graphicControl,SWT.BORDER);
  assistText.setLocation(cursorRelativePosition.x,cursorRelativePosition.y - assistText.getLineHeight());
  assistText.setSize(200,assistText.computeSize(SWT.DEFAULT,SWT.DEFAULT).y);
  assistText.setFocus();
  TalendEditorComponentProposalProvider proposalProvider=new TalendEditorComponentProposalProvider(this,proposalList);
  contentProposalAdapter=new ContentProposalAdapter(assistText,new TextContentAdapter(),proposalProvider,null,null);
  contentProposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
  contentProposalAdapter.setLabelProvider(new TalendEditorComponentLabelProvider());
}
Program: 119038
Project: 119038
Buggy source:
public TalendEditorComponentCreationAssist(String categoryName,GraphicalViewer viewer,CommandStack commandStack,IProcess2 process){
  this.graphicViewer=viewer;
  this.graphicControl=viewer.getControl();
  this.components=TalendEditorComponentCreationUtil.getComponentsInCategory(categoryName);
  this.process=process;
  Object service=DesignerPlugin.getDefault().getWorkbench().getService(IBindingService.class);
  if (service != null && service instanceof IBindingService) {
    bindingService=(IBindingService)service;
    isKeyFilterEnabled=bindingService.isKeyFilterEnabled();
  }
}

Fixed version (ground truth):
public TalendEditorComponentCreationAssist(String categoryName,GraphicalViewer viewer,CommandStack commandStack,IProcess2 process){
  this.graphicViewer=viewer;
  this.graphicControl=viewer.getControl();
  this.process=process;
  proposalList=new ArrayList<IContentProposal>();
  Object service=DesignerPlugin.getDefault().getWorkbench().getService(IBindingService.class);
  if (service != null && service instanceof IBindingService) {
    bindingService=(IBindingService)service;
    isKeyFilterEnabled=bindingService.isKeyFilterEnabled();
  }
}
Program: 119039
Project: 119039
Buggy source:
public static Map<String,IComponent> getComponentsInType(String categoryName,EConnectionType type){
  if (type == null) {
    type=ConnectionManager.getNewConnectionType();
  }
  Map<String,IComponent> lineTypeMap=lineTypeEntries.get(type);
  if (lineTypeMap != null && !lineTypeMap.isEmpty()) {
    return lineTypeMap;
  }
  Map<String,IComponent> map=entries.get(categoryName);
  if (map == null) {
    map=new HashMap<String,IComponent>();
    entries.put(categoryName,map);
    readComponentsInCategory(categoryName,map);
  }
  lineTypeMap=new HashMap<String,IComponent>();
  for (  String key : map.keySet()) {
    IComponent component=map.get(key);
    if (isComponentAllowed(component,type)) {
      lineTypeMap.put(component.getName(),component);
    }
  }
  lineTypeEntries.put(type,lineTypeMap);
  return lineTypeMap;
}

Fixed version (ground truth):
public static Map<String,IComponent> getComponentsInType(String categoryName,EConnectionType type){
  if (type == null) {
    type=ConnectionManager.getNewConnectionType();
  }
  Map<String,IComponent> lineTypeMap=lineTypeEntries.get(type);
  if (lineTypeMap != null && !lineTypeMap.isEmpty()) {
    return lineTypeMap;
  }
  Map<String,IComponent> map=entries.get(categoryName);
  if (map == null) {
    map=new HashMap<String,IComponent>();
    entries.put(categoryName,map);
    readComponentsInCategory(categoryName,map);
  }
  lineTypeMap=new HashMap<String,IComponent>();
  for (  String key : map.keySet()) {
    IComponent component=map.get(key);
    if (isComponentAllowedWithConnectionType(component,type)) {
      lineTypeMap.put(component.getName(),component);
    }
  }
  lineTypeEntries.put(type,lineTypeMap);
  return lineTypeMap;
}
Program: 119040
Project: 119040
Buggy source:
public String getText(Object element){
  if (element != null && element instanceof IContentProposal) {
    IContentProposal proposal=(IContentProposal)element;
    String label=proposal.getLabel();
    IComponent iComponent=components.get(label);
    if (iComponent != null) {
      return label + "String_Node_Str" + iComponent.getOriginalFamilyName();
    }
 else {
      return label;
    }
  }
  return super.getText(element);
}

Fixed version (ground truth):
@Override public String getText(Object element){
  if (element != null && element instanceof ComponentContentProposal) {
    ComponentContentProposal proposal=(ComponentContentProposal)element;
    String label=proposal.getLabel();
    IComponent iComponent=proposal.getComponent();
    if (iComponent != null) {
      return label + "String_Node_Str" + iComponent.getOriginalFamilyName();
    }
 else {
      return label;
    }
  }
  return super.getText(element);
}
Program: 119041
Project: 119041
Buggy source:
public Image getImage(Object element){
  if (element != null && element instanceof IContentProposal) {
    IContentProposal proposal=(IContentProposal)element;
    IComponent iComponent=components.get(proposal.getLabel());
    if (iComponent != null && iComponent.getIcon16() != null) {
      return CoreImageProvider.getComponentImageFromDesc(iComponent.getIcon16());
    }
  }
  return super.getImage(element);
}

Fixed version (ground truth):
@Override public Image getImage(Object element){
  if (element != null && element instanceof ComponentContentProposal) {
    ComponentContentProposal proposal=(ComponentContentProposal)element;
    IComponent iComponent=proposal.getComponent();
    if (iComponent != null && iComponent.getIcon16() != null) {
      return CoreImageProvider.getComponentImageFromDesc(iComponent.getIcon16());
    }
  }
  return super.getImage(element);
}