nus-yam/ex-repair huggingface dataset:
Program: 122541
Project: 122541
Buggy source:
protected void doRun(){
  if (repositoryNode == null) {
    repositoryNode=getCurrentRepositoryNode();
  }
  if (isToolbar()) {
    if (repositoryNode != null && repositoryNode.getContentType() != currentNodeType) {
      repositoryNode=null;
    }
    if (repositoryNode == null) {
      repositoryNode=getRepositoryNodeForDefault(currentNodeType);
    }
  }
  WizardDialog wizardDialog;
  if (isToolbar()) {
    init(repositoryNode);
    WSDLSchemaWizard wsdlSchemaWizard=new WSDLSchemaWizard(PlatformUI.getWorkbench(),creation,repositoryNode,getExistingNames(),false);
    wizardDialog=new WizardDialog(Display.getCurrent().getActiveShell(),wsdlSchemaWizard);
  }
 else {
    wizardDialog=new WizardDialog(Display.getCurrent().getActiveShell(),new WSDLSchemaWizard(PlatformUI.getWorkbench(),creation,repositoryNode,getExistingNames(),false));
  }
  if (!creation) {
    RepositoryManager.refreshSavedNode(repositoryNode);
  }
  wizardDialog.setPageSize(WIZARD_WIDTH,WIZARD_HEIGHT);
  wizardDialog.create();
  wizardDialog.open();
  RepositoryManager.refreshCreatedNode(ERepositoryObjectType.METADATA_WSDL_SCHEMA);
}

Fixed version (ground truth):
protected void doRun(){
  if (repositoryNode == null) {
    repositoryNode=getCurrentRepositoryNode();
  }
  if (isToolbar()) {
    if (repositoryNode != null && repositoryNode.getContentType() != currentNodeType) {
      repositoryNode=null;
    }
    if (repositoryNode == null) {
      repositoryNode=getRepositoryNodeForDefault(currentNodeType);
    }
  }
  WizardDialog wizardDialog;
  if (isToolbar()) {
    init(repositoryNode);
    WSDLSchemaWizard wsdlSchemaWizard=new WSDLSchemaWizard(PlatformUI.getWorkbench(),creation,repositoryNode,getExistingNames(),false);
    wsdlSchemaWizard.setToolbar(true);
    wizardDialog=new WizardDialog(Display.getCurrent().getActiveShell(),wsdlSchemaWizard);
  }
 else {
    wizardDialog=new WizardDialog(Display.getCurrent().getActiveShell(),new WSDLSchemaWizard(PlatformUI.getWorkbench(),creation,repositoryNode,getExistingNames(),false));
  }
  if (!creation) {
    RepositoryManager.refreshSavedNode(repositoryNode);
  }
  wizardDialog.setPageSize(WIZARD_WIDTH,WIZARD_HEIGHT);
  wizardDialog.create();
  wizardDialog.open();
  RepositoryManager.refreshCreatedNode(ERepositoryObjectType.METADATA_WSDL_SCHEMA);
}
Program: 122544
Project: 122544
Buggy source:
public void widgetDefaultSelected(SelectionEvent e){
}

Fixed version (ground truth):
@Override public void widgetDefaultSelected(SelectionEvent e){
}
Program: 122545
Project: 122545
Buggy source:
public void widgetSelected(SelectionEvent event){
  Command command=createCommand(event);
  executeCommand(command);
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent event){
  Command command=createCommand(event);
  executeCommand(command);
}
Program: 122546
Project: 122546
Buggy source:
public void propertyChange(PropertyChangeEvent arg0){
}

Fixed version (ground truth):
@Override public void propertyChange(PropertyChangeEvent arg0){
}
Program: 122549
Project: 122549
Buggy source:
@Override public String getText(Object element){
  if (element instanceof IContainerNode) {
    if (element instanceof ProjectNode) {
      Project project=((ProjectNode)element).getProject();
      return ProjectManager.getInstance().getProjectDisplayLabel(project);
    }
    return ((IContainerNode)element).getLabel();
  }
 else   if (element instanceof ItemRecord) {
    return ((ItemRecord)element).getLabel();
  }
  return super.getText(element);
}

Fixed version (ground truth):
@Override public String getText(Object element){
  if (element instanceof IContainerNode) {
    if (element instanceof ProjectNode) {
      Project project=((ProjectNode)element).getProject();
      return ProjectManager.getProjectDisplayLabel(project);
    }
    return ((IContainerNode)element).getLabel();
  }
 else   if (element instanceof ItemRecord) {
    return ((ItemRecord)element).getLabel();
  }
  return super.getText(element);
}
Program: 122550
Project: 122550
Buggy source:
/** 
 * DOC ggu ChangeProjectTechinicalNameMigrationTask constructor comment.
 */
public ChangeProjectTechinicalNameMigrationTask(){
  super();
  this.xmiResManager=new XmiResourceManager();
  this.projectManager=ProjectManager.getInstance();
}

Fixed version (ground truth):
/** 
 * DOC ggu ChangeProjectTechinicalNameMigrationTask constructor comment.
 */
public ChangeProjectTechinicalNameMigrationTask(){
  super();
  this.xmiResManager=new XmiResourceManager();
}
Program: 122551
Project: 122551
Buggy source:
/** 
 * default, only process the local talend project in this migration task.
 */
