nus-yam/ex-repair huggingface dataset:
Program: 125566
Project: 125566
Buggy source:
private void adaptHbaseHadoopPartEditable(){
  hcPropertyTypeCombo.setReadOnly(isContextMode());
  hbaseDistributionCombo.setReadOnly(isContextMode());
  hbaseVersionCombo.setReadOnly(isContextMode());
  useKerberosForHBase.setEnabled(!isContextMode());
  useKeyTabForHBase.setEnabled(!isContextMode());
  hbaseMasterPrincipalTxt.setEditable(!isContextMode());
  hbaseRSPrincipalTxt.setEditable(!isContextMode());
  principalForHBaseTxt.setEditable(!isContextMode());
  keytabForHBaseTxt.setEditable(!isContextMode());
  useMaprTForHBase.setEnabled(!isContextMode());
  maprTUsernameForHBaseTxt.setEditable(!isContextMode());
  maprTPasswordForHBaseTxt.setEditable(!isContextMode());
  maprTClusterForHBaseTxt.setEditable(!isContextMode());
  maprTDurationForHBaseTxt.setEditable(!isContextMode());
}

Fixed version (ground truth):
private void adaptHbaseHadoopPartEditable(){
  hcPropertyTypeCombo.setReadOnly(isContextMode());
  hbaseDistributionCombo.setReadOnly(isContextMode());
  hbaseVersionCombo.setReadOnly(isContextMode());
  useKerberosForHBase.setEnabled(!isContextMode());
  useKeyTabForHBase.setEnabled(!isContextMode());
  hbaseMasterPrincipalTxt.setEditable(!isContextMode());
  hbaseRSPrincipalTxt.setEditable(!isContextMode());
  principalForHBaseTxt.setEditable(!isContextMode());
  keytabForHBaseTxt.setEditable(!isContextMode());
  useMaprTForHBase.setEnabled(!isContextMode());
  maprTUsernameForHBaseTxt.setEditable(!isContextMode());
  maprTPasswordForHBaseTxt.setEditable(!isContextMode());
  maprTClusterForHBaseTxt.setEditable(!isContextMode());
  maprTDurationForHBaseTxt.setEditable(!isContextMode());
  if (isContextMode()) {
    maprTPasswordForHBaseTxt.getTextControl().setEchoChar('\0');
  }
 else {
    maprTPasswordForHBaseTxt.getTextControl().setEchoChar('*');
  }
}
Program: 125569
Project: 125569
Buggy source:
/** 
 * DOC ggu Comment method "getMainProjectBranch".
 * @param technicalLabel
 * @return
 */
public String getMainProjectBranch(String technicalLabel){
  String branchForMainProject=null;
  Map<String,String> fields=getRepositoryContextFields();
  if (fields == null || technicalLabel == null) {
    return branchForMainProject;
  }
  String branchKey=IProxyRepositoryFactory.BRANCH_SELECTION + SVNConstant.UNDER_LINE_CHAR + technicalLabel;
  if (fields.containsKey(branchKey)) {
    branchForMainProject=fields.get(branchKey);
  }
  if (branchForMainProject != null) {
    if (!branchForMainProject.contains(SVNConstant.NAME_TAGS) && !branchForMainProject.contains(SVNConstant.NAME_BRANCHES) && !branchForMainProject.contains(SVNConstant.NAME_TRUNK)&& !branchForMainProject.contains(SVNConstant.NAME_MASTER)) {
      branchForMainProject=SVNConstant.NAME_BRANCHES + SVNConstant.SEP_CHAR + branchForMainProject;
    }
  }
  return branchForMainProject;
}

Fixed version (ground truth):
/** 
 * DOC ggu Comment method "getMainProjectBranch".
 * @param technicalLabel
 * @return
 */
public String getMainProjectBranch(String technicalLabel){
  String branchForMainProject=null;
  Map<String,String> fields=getRepositoryContextFields();
  if (fields == null || technicalLabel == null) {
    return branchForMainProject;
  }
  String branchKey=IProxyRepositoryFactory.BRANCH_SELECTION + SVNConstant.UNDER_LINE_CHAR + technicalLabel;
  if (fields.containsKey(branchKey)) {
    branchForMainProject=fields.get(branchKey);
  }
  if (branchForMainProject != null) {
    branchForMainProject=getFormatedBranchName(branchForMainProject);
  }
  return branchForMainProject;
}
Program: 125573
Project: 125573
Buggy source:
private void collectContextParams(){
  collectHiveContextParams();
  collectHBaseContextParams();
}

Fixed version (ground truth):
private void collectContextParams(){
  collectHiveContextParams();
  collectHBaseContextParams();
  collectImpalaContextParams();
}
Program: 125574
Project: 125574
Buggy source:
/** 
 * generate the code of the current Process.
 * @param statistics generate with statistics option ?
 * @param trace generate with trace option ?
 * @param context generate also the context file ?
 * @throws ProcessorException
 */
public void generateCode(boolean statistics,boolean trace,boolean context) throws ProcessorException ;

Fixed version (ground truth):
public void generateCode(boolean statistics,boolean trace,boolean context,int option) throws ProcessorException ;
Program: 125576
Project: 125576
Buggy source:
private static void generateBuildInfo(JobInfo jobInfo,IProgressMonitor progressMonitor,boolean isMainJob,IProcess currentProcess,String currentJobName,IProcessor processor,int option) throws ProcessorException {
  if (isMainJob) {
    progressMonitor.subTask(Messages.getString("String_Node_Str") + currentJobName);
    if (codeModified && !BitwiseOptionUtils.containOption(option,GENERATE_WITHOUT_COMPILING)) {
      try {
        processor.build(progressMonitor);
      }
 catch (      Exception e) {
        throw new ProcessorException(e);
      }
      processor.syntaxCheck();
    }
    needContextInCurrentGeneration=true;
    retrievedJarsForCurrentBuild.clear();
    codeModified=false;
  }
}

