nus-yam/ex-repair huggingface dataset:
Program: 126021
Project: 126021
Buggy source:
@Override public ResultSet getTables(String catalog,String schemaPattern,String tableNamePattern,String[] types) throws SQLException {
  ResultSet tables=super.getTables(catalog,schemaPattern,tableNamePattern,types);
  List<String[]> list=getTableList(tables);
  if (list.isEmpty()) {
    String sql="String_Node_Str";
    ResultSet rs=null;
    PreparedStatement stmt=null;
    try {
      stmt=connection.prepareStatement(sql);
      if (!StringUtils.isEmpty(tableNamePattern)) {
        stmt.setString(1,tableNamePattern);
      }
      rs=stmt.executeQuery();
      list=getTableList(rs);
    }
 catch (    SQLException e) {
      throw new RuntimeException(e);
    }
 finally {
      try {
        rs.close();
        stmt.close();
      }
 catch (      Exception e) {
      }
    }
  }
  EXASOLResultSet tableResultSet=new EXASOLResultSet();
  tableResultSet.setMetadata(TABLE_META);
  tableResultSet.setData(list);
  return tableResultSet;
}

Fixed version (ground truth):
@Override public ResultSet getTables(String catalog,String schemaPattern,String tableNamePattern,String[] types) throws SQLException {
  ResultSet tables=super.getTables(null,schemaPattern,tableNamePattern,types);
  List<String[]> list=getTableList(tables);
  if (list.isEmpty()) {
    StringBuilder sql=new StringBuilder();
    sql.append("String_Node_Str");
    sql.append("String_Node_Str");
    sql.append("String_Node_Str");
    sql.append("String_Node_Str");
    sql.append("String_Node_Str");
    sql.append("String_Node_Str");
    sql.append("String_Node_Str");
    sql.append("String_Node_Str");
    sql.append("String_Node_Str");
    sql.append("String_Node_Str");
    sql.append("String_Node_Str");
    sql.append("String_Node_Str");
    sql.append("String_Node_Str");
    ResultSet rs=null;
    PreparedStatement stmt=null;
    try {
      stmt=connection.prepareStatement(sql.toString());
      if (!StringUtils.isEmpty(tableNamePattern)) {
        stmt.setString(1,tableNamePattern);
      }
      rs=stmt.executeQuery();
      list=getTableList(rs);
    }
  finally {
      try {
        if (rs != null) {
          rs.close();
        }
        if (stmt != null) {
          stmt.close();
        }
      }
 catch (      Exception e) {
      }
    }
  }
  EXASOLResultSet tableResultSet=new EXASOLResultSet();
  tableResultSet.setMetadata(TABLE_META);
  tableResultSet.setData(list);
  return tableResultSet;
}
Program: 126022
Project: 126022
Buggy source:
private String getStringFromResultSet(ResultSet resultSet,String nameOfString){
  String valueOfString=null;
  try {
    valueOfString=resultSet.getString(nameOfString);
  }
 catch (  SQLException e) {
    log.warn(e,e);
  }
  return valueOfString;
}