public boolean migrateTalendProject(IProject localProject,Project talendProject,XmiResourceManager xmiResourceManager){
  try {
    String localProjectName=localProject.getName();
    String technicalLabel=talendProject.getTechnicalLabel();
    String technicalProjectName=projectManager.getLocalTechnicalProjectName(talendProject.getLabel());
    if (!technicalLabel.equals(technicalProjectName)) {
      setAndSaveTalendProject(talendProject,technicalProjectName,xmiResourceManager);
    }
    if (!localProjectName.equals(technicalProjectName)) {
      renameProject(localProject,technicalProjectName);
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * default, only process the local talend project in this migration task.
 */
public boolean migrateTalendProject(IProject localProject,Project talendProject,XmiResourceManager xmiResourceManager){
  try {
    String localProjectName=localProject.getName();
    String technicalLabel=talendProject.getTechnicalLabel();
    String technicalProjectName=ProjectManager.getLocalTechnicalProjectName(talendProject.getLabel());
    if (!technicalLabel.equals(technicalProjectName)) {
      setAndSaveTalendProject(talendProject,technicalProjectName,xmiResourceManager);
    }
    if (!localProjectName.equals(technicalProjectName)) {
      renameProject(localProject,technicalProjectName);
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return false;
  }
  return true;
}
Program: 122552
Project: 122552
Buggy source:
public boolean execute(){
  if (!ProjectManager.getInstance().enableSpecialTechnicalProjectName()) {
    return false;
  }
  try {
    IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
    try {
      root.refreshLocal(IResource.DEPTH_INFINITE,null);
    }
 catch (    CoreException e) {
      ExceptionHandler.process(e);
    }
    IProject[] projects=root.getProjects();
    for (    IProject localProject : projects) {
      try {
        if (localProject.hasNature(TalendNature.ID)) {
          Project talendProject=xmiResManager.loadProject(localProject);
          if (needCheckProject(localProject,talendProject)) {
            checkTalendProject(localProject,talendProject);
          }
        }
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
        return false;
      }
    }
  }
  finally {
    xmiResManager.unloadResources();
  }
  return true;
}

Fixed version (ground truth):
public boolean execute(){
  if (!ProjectManager.enableSpecialTechnicalProjectName()) {
    return false;
  }
  try {
    IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
    try {
      root.refreshLocal(IResource.DEPTH_INFINITE,null);
    }
 catch (    CoreException e) {
      ExceptionHandler.process(e);
    }
    IProject[] projects=root.getProjects();
    for (    IProject localProject : projects) {
      try {
        if (localProject.hasNature(TalendNature.ID)) {
          Project talendProject=xmiResManager.loadProject(localProject);
          if (needCheckProject(localProject,talendProject)) {
            checkTalendProject(localProject,talendProject);
          }
        }
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
        return false;
      }
    }
  }
  finally {
    xmiResManager.unloadResources();
  }
  return true;
}
Program: 122554
Project: 122554
Buggy source:
private String getLabel(String name){
  List<Project> proItem=getProjectItem();
  for (int i=0; i < proItem.size(); i++) {
    Project p=proItem.get(i);
    String proName=p.getTechnicalLabel();
    if (proName.equals(name)) {
      return ProjectManager.getInstance().getProjectDisplayLabel(p.getEmfProject());
    }
  }
  return name;
}

Fixed version (ground truth):
private String getLabel(String name){
  List<Project> proItem=getProjectItem();
  for (int i=0; i < proItem.size(); i++) {
    Project p=proItem.get(i);
    String proName=p.getTechnicalLabel();
    if (proName.equals(name)) {
      return ProjectManager.getProjectDisplayLabel(p.getEmfProject());
    }
  }
  return name;
}
Program: 122556
Project: 122556
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public boolean createProjects(){
  final boolean created=super.createProjects();
  final Object[] selected=getProjectsList().getCheckedElements();
  XmiResourceManager xmiManager=new XmiResourceManager();
  try {
    for (    Object element : selected) {
      final ProjectRecord record=(ProjectRecord)element;
      String projectName=record.getProjectName();
      final IWorkspace workspace=ResourcesPlugin.getWorkspace();
      final IProject project=workspace.getRoot().getProject(projectName);
      try {
        final Project loadProject=xmiManager.loadProject(project);
        loadProject.setLocal(true);
        loadProject.setId(0);
        loadProject.setUrl(null);
        loadProject.setCreationDate(null);
        loadProject.setType(null);
        xmiManager.saveResource(loadProject.eResource());
        if (ProjectManager.getInstance().enableSpecialTechnicalProjectName()) {
          ChangeProjectTechinicalNameMigrationTask migrationTask=new ChangeProjectTechinicalNameMigrationTask();
          migrationTask.migrateTalendProject(project,loadProject,xmiManager);
        }
      }
 catch (      PersistenceException e) {
      }
    }
  }
  finally {
    xmiManager.unloadResources();
  }
  return created;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public boolean createProjects(){
  final boolean created=super.createProjects();
  final Object[] selected=getProjectsList().getCheckedElements();
  XmiResourceManager xmiManager=new XmiResourceManager();
  try {
    for (    Object element : selected) {
      final ProjectRecord record=(ProjectRecord)element;
      String projectName=record.getProjectName();
      final IWorkspace workspace=ResourcesPlugin.getWorkspace();
      final IProject project=workspace.getRoot().getProject(projectName);
      try {
        final Project loadProject=xmiManager.loadProject(project);
        loadProject.setLocal(true);
        loadProject.setId(0);
        loadProject.setUrl(null);
        loadProject.setCreationDate(null);
        loadProject.setType(null);
        xmiManager.saveResource(loadProject.eResource());
        if (ProjectManager.enableSpecialTechnicalProjectName()) {
          ChangeProjectTechinicalNameMigrationTask migrationTask=new ChangeProjectTechinicalNameMigrationTask();
          migrationTask.migrateTalendProject(project,loadProject,xmiManager);
        }
      }
 catch (      PersistenceException e) {
      }
    }
  }
  finally {
    xmiManager.unloadResources();
  }
  return created;
}
Program: 122557
Project: 122557
Buggy source:
public static void copyFile(String srcFileName,String desFileName,boolean delSrc) throws Exception {
  FileInputStream srcInputStream=new FileInputStream(srcFileName);
  long lastModified=new File(srcFileName).lastModified();
  int available=srcInputStream.available();
  if (available > L_SIZE) {
    copyFileL(srcFileName,srcInputStream,desFileName,delSrc);
  }
 else   if (available > M_SIZE) {
    copyFileM(srcFileName,srcInputStream,desFileName,delSrc);
  }
 else {
    copyFileS(srcFileName,srcInputStream,desFileName,delSrc);
  }
  new File(desFileName).setLastModified(lastModified);
}

Fixed version (ground truth):
public static void copyFile(String srcFileName,String desFileName,boolean delSrc) throws Exception {
  FileInputStream srcInputStream=null;
  try {
    srcInputStream=new FileInputStream(srcFileName);
    long lastModified=new File(srcFileName).lastModified();
    int available=srcInputStream.available();
    if (available > L_SIZE) {
      copyFileL(srcFileName,srcInputStream,desFileName,delSrc);
    }
 else     if (available > M_SIZE) {
      copyFileM(srcFileName,srcInputStream,desFileName,delSrc);
    }
 else {
      copyFileS(srcFileName,srcInputStream,desFileName,delSrc);
    }
    new File(desFileName).setLastModified(lastModified);
  }
  finally {
    if (srcInputStream != null) {
      srcInputStream.close();
    }
  }
}
Program: 122558
Project: 122558
Buggy source:
public static void copyFile(String srcFileName,String desFileName,boolean delSrc) throws Exception {
  FileInputStream srcInputStream=new FileInputStream(srcFileName);
  long lastModified=new File(srcFileName).lastModified();
  int available=srcInputStream.available();
  if (available > L_SIZE) {
    copyFileL(srcFileName,srcInputStream,desFileName,delSrc);
  }
 else   if (available > M_SIZE) {
    copyFileM(srcFileName,srcInputStream,desFileName,delSrc);
  }
 else {
    copyFileS(srcFileName,srcInputStream,desFileName,delSrc);
  }
  new File(desFileName).setLastModified(lastModified);
}

Fixed version (ground truth):
public static void copyFile(String srcFileName,String desFileName,boolean delSrc) throws Exception {
  FileInputStream srcInputStream=null;
  try {
    srcInputStream=new FileInputStream(srcFileName);
    long lastModified=new File(srcFileName).lastModified();
    int available=srcInputStream.available();
    if (available > L_SIZE) {
      copyFileL(srcFileName,srcInputStream,desFileName,delSrc);
    }
 else     if (available > M_SIZE) {
      copyFileM(srcFileName,srcInputStream,desFileName,delSrc);
    }
 else {
      copyFileS(srcFileName,srcInputStream,desFileName,delSrc);
    }
    new File(desFileName).setLastModified(lastModified);
  }
  finally {
    if (srcInputStream != null) {
      srcInputStream.close();
    }
  }
}
Program: 122559
Project: 122559
Buggy source:
private static void copyFileL(String srcFileName,FileInputStream srcInputStream,String desFileName,boolean delSrc) throws Exception {
  File source=new File(srcFileName);
  File dest=new File(desFileName);
  FileChannel in=null, out=null;
  try {
    in=srcInputStream.getChannel();
    out=new FileOutputStream(dest).getChannel();
    long size=in.size();
    long position=0;
    final long MAP_SIZE=33525760;
    MappedByteBuffer buf=null;
    while (true) {
      if (position + MAP_SIZE >= size) {
        buf=in.map(FileChannel.MapMode.READ_ONLY,position,size - position);
        out.write(buf);
        if (delSrc) {
          clean(buf);
        }
        break;
      }
 else {
        buf=in.map(FileChannel.MapMode.READ_ONLY,position,MAP_SIZE);
        out.write(buf);
        if (delSrc) {
          clean(buf);
        }
        position+=MAP_SIZE;
      }
    }
    in.close();
    out.close();
    srcInputStream.close();
    if (delSrc) {
      source.delete();
    }
  }
  finally {
    if (in != null) {
      in.close();
    }
    if (out != null) {
      out.close();
    }
    if (srcInputStream != null) {
      srcInputStream.close();
    }
  }
}

Fixed version (ground truth):
private static void copyFileL(String srcFileName,FileInputStream srcInputStream,String desFileName,boolean delSrc) throws Exception {
  File source=new File(srcFileName);
  File dest=new File(desFileName);
  FileChannel in=null, out=null;
  try {
    in=srcInputStream.getChannel();
    out=new FileOutputStream(dest).getChannel();
    long size=in.size();
    long position=0;
    final long MAP_SIZE=33525760;
    MappedByteBuffer buf=null;
    while (true) {
      if (position + MAP_SIZE >= size) {
        buf=in.map(FileChannel.MapMode.READ_ONLY,position,size - position);
        out.write(buf);
        if (delSrc) {
          clean(buf);
        }
        break;
      }
 else {
        buf=in.map(FileChannel.MapMode.READ_ONLY,position,MAP_SIZE);
        out.write(buf);
        if (delSrc) {
          clean(buf);
        }
        position+=MAP_SIZE;
      }
    }
    in.close();
    out.close();
    if (delSrc) {
      source.delete();
    }
  }
  finally {
    if (in != null) {
      in.close();
    }
    if (out != null) {
      out.close();
    }
  }
}
Program: 122560
Project: 122560
Buggy source:
private static void copyFileM(String srcFileName,FileInputStream srcInputStream,String desFileName,boolean delSrc) throws IOException {
  File source=new File(srcFileName);
  File dest=new File(desFileName);
  FileChannel in=null;
  FileChannel out=null;
  try {
    in=srcInputStream.getChannel();
    out=new FileOutputStream(dest).getChannel();
    in.transferTo(0,in.size(),out);
    in.close();
    out.close();
    srcInputStream.close();
    if (delSrc) {
      source.delete();
    }
  }
  finally {
    if (in != null) {
      in.close();
    }
    if (out != null) {
      out.close();
    }
    if (srcInputStream != null) {
      srcInputStream.close();
    }
  }
}

Fixed version (ground truth):
private static void copyFileM(String srcFileName,FileInputStream srcInputStream,String desFileName,boolean delSrc) throws IOException {
  File source=new File(srcFileName);
  File dest=new File(desFileName);
  FileChannel in=null;
  FileChannel out=null;
  try {
    in=srcInputStream.getChannel();
    out=new FileOutputStream(dest).getChannel();
    in.transferTo(0,in.size(),out);
    in.close();
    out.close();
    if (delSrc) {
      source.delete();
    }
  }
  finally {
    if (in != null) {
      in.close();
    }
    if (out != null) {
      out.close();
    }
  }
}
Program: 122561
Project: 122561
Buggy source:
@SuppressWarnings("String_Node_Str") public boolean executeUpdates(List<UpdateResult> results){
  return UpdateManagerUtils.executeUpdates(results);
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public boolean executeUpdates(List<UpdateResult> results){
  return UpdateManagerUtils.executeUpdates(results);
}
Program: 122563
Project: 122563
Buggy source:
public List<UpdateResult> getUpdatesNeeded(EUpdateItemType type,boolean onlySimpleShow){
  if (type == null) {
    return null;
  }
  List<UpdateResult> tmpResults=new ArrayList<UpdateResult>();
switch (type) {
case NODE_PROPERTY:
case NODE_SCHEMA:
case NODE_QUERY:
case NODE_SAP_IDOC:
case NODE_SAP_FUNCTION:
case NODE_VALIDATION_RULE:
    tmpResults=checkNodesParameters(type,onlySimpleShow);
  break;
case JOB_PROPERTY_EXTRA:
case JOB_PROPERTY_STATS_LOGS:
case JOB_PROPERTY_HEADERFOOTER:
tmpResults=checkMainParameters(type,onlySimpleShow);
break;
case CONTEXT:
tmpResults=checkContext(onlySimpleShow);
break;
case CONTEXT_GROUP:
tmpResults=checkGroupContext(onlySimpleShow);
break;
case JOBLET_SCHEMA:
tmpResults=checkJobletNodeSchema();
break;
case JOBLET_RENAMED:
tmpResults=checkJobletNodesPropertyChanger();
break;
case RELOAD:
tmpResults=checkJobletNodeReload(onlySimpleShow);
break;
case JOBLET_CONTEXT:
tmpResults=checkJobletNodesContext();
break;
default :
}
return tmpResults;
}

Fixed version (ground truth):
@Override public List<UpdateResult> getUpdatesNeeded(EUpdateItemType type,boolean onlySimpleShow){
  if (type == null) {
    return null;
  }
  List<UpdateResult> tmpResults=new ArrayList<UpdateResult>();
switch (type) {
case NODE_PROPERTY:
case NODE_SCHEMA:
case NODE_QUERY:
case NODE_SAP_IDOC:
case NODE_SAP_FUNCTION:
case NODE_VALIDATION_RULE:
    tmpResults=checkNodesParameters(type,onlySimpleShow);
  break;
case JOB_PROPERTY_EXTRA:
case JOB_PROPERTY_STATS_LOGS:
case JOB_PROPERTY_HEADERFOOTER:
tmpResults=checkMainParameters(type,onlySimpleShow);
break;
case CONTEXT:
tmpResults=checkContext(onlySimpleShow);
break;
case CONTEXT_GROUP:
tmpResults=checkGroupContext(onlySimpleShow);
break;
case JOBLET_SCHEMA:
tmpResults=checkJobletNodeSchema();
break;
case JOBLET_RENAMED:
tmpResults=checkJobletNodesPropertyChanger();
break;
case RELOAD:
tmpResults=checkJobletNodeReload(onlySimpleShow);
break;
case JOBLET_CONTEXT:
tmpResults=checkJobletNodesContext();
break;
default :
}
return tmpResults;
}
Program: 122564
Project: 122564
Buggy source:
public void retrieveRefInformation(){
  jobletReferenceMap.clear();
  if (jobletProcessProvider == null) {
    return;
  }
  for (  INode node : this.getProcess().getGraphicalNodes()) {
    Item jobletItem=jobletProcessProvider.getJobletItem(node);
    if (jobletItem != null) {
      jobletReferenceMap.put(jobletItem.getProperty().getId(),jobletItem.getProperty().getModificationDate());
    }
  }
}

Fixed version (ground truth):
@Override public void retrieveRefInformation(){
  jobletReferenceMap.clear();
  if (jobletProcessProvider == null) {
    return;
  }
  for (  INode node : this.getProcess().getGraphicalNodes()) {
    Item jobletItem=jobletProcessProvider.getJobletItem(node);
    if (jobletItem != null) {
      jobletReferenceMap.put(jobletItem.getProperty().getId(),jobletItem.getProperty().getModificationDate());
    }
  }
}
Program: 122566
Project: 122566
Buggy source:
public void shellClosed(ShellEvent e){
  UIManager uiManager=mapperManager.getUiManager();
  if (uiManager.getMapperResponse() == SWT.NONE) {
    for (    DataMapTableView dataMapTableView : uiManager.getInputsTablesView()) {
      dataMapTableView.notifyFocusLost();
    }
    for (    DataMapTableView dataMapTableView : uiManager.getOutputsTablesView()) {
      dataMapTableView.notifyFocusLost();
    }
    for (    DataMapTableView dataMapTableView : uiManager.getVarsTablesView()) {
      dataMapTableView.notifyFocusLost();
    }
    uiManager.setMapperResponse(SWT.CANCEL);
    uiManager.prepareClosing(uiManager.getMapperResponse());
  }
  if (mapperManager.isDataChanged() && !mapperManager.getUiManager().isCloseWithoutPrompt()) {
    boolean closeWindow=MessageDialog.openConfirm(mapperShellFinal,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    if (!closeWindow) {
      e.doit=false;
    }
 else {
      mapperManager.getAbstractMapComponent().setExternalData(mapperManager.getOriginalExternalData());
      mapperManager.getUiManager().prepareClosing(SWT.CANCEL);
    }
  }
}

Fixed version (ground truth):
public void shellClosed(ShellEvent e){
  UIManager uiManager=mapperManager.getUiManager();
  if (uiManager.getMapperResponse() == SWT.NONE) {
    for (    DataMapTableView dataMapTableView : uiManager.getInputsTablesView()) {
      dataMapTableView.notifyFocusLost();
    }
    for (    DataMapTableView dataMapTableView : uiManager.getOutputsTablesView()) {
      dataMapTableView.notifyFocusLost();
    }
    for (    DataMapTableView dataMapTableView : uiManager.getVarsTablesView()) {
      dataMapTableView.notifyFocusLost();
    }
    uiManager.setMapperResponse(SWT.CANCEL);
    uiManager.prepareClosing(uiManager.getMapperResponse());
  }
  if (!mapperManager.componentIsReadOnly() && mapperManager.isDataChanged() && !mapperManager.getUiManager().isCloseWithoutPrompt()) {
    boolean closeWindow=MessageDialog.openConfirm(mapperShellFinal,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    if (!closeWindow) {
      e.doit=false;
    }
 else {
      mapperManager.getAbstractMapComponent().setExternalData(mapperManager.getOriginalExternalData());
      mapperManager.getUiManager().prepareClosing(SWT.CANCEL);
    }
  }
}
Program: 122569
Project: 122569
Buggy source:
/** 
 * DOC ycbai Comment method "enableDiaplayViewer".
 * @param enable
 */
public void enableDiaplayViewer(boolean isRepository){
  MetadataTableEditorView metadataEditorView=mapperManager.getUiManager().getMetadataEditorView(getZone());
  metadataEditorView.setReadOnly(isRepository);
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "enableDiaplayViewer".
 * @param enable
 */
public void enableDiaplayViewer(boolean isRepository){
  MetadataTableEditorView metadataEditorView=mapperManager.getUiManager().getMetadataEditorView(getZone());
  if (mapperManager.componentIsReadOnly()) {
    metadataEditorView.setReadOnly(true);
  }
 else {
    metadataEditorView.setReadOnly(isRepository);
  }
}
Program: 122575
Project: 122575
Buggy source:
@Override protected boolean addToolItems(){
  if (!getInputTable().isMainConnection()) {
    final InputTable table=getInputTable();
    condensedItem=new ToolItem(toolBarActions,SWT.CHECK);
    condensedItem.setEnabled(!mapperManager.componentIsReadOnly());
    condensedItem.setSelection(table.isActivateCondensedTool());
    condensedItem.setToolTipText("String_Node_Str");
    initCondensedItemImage();
    condensedItem.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        table.setActivateCondensedTool(condensedItem.getSelection());
        showTableMapSetting(condensedItem.getSelection());
      }
    }
);
    if (mapperManager.isPersistentMap()) {
      TMAP_LOOKUP_MODE lookupMode=(TMAP_LOOKUP_MODE)table.getLookupMode();
switch (lookupMode) {
case LOAD_ONCE:
case LOAD_ONCE_AND_UPDATE:
case RELOAD:
        persistentCheckEditable=true;
      previousValidPersistentMode=table.isPersistent();
    break;
case CACHE_OR_RELOAD:
  persistentCheckEditable=false;
getInputTable().setPersistent(false);
break;
default :
break;
}
}
}
createActivateFilterCheck();
return true;
}

Fixed version (ground truth):
@Override protected boolean addToolItems(){
  if (!getInputTable().isMainConnection()) {
    final InputTable table=getInputTable();
    condensedItem=new ToolItem(toolBarActions,SWT.CHECK);
    condensedItem.setSelection(table.isActivateCondensedTool());
    condensedItem.setToolTipText("String_Node_Str");
    initCondensedItemImage();
    condensedItem.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        table.setActivateCondensedTool(condensedItem.getSelection());
        showTableMapSetting(condensedItem.getSelection());
      }
    }
);
    if (mapperManager.isPersistentMap()) {
      TMAP_LOOKUP_MODE lookupMode=(TMAP_LOOKUP_MODE)table.getLookupMode();
switch (lookupMode) {
case LOAD_ONCE:
case LOAD_ONCE_AND_UPDATE:
case RELOAD:
        persistentCheckEditable=true;
      previousValidPersistentMode=table.isPersistent();
    break;
case CACHE_OR_RELOAD:
  persistentCheckEditable=false;
getInputTable().setPersistent(false);
break;
default :
break;
}
}
}
createActivateFilterCheck();
return true;
}
Program: 122576
Project: 122576
Buggy source:
public void widgetSelected(SelectionEvent arg0){
  getInputTable().addGlobalMapEntry(new GlobalMapEntry(getInputTable(),"String_Node_Str","String_Node_Str"));
  updateGridDataHeightForTableGlobalMap();
  resizeAtExpandedSize();
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent arg0){
  if (!mapperManager.componentIsReadOnly()) {
    getInputTable().addGlobalMapEntry(new GlobalMapEntry(getInputTable(),"String_Node_Str","String_Node_Str"));
    updateGridDataHeightForTableGlobalMap();
    resizeAtExpandedSize();
  }
}
Program: 122577
Project: 122577
Buggy source:
@Override protected void selectionEvent(TableViewerCreatorColumnNotModifiable column,Object bean){
  ITableEntry tableEntry=(ITableEntry)bean;
  boolean removeEntry=MessageDialog.openConfirm(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str",tableEntry.getName()));
  if (removeEntry) {
    ExtendedTableRemoveCommand removeCommand=new ExtendedTableRemoveCommand(bean,extendedTableViewerForGlobalMap.getExtendedTableModel());
    mapperManager.removeTableEntry((ITableEntry)bean);
    mapperManager.executeCommand(removeCommand);
    tableViewerCreatorForGlobalMap.getTableViewer().refresh();
    List list=tableViewerCreatorForGlobalMap.getInputList();
    updateGridDataHeightForTableGlobalMap();
    resizeAtExpandedSize();
  }
}

Fixed version (ground truth):
@Override protected void selectionEvent(TableViewerCreatorColumnNotModifiable column,Object bean){
  ITableEntry tableEntry=(ITableEntry)bean;
  if (!mapperManager.componentIsReadOnly()) {
    boolean removeEntry=MessageDialog.openConfirm(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str",tableEntry.getName()));
    if (removeEntry) {
      ExtendedTableRemoveCommand removeCommand=new ExtendedTableRemoveCommand(bean,extendedTableViewerForGlobalMap.getExtendedTableModel());
      mapperManager.removeTableEntry((ITableEntry)bean);
      mapperManager.executeCommand(removeCommand);
      tableViewerCreatorForGlobalMap.getTableViewer().refresh();
      List list=tableViewerCreatorForGlobalMap.getInputList();
      updateGridDataHeightForTableGlobalMap();
      resizeAtExpandedSize();
    }
  }
}
Program: 122578
Project: 122578
Buggy source:
public void shellClosed(ShellEvent e){
  UIManager uiManager=mapperManager.getUiManager();
  if (uiManager.getMapperResponse() == SWT.NONE) {
    for (    DataMapTableView dataMapTableView : uiManager.getInputsTablesView()) {
      dataMapTableView.notifyFocusLost();
    }
    for (    DataMapTableView dataMapTableView : uiManager.getOutputsTablesView()) {
      dataMapTableView.notifyFocusLost();
    }
    for (    DataMapTableView dataMapTableView : uiManager.getVarsTablesView()) {
      dataMapTableView.notifyFocusLost();
    }
    uiManager.setMapperResponse(SWT.CANCEL);
    uiManager.prepareClosing(uiManager.getMapperResponse());
  }
  if (mapperManager.isDataChanged() && !mapperManager.getUiManager().isCloseWithoutPrompt()) {
    boolean closeWindow=MessageDialog.openConfirm(mapperShellFinal,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    if (!closeWindow) {
      e.doit=false;
    }
 else {
      mapperManager.getAbstractMapComponent().setExternalData(mapperManager.getOriginalExternalData());
      mapperManager.getUiManager().prepareClosing(SWT.CANCEL);
    }
  }
}

Fixed version (ground truth):
public void shellClosed(ShellEvent e){
  UIManager uiManager=mapperManager.getUiManager();
  if (uiManager.getMapperResponse() == SWT.NONE) {
    for (    DataMapTableView dataMapTableView : uiManager.getInputsTablesView()) {
      dataMapTableView.notifyFocusLost();
    }
    for (    DataMapTableView dataMapTableView : uiManager.getOutputsTablesView()) {
      dataMapTableView.notifyFocusLost();
    }
    for (    DataMapTableView dataMapTableView : uiManager.getVarsTablesView()) {
      dataMapTableView.notifyFocusLost();
    }
    uiManager.setMapperResponse(SWT.CANCEL);
    uiManager.prepareClosing(uiManager.getMapperResponse());
  }
  if (!mapperManager.componentIsReadOnly() && mapperManager.isDataChanged() && !mapperManager.getUiManager().isCloseWithoutPrompt()) {
    boolean closeWindow=MessageDialog.openConfirm(mapperShellFinal,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    if (!closeWindow) {
      e.doit=false;
    }
 else {
      mapperManager.getAbstractMapComponent().setExternalData(mapperManager.getOriginalExternalData());
      mapperManager.getUiManager().prepareClosing(SWT.CANCEL);
    }
  }
}
Program: 122581
Project: 122581
Buggy source:
/** 
 * DOC ycbai Comment method "enableDiaplayViewer".
 * @param enable
 */
public void enableDiaplayViewer(boolean isRepository){
  MetadataTableEditorView metadataEditorView=mapperManager.getUiManager().getMetadataEditorView(getZone());
  metadataEditorView.setReadOnly(isRepository);
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "enableDiaplayViewer".
 * @param enable
 */
public void enableDiaplayViewer(boolean isRepository){
  MetadataTableEditorView metadataEditorView=mapperManager.getUiManager().getMetadataEditorView(getZone());
  if (mapperManager.componentIsReadOnly()) {
    metadataEditorView.setReadOnly(true);
  }
 else {
    metadataEditorView.setReadOnly(isRepository);
  }
}
Program: 122582
Project: 122582
Buggy source:
/** 
 * DOC ycbai Comment method "getSchemaDisplayName".
 * @param id
 * @return
 */
protected String getSchemaDisplayName(String id){
  if (id == null)   return null;
  String[] values=id.split("String_Node_Str");
  String itemId=values[0];
  String name=values[1];
  try {
    IProxyRepositoryFactory factory=((IProxyRepositoryService)GlobalServiceRegister.getDefault().getService(IProxyRepositoryService.class)).getProxyRepositoryFactory();
    IRepositoryViewObject object=factory.getLastVersion(itemId);
    if (object == null) {
      return null;
    }
    Item item=object.getProperty().getItem();
    if (item instanceof ConnectionItem) {
      ConnectionItem lastItemUsed=(ConnectionItem)item;
      return DesignerUtilities.getRepositoryAliasName(lastItemUsed) + "String_Node_Str" + lastItemUsed.getProperty().getLabel()+ "String_Node_Str"+ name;
    }
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "getSchemaDisplayName".
 * @param id
 * @return
 */
protected String getSchemaDisplayName(String id){
  if (id == null) {
    return null;
  }
  String[] values=id.split("String_Node_Str");
  String itemId=values[0];
  String name=values[1];
  try {
    IProxyRepositoryFactory factory=((IProxyRepositoryService)GlobalServiceRegister.getDefault().getService(IProxyRepositoryService.class)).getProxyRepositoryFactory();
    IRepositoryViewObject object=factory.getLastVersion(itemId);
    if (object == null) {
      return null;
    }
    Item item=object.getProperty().getItem();
    if (item instanceof ConnectionItem) {
      ConnectionItem lastItemUsed=(ConnectionItem)item;
      return DesignerUtilities.getRepositoryAliasName(lastItemUsed) + "String_Node_Str" + lastItemUsed.getProperty().getLabel()+ "String_Node_Str"+ name;
    }
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  return null;
}
Program: 122583
Project: 122583
Buggy source:
/** 
 * DOC ycbai Comment method "getGlobalMapEntryByNameFromList".
 * @param list
 * @param name
 * @return
 */
private GlobalMapEntry getGlobalMapEntryByNameFromList(List<GlobalMapEntry> list,String name){
  if (list == null || name == null)   return null;
  for (  GlobalMapEntry mapEntry : list) {
    if (name.equals(mapEntry.getName())) {
      return mapEntry;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "getGlobalMapEntryByNameFromList".
 * @param list
 * @param name
 * @return
 */
private GlobalMapEntry getGlobalMapEntryByNameFromList(List<GlobalMapEntry> list,String name){
  if (list == null || name == null) {
    return null;
  }
  for (  GlobalMapEntry mapEntry : list) {
    if (name.equals(mapEntry.getName())) {
      return mapEntry;
    }
  }
  return null;
}
Program: 122587
Project: 122587
Buggy source:
public void updateTitleImage(){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      Image image=null;
      if (getProcess() == null) {
        return;
      }
      InformationLevel level=getProcess().getProperty().getMaxInformationLevel();
      if (level.equals(InformationLevel.ERROR_LITERAL)) {
        image=OverlayImageProvider.getImageWithError(ImageProvider.getImage(ECoreImage.PROCESS_ICON)).createImage();
      }
 else {
        image=ImageProvider.getImage(ECoreImage.PROCESS_ICON);
      }
      setTitleImage(image);
    }
  }
);
}

Fixed version (ground truth):
@Override public void updateTitleImage(){
  Display.getDefault().syncExec(new Runnable(){
    @Override public void run(){
      Image image=null;
      if (getProcess() == null) {
        return;
      }
      InformationLevel level=getProcess().getProperty().getMaxInformationLevel();
      if (level.equals(InformationLevel.ERROR_LITERAL)) {
        image=OverlayImageProvider.getImageWithError(ImageProvider.getImage(ECoreImage.PROCESS_ICON)).createImage();
      }
 else {
        image=ImageProvider.getImage(ECoreImage.PROCESS_ICON);
      }
      setTitleImage(image);
    }
  }
);
}
Program: 122588
Project: 122588
Buggy source:
/** 
 * Getter for designerEditor.
 * @return the designerEditor
 */
public AbstractTalendEditor getDesignerEditor(){
  return this.designerEditor;
}

Fixed version (ground truth):
/** 
 * Getter for designerEditor.
 * @return the designerEditor
 */
@Override public AbstractTalendEditor getDesignerEditor(){
  return this.designerEditor;
}
Program: 122589
Project: 122589
Buggy source:
public void run(){
  Image image=null;
  if (getProcess() == null) {
    return;
  }
  InformationLevel level=getProcess().getProperty().getMaxInformationLevel();
  if (level.equals(InformationLevel.ERROR_LITERAL)) {
    image=OverlayImageProvider.getImageWithError(ImageProvider.getImage(ECoreImage.PROCESS_ICON)).createImage();
  }
 else {
    image=ImageProvider.getImage(ECoreImage.PROCESS_ICON);
  }
  setTitleImage(image);
}

Fixed version (ground truth):
@Override public void run(){
  Image image=null;
  if (getProcess() == null) {
    return;
  }
  InformationLevel level=getProcess().getProperty().getMaxInformationLevel();
  if (level.equals(InformationLevel.ERROR_LITERAL)) {
    image=OverlayImageProvider.getImageWithError(ImageProvider.getImage(ECoreImage.PROCESS_ICON)).createImage();
  }
 else {
    image=ImageProvider.getImage(ECoreImage.PROCESS_ICON);
  }
  setTitleImage(image);
}
Program: 122590
Project: 122590
Buggy source:
public boolean canExecute(){
  boolean canExecute=false;
  if (!connection.isActivate()) {
    return false;
  }
  if (newSource != null) {
    connection.setPropertyValue(EParameterName.ACTIVATE.getName(),false);
    canExecute=checkSourceReconnection();
    connection.setPropertyValue(EParameterName.ACTIVATE.getName(),true);
  }
 else   if (newTarget != null) {
    connection.setPropertyValue(EParameterName.ACTIVATE.getName(),false);
    canExecute=checkTargetReconnection();
    connection.setPropertyValue(EParameterName.ACTIVATE.getName(),true);
  }
  return canExecute;
}

Fixed version (ground truth):
@Override public boolean canExecute(){
  boolean canExecute=false;
  if (!connection.isActivate()) {
    return false;
  }
  if (newSource != null) {
    connection.setPropertyValue(EParameterName.ACTIVATE.getName(),false);
    canExecute=checkSourceReconnection();
    connection.setPropertyValue(EParameterName.ACTIVATE.getName(),true);
  }
 else   if (newTarget != null) {
    connection.setPropertyValue(EParameterName.ACTIVATE.getName(),false);
    canExecute=checkTargetReconnection();
    connection.setPropertyValue(EParameterName.ACTIVATE.getName(),true);
  }
  return canExecute;
}
Program: 122594
Project: 122594
Buggy source:
/** 
 * Added by Marvin Wang on July 30, 2012 for refreshing the tab of Job view.
 */
protected void refreshJobSettingsView(){
  IViewPart viewPart=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IJobSettingsView.ID);
  if (viewPart != null && viewPart instanceof JobSettingsView) {
    JobSettingsView jobView=(JobSettingsView)viewPart;
    IDynamicProperty dc=jobView.getCurrentSelectedTab().getPropertyComposite();
    if (dc != null) {
      dc.refresh();
    }
  }
}

Fixed version (ground truth):
/** 
 * Added by Marvin Wang on July 30, 2012 for refreshing the tab of Job view.
 */
protected void refreshJobSettingsView(){
  IViewPart viewPart=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IJobSettingsView.ID);
  if (viewPart != null && viewPart instanceof JobSettingsView) {
    JobSettingsView jobView=(JobSettingsView)viewPart;
    TalendPropertyTabDescriptor currentSelectedTab=jobView.getCurrentSelectedTab();
    if (currentSelectedTab != null) {
      IDynamicProperty dc=currentSelectedTab.getPropertyComposite();
      if (dc != null) {
        dc.refresh();
      }
    }
  }
}
Program: 122595
Project: 122595
Buggy source:
public void widgetDefaultSelected(SelectionEvent e){
}

Fixed version (ground truth):
@Override public void widgetDefaultSelected(SelectionEvent e){
}
Program: 122596
Project: 122596
Buggy source:
public void widgetSelected(SelectionEvent event){
  Command command=createCommand(event);
  executeCommand(command);
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent event){
  Command command=createCommand(event);
  executeCommand(command);
}
Program: 122597
Project: 122597
Buggy source:
public void propertyChange(PropertyChangeEvent arg0){
}

Fixed version (ground truth):
@Override public void propertyChange(PropertyChangeEvent arg0){
}
Program: 122600
Project: 122600
Buggy source:
/** 
 * Added by Marvin Wang on July 30, 2012 for refreshing the tab of Job view.
 */
protected void refreshJobSettingsView(){
  IViewPart viewPart=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IJobSettingsView.ID);
  if (viewPart != null && viewPart instanceof JobSettingsView) {
    JobSettingsView jobView=(JobSettingsView)viewPart;
    IDynamicProperty dc=jobView.getCurrentSelectedTab().getPropertyComposite();
    if (dc != null) {
      dc.refresh();
    }
  }
}

Fixed version (ground truth):
/** 
 * Added by Marvin Wang on July 30, 2012 for refreshing the tab of Job view.
 */
protected void refreshJobSettingsView(){
  IViewPart viewPart=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IJobSettingsView.ID);
  if (viewPart != null && viewPart instanceof JobSettingsView) {
    JobSettingsView jobView=(JobSettingsView)viewPart;
    TalendPropertyTabDescriptor currentSelectedTab=jobView.getCurrentSelectedTab();
    if (currentSelectedTab != null) {
      IDynamicProperty dc=currentSelectedTab.getPropertyComposite();
      if (dc != null) {
        dc.refresh();
      }
    }
  }
}
Program: 122601
Project: 122601
Buggy source:
private static void copyFileL(String srcFileName,FileInputStream srcInputStream,String desFileName,boolean delSrc) throws Exception {
  File source=new File(srcFileName);
  File dest=new File(desFileName);
  FileChannel in=null, out=null;
  try {
    in=srcInputStream.getChannel();
    out=new FileOutputStream(dest).getChannel();
    long size=in.size();
    long position=0;
    final long MAP_SIZE=33525760;
    MappedByteBuffer buf=null;
    while (true) {
      if (position + MAP_SIZE >= size) {
        buf=in.map(FileChannel.MapMode.READ_ONLY,position,size - position);
        out.write(buf);
        if (delSrc) {
          clean(buf);
        }
        break;
      }
 else {
        buf=in.map(FileChannel.MapMode.READ_ONLY,position,MAP_SIZE);
        out.write(buf);
        if (delSrc) {
          clean(buf);
        }
        position+=MAP_SIZE;
      }
    }
    in.close();
    out.close();
    if (delSrc) {
      source.delete();
    }
  }
  finally {
    if (in != null) {
      in.close();
    }
    if (out != null) {
      out.close();
    }
  }
}

Fixed version (ground truth):
private static void copyFileL(String srcFileName,FileInputStream srcInputStream,String desFileName,boolean delSrc) throws Exception {
  File source=new File(srcFileName);
  File dest=new File(desFileName);
  FileChannel in=null, out=null;
  try {
    in=srcInputStream.getChannel();
    out=new FileOutputStream(dest).getChannel();
    long size=in.size();
    long position=0;
    final long MAP_SIZE=33525760;
    MappedByteBuffer buf=null;
    while (true) {
      if (position + MAP_SIZE >= size) {
        buf=in.map(FileChannel.MapMode.READ_ONLY,position,size - position);
        out.write(buf);
        if (delSrc) {
          clean(buf);
        }
        break;
      }
 else {
        buf=in.map(FileChannel.MapMode.READ_ONLY,position,MAP_SIZE);
        out.write(buf);
        if (delSrc) {
          clean(buf);
        }
        position+=MAP_SIZE;
      }
    }
    in.close();
    out.close();
    srcInputStream.close();
    if (delSrc) {
      source.delete();
    }
  }
  finally {
    if (in != null) {
      in.close();
    }
    if (out != null) {
      out.close();
    }
    if (srcInputStream != null) {
      srcInputStream.close();
    }
  }
}
Program: 122602
Project: 122602
Buggy source:
private static void copyFileM(String srcFileName,FileInputStream srcInputStream,String desFileName,boolean delSrc) throws IOException {
  File source=new File(srcFileName);
  File dest=new File(desFileName);
  FileChannel in=null;
  FileChannel out=null;
  try {
    in=srcInputStream.getChannel();
    out=new FileOutputStream(dest).getChannel();
    in.transferTo(0,in.size(),out);
    in.close();
    out.close();
    if (delSrc) {
      source.delete();
    }
  }
  finally {
    if (in != null) {
      in.close();
    }
    if (out != null) {
      out.close();
    }
  }
}

Fixed version (ground truth):
private static void copyFileM(String srcFileName,FileInputStream srcInputStream,String desFileName,boolean delSrc) throws IOException {
  File source=new File(srcFileName);
  File dest=new File(desFileName);
  FileChannel in=null;
  FileChannel out=null;
  try {
    in=srcInputStream.getChannel();
    out=new FileOutputStream(dest).getChannel();
    in.transferTo(0,in.size(),out);
    in.close();
    out.close();
    srcInputStream.close();
    if (delSrc) {
      source.delete();
    }
  }
  finally {
    if (in != null) {
      in.close();
    }
    if (out != null) {
      out.close();
    }
    if (srcInputStream != null) {
      srcInputStream.close();
    }
  }
}
Program: 122606
Project: 122606
Buggy source:
protected boolean selectRepositoryNode(Viewer viewer,RepositoryNode node){
  if (node == null) {
    return false;
  }
  IRepositoryViewObject object=node.getObject();
  if (object != null) {
    if (object instanceof MetadataColumnRepositoryObject) {
      return false;
    }
    if (node.getObjectType() == ERepositoryObjectType.METADATA_CON_TABLE) {
      return false;
    }
  }
  if (object == null && node.getParent() != null && node.getParent().getObject() != null && node.getParent().getObjectType() == ERepositoryObjectType.METADATA_CONNECTIONS) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
protected boolean selectRepositoryNode(Viewer viewer,RepositoryNode node){
  if (node == null) {
    return false;
  }
  IRepositoryViewObject object=node.getObject();
  if (object != null) {
    if (object instanceof MetadataColumnRepositoryObject) {
      return false;
    }
    if (node.getObjectType() == ERepositoryObjectType.METADATA_CON_TABLE) {
      return false;
    }
  }
  if (object == null && node.getParent() != null && node.getParent().getObject() != null && node.getParent().getObjectType() == ERepositoryObjectType.METADATA_CONNECTIONS) {
    return false;
  }
  if (object == null && ERepositoryObjectType.GENERATED.equals(node.getContentType())) {
    return false;
  }
  return true;
}
Program: 122607
Project: 122607
Buggy source:
@Override protected void setTableViewerCreatorOptions(TableViewerCreator<B> newTableViewerCreator){
  super.setTableViewerCreatorOptions(newTableViewerCreator);
  newTableViewerCreator.setLayoutMode(LAYOUT_MODE.DEFAULT);
}

Fixed version (ground truth):
@Override protected void setTableViewerCreatorOptions(TableViewerCreator<B> newTableViewerCreator){
  super.setTableViewerCreatorOptions(newTableViewerCreator);
  newTableViewerCreator.setLayoutMode(LAYOUT_MODE.DEFAULT);
  newTableViewerCreator.setLazyLoad(true);
}
Program: 122611
Project: 122611
Buggy source:
public boolean openReadOnlyDialog(Shell shell){
  Context ctx=CoreRuntimePlugin.getInstance().getContext();
  RepositoryContext rc=(RepositoryContext)ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);
  String branchKey=IProxyRepositoryFactory.BRANCH_SELECTION + "String_Node_Str" + ProjectManager.getInstance().getCurrentProject().getTechnicalLabel();
  String branchSelection=rc.getFields().get(branchKey);
  if (branchSelection.startsWith("String_Node_Str")) {
    MessageDialog.openInformation(shell,"String_Node_Str","String_Node_Str");
  }
  return true;
}

Fixed version (ground truth):
public boolean openReadOnlyDialog(Shell shell){
  Context ctx=CoreRuntimePlugin.getInstance().getContext();
  RepositoryContext rc=(RepositoryContext)ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);
  String branchKey=IProxyRepositoryFactory.BRANCH_SELECTION + "String_Node_Str" + ProjectManager.getInstance().getCurrentProject().getTechnicalLabel();
  String branchSelection=rc.getFields().get(branchKey);
  if (rc.getFields().containsKey(branchKey) && branchSelection != null) {
    if (branchSelection.startsWith("String_Node_Str")) {
      MessageDialog.openInformation(shell,"String_Node_Str","String_Node_Str");
    }
  }
  return true;
}