Fixed version (ground truth):
private static void generateBuildInfo(JobInfo jobInfo,IProgressMonitor progressMonitor,boolean isMainJob,IProcess currentProcess,String currentJobName,IProcessor processor,int option) throws ProcessorException {
  if (isMainJob) {
    progressMonitor.subTask(Messages.getString("String_Node_Str") + currentJobName);
    if (codeModified && !BitwiseOptionUtils.containOption(option,GENERATE_WITHOUT_COMPILING)) {
      try {
        processor.build(progressMonitor);
      }
 catch (      Exception e) {
        throw new ProcessorException(e);
      }
      processor.syntaxCheck();
      CorePlugin.getDefault().getRunProcessService().checkLastGenerationHasCompilationError(true);
    }
    needContextInCurrentGeneration=true;
    retrievedJarsForCurrentBuild.clear();
    codeModified=false;
  }
}
Program: 125579
Project: 125579
Buggy source:
public static ProjectRepositoryNode getInstance(){
  if (defaultProjRepoNode == null) {
    defaultProjRepoNode=new ProjectRepositoryNode(null,null,ENodeType.STABLE_SYSTEM_FOLDER);
    defaultProjRepoNode.initialize(null);
  }
  if (defaultProjRepoNode.isDisposed) {
synchronized (defaultProjRepoNode) {
      if (defaultProjRepoNode.isDisposed) {
        defaultProjRepoNode.isDisposed=false;
        defaultProjRepoNode.project=ProjectManager.getInstance().getCurrentProject();
        defaultProjRepoNode.setRoot(defaultProjRepoNode);
        defaultProjRepoNode.initialize(defaultProjRepoNode.currentPerspective);
      }
    }
  }
  return defaultProjRepoNode;
}

Fixed version (ground truth):
public static ProjectRepositoryNode getInstance(){
  if (!ProxyRepositoryFactory.getInstance().isFullLogonFinished()) {
    return dummyProjRepoNode;
  }
  if (defaultProjRepoNode == null) {
    defaultProjRepoNode=new ProjectRepositoryNode(null,null,ENodeType.STABLE_SYSTEM_FOLDER);
    defaultProjRepoNode.initialize(null);
  }
  if (defaultProjRepoNode.isDisposed) {
synchronized (defaultProjRepoNode) {
      if (defaultProjRepoNode.isDisposed) {
        defaultProjRepoNode.isDisposed=false;
        defaultProjRepoNode.project=ProjectManager.getInstance().getCurrentProject();
        defaultProjRepoNode.setRoot(defaultProjRepoNode);
        defaultProjRepoNode.initialize(defaultProjRepoNode.currentPerspective);
      }
    }
  }
  return defaultProjRepoNode;
}
Program: 125580
Project: 125580
Buggy source:
public void logOffProject(){
  repositoryFactoryFromProvider.logOffProject();
  fullLogonFinished=false;
  ProjectRepositoryNode root=ProjectRepositoryNode.getInstance();
  if (root != null) {
    root.setEnableDisposed(true);
    root.dispose();
  }
}

Fixed version (ground truth):
public void logOffProject(){
  repositoryFactoryFromProvider.logOffProject();
  ProjectRepositoryNode root=ProjectRepositoryNode.getInstance();
  if (root != null) {
    root.setEnableDisposed(true);
    root.dispose();
  }
  fullLogonFinished=false;
}
Program: 125581
Project: 125581
Buggy source:
/** 
 * DOC ggu Comment method "getMainProjectBranch".
 * @param technicalLabel
 * @return
 */