Fixed version (ground truth):
private String getStringFromResultSet(ResultSet resultSet,String nameOfString){
  String valueOfString=null;
  try {
    valueOfString=resultSet.getString(nameOfString);
  }
 catch (  SQLException e) {
    logger.warn(e.getMessage(),e);
  }
  return valueOfString;
}
Program: 126023
Project: 126023
Buggy source:
public static boolean isSchemaFromSidOrDatabase(EDatabaseTypeName inType){
  if (EDatabaseTypeName.TERADATA.equals(inType) || EDatabaseTypeName.IMPALA.equals(inType) || EDatabaseTypeName.AS400.equals(inType)|| EDatabaseTypeName.EXASOL.equals(inType)) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public static boolean isSchemaFromSidOrDatabase(EDatabaseTypeName inType){
  if (EDatabaseTypeName.TERADATA.equals(inType) || EDatabaseTypeName.IMPALA.equals(inType) || EDatabaseTypeName.AS400.equals(inType)|| EDatabaseTypeName.EXASOL.equals(inType)|| EDatabaseTypeName.HIVE.equals(inType)) {
    return true;
  }
 else {
    return false;
  }
}
Program: 126024
Project: 126024
Buggy source:
private void setPomForHDLight(IProgressMonitor monitor){
  IProcessor processor=getJobProcessor();
  IElementParameter param=processor.getProcess().getElementParameter("String_Node_Str");
  if (param != null) {
    String distribution=(String)param.getValue();
    if ("String_Node_Str".equals(distribution)) {
      try {
        Model model=MODEL_MANAGER.readMavenModel(getPomFile());
        List<Plugin> plugins=new ArrayList<Plugin>(model.getBuild().getPlugins());
        out:         for (        Plugin plugin : plugins) {
          if (plugin.getArtifactId().equals("String_Node_Str")) {
            List<PluginExecution> pluginExecutions=plugin.getExecutions();
            for (            PluginExecution pluginExecution : pluginExecutions) {
              if (pluginExecution.getId().equals("String_Node_Str")) {
                Object object=pluginExecution.getConfiguration();
                if (object instanceof Xpp3Dom) {
                  Xpp3Dom configNode=(Xpp3Dom)object;
                  Xpp3Dom includesNode=configNode.getChild("String_Node_Str");
                  Xpp3Dom includeNode=new Xpp3Dom("String_Node_Str");
                  includeNode.setValue("String_Node_Str");
                  includesNode.addChild(includeNode);
                  model.getBuild().setPlugins(plugins);
                  PomUtil.savePom(monitor,model,getPomFile());
                  break out;
                }
              }
            }
          }
        }
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
      }
    }
  }
}

Fixed version (ground truth):
private void setPomForHDLight(IProgressMonitor monitor){
  if (ProcessUtils.isHDInsight()) {
    try {
      Model model=MODEL_MANAGER.readMavenModel(getPomFile());
      List<Plugin> plugins=new ArrayList<Plugin>(model.getBuild().getPlugins());
      out:       for (      Plugin plugin : plugins) {
        if (plugin.getArtifactId().equals("String_Node_Str")) {
          List<PluginExecution> pluginExecutions=plugin.getExecutions();
          for (          PluginExecution pluginExecution : pluginExecutions) {
            if (pluginExecution.getId().equals("String_Node_Str")) {
              Object object=pluginExecution.getConfiguration();
              if (object instanceof Xpp3Dom) {
                Xpp3Dom configNode=(Xpp3Dom)object;
                Xpp3Dom includesNode=configNode.getChild("String_Node_Str");
                Xpp3Dom includeNode=new Xpp3Dom("String_Node_Str");
                includeNode.setValue("String_Node_Str");
                includesNode.addChild(includeNode);
                model.getBuild().setPlugins(plugins);
                PomUtil.savePom(monitor,model,getPomFile());
                break out;
              }
            }
          }
        }
      }
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
}
Program: 126027
Project: 126027
Buggy source:
@Override public int hashCode(){
  int hashCode=31;
  if (this.getModuleName() != null) {
    hashCode*=this.getModuleName().hashCode();
  }
  if (this.getBundleName() != null) {
    hashCode*=this.getBundleName().hashCode();
  }
  if (this.getBundleVersion() != null) {
    hashCode*=this.getBundleVersion().hashCode();
  }
  hashCode*=new Boolean(this.isRequired()).hashCode();
  return hashCode;
}

Fixed version (ground truth):
@Override public int hashCode(){
  int hashCode=31;
  if (this.getModuleName() != null) {
    hashCode*=this.getModuleName().hashCode();
  }
  if (this.getBundleName() != null) {
    hashCode*=this.getBundleName().hashCode();
  }
  if (this.getBundleVersion() != null) {
    hashCode*=this.getBundleVersion().hashCode();
  }
  hashCode*=new Boolean(this.isRequired()).hashCode();
  hashCode*=new Boolean(this.isMrRequired()).hashCode();
  return hashCode;
}
Program: 126028
Project: 126028
Buggy source:
@Override public boolean equals(Object obj){
  if (obj == null) {
    return false;
  }
  if (!(obj instanceof ModuleNeeded)) {
    return false;
  }
  ModuleNeeded other=(ModuleNeeded)obj;
  if (other.getModuleName() == null) {
    if (this.getModuleName() != null) {
      return false;
    }
  }
 else {
    if (this.getModuleName() == null) {
      return false;
    }
 else     if (!other.getModuleName().equals(this.getModuleName())) {
      return false;
    }
  }
  if (other.getBundleName() == null) {
    if (this.getBundleName() != null) {
      return false;
    }
  }
 else {
    if (this.getBundleName() == null) {
      return false;
    }
 else     if (!other.getBundleName().equals(this.getBundleName())) {
      return false;
    }
  }
  if (other.getBundleVersion() == null) {
    if (this.getBundleVersion() != null) {
      return false;
    }
  }
 else {
    if (this.getBundleVersion() == null) {
      return false;
    }
 else     if (!other.getBundleVersion().equals(this.getBundleVersion())) {
      return false;
    }
  }
  if (other.getModuleLocaion() == null) {
    if (this.getModuleLocaion() != null) {
      return false;
    }
  }
 else {
    if (this.getModuleLocaion() == null) {
      return false;
    }
 else     if (!other.getModuleLocaion().equals(this.getModuleLocaion())) {
      return false;
    }
  }
  if (other.isRequired() != this.isRequired()) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (obj == null) {
    return false;
  }
  if (!(obj instanceof ModuleNeeded)) {
    return false;
  }
  ModuleNeeded other=(ModuleNeeded)obj;
  if (other.getModuleName() == null) {
    if (this.getModuleName() != null) {
      return false;
    }
  }
 else {
    if (this.getModuleName() == null) {
      return false;
    }
 else     if (!other.getModuleName().equals(this.getModuleName())) {
      return false;
    }
  }
  if (other.getBundleName() == null) {
    if (this.getBundleName() != null) {
      return false;
    }
  }
 else {
    if (this.getBundleName() == null) {
      return false;
    }
 else     if (!other.getBundleName().equals(this.getBundleName())) {
      return false;
    }
  }
  if (other.getBundleVersion() == null) {
    if (this.getBundleVersion() != null) {
      return false;
    }
  }
 else {
    if (this.getBundleVersion() == null) {
      return false;
    }
 else     if (!other.getBundleVersion().equals(this.getBundleVersion())) {
      return false;
    }
  }
  if (other.getModuleLocaion() == null) {
    if (this.getModuleLocaion() != null) {
      return false;
    }
  }
 else {
    if (this.getModuleLocaion() == null) {
      return false;
    }
 else     if (!other.getModuleLocaion().equals(this.getModuleLocaion())) {
      return false;
    }
  }
  if (other.isRequired() != this.isRequired()) {
    return false;
  }
  if (other.isMrRequired() != this.isMrRequired()) {
    return false;
  }
  return true;
}
Program: 126030
Project: 126030
Buggy source:
public boolean hasTalendProjectFile(IProject project){
  URI uri=getProjectResourceUri(project);
  try {
    project.refreshLocal(IResource.DEPTH_ONE,new NullProgressMonitor());
  }
 catch (  CoreException e) {
    ExceptionHandler.process(e);
  }
  IPath path=URIHelper.convert(uri);
  IFile file=ResourcesPlugin.getWorkspace().getRoot().getFile(path);
  return file.exists();
}

Fixed version (ground truth):
public boolean hasTalendProjectFile(IProject project){
  URI uri=getProjectResourceUri(project);
  try {
    if (!project.isSynchronized(IResource.DEPTH_ONE)) {
      project.refreshLocal(IResource.DEPTH_ONE,new NullProgressMonitor());
    }
  }
 catch (  CoreException e) {
    ExceptionHandler.process(e);
  }
  IPath path=URIHelper.convert(uri);
  IFile file=ResourcesPlugin.getWorkspace().getRoot().getFile(path);
  return file.exists();
}
Program: 126034
Project: 126034
Buggy source:
public void close(){
  unRegistOnBoardingManager();
  uiManager.close();
  afterClosed();
}

Fixed version (ground truth):
public void close(){
  if (!isRegisted()) {
    return;
  }
  unRegistOnBoardingManager();
  uiManager.close();
  afterClosed();
}
Program: 126035
Project: 126035
Buggy source:
@Override public void mouseDown(MouseEvent e){
  if (hlShell.isDisposed()) {
    removeListeners();
  }
  if (e.button == 1) {
    onBoardingManager.close();
  }
}

Fixed version (ground truth):
@Override public void mouseDown(MouseEvent e){
  if (hlShell.isDisposed()) {
    removeListeners();
    return;
  }
  if (e.button == 1) {
    onBoardingManager.close();
  }
}
Program: 126036
Project: 126036
Buggy source:
@Override public void controlMoved(ControlEvent e){
  if (hlShell.isDisposed()) {
    removeListeners();
  }
  Rectangle clientArea=parentShell.getDisplay().map(parentShell,null,parentShell.getClientArea());
  hlShell.setLocation(clientArea.x,clientArea.y);
}

Fixed version (ground truth):
@Override public void controlMoved(ControlEvent e){
  if (hlShell.isDisposed()) {
    removeListeners();
    return;
  }
  Rectangle clientArea=parentShell.getDisplay().map(parentShell,null,parentShell.getClientArea());
  hlShell.setLocation(clientArea.x,clientArea.y);
}
Program: 126037
Project: 126037
Buggy source:
@Override public void controlResized(ControlEvent e){
  if (hlShell.isDisposed()) {
    removeListeners();
  }
  if (currentFocusedWidget == null || currentFocusedWidget.isDisposed()) {
    Rectangle clientArea=parentShell.getClientArea();
    Rectangle mappedClientArea=parentShell.getDisplay().map(parentShell,null,clientArea);
    hlShell.setBounds(mappedClientArea);
    hlShell.setRegion(getNewRegion(clientArea,new Rectangle(0,0,0,0)));
  }
}

Fixed version (ground truth):
@Override public void controlResized(ControlEvent e){
  if (hlShell.isDisposed()) {
    removeListeners();
    return;
  }
  if (currentFocusedWidget == null || currentFocusedWidget.isDisposed()) {
    Rectangle clientArea=parentShell.getClientArea();
    Rectangle mappedClientArea=parentShell.getDisplay().map(parentShell,null,clientArea);
    hlShell.setBounds(mappedClientArea);
    hlShell.setRegion(getNewRegion(clientArea,new Rectangle(0,0,0,0)));
  }
}
Program: 126038
Project: 126038
Buggy source:
private void addListeners(){
  controlListenerForParent=new ControlListener(){
    @Override public void controlResized(    ControlEvent e){
      if (hlShell.isDisposed()) {
        removeListeners();
      }
      if (currentFocusedWidget == null || currentFocusedWidget.isDisposed()) {
        Rectangle clientArea=parentShell.getClientArea();
        Rectangle mappedClientArea=parentShell.getDisplay().map(parentShell,null,clientArea);
        hlShell.setBounds(mappedClientArea);
        hlShell.setRegion(getNewRegion(clientArea,new Rectangle(0,0,0,0)));
      }
    }
    @Override public void controlMoved(    ControlEvent e){
      if (hlShell.isDisposed()) {
        removeListeners();
      }
      Rectangle clientArea=parentShell.getDisplay().map(parentShell,null,parentShell.getClientArea());
      hlShell.setLocation(clientArea.x,clientArea.y);
    }
  }
;
  parentShell.addControlListener(controlListenerForParent);
  hlShell.addMouseListener(new MouseAdapter(){
    @Override public void mouseDown(    MouseEvent e){
      if (hlShell.isDisposed()) {
        removeListeners();
      }
      if (e.button == 1) {
        onBoardingManager.close();
      }
    }
  }
);
}

Fixed version (ground truth):
private void addListeners(){
  controlListenerForParent=new ControlListener(){
    @Override public void controlResized(    ControlEvent e){
      if (hlShell.isDisposed()) {
        removeListeners();
        return;
      }
      if (currentFocusedWidget == null || currentFocusedWidget.isDisposed()) {
        Rectangle clientArea=parentShell.getClientArea();
        Rectangle mappedClientArea=parentShell.getDisplay().map(parentShell,null,clientArea);
        hlShell.setBounds(mappedClientArea);
        hlShell.setRegion(getNewRegion(clientArea,new Rectangle(0,0,0,0)));
      }
    }
    @Override public void controlMoved(    ControlEvent e){
      if (hlShell.isDisposed()) {
        removeListeners();
        return;
      }
      Rectangle clientArea=parentShell.getDisplay().map(parentShell,null,parentShell.getClientArea());
      hlShell.setLocation(clientArea.x,clientArea.y);
    }
  }
;
  parentShell.addControlListener(controlListenerForParent);
  hlShell.addMouseListener(new MouseAdapter(){
    @Override public void mouseDown(    MouseEvent e){
      if (hlShell.isDisposed()) {
        removeListeners();
        return;
      }
      if (e.button == 1) {
        onBoardingManager.close();
      }
    }
  }
);
  hlShell.addDisposeListener(new DisposeListener(){
    @Override public void widgetDisposed(    DisposeEvent e){
      onBoardingManager.close();
    }
  }
);
}
Program: 126039
Project: 126039
Buggy source:
public void close(){
  hlShell.setEnabled(false);
  setVisible(false);
  removeListeners();
  hlShell.close();
}

Fixed version (ground truth):
public void close(){
  if (hlShell.isDisposed()) {
    return;
  }
  hlShell.setEnabled(false);
  setVisible(false);
  removeListeners();
  hlShell.close();
}
Program: 126040
Project: 126040
Buggy source:
public void close(){
  removeListeners();
  obShell.close();
  isOpened=false;
}

Fixed version (ground truth):
public void close(){
  if (obShell.isDisposed()) {
    return;
  }
  removeListeners();
  obShell.close();
  isOpened=false;
}
Program: 126041
Project: 126041
Buggy source:
private void addListeners(){
  controlListenerForParent=new ControlListener(){
    @Override public void controlResized(    ControlEvent e){
      if (!checkAvailable()) {
        return;
      }
      refresh();
    }
    @Override public void controlMoved(    ControlEvent e){
      if (!checkAvailable()) {
        return;
      }
      Rectangle clientArea=parentShell.getDisplay().map(parentShell,null,parentShell.getClientArea());
      obShell.setLocation(clientArea.x,clientArea.y);
    }
    private boolean checkAvailable(){
      if (obShell.isDisposed() || parentShell.isDisposed()) {
        removeListeners();
        return false;
      }
 else {
        return true;
      }
    }
  }
;
  parentShell.addControlListener(controlListenerForParent);
}

Fixed version (ground truth):
private void addListeners(){
  controlListenerForParent=new ControlListener(){
    @Override public void controlResized(    ControlEvent e){
      if (!checkAvailable()) {
        return;
      }
      refresh();
    }
    @Override public void controlMoved(    ControlEvent e){
      if (!checkAvailable()) {
        return;
      }
      Rectangle clientArea=parentShell.getDisplay().map(parentShell,null,parentShell.getClientArea());
      obShell.setLocation(clientArea.x,clientArea.y);
    }
    private boolean checkAvailable(){
      if (obShell.isDisposed() || parentShell.isDisposed()) {
        removeListeners();
        return false;
      }
 else {
        return true;
      }
    }
  }
;
  parentShell.addControlListener(controlListenerForParent);
  obShell.addDisposeListener(new DisposeListener(){
    @Override public void widgetDisposed(    DisposeEvent e){
      onBoardingManager.close();
    }
  }
);
}
Program: 126043
Project: 126043
Buggy source:
/** 
 * maximum display CheatSheetView.
 * @param view
 */
public void maxDisplayCheatSheetView(CheatSheetView view){
  IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  activePage.setEditorAreaVisible(true);
  IViewPart cheatSheetView=null;
  IViewReference cheatSheetref=null;
  for (  IViewReference ref : activePage.getViewReferences()) {
    cheatSheetView=ref.getView(false);
    if (!view.equals(cheatSheetView)) {
      activePage.setPartState(ref,IWorkbenchPage.STATE_MINIMIZED);
    }
 else     if (cheatSheetView instanceof org.eclipse.ui.internal.ViewIntroAdapterPart) {
    }
 else {
      cheatSheetref=ref;
    }
  }
  for (  IEditorReference ref : activePage.getEditorReferences()) {
    activePage.setPartState(ref,IWorkbenchPage.STATE_MINIMIZED);
  }
  if (cheatSheetref != null && cheatSheetView != null) {
    activePage.setPartState(cheatSheetref,IWorkbenchPage.STATE_MAXIMIZED);
    activePage.bringToTop(cheatSheetView);
  }
  setMaxCheatSheetHasSHow(true);
  PrefUtil.getAPIPreferenceStore().setValue(this.getClass().getSimpleName(),true);
  setFirstTime(!PrefUtil.getAPIPreferenceStore().getBoolean(this.getClass().getSimpleName()));
  partListener2=new PartListener2Adapter(){
    @Override public void partDeactivated(    IWorkbenchPartReference partRef){
      super.partDeactivated(partRef);
      restoreOtherViewAndEditor(partRef.getPart(false));
    }
    @Override public void partHidden(    IWorkbenchPartReference partRef){
      restoreOtherViewAndEditor(partRef.getPart(false));
    }
  }
;
  activePage.addPartListener(partListener2);
}

Fixed version (ground truth):
/** 
 * maximum display CheatSheetView.
 * @param view
 */
public void maxDisplayCheatSheetView(CheatSheetView view){
  IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  activePage.setEditorAreaVisible(true);
  IViewPart cheatSheetView=null;
  for (  IViewReference ref : activePage.getViewReferences()) {
    cheatSheetView=ref.getView(false);
    if (view.equals(cheatSheetView)) {
      activePage.setPartState(ref,IWorkbenchPage.STATE_MAXIMIZED);
      activePage.bringToTop(cheatSheetView);
    }
  }
  setMaxCheatSheetHasSHow(true);
  PrefUtil.getAPIPreferenceStore().setValue(this.getClass().getSimpleName(),true);
  setFirstTime(!PrefUtil.getAPIPreferenceStore().getBoolean(this.getClass().getSimpleName()));
  partListener2=new PartListener2Adapter(){
    @Override public void partDeactivated(    IWorkbenchPartReference partRef){
      super.partDeactivated(partRef);
      restoreOtherViewAndEditor(partRef.getPart(false));
    }
    @Override public void partHidden(    IWorkbenchPartReference partRef){
      restoreOtherViewAndEditor(partRef.getPart(false));
    }
  }
;
  activePage.addPartListener(partListener2);
}
Program: 126045
Project: 126045
Buggy source:
private URI getReferenceFileURI(URI itemResourceURI,ReferenceFileItem refFile){
  if (refFile.getName() != null) {
    return itemResourceURI.trimSegments(1).appendSegment(refFile.getName() + "String_Node_Str" + refFile.getExtension());
  }
 else {
    return itemResourceURI.trimFileExtension().appendFileExtension(refFile.getExtension());
  }
}

Fixed version (ground truth):
private URI getReferenceFileURI(URI itemResourceURI,ReferenceFileItem refFile){
  if (refFile.getName() != null) {
    ByteArray contentByteArray=refFile.getContent();
    URI referenceFileURI=null;
    if (contentByteArray != null) {
      Resource eResource=contentByteArray.eResource();
      if (eResource != null) {
        referenceFileURI=eResource.getURI();
      }
    }
    if (referenceFileURI != null) {
      String fileName=referenceFileURI.segment(referenceFileURI.segmentCount() - 1);
      if (fileName != null && fileName.startsWith(refFile.getName())) {
        return itemResourceURI.trimSegments(1).appendSegment(fileName);
      }
 else {
        CommonExceptionHandler.process(new Exception("String_Node_Str" + refFile.getName() + "String_Node_Str"+ fileName+ "String_Node_Str"),Priority.INFO);
      }
    }
    return itemResourceURI.trimSegments(1).appendSegment(refFile.getName() + "String_Node_Str" + refFile.getExtension());
  }
 else {
    return itemResourceURI.trimFileExtension().appendFileExtension(refFile.getExtension());
  }
}
Program: 126046
Project: 126046
Buggy source:
@Override public void perspectivePreDeactivate(IWorkbenchPage page,IPerspectiveDescriptor perspective){
  CheatSheetView cheetSheet=CheatSheetUtils.getInstance().findCheetSheet();
  if (null != cheetSheet) {
    cheetSheetID=cheetSheet.getCheatSheetID();
    CheatSheetUtils.getInstance().hideCheetSheet(cheetSheet);
  }
  cheetSheetInPerspective.put(perspective.getId(),null != cheetSheet);
  super.perspectivePreDeactivate(page,perspective);
}

Fixed version (ground truth):
@Override public void perspectivePreDeactivate(IWorkbenchPage page,IPerspectiveDescriptor perspective){
  CheatSheetView cheetSheet=CheatSheetUtils.getInstance().findCheetSheet("String_Node_Str");
  if (null != cheetSheet) {
    cheetSheetID=cheetSheet.getCheatSheetID();
    CheatSheetUtils.getInstance().hideCheetSheet(cheetSheet);
  }
  cheetSheetInPerspective.put(perspective.getId(),null != cheetSheet);
  super.perspectivePreDeactivate(page,perspective);
}
Program: 126047
Project: 126047
Buggy source:
/** 
 * show the cheet sheet view.
 */
private void restoreCheetSheet(){
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      CheatSheetView view=ViewUtilities.showCheatSheetView();
      IWorkbenchPart activePart=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
      if (null != view) {
        if (null != cheetSheetID) {
          view.setInput(cheetSheetID);
        }
        if (CheatSheetUtils.getInstance().isFirstTime()) {
          CheatSheetUtils.getInstance().maxDisplayCheatSheetView(view);
        }
      }
      if (null != activePart) {
        activePart.setFocus();
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * show the cheet sheet view.
 */
private void restoreCheetSheet(){
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      CheatSheetView view=ViewUtilities.showCheatSheetView();
      IWorkbenchPart activePart=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
      if (null != view) {
        view.setInput("String_Node_Str");
        if (CheatSheetUtils.getInstance().isFirstTime()) {
          CheatSheetUtils.getInstance().maxDisplayCheatSheetView(view);
        }
      }
      if (null != activePart) {
        activePart.setFocus();
      }
    }
  }
);
}
Program: 126048
Project: 126048
Buggy source:
public void run(){
  CheatSheetView view=ViewUtilities.showCheatSheetView();
  IWorkbenchPart activePart=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
  if (null != view) {
    if (null != cheetSheetID) {
      view.setInput(cheetSheetID);
    }
    if (CheatSheetUtils.getInstance().isFirstTime()) {
      CheatSheetUtils.getInstance().maxDisplayCheatSheetView(view);
    }
  }
  if (null != activePart) {
    activePart.setFocus();
  }
}

Fixed version (ground truth):
public void run(){
  CheatSheetView view=ViewUtilities.showCheatSheetView();
  IWorkbenchPart activePart=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
  if (null != view) {
    view.setInput("String_Node_Str");
    if (CheatSheetUtils.getInstance().isFirstTime()) {
      CheatSheetUtils.getInstance().maxDisplayCheatSheetView(view);
    }
  }
  if (null != activePart) {
    activePart.setFocus();
  }
}
Program: 126049
Project: 126049
Buggy source:
/** 
 * find And maximum Display CheatSheet.
 */
public void findAndmaxDisplayCheatSheet(){
  CheatSheetView findCheetSheet=findCheetSheet();
  if (findCheetSheet != null) {
    maxDisplayCheatSheetView(findCheetSheet);
  }
}

Fixed version (ground truth):
/** 
 * find And maximum Display CheatSheet.
 */
public void findAndmaxDisplayCheatSheet(String cheatSheetID){
  CheatSheetView findCheetSheet=findCheetSheet(cheatSheetID);
  if (findCheetSheet != null) {
    maxDisplayCheatSheetView(findCheetSheet);
  }
}
Program: 126050
Project: 126050
Buggy source:
/** 
 * get the cheet sheet view.
 * @return CheatSheetView
 */
public CheatSheetView findCheetSheet(){
  IWorkbench workbench=PlatformUI.getWorkbench();
  IWorkbenchWindow window=workbench.getActiveWorkbenchWindow();
  IWorkbenchPage page=window.getActivePage();
  CheatSheetView view=(CheatSheetView)page.findView(ICheatSheetResource.CHEAT_SHEET_VIEW_ID);
  if (view == null && page != null && page.getPerspective().getId().equals(DQ_PERSPECTIVE_ID)) {
    try {
      view=(CheatSheetView)page.showView(ICheatSheetResource.CHEAT_SHEET_VIEW_ID);
      page.activate(view);
    }
 catch (    PartInitException pie) {
      String message=Messages.LAUNCH_SHEET_ERROR;
      IStatus status=new Status(IStatus.ERROR,ICheatSheetResource.CHEAT_SHEET_PLUGIN_ID,IStatus.OK,message,pie);
      CheatSheetPlugin.getPlugin().getLog().log(status);
      org.eclipse.jface.dialogs.ErrorDialog.openError(window.getShell(),Messages.CHEAT_SHEET_ERROR_OPENING,null,pie.getStatus());
    }
  }
  return view;
}

Fixed version (ground truth):
/** 
 * get the cheet sheet view.
 * @return CheatSheetView
 */
public CheatSheetView findCheetSheet(String cheatSheetID){
  IWorkbench workbench=PlatformUI.getWorkbench();
  IWorkbenchWindow window=workbench.getActiveWorkbenchWindow();
  IWorkbenchPage page=window.getActivePage();
  CheatSheetView view=(CheatSheetView)page.findView(ICheatSheetResource.CHEAT_SHEET_VIEW_ID);
  if (view == null && page != null && page.getPerspective().getId().equals(DQ_PERSPECTIVE_ID)) {
    try {
      view=(CheatSheetView)page.showView(ICheatSheetResource.CHEAT_SHEET_VIEW_ID);
      view.setInput(cheatSheetID);
      page.activate(view);
    }
 catch (    PartInitException pie) {
      String message=Messages.LAUNCH_SHEET_ERROR;
      IStatus status=new Status(IStatus.ERROR,ICheatSheetResource.CHEAT_SHEET_PLUGIN_ID,IStatus.OK,message,pie);
      CheatSheetPlugin.getPlugin().getLog().log(status);
      org.eclipse.jface.dialogs.ErrorDialog.openError(window.getShell(),Messages.CHEAT_SHEET_ERROR_OPENING,null,pie.getStatus());
    }
  }
  return view;
}
Program: 126051
Project: 126051
Buggy source:
/** 
 * DOC talend Comment method "restoreOtherViewAndEditor".
 * @param part
 */
protected void restoreOtherViewAndEditor(IWorkbenchPart part){
  if (CheatSheetUtils.getInstance().isMaxCheatSheetHasSHow() && part instanceof org.eclipse.ui.internal.cheatsheets.views.CheatSheetView) {
    IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    for (    IViewReference ref : activePage.getViewReferences()) {
      if (part != ref.getView(false)) {
        activePage.setPartState(ref,IWorkbenchPage.STATE_RESTORED);
      }
    }
    for (    IEditorReference ref : activePage.getEditorReferences()) {
      activePage.setPartState(ref,IWorkbenchPage.STATE_RESTORED);
    }
    CheatSheetUtils.getInstance().setMaxCheatSheetHasSHow(false);
    if (partListener2 != null) {
      activePage.removePartListener(partListener2);
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC talend Comment method "restoreOtherViewAndEditor".
 * @param part
 */
protected void restoreOtherViewAndEditor(IWorkbenchPart part){
  if (part instanceof org.eclipse.ui.internal.cheatsheets.views.CheatSheetView) {
    IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    for (    IViewReference ref : activePage.getViewReferences()) {
      if (part != ref.getView(false)) {
        activePage.setPartState(ref,IWorkbenchPage.STATE_RESTORED);
      }
    }
    for (    IEditorReference ref : activePage.getEditorReferences()) {
      activePage.setPartState(ref,IWorkbenchPage.STATE_RESTORED);
    }
    CheatSheetUtils.getInstance().setMaxCheatSheetHasSHow(false);
    if (partListener2 != null) {
      activePage.removePartListener(partListener2);
    }
  }
}
Program: 126053
Project: 126053
Buggy source:
/** 
 * after create operation, can do something, like add some natures.
 */
protected void afterCreate(IProgressMonitor monitor,IResource res) throws Exception {
  IProject p=res.getProject();
  if (!p.isOpen()) {
    p.open(monitor);
  }
  convertJavaProjectToPom(monitor,p);
  changeClasspath(monitor,p);
}

Fixed version (ground truth):
/** 
 * after create operation, can do something, like add some natures.
 */
protected void afterCreate(IProgressMonitor monitor,IResource res) throws Exception {
  IProject p=res.getProject();
  if (!p.isOpen()) {
    p.open(monitor);
  }
  convertJavaProjectToPom(monitor,p);
  changeClasspath(monitor,p);
  IJavaProject javaProject=JavaCore.create(p);
  clearProjectIndenpendComplianceSettings(javaProject);
  javaProject.close();
}
Program: 126054
Project: 126054
Buggy source:
/** 
 * Retruns the Query part of the URL as an instance of a Properties class.
 * @param url
 * @return
 */
public Properties getQueryParameters(URL url){
  Properties properties=new Properties();
  String query=url.getQuery();
  if (query == null) {
    return properties;
  }
  String[] params;
  if (EnvironmentUtils.isWindowsSystem()) {
    params=StringUtil.split(query,"String_Node_Str");
  }
 else {
    params=StringUtil.split(query,"String_Node_Str");
  }
  for (  String param : params) {
    String[] keyValuePair=StringUtil.split(param,"String_Node_Str");
    if (keyValuePair.length != 2) {
      Log.warning("String_Node_Str" + param);
      continue;
    }
    String key=urlDecode(keyValuePair[0]);
    if (key == null) {
      Log.warning("String_Node_Str" + keyValuePair[0]);
      continue;
    }
    String value=urlDecode(keyValuePair[1]);
    if (value == null) {
      Log.warning("String_Node_Str" + keyValuePair[1]);
      continue;
    }
    properties.setProperty(key,value);
  }
  return properties;
}

Fixed version (ground truth):
/** 
 * Retruns the Query part of the URL as an instance of a Properties class.
 * @param url
 * @return
 */
public Properties getQueryParameters(URL url){
  Properties properties=new Properties();
  String query=url.getQuery();
  if (query == null) {
    return properties;
  }
  String[] params;
  if (query.indexOf("String_Node_Str") != -1) {
    query=query.replaceAll("String_Node_Str","String_Node_Str");
  }
  params=StringUtil.split(query,"String_Node_Str");
  for (  String param : params) {
    String[] keyValuePair=StringUtil.split(param,"String_Node_Str");
    if (keyValuePair.length != 2) {
      Log.warning("String_Node_Str" + param);
      continue;
    }
    String key=urlDecode(keyValuePair[0]);
    if (key == null) {
      Log.warning("String_Node_Str" + keyValuePair[0]);
      continue;
    }
    String value=urlDecode(keyValuePair[1]);
    if (value == null) {
      Log.warning("String_Node_Str" + keyValuePair[1]);
      continue;
    }
    properties.setProperty(key,value);
  }
  return properties;
}
Program: 126055
Project: 126055
Buggy source:
/** 
 * Retruns the Query part of the URL as an instance of a Properties class.
 * @param url
 * @return
 */
public Properties getQueryParameters(URL url){
  Properties properties=new Properties();
  String query=url.getQuery();
  if (query == null) {
    return properties;
  }
  String[] params;
  if (System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    params=StringUtil.split(query,"String_Node_Str");
  }
 else {
    params=StringUtil.split(query,"String_Node_Str");
  }
  for (  String param : params) {
    String[] keyValuePair=StringUtil.split(param,"String_Node_Str");
    if (keyValuePair.length != 2) {
      Log.warning("String_Node_Str" + param);
      continue;
    }
    String key=urlDecode(keyValuePair[0]);
    if (key == null) {
      Log.warning("String_Node_Str" + keyValuePair[0]);
      continue;
    }
    String value=urlDecode(keyValuePair[1]);
    if (value == null) {
      Log.warning("String_Node_Str" + keyValuePair[1]);
      continue;
    }
    properties.setProperty(key,value);
  }
  return properties;
}

Fixed version (ground truth):
/** 
 * Retruns the Query part of the URL as an instance of a Properties class.
 * @param url
 * @return
 */
public Properties getQueryParameters(URL url){
  Properties properties=new Properties();
  String query=url.getQuery();
  if (query == null) {
    return properties;
  }
  String[] params;
  if (query.indexOf("String_Node_Str") != -1) {
    query=query.replaceAll("String_Node_Str","String_Node_Str");
  }
  params=StringUtil.split(query,"String_Node_Str");
  for (  String param : params) {
    String[] keyValuePair=StringUtil.split(param,"String_Node_Str");
    if (keyValuePair.length != 2) {
      Log.warning("String_Node_Str" + param);
      continue;
    }
    String key=urlDecode(keyValuePair[0]);
    if (key == null) {
      Log.warning("String_Node_Str" + keyValuePair[0]);
      continue;
    }
    String value=urlDecode(keyValuePair[1]);
    if (value == null) {
      Log.warning("String_Node_Str" + keyValuePair[1]);
      continue;
    }
    properties.setProperty(key,value);
  }
  return properties;
}
Program: 126056
Project: 126056
Buggy source:
/** 
 * maximum display CheatSheetView.
 * @param view
 */
public void maxDisplayCheatSheetView(CheatSheetView view){
  IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  activePage.setEditorAreaVisible(true);
  IViewPart cheatSheetView=null;
  IViewReference cheatSheetref=null;
  for (  IViewReference ref : activePage.getViewReferences()) {
    cheatSheetView=ref.getView(false);
    if (!view.equals(cheatSheetView)) {
      activePage.setPartState(ref,IWorkbenchPage.STATE_MINIMIZED);
    }
 else {
      cheatSheetref=ref;
    }
  }
  for (  IEditorReference ref : activePage.getEditorReferences()) {
    activePage.setPartState(ref,IWorkbenchPage.STATE_MINIMIZED);
  }
  if (cheatSheetref != null && cheatSheetView != null) {
    activePage.setPartState(cheatSheetref,IWorkbenchPage.STATE_MAXIMIZED);
    activePage.bringToTop(cheatSheetView);
  }
  setMaxCheatSheetHasSHow(true);
  PrefUtil.getAPIPreferenceStore().setValue(this.getClass().getSimpleName(),true);
  setFirstTime(!PrefUtil.getAPIPreferenceStore().getBoolean(this.getClass().getSimpleName()));
  partListener2=new PartListener2Adapter(){
    @Override public void partHidden(    IWorkbenchPartReference partRef){
      restoreOtherViewAndEditor(partRef.getPart(false));
    }
  }
;
  activePage.addPartListener(partListener2);
}

Fixed version (ground truth):
/** 
 * maximum display CheatSheetView.
 * @param view
 */
public void maxDisplayCheatSheetView(CheatSheetView view){
  IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  activePage.setEditorAreaVisible(true);
  IViewPart cheatSheetView=null;
  IViewReference cheatSheetref=null;
  for (  IViewReference ref : activePage.getViewReferences()) {
    cheatSheetView=ref.getView(false);
    if (!view.equals(cheatSheetView)) {
      activePage.setPartState(ref,IWorkbenchPage.STATE_MINIMIZED);
    }
 else     if (cheatSheetView instanceof org.eclipse.ui.internal.ViewIntroAdapterPart) {
    }
 else {
      cheatSheetref=ref;
    }
  }
  for (  IEditorReference ref : activePage.getEditorReferences()) {
    activePage.setPartState(ref,IWorkbenchPage.STATE_MINIMIZED);
  }
  if (cheatSheetref != null && cheatSheetView != null) {
    activePage.setPartState(cheatSheetref,IWorkbenchPage.STATE_MAXIMIZED);
    activePage.bringToTop(cheatSheetView);
  }
  setMaxCheatSheetHasSHow(true);
  PrefUtil.getAPIPreferenceStore().setValue(this.getClass().getSimpleName(),true);
  setFirstTime(!PrefUtil.getAPIPreferenceStore().getBoolean(this.getClass().getSimpleName()));
  partListener2=new PartListener2Adapter(){
    @Override public void partHidden(    IWorkbenchPartReference partRef){
      restoreOtherViewAndEditor(partRef.getPart(false));
    }
  }
;
  activePage.addPartListener(partListener2);
}
Program: 126058
Project: 126058
Buggy source:
@SuppressWarnings("String_Node_Str") private static synchronized ClassLoader getCustomClassLoader(String index,Object customJars,boolean showDownloadIfNotExist){
  if (customJars instanceof Set) {
    return ClassLoaderFactory.getCustomClassLoader(index,(Set<String>)customJars);
  }
  return ClassLoaderFactory.getCustomClassLoader(index,String.valueOf(customJars));
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private static synchronized ClassLoader getCustomClassLoader(String index,Object customJars,boolean showDownloadIfNotExist){
  if (customJars instanceof Set) {
    return ClassLoaderFactory.getCustomClassLoader(index,(Set<String>)customJars);
  }
  String jarString=null;
  if (customJars != null) {
    jarString=String.valueOf(customJars);
  }
  return ClassLoaderFactory.getCustomClassLoader(index,jarString);
}
Program: 126059
Project: 126059
Buggy source:
/** 
 * show the cheet sheet view.
 */
private void restoreCheetSheet(){
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      CheatSheetView view=ViewUtilities.showCheatSheetView();
      IWorkbenchPart activePart=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
      if (null != view) {
        if (null != cheetSheetID) {
          view.setInput(cheetSheetID);
        }
 else {
          view.setInput(DQ_CHEATSHEET_START_ID);
        }
        if (CheatSheetUtils.getInstance().isFirstTime()) {
          CheatSheetUtils.getInstance().maxDisplayCheatSheetView(view);
        }
      }
      if (null != activePart) {
        activePart.setFocus();
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * show the cheet sheet view.
 */
private void restoreCheetSheet(){
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      CheatSheetView view=ViewUtilities.showCheatSheetView();
      IWorkbenchPart activePart=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
      if (null != view) {
        if (null != cheetSheetID) {
          view.setInput(cheetSheetID);
        }
 else {
          view.setInput(CheatSheetUtils.DQ_CHEATSHEET_START_ID);
        }
        if (CheatSheetUtils.getInstance().isFirstTime()) {
          CheatSheetUtils.getInstance().maxDisplayCheatSheetView(view);
        }
      }
      if (null != activePart) {
        activePart.setFocus();
      }
    }
  }
);
}
Program: 126060
Project: 126060
Buggy source:
/** 
 * CheatSheetPerspectiveAdapter constructor.
 */
public CheatSheetPerspectiveAdapter(){
  CheatSheetView cheetSheet=CheatSheetUtils.getInstance().findCheetSheet();
  if (cheetSheet != null) {
    cheetSheet.setInput(CheatSheetPerspectiveAdapter.DQ_CHEATSHEET_START_ID);
  }
}

Fixed version (ground truth):
/** 
 * CheatSheetPerspectiveAdapter constructor.
 */
public CheatSheetPerspectiveAdapter(){
  CheatSheetView cheetSheet=CheatSheetUtils.getInstance().findCheetSheet();
  if (cheetSheet != null) {
    cheetSheet.setInput(CheatSheetUtils.DQ_CHEATSHEET_START_ID);
  }
}
Program: 126061
Project: 126061
Buggy source:
public void run(){
  CheatSheetView view=ViewUtilities.showCheatSheetView();
  IWorkbenchPart activePart=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
  if (null != view) {
    if (null != cheetSheetID) {
      view.setInput(cheetSheetID);
    }
 else {
      view.setInput(DQ_CHEATSHEET_START_ID);
    }
    if (CheatSheetUtils.getInstance().isFirstTime()) {
      CheatSheetUtils.getInstance().maxDisplayCheatSheetView(view);
    }
  }
  if (null != activePart) {
    activePart.setFocus();
  }
}

Fixed version (ground truth):
public void run(){
  CheatSheetView view=ViewUtilities.showCheatSheetView();
  IWorkbenchPart activePart=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
  if (null != view) {
    if (null != cheetSheetID) {
      view.setInput(cheetSheetID);
    }
 else {
      view.setInput(CheatSheetUtils.DQ_CHEATSHEET_START_ID);
    }
    if (CheatSheetUtils.getInstance().isFirstTime()) {
      CheatSheetUtils.getInstance().maxDisplayCheatSheetView(view);
    }
  }
  if (null != activePart) {
    activePart.setFocus();
  }
}
Program: 126062
Project: 126062
Buggy source:
/** 
 * get the cheet sheet view.
 * @return CheatSheetView
 */
public CheatSheetView findCheetSheet(){
  IWorkbench workbench=PlatformUI.getWorkbench();
  IWorkbenchWindow window=workbench.getActiveWorkbenchWindow();
  IWorkbenchPage page=window.getActivePage();
  return (CheatSheetView)page.findView(ICheatSheetResource.CHEAT_SHEET_VIEW_ID);
}

Fixed version (ground truth):
/** 
 * get the cheet sheet view.
 * @return CheatSheetView
 */
public CheatSheetView findCheetSheet(){
  IWorkbench workbench=PlatformUI.getWorkbench();
  IWorkbenchWindow window=workbench.getActiveWorkbenchWindow();
  IWorkbenchPage page=window.getActivePage();
  CheatSheetView view=(CheatSheetView)page.findView(ICheatSheetResource.CHEAT_SHEET_VIEW_ID);
  IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  if (view == null && activePage != null && activePage.getPerspective().getId().equals(DQ_PERSPECTIVE_ID)) {
    try {
      view=(CheatSheetView)page.showView(ICheatSheetResource.CHEAT_SHEET_VIEW_ID);
      view.setInput(DQ_CHEATSHEET_START_ID);
      page.activate(view);
    }
 catch (    PartInitException pie) {
      String message=Messages.LAUNCH_SHEET_ERROR;
      IStatus status=new Status(IStatus.ERROR,ICheatSheetResource.CHEAT_SHEET_PLUGIN_ID,IStatus.OK,message,pie);
      CheatSheetPlugin.getPlugin().getLog().log(status);
      org.eclipse.jface.dialogs.ErrorDialog.openError(window.getShell(),Messages.CHEAT_SHEET_ERROR_OPENING,null,pie.getStatus());
    }
  }
  return view;
}
Program: 126063
Project: 126063
Buggy source:
/** 
 * maximum display CheatSheetView.
 * @param view
 */
public void maxDisplayCheatSheetView(CheatSheetView view){
  IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  activePage.setEditorAreaVisible(true);
  for (  IViewReference ref : activePage.getViewReferences()) {
    if (view.equals(ref.getView(false))) {
      activePage.setPartState(ref,IWorkbenchPage.STATE_MAXIMIZED);
      activePage.bringToTop(ref.getView(false));
    }
 else {
      activePage.setPartState(ref,IWorkbenchPage.STATE_MINIMIZED);
    }
  }
  for (  IEditorReference ref : activePage.getEditorReferences()) {
    activePage.setPartState(ref,IWorkbenchPage.STATE_MINIMIZED);
  }
  PrefUtil.getAPIPreferenceStore().setValue(this.getClass().getSimpleName(),true);
  setFirstTime(!PrefUtil.getAPIPreferenceStore().getBoolean(this.getClass().getSimpleName()));
}

Fixed version (ground truth):
/** 
 * maximum display CheatSheetView.
 * @param view
 */
public void maxDisplayCheatSheetView(CheatSheetView view){
  IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  activePage.setEditorAreaVisible(true);
  IViewPart cheatSheetView=null;
  IViewReference cheatSheetref=null;
  for (  IViewReference ref : activePage.getViewReferences()) {
    cheatSheetView=ref.getView(false);
    if (!view.equals(cheatSheetView)) {
      activePage.setPartState(ref,IWorkbenchPage.STATE_MINIMIZED);
    }
 else {
      cheatSheetref=ref;
    }
  }
  for (  IEditorReference ref : activePage.getEditorReferences()) {
    activePage.setPartState(ref,IWorkbenchPage.STATE_MINIMIZED);
  }
  if (cheatSheetref != null && cheatSheetView != null) {
    activePage.setPartState(cheatSheetref,IWorkbenchPage.STATE_MAXIMIZED);
    activePage.bringToTop(cheatSheetView);
  }
  setMaxCheatSheetHasSHow(true);
  PrefUtil.getAPIPreferenceStore().setValue(this.getClass().getSimpleName(),true);
  setFirstTime(!PrefUtil.getAPIPreferenceStore().getBoolean(this.getClass().getSimpleName()));
  partListener2=new PartListener2Adapter(){
    @Override public void partHidden(    IWorkbenchPartReference partRef){
      restoreOtherViewAndEditor(partRef.getPart(false));
    }
  }
;
  activePage.addPartListener(partListener2);
}
Program: 126064
Project: 126064
Buggy source:
@Override public String getInitialWindowPerspectiveId(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getInitialWindowPerspectiveId(){
  return IBrandingConfiguration.PERSPECTIVE_DI_ID;
}