public String getMainProjectBranch(String technicalLabel){
  Map<String,String> fields=getRepositoryContextFields();
  if (fields == null || technicalLabel == null) {
    return null;
  }
  String branchKey=IProxyRepositoryFactory.BRANCH_SELECTION + SVNConstant.UNDER_LINE_CHAR + technicalLabel;
  if (fields.containsKey(branchKey)) {
    String branchForMainProject=fields.get(branchKey);
    return branchForMainProject;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * DOC ggu Comment method "getMainProjectBranch".
 * @param technicalLabel
 * @return
 */
public String getMainProjectBranch(String technicalLabel){
  String branchForMainProject=null;
  Map<String,String> fields=getRepositoryContextFields();
  if (fields == null || technicalLabel == null) {
    return branchForMainProject;
  }
  String branchKey=IProxyRepositoryFactory.BRANCH_SELECTION + SVNConstant.UNDER_LINE_CHAR + technicalLabel;
  if (fields.containsKey(branchKey)) {
    branchForMainProject=fields.get(branchKey);
  }
  if (branchForMainProject != null) {
    if (!branchForMainProject.contains(SVNConstant.NAME_TAGS) && !branchForMainProject.contains(SVNConstant.NAME_BRANCHES) && !branchForMainProject.contains(SVNConstant.NAME_TRUNK)&& !branchForMainProject.contains(SVNConstant.NAME_MASTER)) {
      branchForMainProject=SVNConstant.NAME_BRANCHES + SVNConstant.SEP_CHAR + branchForMainProject;
    }
  }
  return branchForMainProject;
}
Program: 125586
Project: 125586
Buggy source:
private void adaptHbaseHadoopPartEditable(){
  hcPropertyTypeCombo.setReadOnly(isContextMode());
  hbaseDistributionCombo.setReadOnly(isContextMode());
  hbaseVersionCombo.setReadOnly(isContextMode());
  useKerberosForHBase.setEnabled(!isContextMode());
  useKeyTabForHBase.setEnabled(!isContextMode());
  hbaseMasterPrincipalTxt.setEditable(!isContextMode());
  hbaseRSPrincipalTxt.setEditable(!isContextMode());
  principalForHBaseTxt.setEditable(!isContextMode());
  keytabForHBaseTxt.setEditable(!isContextMode());
  useMaprTForHBase.setEnabled(!isContextMode());
  maprTUsernameForHBaseTxt.setEditable(!isContextMode());
  maprTPasswordForHBaseTxt.setEditable(!isContextMode());
  maprTClusterForHBaseTxt.setEditable(!isContextMode());
  maprTDurationForHBaseTxt.setEditable(!isContextMode());
}

Fixed version (ground truth):
private void adaptHbaseHadoopPartEditable(){
  hcPropertyTypeCombo.setReadOnly(isContextMode());
  hbaseDistributionCombo.setReadOnly(isContextMode());
  hbaseVersionCombo.setReadOnly(isContextMode());
  useKerberosForHBase.setEnabled(!isContextMode());
  useKeyTabForHBase.setEnabled(!isContextMode());
  hbaseMasterPrincipalTxt.setEditable(!isContextMode());
  hbaseRSPrincipalTxt.setEditable(!isContextMode());
  principalForHBaseTxt.setEditable(!isContextMode());
  keytabForHBaseTxt.setEditable(!isContextMode());
  useMaprTForHBase.setEnabled(!isContextMode());
  maprTUsernameForHBaseTxt.setEditable(!isContextMode());
  maprTPasswordForHBaseTxt.setEditable(!isContextMode());
  maprTClusterForHBaseTxt.setEditable(!isContextMode());
  maprTDurationForHBaseTxt.setEditable(!isContextMode());
  if (isContextMode()) {
    maprTPasswordForHBaseTxt.getTextControl().setEchoChar('\0');
  }
 else {
    maprTPasswordForHBaseTxt.getTextControl().setEchoChar('*');
  }
}
Program: 125589
Project: 125589
Buggy source:
/** 
 * Export the resources contained in the previously-defined resourcesToExport collection.
 */
public void exportSpecifiedResources() throws InterruptedException {
  for (  ExportFileResource fileResource : resourcesListToExport) {
    String rootName=fileResource.getDirectoryName();
    Set<String> paths=fileResource.getRelativePathList();
    for (Iterator iter=paths.iterator(); iter.hasNext(); ) {
      String relativePath=(String)iter.next();
      Set<URL> resource=fileResource.getResourcesByRelativePath(relativePath);
      for (      URL url : resource) {
        String currentResource=url.getPath();
        exportResource(rootName,relativePath,currentResource,1);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Export the resources contained in the previously-defined resourcesToExport collection.
 */
public void exportSpecifiedResources() throws InterruptedException {
  for (  ExportFileResource fileResource : resourcesListToExport) {
    String rootName=fileResource.getDirectoryName();
    Set<String> paths=fileResource.getRelativePathList();
    for (    Object element : paths) {
      String relativePath=(String)element;
      Set<URL> resource=fileResource.getResourcesByRelativePath(relativePath);
      for (      URL url : resource) {
        String currentResource=url.getPath();
        exportResource(rootName,relativePath,currentResource,1);
      }
    }
  }
}
Program: 125591
Project: 125591
Buggy source:
/** 
 * Do all required cleanup now that we're finished with the currently-open .tar.gz
 * @exception java.io.IOException
 */
public void finished() throws IOException {
}

Fixed version (ground truth):
/** 
 * Do all required cleanup now that we're finished with the currently-open .tar.gz
 * @exception java.io.IOException
 */
@Override public void finished() throws IOException {
}
Program: 125592
Project: 125592
Buggy source:
/** 
 * Write the passed resource to the current archive.
 * @param resource org.eclipse.core.resources.IFile
 * @param destinationPath java.lang.String
 * @exception java.io.IOException
 * @exception org.eclipse.core.runtime.CoreException
 */
public void write(String resource,String destinationPath) throws IOException, CoreException {
  Path path=new Path(destinationPath);
  if (path.segmentCount() == 1) {
    writeFile(resource,new File(rootFolder,path.segment(0)));
  }
 else {
    File destination=new File(rootFolder,path.toOSString());
    createFolder(destination.getAbsolutePath());
    writeFile(resource,destination);
  }
}

Fixed version (ground truth):
/** 
 * Write the passed resource to the current archive.
 * @param resource org.eclipse.core.resources.IFile
 * @param destinationPath java.lang.String
 * @exception java.io.IOException
 * @exception org.eclipse.core.runtime.CoreException
 */
@Override public void write(String resource,String destinationPath) throws IOException, CoreException {
  Path path=new Path(destinationPath);
  if (path.segmentCount() == 1) {
    writeFile(resource,new File(rootFolder,path.segment(0)));
  }
 else {
    File destination=new File(rootFolder,path.toOSString());
    createFolder(destination.getAbsolutePath());
    writeFile(resource,destination);
  }
}
Program: 125593
Project: 125593
Buggy source:
public boolean accept(File pathname){
  boolean result=true;
  if (pathname != null && pathname.isFile()) {
    try {
      result=Pattern.compile(regEx).matcher(pathname.getName()).find();
    }
 catch (    PatternSyntaxException e) {
    }
  }
  return result;
}

Fixed version (ground truth):
@Override public boolean accept(File pathname){
  boolean result=true;
  if (pathname != null && pathname.isFile()) {
    try {
      result=Pattern.compile(regEx).matcher(pathname.getName()).find();
    }
 catch (    PatternSyntaxException e) {
    }
  }
  return result;
}
Program: 125594
Project: 125594
Buggy source:
/** 
 * Do all required cleanup now that we're finished with the currently-open .tar.gz
 * @exception java.io.IOException
 */
public void finished() throws IOException {
  outputStream.close();
  if (gzipOutputStream != null) {
    gzipOutputStream.close();
  }
}

Fixed version (ground truth):
/** 
 * Do all required cleanup now that we're finished with the currently-open .tar.gz
 * @exception java.io.IOException
 */
@Override public void finished() throws IOException {
  outputStream.close();
  if (gzipOutputStream != null) {
    gzipOutputStream.close();
  }
}
Program: 125595
Project: 125595
Buggy source:
/** 
 * Write the passed resource to the current archive.
 * @param resource org.eclipse.core.resources.IFile
 * @param destinationPath java.lang.String
 * @exception java.io.IOException
 * @exception org.eclipse.core.runtime.CoreException
 */
public void write(String resource,String destinationPath) throws IOException, CoreException {
  TarEntry newEntry=new TarEntry(destinationPath);
  write(newEntry,resource);
}

Fixed version (ground truth):
/** 
 * Write the passed resource to the current archive.
 * @param resource org.eclipse.core.resources.IFile
 * @param destinationPath java.lang.String
 * @exception java.io.IOException
 * @exception org.eclipse.core.runtime.CoreException
 */
@Override public void write(String resource,String destinationPath) throws IOException, CoreException {
  TarEntry newEntry=new TarEntry(destinationPath);
  write(newEntry,resource);
}
Program: 125596
Project: 125596
Buggy source:
/** 
 * Do all required cleanup now that we're finished with the currently-open .zip
 * @exception java.io.IOException
 */
public void finished() throws IOException {
  outputStream.close();
}

Fixed version (ground truth):
/** 
 * Do all required cleanup now that we're finished with the currently-open .zip
 * @exception java.io.IOException
 */
@Override public void finished() throws IOException {
  outputStream.close();
}
Program: 125597
Project: 125597
Buggy source:
/** 
 * Write the passed resource to the current archive.
 * @param resource org.eclipse.core.resources.IFile
 * @param destinationPath java.lang.String
 * @exception java.io.IOException
 * @exception org.eclipse.core.runtime.CoreException
 */
public void write(String resource,String destinationPath) throws IOException, CoreException {
  ZipEntry newEntry=new ZipEntry(destinationPath);
  write(newEntry,resource);
}

Fixed version (ground truth):
/** 
 * Write the passed resource to the current archive.
 * @param resource org.eclipse.core.resources.IFile
 * @param destinationPath java.lang.String
 * @exception java.io.IOException
 * @exception org.eclipse.core.runtime.CoreException
 */
@Override public void write(String resource,String destinationPath) throws IOException, CoreException {
  ZipEntry newEntry=new ZipEntry(destinationPath);
  write(newEntry,resource);
}
Program: 125599
Project: 125599
Buggy source:
private boolean doCollectItemFiles(File directory,boolean interruptable){
  File[] contents=directory.listFiles();
  Thread currentThread=Thread.currentThread();
  if (contents != null) {
    for (    File content : contents) {
      if (interruptable && currentThread.isInterrupted()) {
        return false;
      }
      File file=content;
      if (file.isFile()) {
        add(file.getAbsolutePath(),file);
      }
      if (file.isDirectory()) {
        if ((!FilesUtils.isSVNFolder(file))) {
          collectPath2Object(content,interruptable);
        }
      }
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean doCollectItemFiles(File original,File root,File directory,boolean interruptable){
  File[] contents=directory.listFiles();
  Thread currentThread=Thread.currentThread();
  if (contents != null) {
    for (    File content : contents) {
      if (interruptable && currentThread.isInterrupted()) {
        return false;
      }
      File file=content;
      if (file.isFile()) {
        add(file.getAbsolutePath(),file);
      }
      if (file.isDirectory()) {
        if ((!FilesUtils.isSVNFolder(file))) {
          collectPath2Object(original,root,content,interruptable);
        }
        IPath folderPath=getFolderPath(original,root,file);
        if (folderPath != null) {
          addFolder(folderPath.toPortableString());
        }
      }
    }
  }
  return true;
}
Program: 125600
Project: 125600
Buggy source:
public boolean collectPath2Object(Object root,boolean interruptable){
  if (interruptable && Thread.currentThread().isInterrupted()) {
    return false;
  }
  return doCollectItemFiles((File)root,interruptable);
}

Fixed version (ground truth):
public boolean collectPath2Object(File original,File root,File current,boolean interruptable){
  if (interruptable && Thread.currentThread().isInterrupted()) {
    return false;
  }
  return doCollectItemFiles(original,root,current,interruptable);
}
Program: 125601
Project: 125601
Buggy source:
private boolean doCollectItemFiles(Object entry,int level){
  List children=provider.getChildren(entry);
  if (children == null) {
    children=new ArrayList(1);
  }
  Iterator childrenEnum=children.iterator();
  while (childrenEnum.hasNext()) {
    Object child=childrenEnum.next();
    if (provider.isFolder(child)) {
      doCollectItemFiles(child,level + 1);
    }
 else {
      add(provider.getFullPath(child),child);
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean doCollectItemFiles(Object entry,int level){
  List children=provider.getChildren(entry);
  if (children == null) {
    children=new ArrayList(1);
  }
  Iterator childrenEnum=children.iterator();
  while (childrenEnum.hasNext()) {
    Object child=childrenEnum.next();
    if (provider.isFolder(child)) {
      doCollectItemFiles(child,level + 1);
      addFolder(provider.getFullPath(child));
    }
 else {
      add(provider.getFullPath(child),child);
    }
  }
  return true;
}
Program: 125602
Project: 125602
Buggy source:
public static ProjectRepositoryNode getInstance(){
  if (defaultProjRepoNode == null) {
    defaultProjRepoNode=new ProjectRepositoryNode(null,null,ENodeType.STABLE_SYSTEM_FOLDER);
    defaultProjRepoNode.initialize(null);
  }
  if (defaultProjRepoNode.isDisposed) {
synchronized (defaultProjRepoNode) {
      if (defaultProjRepoNode.isDisposed) {
        defaultProjRepoNode.isDisposed=false;
        defaultProjRepoNode.project=ProjectManager.getInstance().getCurrentProject();
        defaultProjRepoNode.setRoot(defaultProjRepoNode);
        defaultProjRepoNode.initialize(defaultProjRepoNode.currentPerspective);
      }
    }
  }
  return defaultProjRepoNode;
}

Fixed version (ground truth):
public static ProjectRepositoryNode getInstance(){
  if (!ProxyRepositoryFactory.getInstance().isFullLogonFinished()) {
    return dummyProjRepoNode;
  }
  if (defaultProjRepoNode == null) {
    defaultProjRepoNode=new ProjectRepositoryNode(null,null,ENodeType.STABLE_SYSTEM_FOLDER);
    defaultProjRepoNode.initialize(null);
  }
  if (defaultProjRepoNode.isDisposed) {
synchronized (defaultProjRepoNode) {
      if (defaultProjRepoNode.isDisposed) {
        defaultProjRepoNode.isDisposed=false;
        defaultProjRepoNode.project=ProjectManager.getInstance().getCurrentProject();
        defaultProjRepoNode.setRoot(defaultProjRepoNode);
        defaultProjRepoNode.initialize(defaultProjRepoNode.currentPerspective);
      }
    }
  }
  return defaultProjRepoNode;
}
Program: 125603
Project: 125603
Buggy source:
public void logOffProject(){
  repositoryFactoryFromProvider.logOffProject();
  fullLogonFinished=false;
  ProjectRepositoryNode root=ProjectRepositoryNode.getInstance();
  if (root != null) {
    root.setEnableDisposed(true);
    root.dispose();
  }
}

Fixed version (ground truth):
public void logOffProject(){
  repositoryFactoryFromProvider.logOffProject();
  ProjectRepositoryNode root=ProjectRepositoryNode.getInstance();
  if (root != null) {
    root.setEnableDisposed(true);
    root.dispose();
  }
  fullLogonFinished=false;
}
Program: 125604
Project: 125604
Buggy source:
/** 
 * DOC ggu Comment method "getMainProjectBranch".
 * @param technicalLabel
 * @return
 */
public String getMainProjectBranch(String technicalLabel){
  Map<String,String> fields=getRepositoryContextFields();
  if (fields == null || technicalLabel == null) {
    return null;
  }
  String branchKey=IProxyRepositoryFactory.BRANCH_SELECTION + SVNConstant.UNDER_LINE_CHAR + technicalLabel;
  if (fields.containsKey(branchKey)) {
    String branchForMainProject=fields.get(branchKey);
    return branchForMainProject;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * DOC ggu Comment method "getMainProjectBranch".
 * @param technicalLabel
 * @return
 */
public String getMainProjectBranch(String technicalLabel){
  String branchForMainProject=null;
  Map<String,String> fields=getRepositoryContextFields();
  if (fields == null || technicalLabel == null) {
    return branchForMainProject;
  }
  String branchKey=IProxyRepositoryFactory.BRANCH_SELECTION + SVNConstant.UNDER_LINE_CHAR + technicalLabel;
  if (fields.containsKey(branchKey)) {
    branchForMainProject=fields.get(branchKey);
  }
  if (branchForMainProject != null) {
    if (!branchForMainProject.contains(SVNConstant.NAME_TAGS) && !branchForMainProject.contains(SVNConstant.NAME_BRANCHES) && !branchForMainProject.contains(SVNConstant.NAME_TRUNK)&& !branchForMainProject.contains(SVNConstant.NAME_MASTER)) {
      branchForMainProject=SVNConstant.NAME_BRANCHES + SVNConstant.SEP_CHAR + branchForMainProject;
    }
  }
  return branchForMainProject;
}
Program: 125608
Project: 125608
Buggy source:
private void collectContextParams(){
  collectHiveContextParams();
  collectHBaseContextParams();
}

Fixed version (ground truth):
private void collectContextParams(){
  collectHiveContextParams();
  collectHBaseContextParams();
  collectImpalaContextParams();
}
Program: 125610
Project: 125610
Buggy source:
private void handleReferenced(RepositoryNode parent){
  if (parent.getType().equals(ENodeType.SYSTEM_FOLDER)) {
    for (    ProjectReference refProject : (List<ProjectReference>)project.getEmfProject().getReferencedProjects()) {
      String parentBranch=ProjectManager.getInstance().getMainProjectBranch(project);
      if (refProject.getReferencedProject().getUrl() != null && refProject.getReferencedProject().getUrl().startsWith("String_Node_Str") || (refProject.getBranch() != null && refProject.getBranch().equals(parentBranch))) {
        Project emfProject=refProject.getReferencedProject();
        ProjectRepositoryNode referencedProjectNode=new ProjectRepositoryNode(new org.talend.core.model.general.Project(emfProject),null,parent,this,ENodeType.REFERENCED_PROJECT);
        referencedProjectNode.setProperties(EProperties.LABEL,emfProject.getLabel());
        referencedProjectNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.REFERENCED_PROJECTS);
        parent.getChildren().add(referencedProjectNode);
        referencedProjectNode.initialize(currentPerspective);
      }
    }
  }
}

Fixed version (ground truth):
private void handleReferenced(RepositoryNode parent){
  if (parent.getType().equals(ENodeType.SYSTEM_FOLDER)) {
    for (    ProjectReference refProject : (List<ProjectReference>)project.getEmfProject().getReferencedProjects()) {
      String parentBranch=ProjectManager.getInstance().getMainProjectBranch(project);
      if (refProject.getBranch() == null || refProject.getBranch().equals(parentBranch)) {
        Project emfProject=refProject.getReferencedProject();
        ProjectRepositoryNode referencedProjectNode=new ProjectRepositoryNode(new org.talend.core.model.general.Project(emfProject),null,parent,this,ENodeType.REFERENCED_PROJECT);
        referencedProjectNode.setProperties(EProperties.LABEL,emfProject.getLabel());
        referencedProjectNode.setProperties(EProperties.CONTENT_TYPE,ERepositoryObjectType.REFERENCED_PROJECTS);
        parent.getChildren().add(referencedProjectNode);
        referencedProjectNode.initialize(currentPerspective);
      }
    }
  }
}
Program: 125611
Project: 125611
Buggy source:
public void unloadRelations(){
  loaded=false;
  currentProjectItemsRelations=new HashMap<Relation,Set<Relation>>();
  referencesItemsRelations=new HashMap<Relation,Set<Relation>>();
}

Fixed version (ground truth):
public void unloadRelations(){
  loaded=false;
  clearAllItemsRelations();
}
Program: 125612
Project: 125612
Buggy source:
/** 
 * return the referenced projects of the project.
 */
@SuppressWarnings("String_Node_Str") public List<Project> getReferencedProjects(Project project){
  Context ctx=CoreRuntimePlugin.getInstance().getContext();
  if (project != null && ctx != null) {
    if (project.equals(this.currentProject)) {
      return getReferencedProjects();
    }
    String parentBranch=getMainProjectBranch(project);
    List<Project> refProjects=new ArrayList<Project>();
    for (    ProjectReference refProject : (List<ProjectReference>)project.getEmfProject().getReferencedProjects()) {
      if (refProject.getBranch() == null || parentBranch.equals(refProject.getBranch())) {
        refProjects.add(new Project(refProject.getReferencedProject(),false));
      }
    }
    return refProjects;
  }
  return Collections.emptyList();
}

Fixed version (ground truth):
/** 
 * return the referenced projects of the project.
 */
@SuppressWarnings("String_Node_Str") public List<Project> getReferencedProjects(Project project){
  Context ctx=CoreRuntimePlugin.getInstance().getContext();
  if (project != null && ctx != null) {
    if (project.equals(this.currentProject)) {
      return getReferencedProjects();
    }
    String parentBranch=getMainProjectBranch(project);
    List<Project> refProjects=new ArrayList<Project>();
    for (    ProjectReference refProject : (List<ProjectReference>)project.getEmfProject().getReferencedProjects()) {
      if (refProject.getBranch() == null || refProject.getBranch().equals(parentBranch)) {
        refProjects.add(new Project(refProject.getReferencedProject(),false));
      }
    }
    return refProjects;
  }
  return Collections.emptyList();
}
Program: 125613
Project: 125613
Buggy source:
@SuppressWarnings("String_Node_Str") private void resolveRefProject(org.talend.core.model.properties.Project p){
  Context ctx=CoreRuntimePlugin.getInstance().getContext();
  if (p != null && ctx != null) {
    String parentBranch=ProjectManager.getInstance().getMainProjectBranch(p);
    if (parentBranch != null) {
      for (      ProjectReference pr : (List<ProjectReference>)p.getReferencedProjects()) {
        if (pr.getBranch() == null || parentBranch.equals(pr.getBranch())) {
          resolveRefProject(pr.getReferencedProject());
        }
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void resolveRefProject(org.talend.core.model.properties.Project p){
  Context ctx=CoreRuntimePlugin.getInstance().getContext();
  if (p != null && ctx != null) {
    String parentBranch=ProjectManager.getInstance().getMainProjectBranch(p);
    if (parentBranch != null) {
      for (      ProjectReference pr : (List<ProjectReference>)p.getReferencedProjects()) {
        if (pr.getBranch() == null || pr.getBranch().equals(parentBranch)) {
          resolveRefProject(pr.getReferencedProject());
        }
      }
    }
  }
}
Program: 125614
Project: 125614
Buggy source:
private void resolveSubRefProject(org.talend.core.model.properties.Project p,List<Project> allReferencedprojects){
  Context ctx=CoreRuntimePlugin.getInstance().getContext();
  if (ctx != null && p != null) {
    String parentBranch=ProjectManager.getInstance().getMainProjectBranch(p);
    if (parentBranch != null) {
      for (      ProjectReference pr : (List<ProjectReference>)p.getReferencedProjects()) {
        if (pr.getBranch() == null || parentBranch.equals(pr.getBranch())) {
          Project project=new Project(pr.getReferencedProject(),false);
          allReferencedprojects.add(project);
          resolveSubRefProject(pr.getReferencedProject(),allReferencedprojects);
        }
      }
    }
  }
}

Fixed version (ground truth):
private void resolveSubRefProject(org.talend.core.model.properties.Project p,List<Project> allReferencedprojects){
  Context ctx=CoreRuntimePlugin.getInstance().getContext();
  if (ctx != null && p != null) {
    String parentBranch=ProjectManager.getInstance().getMainProjectBranch(p);
    if (parentBranch != null) {
      for (      ProjectReference pr : (List<ProjectReference>)p.getReferencedProjects()) {
        if (pr.getBranch() == null || pr.getBranch().equals(parentBranch)) {
          Project project=new Project(pr.getReferencedProject(),false);
          allReferencedprojects.add(project);
          resolveSubRefProject(pr.getReferencedProject(),allReferencedprojects);
        }
      }
    }
  }
}
Program: 125616
Project: 125616
Buggy source:
@Override public Project createProject(Project projectInfor) throws PersistenceException {
  IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
  String technicalLabel=Project.createTechnicalName(projectInfor.getLabel());
  IProject prj=root.getProject(technicalLabel);
  final IWorkspace workspace=ResourcesPlugin.getWorkspace();
  try {
    IProjectDescription desc=null;
    if (prj.exists()) {
      desc=prj.getDescription();
    }
 else {
      desc=workspace.newProjectDescription(projectInfor.getLabel());
    }
    desc.setNatureIds(new String[]{TalendNature.ID});
    desc.setComment(projectInfor.getDescription());
    if (!prj.exists()) {
      prj.create(desc,null);
    }
    prj.open(IResource.NONE,null);
    prj.setDefaultCharset("String_Node_Str",null);
  }
 catch (  CoreException e) {
    throw new PersistenceException(e);
  }
  Project project=new Project();
  project.setLabel(projectInfor.getLabel());
  project.setDescription(projectInfor.getDescription());
  project.setLanguage(projectInfor.getLanguage());
  project.setAuthor(projectInfor.getAuthor());
  project.setLocal(true);
  project.setTechnicalLabel(technicalLabel);
  saveProject(prj,project);
  return project;
}

Fixed version (ground truth):
@Override public Project createProject(Project projectInfor) throws PersistenceException {
  IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
  IProgressMonitor monitor=new NullProgressMonitor();
  String technicalLabel=Project.createTechnicalName(projectInfor.getLabel());
  IProject prj=root.getProject(technicalLabel);
  final IWorkspace workspace=ResourcesPlugin.getWorkspace();
  try {
    if (prj.exists() && !prj.getFile(IProjectDescription.DESCRIPTION_FILE_NAME).getLocation().toFile().exists()) {
      File projectFolder=prj.getLocation().toFile();
      File bakFolder=new File(projectFolder.getParentFile(),technicalLabel + "String_Node_Str");
      boolean renamed=false;
      try {
        renamed=projectFolder.renameTo(bakFolder);
        if (renamed) {
          prj.delete(true,monitor);
        }
      }
  finally {
        if (renamed) {
          bakFolder.renameTo(projectFolder);
        }
      }
    }
    IProjectDescription desc=null;
    if (prj.exists()) {
      if (!prj.isOpen()) {
        prj.open(monitor);
      }
      desc=prj.getDescription();
    }
 else {
      desc=workspace.newProjectDescription(projectInfor.getLabel());
    }
    desc.setNatureIds(new String[]{TalendNature.ID});
    desc.setComment(projectInfor.getDescription());
    if (!prj.exists()) {
      prj.create(desc,monitor);
    }
    prj.open(IResource.NONE,monitor);
    prj.setDefaultCharset("String_Node_Str",monitor);
  }
 catch (  CoreException e) {
    throw new PersistenceException(e);
  }
  Project project=new Project();
  project.setLabel(projectInfor.getLabel());
  project.setDescription(projectInfor.getDescription());
  project.setLanguage(projectInfor.getLanguage());
  project.setAuthor(projectInfor.getAuthor());
  project.setLocal(true);
  project.setTechnicalLabel(technicalLabel);
  saveProject(prj,project);
  return project;
}
Program: 125617
Project: 125617
Buggy source:
@Override public List<org.talend.core.model.properties.Project> getReferencedProjects(Project project){
  String parentBranch=getRepositoryContext().getFields().get(IProxyRepositoryFactory.BRANCH_SELECTION + "String_Node_Str" + getRepositoryContext().getProject().getTechnicalLabel());
  List<org.talend.core.model.properties.Project> refProjectList=new ArrayList<org.talend.core.model.properties.Project>();
  for (  ProjectReference refProject : (List<ProjectReference>)project.getEmfProject().getReferencedProjects()) {
    if (refProject.getBranch() == null || parentBranch.equals(refProject.getBranch())) {
      refProjectList.add(refProject.getReferencedProject());
    }
  }
  return refProjectList;
}

Fixed version (ground truth):
@Override public List<org.talend.core.model.properties.Project> getReferencedProjects(Project project){
  String parentBranch=getRepositoryContext().getFields().get(IProxyRepositoryFactory.BRANCH_SELECTION + "String_Node_Str" + getRepositoryContext().getProject().getTechnicalLabel());
  List<org.talend.core.model.properties.Project> refProjectList=new ArrayList<org.talend.core.model.properties.Project>();
  for (  ProjectReference refProject : (List<ProjectReference>)project.getEmfProject().getReferencedProjects()) {
    if (refProject.getBranch() == null || refProject.getBranch().equals(parentBranch)) {
      refProjectList.add(refProject.getReferencedProject());
    }
  }
  return refProjectList;
}
Program: 125618
Project: 125618
Buggy source:
public void unloadRelations(){
  loaded=false;
  currentProjectItemsRelations=new HashMap<Relation,Set<Relation>>();
  referencesItemsRelations=new HashMap<Relation,Set<Relation>>();
}

Fixed version (ground truth):
public void unloadRelations(){
  loaded=false;
  clearAllItemsRelations();
}
Program: 125623
Project: 125623
Buggy source:
private static List<Map<String,Object>> getColumnMappingValue(Connection connection,IMetadataTable metaTable){
  if (connection == null || metaTable == null) {
    return null;
  }
  List<Map<String,Object>> values=new ArrayList<Map<String,Object>>();
  List<IMetadataColumn> columns=metaTable.getListColumns();
  if (connection instanceof DatabaseConnection) {
    DatabaseConnection dbConn=(DatabaseConnection)connection;
    String databaseType=dbConn.getDatabaseType();
    if (EDatabaseTypeName.HBASE.getDisplayName().equals(databaseType)) {
      for (      IMetadataColumn column : columns) {
        Map<String,Object> row=new HashMap<String,Object>();
        row.put("String_Node_Str",column.getLabel());
        row.put("String_Node_Str",TalendQuoteUtils.addQuotes(column.getAdditionalField().get("String_Node_Str")));
        values.add(row);
      }
    }
  }
  return values;
}

Fixed version (ground truth):
public static List<Map<String,Object>> getColumnMappingValue(Connection connection,IMetadataTable metaTable){
  if (connection == null || metaTable == null) {
    return null;
  }
  List<Map<String,Object>> values=new ArrayList<Map<String,Object>>();
  List<IMetadataColumn> columns=metaTable.getListColumns();
  if (connection instanceof DatabaseConnection) {
    DatabaseConnection dbConn=(DatabaseConnection)connection;
    String databaseType=dbConn.getDatabaseType();
    if (EDatabaseTypeName.HBASE.getDisplayName().equals(databaseType)) {
      for (      IMetadataColumn column : columns) {
        Map<String,Object> row=new HashMap<String,Object>();
        row.put("String_Node_Str",column.getLabel());
        row.put("String_Node_Str",TalendQuoteUtils.addQuotes(column.getAdditionalField().get("String_Node_Str")));
        values.add(row);
      }
    }
  }
  return values;
}
Program: 125624
Project: 125624
Buggy source:
public void cleanup(){
  if (defaultProjRepoNode == null) {
    return;
  }
  for (  IRepositoryNode childNode : defaultProjRepoNode.getChildren()) {
    if (childNode instanceof RepositoryNode) {
      RepositoryNode node=(RepositoryNode)childNode;
      node.setInitialized(false);
      node.getChildren().clear();
    }
  }
}

Fixed version (ground truth):
public void cleanup(){
  if (defaultProjRepoNode == null) {
    return;
  }
  getInstance();
  for (  IRepositoryNode childNode : defaultProjRepoNode.getChildren()) {
    if (childNode instanceof RepositoryNode) {
      RepositoryNode node=(RepositoryNode)childNode;
      node.setInitialized(false);
      node.getChildren().clear();
    }
  }
}
Program: 125626
Project: 125626
Buggy source:
public static ProjectRepositoryNode getInstance(){
  if (defaultProjRepoNode == null) {
    defaultProjRepoNode=new ProjectRepositoryNode(null,null,ENodeType.STABLE_SYSTEM_FOLDER);
    defaultProjRepoNode.initialize(null);
  }
  return defaultProjRepoNode;
}

Fixed version (ground truth):
public static ProjectRepositoryNode getInstance(){
  if (defaultProjRepoNode == null) {
    defaultProjRepoNode=new ProjectRepositoryNode(null,null,ENodeType.STABLE_SYSTEM_FOLDER);
    defaultProjRepoNode.initialize(null);
  }
  if (defaultProjRepoNode.isDisposed) {
synchronized (defaultProjRepoNode) {
      if (defaultProjRepoNode.isDisposed) {
        defaultProjRepoNode.isDisposed=false;
        defaultProjRepoNode.project=ProjectManager.getInstance().getCurrentProject();
        defaultProjRepoNode.setRoot(defaultProjRepoNode);
        defaultProjRepoNode.initialize(defaultProjRepoNode.currentPerspective);
      }
    }
  }
  return defaultProjRepoNode;
}
Program: 125627
Project: 125627
Buggy source:
public void logOffProject(){
  repositoryFactoryFromProvider.logOffProject();
  fullLogonFinished=false;
}

Fixed version (ground truth):
public void logOffProject(){
  repositoryFactoryFromProvider.logOffProject();
  fullLogonFinished=false;
  ProjectRepositoryNode root=ProjectRepositoryNode.getInstance();
  if (root != null) {
    root.setEnableDisposed(true);
    root.dispose();
  }
}
Program: 125629
Project: 125629
Buggy source:
@Override protected Object openDialogBox(Control cellEditorWindow){
  String value=(String)getValue();
  ModuleListDialog dialog=new ModuleListDialog(cellEditorWindow.getShell(),value,this.param,false);
  if (dialog.open() == Window.OK) {
    String selecteModule=dialog.getSelecteModule();
    if (selecteModule != null && (value == null || !value.equals(selecteModule))) {
      int index=0;
      if (getTableViewer() != null) {
        index=getTableViewer().getTable().getSelectionIndex();
      }
      IElement element=this.tableParam.getElement();
      if (element != null) {
        IElementParameter updateComponentsParam=element.getElementParameter("String_Node_Str");
        if (updateComponentsParam != null) {
          updateComponentsParam.setValue(Boolean.TRUE);
        }
      }
      executeCommand(new ModelChangeCommand(tableParam,param.getName(),selecteModule,index));
      if (getTableViewer() != null) {
        getTableViewer().refresh(true);
      }
      return selecteModule;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override protected Object openDialogBox(Control cellEditorWindow){
  String value=(String)getValue();
  ModuleListDialog dialog=new ModuleListDialog(cellEditorWindow.getShell(),value,this.param,false);
  if (dialog.open() == Window.OK) {
    String selecteModule=dialog.getSelecteModule();
    if (selecteModule != null && (value == null || !value.equals(selecteModule))) {
      setModuleValue(selecteModule);
      return selecteModule;
    }
  }
  return null;
}
Program: 125630
Project: 125630
Buggy source:
@Override protected Control createContents(Composite cell){
  defaultLabel=new Text(cell,SWT.LEFT);
  defaultLabel.setFont(cell.getFont());
  defaultLabel.setBackground(cell.getBackground());
  return defaultLabel;
}

Fixed version (ground truth):
@Override protected Control createContents(Composite cell){
  defaultLabel=new Text(cell,SWT.LEFT);
  defaultLabel.setFont(cell.getFont());
  defaultLabel.setBackground(cell.getBackground());
  defaultLabel.addFocusListener(new FocusAdapter(){
    @Override public void focusLost(    FocusEvent e){
      String newValue=defaultLabel.getText();
      if (newValue == null || newValue.trim().equals("String_Node_Str")) {
        defaultLabel.setText(oldValue);
        return;
      }
      if (newValue.equals(oldValue)) {
        return;
      }
      boolean newValidState=isCorrect(newValue);
      if (newValidState) {
        doSetValue(newValue);
        setModuleValue(newValue);
      }
    }
  }
);
  return defaultLabel;
}
Program: 125631
Project: 125631
Buggy source:
@Override protected void updateContents(Object value){
  if (defaultLabel == null) {
    return;
  }
  String text="String_Node_Str";
  if (value != null) {
    text=value.toString();
  }
  defaultLabel.setText(text);
}

Fixed version (ground truth):
@Override protected void updateContents(Object value){
  if (defaultLabel == null) {
    return;
  }
  String text="String_Node_Str";
  if (value != null) {
    text=value.toString();
  }
  oldValue=text;
  defaultLabel.setText(text);
}
Program: 125635
Project: 125635
Buggy source:
private static void checkItemDependencies(IRepositoryViewObject obj,List<IRepositoryViewObject> repositoryObjects,boolean includeSystemItems,boolean includeReferenceProjectItems){
  if (obj != null && !repositoryObjects.contains(obj)) {
    repositoryObjects.add(obj);
    checkAllVersionLatest(repositoryObjects,obj,includeSystemItems,includeReferenceProjectItems);
    checkItemDependencies(obj.getProperty().getItem(),repositoryObjects,includeSystemItems,includeReferenceProjectItems);
  }
}

Fixed version (ground truth):
private static void checkItemDependencies(IRepositoryViewObject obj,List<IRepositoryViewObject> repositoryObjects,boolean includeSystemItems,boolean includeReferenceProjectItems,boolean needRebuild){
  if (obj != null && !repositoryObjects.contains(obj)) {
    repositoryObjects.add(obj);
    checkAllVersionLatest(repositoryObjects,obj,includeSystemItems,includeReferenceProjectItems);
    checkItemDependencies(obj.getProperty().getItem(),repositoryObjects,includeSystemItems,includeReferenceProjectItems,needRebuild);
  }
}
Program: 125636
Project: 125636
Buggy source:
/** 
 * DOC YeXiaowei Comment method "hidePassword".
 * @param password
 * @return
 */
public static String hidePassword(final String password){
  if (password == null) {
    return "String_Node_Str";
  }
  String testPassword=password.trim();
  if (testPassword.startsWith(ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX)) {
    String variableName=testPassword.substring(ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX.length(),testPassword.length());
    if (!ContextUtils.isJavaKeyWords(variableName)) {
      return password;
    }
  }
  int length=password.length() + 2;
  StringBuilder builder=new StringBuilder();
  for (int i=0; i < length; i++) {
    builder.append(PASS_COVER);
  }
  return builder.toString();
}

Fixed version (ground truth):
/** 
 * DOC YeXiaowei Comment method "hidePassword".
 * @param password
 * @return
 */
public static String hidePassword(final String password){
  if (password == null) {
    return PASS_COVER + PASS_COVER;
  }
  if (ContextParameterUtils.containContextVariables(password)) {
    return password;
  }
  int length=password.length() + 2;
  StringBuilder builder=new StringBuilder();
  for (int i=0; i < length; i++) {
    builder.append(PASS_COVER);
  }
  return builder.toString();
}
Program: 125637
Project: 125637
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  Composite comp=new Composite(composite,SWT.NONE);
  comp.setLayoutData(new GridData(GridData.FILL_BOTH));
  GridLayout layout=new GridLayout();
  layout.marginHeight=10;
  layout.marginWidth=10;
  comp.setLayout(layout);
  propertiesBar=new ExpandBar(comp,SWT.V_SCROLL);
  propertiesBar.setSpacing(10);
  propertiesBar.setBackground(propertiesBar.getParent().getBackground());
  propertiesBar.setLayoutData(new GridData(GridData.FILL_BOTH));
  PropertiesTableView parentPropertiesTable=null;
  if (initPropertiesOfParent != null) {
    parentPropertiesTable=createPropertiesTable(propertiesBar,0,getParentTitle(),initPropertiesOfParent,true,false);
  }
  int tableIndex=parentPropertiesTable == null ? 0 : 1;
  propertiesTableView=createPropertiesTable(propertiesBar,tableIndex,getTitle(),initProperties,isReadOnly(),true);
  updateExpandItems();
  updateStatusLabel(initProperties);
  return parent;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  Composite comp=new Composite(composite,SWT.NONE);
  comp.setLayoutData(new GridData(GridData.FILL_BOTH));
  GridLayout layout=new GridLayout();
  layout.marginHeight=10;
  layout.marginWidth=10;
  comp.setLayout(layout);
  propertiesBar=new ExpandBar(comp,SWT.V_SCROLL);
  propertiesBar.setSpacing(10);
  propertiesBar.setBackground(propertiesBar.getParent().getBackground());
  propertiesBar.setLayoutData(new GridData(GridData.FILL_BOTH));
  PropertiesTableView parentPropertiesTable=null;
  if (initPropertiesOfParent != null) {
    parentPropertiesTable=createPropertiesTable(propertiesBar,0,getParentTitle(),initPropertiesOfParent,true,false);
  }
  int tableIndex=parentPropertiesTable == null ? 0 : 1;
  propertiesTableView=createPropertiesTable(propertiesBar,tableIndex,getTitle(),initProperties,isReadOnly(),true);
  updateExpandItems();
  return parent;
}