nus-yam/ex-repair huggingface dataset:
Program: 127963
Project: 127963
Buggy source:
private static DynamicClassLoader findLoader(String index){
  if (index != null && configurationElements != null) {
    for (    IConfigurationElement current : configurationElements) {
      String key=current.getAttribute(INDEX_ATTR);
      if (index.equals(key)) {
        String libraries=current.getAttribute(LIB_ATTR);
        if (StringUtils.isNotEmpty(index)) {
          DynamicClassLoader classLoader=new DynamicClassLoader();
          if (StringUtils.isNotEmpty(libraries)) {
            String[] librariesArray=libraries.split(SEPARATOR);
            loadLibraries(classLoader,librariesArray);
          }
          return classLoader;
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private static DynamicClassLoader findLoader(String index){
  if (index != null && configurationElements != null) {
    for (    IConfigurationElement current : configurationElements) {
      String key=current.getAttribute(INDEX_ATTR);
      if (index.equals(key)) {
        String libraries=current.getAttribute(LIB_ATTR);
        if (StringUtils.isNotEmpty(index)) {
          DynamicClassLoader classLoader=new DynamicClassLoader();
          boolean putInCache=true;
          if (StringUtils.isNotEmpty(libraries)) {
            String[] librariesArray=libraries.split(SEPARATOR);
            putInCache=loadLibraries(classLoader,librariesArray);
          }
          if (putInCache) {
            classLoadersMap.put(index,classLoader);
          }
          return classLoader;
        }
      }
    }
  }
  return null;
}
Program: 127964
Project: 127964
Buggy source:
/** 
 * DOC ycbai Comment method "getClassLoader".
 * @param index
 * @return the classLoader by index
 */
public static DynamicClassLoader getClassLoader(String index){
  if (classLoadersMap == null) {
    init();
  }
  DynamicClassLoader classLoader=classLoadersMap.get(index);
  if (classLoader == null) {
    classLoader=findLoader(index);
  }
  if (classLoader != null) {
    classLoadersMap.put(index,classLoader);
  }
  return classLoader;
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "getClassLoader".
 * @param index
 * @return the classLoader by index
 */
public static DynamicClassLoader getClassLoader(String index){
  if (classLoadersMap == null) {
    init();
  }
  DynamicClassLoader classLoader=classLoadersMap.get(index);
  if (classLoader == null) {
    classLoader=findLoader(index);
  }
  return classLoader;
}
Program: 127965
Project: 127965
Buggy source:
private static void loadLibraries(DynamicClassLoader classLoader,String[] driversArray){
  List<String> jarPathList=new ArrayList<String>();
  if (driversArray == null || driversArray.length == 0) {
    return;
  }
  ILibraryManagerService librairesManagerService=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
  String libPath=getLibPath();
  for (  String driverName : driversArray) {
    String jarPath=libPath + PATH_SEPARATOR + driverName;
    File jarFile=new File(jarPath);
    if (!jarFile.exists()) {
      librairesManagerService.retrieve(driverName,libPath,new NullProgressMonitor());
    }
    jarPathList.add(jarFile.getAbsolutePath());
  }
  classLoader.setLibStorePath(libPath);
  classLoader.addLibraries(jarPathList);
}

Fixed version (ground truth):
private static boolean loadLibraries(DynamicClassLoader classLoader,String[] driversArray){
  List<String> jarPathList=new ArrayList<String>();
  if (driversArray == null || driversArray.length == 0) {
    return true;
  }
  ILibraryManagerService librairesManagerService=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
  String libPath=getLibPath();
  List<String> driverNotExist=new ArrayList<String>();
  for (  String driverName : driversArray) {
    String jarPath=libPath + PATH_SEPARATOR + driverName;
    File jarFile=new File(jarPath);
    if (!jarFile.exists()) {
      driverNotExist.add(driverName);
    }
    jarPathList.add(jarFile.getAbsolutePath());
  }
  boolean putInCache=false;
  if (!driverNotExist.isEmpty()) {
    putInCache=librairesManagerService.retrieve(driverNotExist,libPath,new NullProgressMonitor());
  }
  classLoader.setLibStorePath(libPath);
  classLoader.addLibraries(jarPathList);
  return putInCache;
}
Program: 127966
Project: 127966
Buggy source:
public void getNotInstalledModules(String[] names,List<ModuleToInstall> toInstall,IModulesListener listener){
  StringBuffer jars=new StringBuffer();
  if (names != null && names.length > 0) {
    for (    String module : names) {
      String moduleName=module.trim();
      ModuleToInstall moduleToInstall=cache.get(moduleName);
      if (moduleToInstall != null) {
        moduleToInstall.setContext("String_Node_Str");
        toInstall.add(moduleToInstall);
      }
 else {
        if (jars.length() != 0) {
          jars.append(SEPARATOR);
        }
 else {
          jars.append(moduleName);
        }
      }
    }
  }
  String jarNames=jars.toString();
  if (jarNames.isEmpty()) {
    listener.listModulesDone();
    return;
  }
  getModuleUrlsFromWebService(jarNames,toInstall,null,listener,false);
}

Fixed version (ground truth):
public void getNotInstalledModules(String[] names,List<ModuleToInstall> toInstall,IModulesListener listener){
  StringBuffer jars=new StringBuffer();
  if (names != null && names.length > 0) {
    for (    String module : names) {
      String moduleName=module.trim();
      ModuleToInstall moduleToInstall=cache.get(moduleName);
      if (moduleToInstall != null) {
        moduleToInstall.setContext("String_Node_Str");
        toInstall.add(moduleToInstall);
      }
 else {
        if (jars.length() != 0) {
          jars.append(SEPARATOR);
          jars.append(moduleName);
        }
 else {
          jars.append(moduleName);
        }
      }
    }
  }
  String jarNames=jars.toString();
  if (jarNames.isEmpty()) {
    listener.listModulesDone();
    return;
  }
  getModuleUrlsFromWebService(jarNames,toInstall,null,listener,false);
}
Program: 127967
Project: 127967
Buggy source:
@Override public Set<String> list(IProgressMonitor... monitorWrap){
  Set<String> names=new HashSet<String>();
  try {
    List<File> jarFiles=FilesUtils.getJarFilesFromFolder(getStorageDirectory(),null);
    if (jarFiles.size() > 0) {
      for (      File file : jarFiles) {
        names.add(file.getName());
      }
    }
 else {
    }
  }
 catch (  MalformedURLException e) {
    CommonExceptionHandler.process(e);
  }
  LibrariesIndexManager.getInstance().loadResource();
  EMap<String,String> jarsToRelative=LibrariesIndexManager.getInstance().getIndex().getJarsToRelativePath();
  names.addAll(jarsToRelative.keySet());
  return names;
}

Fixed version (ground truth):
@Override public Set<String> list(IProgressMonitor... monitorWrap){
  Set<String> names=new HashSet<String>();
  try {
    List<File> jarFiles=FilesUtils.getJarFilesFromFolder(getStorageDirectory(),null);
    if (jarFiles.size() > 0) {
      for (      File file : jarFiles) {
        names.add(file.getName());
      }
    }
 else {
    }
  }
 catch (  MalformedURLException e) {
    CommonExceptionHandler.process(e);
  }
  LibrariesIndexManager.getInstance().loadResource();
  EMap<String,String> jarsToRelative=LibrariesIndexManager.getInstance().getIndex().getJarsToRelativePath();
  Map<String,File> componentsFolders=null;
  Set<String> contributeIdSet=null;
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IComponentsService.class)) {
    IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
    componentsFolders=service.getComponentsFactory().getComponentsProvidersFolder();
    contributeIdSet=componentsFolders.keySet();
  }
  for (  String jarName : jarsToRelative.keySet()) {
    String relativePath=jarsToRelative.get(jarName);
    boolean jarFound=false;
    if (relativePath != null) {
      if (relativePath.startsWith("String_Node_Str")) {
        URI uri;
        try {
          uri=new URI(relativePath);
          URL url=FileLocator.toFileURL(uri.toURL());
          File file=new File(url.getFile());
          if (file.exists()) {
            jarFound=true;
          }
        }
 catch (        Exception e) {
          continue;
        }
      }
 else {
        if (componentsFolders != null && contributeIdSet != null) {
          for (          String contributor : contributeIdSet) {
            if (relativePath.contains(contributor)) {
              String bundleLocation=componentsFolders.get(contributor).getAbsolutePath();
              int index=bundleLocation.indexOf(contributor);
              String jarLocation=new Path(bundleLocation.substring(0,index)).append(relativePath).toPortableString();
              File file=new File(jarLocation);
              if (file.exists()) {
                jarFound=true;
              }
              break;
            }
          }
        }
      }
    }
    if (jarFound) {
      names.add(jarName);
    }
  }
  return names;
}
Program: 127969
Project: 127969
Buggy source:
/** 
 * get the repositorynode you want to hide in repositoryview.
 * @return
 */
public List<IRepositoryNode> getHiddenRepositoryCategory(IRepositoryNode parent,String type);

Fixed version (ground truth):
/** 
 * get the repositorynode you want to hide in repositoryview.
 * @return
 * @deprecated try to remove this hidden function by CNF in extension point.
 * @see point="org.eclipse.ui.navigator.navigatorContent"
 */
public List<IRepositoryNode> getHiddenRepositoryCategory(IRepositoryNode parent,String type);
Program: 127970
Project: 127970
Buggy source:
/** 
 * Added by Marvin Wang on Mar 27, 2013.
 * @param metadataConn
 * @return
 */
protected ClassLoader getHive2ClassLoader(IMetadataConnection metadataConn){
  ClassLoader loader=null;
  String distroKey=(String)metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_DISTRIBUTION);
  String distroVersion=(String)metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_VERSION);
  String hiveModel=(String)metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_MODE);
  if (HiveConnUtils.isCustomDistro(distroKey)) {
    String jarsStr=(String)metadataConn.getParameter(ECustomVersionGroup.HIVE.getName());
    String index="String_Node_Str" + metadataConn.getId();
    loader=ClassLoaderFactory.getCustomClassLoader(index,jarsStr);
  }
 else {
    String index="String_Node_Str" + "String_Node_Str" + distroKey + "String_Node_Str"+ distroVersion+ "String_Node_Str"+ hiveModel;
    loader=ClassLoaderFactory.getClassLoader(index);
    if (loader == null) {
      loader=HiveClassLoaderFactory.class.getClassLoader();
    }
  }
  return loader;
}

Fixed version (ground truth):
/** 
 * Added by Marvin Wang on Mar 27, 2013.
 * @param metadataConn
 * @return
 */
protected ClassLoader getHive2ClassLoader(IMetadataConnection metadataConn){
  ClassLoader loader=null;
  String distroKey=(String)metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_DISTRIBUTION);
  String distroVersion=(String)metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_VERSION);
  String hiveModel=(String)metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_MODE);
  if (HiveConnUtils.isCustomDistro(distroKey)) {
    String jarsStr=(String)metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HADOOP_CUSTOM_JARS);
    String index="String_Node_Str" + metadataConn.getId();
    loader=ClassLoaderFactory.getCustomClassLoader(index,jarsStr);
  }
 else {
    String index="String_Node_Str" + "String_Node_Str" + distroKey + "String_Node_Str"+ distroVersion+ "String_Node_Str"+ hiveModel;
    loader=ClassLoaderFactory.getClassLoader(index);
    if (loader == null) {
      loader=HiveClassLoaderFactory.class.getClassLoader();
    }
  }
  return loader;
}
Program: 127971
Project: 127971
Buggy source:
/** 
 * Gets the class loader for different version by the given parameters for hive1 server. Added by Marvin Wang on Mar 12, 2013.
 * @param metadataConn
 * @return
 */
protected ClassLoader getHive1ClassLoader(IMetadataConnection metadataConn){
  ClassLoader loader=null;
  String distroKey=(String)metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_DISTRIBUTION);
  String distroVersion=(String)metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_VERSION);
  String hiveModel=(String)metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_MODE);
  if (HiveConnUtils.isCustomDistro(distroKey)) {
    String jarsStr=(String)metadataConn.getParameter(ECustomVersionGroup.HIVE.getName());
    String index="String_Node_Str" + metadataConn.getId();
    loader=ClassLoaderFactory.getCustomClassLoader(index,jarsStr);
  }
 else {
    String index="String_Node_Str" + "String_Node_Str" + distroKey + "String_Node_Str"+ distroVersion+ "String_Node_Str"+ hiveModel;
    loader=ClassLoaderFactory.getClassLoader(index);
    if (loader == null) {
      loader=HiveClassLoaderFactory.class.getClassLoader();
    }
  }
  return loader;
}

Fixed version (ground truth):
/** 
 * Gets the class loader for different version by the given parameters for hive1 server. Added by Marvin Wang on Mar 12, 2013.
 * @param metadataConn
 * @return
 */
protected ClassLoader getHive1ClassLoader(IMetadataConnection metadataConn){
  ClassLoader loader=null;
  String distroKey=(String)metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_DISTRIBUTION);
  String distroVersion=(String)metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_VERSION);
  String hiveModel=(String)metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_MODE);
  if (HiveConnUtils.isCustomDistro(distroKey)) {
    String jarsStr=(String)metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HADOOP_CUSTOM_JARS);
    String index="String_Node_Str" + metadataConn.getId();
    loader=ClassLoaderFactory.getCustomClassLoader(index,jarsStr);
  }
 else {
    String index="String_Node_Str" + "String_Node_Str" + distroKey + "String_Node_Str"+ distroVersion+ "String_Node_Str"+ hiveModel;
    loader=ClassLoaderFactory.getClassLoader(index);
    if (loader == null) {
      loader=HiveClassLoaderFactory.class.getClassLoader();
    }
  }
  return loader;
}
Program: 127972
Project: 127972
Buggy source:
public void lock(Item item) throws PersistenceException, LoginException ;

Fixed version (ground truth):
public boolean lock(Item item) throws PersistenceException, LoginException ;
Program: 127973
Project: 127973
Buggy source:
public void unlock(Item item) throws PersistenceException, LoginException ;

Fixed version (ground truth):
public boolean unlock(Item item) throws PersistenceException, LoginException ;
Program: 127974
Project: 127974
Buggy source:
@Override public void lock(Item item) throws PersistenceException, LoginException {
  if (getStatus(item).isPotentiallyEditable()) {
    this.repositoryFactoryFromProvider.lock(item);
    notifyLock(item,true);
    String str[]=new String[]{item.toString(),getRepositoryContext().getUser().toString()};
    log.debug(Messages.getString("String_Node_Str",str));
  }
}

Fixed version (ground truth):
@Override public void lock(Item item) throws PersistenceException, LoginException {
  if (getStatus(item).isPotentiallyEditable()) {
    boolean locked=this.repositoryFactoryFromProvider.lock(item);
    if (locked) {
      notifyLock(item,true);
    }
    String str[]=new String[]{item.toString(),getRepositoryContext().getUser().toString()};
    log.debug(Messages.getString("String_Node_Str",str));
  }
}
Program: 127975
Project: 127975
Buggy source:
@Override public void unlock(Item obj) throws PersistenceException, LoginException {
  if (!(obj instanceof FolderItem) && (obj.eResource() == null || obj.getProperty().eResource() == null)) {
    obj=getUptodateProperty(obj.getProperty()).getItem();
  }
  if (getStatus(obj) == ERepositoryStatus.LOCK_BY_USER || obj instanceof JobletDocumentationItem || obj instanceof JobDocumentationItem) {
    Date commitDate=obj.getState().getCommitDate();
    Date modificationDate=obj.getProperty().getModificationDate();
    if (modificationDate == null || commitDate == null || modificationDate.before(commitDate)) {
      this.repositoryFactoryFromProvider.unlock(obj);
      notifyLock(obj,false);
      String str[]=new String[]{obj.toString(),getRepositoryContext().getUser().toString()};
      log.debug(Messages.getString("String_Node_Str",str));
    }
  }
}

Fixed version (ground truth):
@Override public void unlock(Item obj) throws PersistenceException, LoginException {
  if (!(obj instanceof FolderItem) && (obj.eResource() == null || obj.getProperty().eResource() == null)) {
    obj=getUptodateProperty(obj.getProperty()).getItem();
  }
  if (getStatus(obj) == ERepositoryStatus.LOCK_BY_USER || obj instanceof JobletDocumentationItem || obj instanceof JobDocumentationItem) {
    Date commitDate=obj.getState().getCommitDate();
    Date modificationDate=obj.getProperty().getModificationDate();
    if (modificationDate == null || commitDate == null || modificationDate.before(commitDate)) {
      boolean unlocked=this.repositoryFactoryFromProvider.unlock(obj);
      if (unlocked) {
        notifyLock(obj,false);
      }
      String str[]=new String[]{obj.toString(),getRepositoryContext().getUser().toString()};
      log.debug(Messages.getString("String_Node_Str",str));
    }
  }
}
Program: 127976
Project: 127976
Buggy source:
@Override public void lock(Item item) throws PersistenceException {
  if (getStatus(item) == ERepositoryStatus.DEFAULT) {
    item.getState().setLockDate(new Date());
    item.getState().setLocker(getRepositoryContext().getUser());
    item.getState().setLocked(true);
    xmiResourceManager.saveResource(item.getProperty().eResource());
  }
}

Fixed version (ground truth):
@Override public boolean lock(Item item) throws PersistenceException {
  if (getStatus(item) == ERepositoryStatus.DEFAULT) {
    item.getState().setLockDate(new Date());
    item.getState().setLocker(getRepositoryContext().getUser());
    item.getState().setLocked(true);
    xmiResourceManager.saveResource(item.getProperty().eResource());
    return true;
  }
  return false;
}
Program: 127977
Project: 127977
Buggy source:
@Override public void unlock(Item item) throws PersistenceException {
  if (getStatus(item) == ERepositoryStatus.LOCK_BY_USER || item instanceof JobletDocumentationItem || item instanceof JobDocumentationItem) {
    item.getState().setLocker(null);
    item.getState().setLockDate(null);
    item.getState().setLocked(false);
    xmiResourceManager.saveResource(item.getProperty().eResource());
  }
}

Fixed version (ground truth):
@Override public boolean unlock(Item item) throws PersistenceException {
  if (getStatus(item) == ERepositoryStatus.LOCK_BY_USER || item instanceof JobletDocumentationItem || item instanceof JobDocumentationItem) {
    item.getState().setLocker(null);
    item.getState().setLockDate(null);
    item.getState().setLocked(false);
    xmiResourceManager.saveResource(item.getProperty().eResource());
    return true;
  }
  return false;
}
Program: 127978
Project: 127978
Buggy source:
public static String checkStringQuotationMarks(String str){
  String newStr=str;
  if (str == null) {
    return "String_Node_Str";
  }
  if (newStr.contains("String_Node_Str")) {
    newStr=newStr.replace("String_Node_Str","String_Node_Str");
  }
  if (newStr.contains("String_Node_Str")) {
    newStr=newStr.replace("String_Node_Str","String_Node_Str");
  }
  return newStr;
}

Fixed version (ground truth):
public static String checkStringQuotationMarks(String str){
  String newStr=str;
  if (str == null) {
    return "String_Node_Str";
  }
  if (newStr.contains("String_Node_Str")) {
    newStr=newStr.replace("String_Node_Str","String_Node_Str");
  }
  return newStr;
}
Program: 127980
Project: 127980
Buggy source:
public static Map<String,Set<String>> getCustomVersionMap(DatabaseConnection connection){
  Map<String,Set<String>> map=new HashMap<String,Set<String>>();
  if (connection == null) {
    return map;
  }
  EMap<String,String> parameters=connection.getParameters();
  if (parameters.size() == 0) {
    return map;
  }
  ECustomVersionGroup[] values=ECustomVersionGroup.values();
  for (  ECustomVersionGroup group : values) {
    String groupName=group.getName();
    String jarString=parameters.get(groupName);
    if (jarString != null) {
      Set<String> jarSet=new HashSet<String>();
      String[] jarArray=jarString.split(JAR_SEPARATOR);
      for (      String jar : jarArray) {
        jarSet.add(jar);
      }
      map.put(groupName,jarSet);
    }
  }
  return map;
}

Fixed version (ground truth):
public static Map<String,Set<String>> getCustomVersionMap(DatabaseConnection connection){
  Map<String,Set<String>> map=new HashMap<String,Set<String>>();
  if (connection == null) {
    return map;
  }
  EMap<String,String> parameters=connection.getParameters();
  if (parameters.size() == 0) {
    return map;
  }
  ECustomVersionGroup[] values=ECustomVersionGroup.values();
  for (  ECustomVersionGroup group : values) {
    String groupName=group.getName();
    String jarString=parameters.get(groupName);
    if (jarString != null && !jarString.isEmpty()) {
      Set<String> jarSet=new HashSet<String>();
      String[] jarArray=jarString.split(JAR_SEPARATOR);
      for (      String jar : jarArray) {
        jarSet.add(jar);
      }
      map.put(groupName,jarSet);
    }
  }
  return map;
}
Program: 127982
Project: 127982
Buggy source:
/** 
 * ggu Comment method "updateSchema". for repository wizard.
 */
public static boolean updateSingleSchema(ConnectionItem connItem,final MetadataTable newTable,final IMetadataTable oldMetadataTable,Map<String,String> oldTableMap){
  if (connItem == null) {
    return false;
  }
  Map<String,String> schemaRenamedMap=RepositoryUpdateManager.getSchemaRenamedMap(connItem,oldTableMap);
  boolean update=!schemaRenamedMap.isEmpty();
  if (!update) {
    if (newTable != null && oldMetadataTable != null && oldTableMap.containsKey(newTable.getId())) {
      if (GlobalServiceRegister.getDefault().isServiceRegistered(IMetadataManagmentService.class)) {
        IMetadataManagmentService service=(IMetadataManagmentService)GlobalServiceRegister.getDefault().getService(IMetadataManagmentService.class);
        IMetadataTable newMetadataTable=service.convertMetadataTable(newTable);
        update=!oldMetadataTable.sameMetadataAs(newMetadataTable,IMetadataColumn.OPTIONS_NONE);
      }
    }
  }
  if (update) {
    return updateSchema(newTable,connItem,schemaRenamedMap,true,false);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * ggu Comment method "updateSchema". for repository wizard.
 */
public static boolean updateSingleSchema(ConnectionItem connItem,final MetadataTable newTable,final IMetadataTable oldMetadataTable,Map<String,String> oldTableMap){
  if (connItem == null) {
    return false;
  }
  Map<String,String> schemaRenamedMap=RepositoryUpdateManager.getSchemaRenamedMap(connItem,oldTableMap);
  boolean update=!schemaRenamedMap.isEmpty();
  if (!update) {
    if (newTable != null && oldMetadataTable != null && oldTableMap.containsKey(newTable.getId())) {
      if (GlobalServiceRegister.getDefault().isServiceRegistered(IMetadataManagmentService.class)) {
        IMetadataManagmentService service=(IMetadataManagmentService)GlobalServiceRegister.getDefault().getService(IMetadataManagmentService.class);
        IMetadataTable newMetadataTable=service.convertMetadataTable(newTable);
        update=!oldMetadataTable.sameMetadataAs(newMetadataTable,IMetadataColumn.OPTIONS_NONE);
        isAddColumn=isAddColumn(newMetadataTable,oldMetadataTable);
      }
    }
  }
  if (update) {
    return updateSchema(newTable,connItem,schemaRenamedMap,true,false);
  }
  return false;
}
Program: 127984
Project: 127984
Buggy source:
@Override public ResultSet getTables(String catalog,String schema,String tableNamePattern,String[] types) throws SQLException {
  String sql;
  String and;
  if (schema != null) {
    sql="String_Node_Str" + schema + "String_Node_Str";
    and="String_Node_Str";
  }
 else {
    sql="String_Node_Str";
    and="String_Node_Str";
  }
  if (types != null) {
    for (    String type : types) {
      if (TABLE.equals(type)) {
        sql=sql + "String_Node_Str";
        break;
      }
    }
  }
  sql=addTypesToSql(sql,types,and);
  ResultSet rs=null;
  Statement stmt=null;
  List<String[]> list=new ArrayList<String[]>();
  try {
    stmt=connection.createStatement();
    rs=stmt.executeQuery(sql);
    while (rs.next()) {
      String name=rs.getString("String_Node_Str");
      String creator=rs.getString("String_Node_Str");
      String type=rs.getString("String_Node_Str");
      String[] r=new String[]{"String_Node_Str",creator,name,getTypeNameFromDb2zosType(type),"String_Node_Str"};
      list.add(r);
    }
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    try {
      rs.close();
      stmt.close();
    }
 catch (    Exception e) {
    }
  }
  DB2ForZosResultSet tableResultSet=new DB2ForZosResultSet();
  tableResultSet.setMetadata(TABLE_META);
  tableResultSet.setData(list);
  return tableResultSet;
}

Fixed version (ground truth):
@Override public ResultSet getTables(String catalog,String schema,String tableNamePattern,String[] types) throws SQLException {
  String sql;
  String and;
  if (schema != null) {
    sql="String_Node_Str" + schema + "String_Node_Str";
    and="String_Node_Str";
  }
 else {
    sql="String_Node_Str";
    and="String_Node_Str";
  }
  sql=addTypesToSql(sql,types,and);
  ResultSet rs=null;
  Statement stmt=null;
  List<String[]> list=new ArrayList<String[]>();
  try {
    stmt=connection.createStatement();
    rs=stmt.executeQuery(sql);
    while (rs.next()) {
      String name=rs.getString("String_Node_Str");
      String creator=rs.getString("String_Node_Str");
      String type=rs.getString("String_Node_Str");
      String[] r=new String[]{"String_Node_Str",creator,name,getTypeNameFromDb2zosType(type),"String_Node_Str"};
      list.add(r);
    }
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    try {
      rs.close();
      stmt.close();
    }
 catch (    Exception e) {
    }
  }
  DB2ForZosResultSet tableResultSet=new DB2ForZosResultSet();
  tableResultSet.setMetadata(TABLE_META);
  tableResultSet.setData(list);
  return tableResultSet;
}
Program: 127986
Project: 127986
Buggy source:
@Override protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  newShell.setText(Messages.getString("String_Node_Str"));
  newShell.setSize(500,550);
  setHelpAvailable(false);
}

Fixed version (ground truth):
@Override protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  newShell.setText(Messages.getString("String_Node_Str"));
  newShell.setSize(550,600);
  setHelpAvailable(false);
}
Program: 127987
Project: 127987
Buggy source:
private void doExportLibs(){
  FileDialog dialog=new FileDialog(getParentShell(),SWT.SAVE);
  dialog.setFilterExtensions(HadoopCustomLibrariesUtil.FILE__MASK);
  dialog.setText("String_Node_Str");
  final String selectedArchive=dialog.open();
  if (selectedArchive != null) {
    IRunnableWithProgress iRunnableWithProgress=new IRunnableWithProgress(){
      @Override public void run(      IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
        customLibUtil.exportLibZipFile(selectedArchive,libMap);
      }
    }
;
    try {
      new ProgressMonitorDialog(getShell()).run(true,true,iRunnableWithProgress);
    }
 catch (    InvocationTargetException e) {
      ExceptionHandler.process(e);
    }
catch (    InterruptedException e) {
      ExceptionHandler.process(e);
    }
  }
}

Fixed version (ground truth):
private void doExportLibs(){
  FileDialog dialog=new FileDialog(getParentShell(),SWT.SAVE);
  dialog.setFilterExtensions(HadoopCustomLibrariesUtil.FILE__MASK);
  dialog.setText("String_Node_Str");
  final String selectedArchive=dialog.open();
  if (selectedArchive != null) {
    IRunnableWithProgress iRunnableWithProgress=new IRunnableWithProgress(){
      @Override public void run(      IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
        PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable(){
          @Override public void run(){
            customLibUtil.exportLibZipFile(selectedArchive,libMap);
          }
        }
);
      }
    }
;
    try {
      new ProgressMonitorDialog(getShell()).run(true,true,iRunnableWithProgress);
    }
 catch (    InvocationTargetException e) {
      ExceptionHandler.process(e);
    }
catch (    InterruptedException e) {
      ExceptionHandler.process(e);
    }
  }
}
Program: 127988
Project: 127988
Buggy source:
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  customLibUtil.exportLibZipFile(selectedArchive,libMap);
}

Fixed version (ground truth):
@Override public void run(){
  viewer.refresh();
}
Program: 127989
Project: 127989
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  GridLayout layout=new GridLayout();
  parent.setLayout(layout);
  tabFolder=new CTabFolder(parent,SWT.BORDER | SWT.FLAT);
  tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
  tabFolder.setLayout(new GridLayout());
  Composite tableComposite=createTable(tabFolder);
  createTabItems(tableComposite);
  createBtns(parent);
  addListener();
  init();
  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);
  tabFolder=new CTabFolder(comp,SWT.BORDER | SWT.FLAT);
  tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
  tabFolder.setLayout(new GridLayout());
  Composite tableComposite=createTable(tabFolder);
  createTabItems(tableComposite);
  createBtns(comp);
  addListener();
  init();
  return parent;
}
Program: 127990
Project: 127990
Buggy source:
private void doImportLibs(){
  Map<ECustomVersionGroup,String> groupsAndDispaly=new HashMap<ECustomVersionGroup,String>();
  CTabItem[] items=tabFolder.getItems();
  for (  CTabItem item : items) {
    ECustomVersionGroup customVersionGroup=getCustomVersionGroup(item);
    if (customVersionGroup != null) {
      groupsAndDispaly.put(customVersionGroup,item.getText());
    }
  }
  HadoopVersionDialog versionDialog=new HadoopVersionDialog(getShell(),groupsAndDispaly,customLibUtil);
  if (versionDialog.open() == Window.OK) {
    Map<ECustomVersionGroup,Set<LibraryFile>> importLibLibraries=versionDialog.getImportLibLibraries();
    for (    ECustomVersionGroup group : importLibLibraries.keySet()) {
      Set<LibraryFile> set=libMap.get(group.getName());
      if (set != null) {
        set.clear();
        set.addAll(importLibLibraries.get(group));
      }
    }
    viewer.refresh();
  }
}

Fixed version (ground truth):
private void doImportLibs(){
  Map<ECustomVersionGroup,String> groupsAndDispaly=new HashMap<ECustomVersionGroup,String>();
  CTabItem[] items=tabFolder.getItems();
  for (  CTabItem item : items) {
    ECustomVersionGroup customVersionGroup=getCustomVersionGroup(item);
    if (customVersionGroup != null) {
      groupsAndDispaly.put(customVersionGroup,item.getText());
    }
  }
  final HadoopVersionDialog versionDialog=new HadoopVersionDialog(getShell(),groupsAndDispaly,customLibUtil);
  if (versionDialog.open() == Window.OK) {
    final IRunnableWithProgress runnableWithProgress=new IRunnableWithProgress(){
      @Override public void run(      final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
        monitor.beginTask(Messages.getString("String_Node_Str"),IProgressMonitor.UNKNOWN);
        try {
          PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable(){
            @Override public void run(){
              Map<ECustomVersionGroup,Set<LibraryFile>> importLibLibraries=versionDialog.getImportLibLibraries();
              if (importLibLibraries == null) {
                return;
              }
              for (              ECustomVersionGroup group : importLibLibraries.keySet()) {
                Set<LibraryFile> set=libMap.get(group.getName());
                if (set != null) {
                  set.clear();
                  set.addAll(importLibLibraries.get(group));
                }
              }
            }
          }
);
          PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable(){
            @Override public void run(){
              viewer.refresh();
            }
          }
);
        }
  finally {
          monitor.done();
        }
      }
    }
;
    ProgressMonitorDialog dialog=new ProgressMonitorDialog(getShell());
    try {
      dialog.run(true,true,runnableWithProgress);
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
}
Program: 127991
Project: 127991
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  enableExistGroup(false);
  enableZipGroupe(true);
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  enableExistGroup(false);
  enableZipGroupe(true);
  updateOkState();
}
Program: 127992
Project: 127992
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  createVersionFields(composite);
  addListener();
  init();
  return composite;
}

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);
  createVersionFields(comp);
  addListener();
  init();
  updateOkState();
  return parent;
}
Program: 127993
Project: 127993
Buggy source:
@Override public void modifyText(ModifyEvent e){
  zipLocation=zipLocationText.getText();
}

Fixed version (ground truth):
@Override public void modifyText(ModifyEvent e){
  zipLocation=zipLocationText.getText();
  updateOkState();
}
Program: 127994
Project: 127994
Buggy source:
@Override protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  newShell.setText(Messages.getString("String_Node_Str"));
  newShell.setSize(400,400);
  newShell.addListener(SWT.Resize,new Listener(){
    @Override public void handleEvent(    Event event){
      layoutTitle(true);
    }
  }
);
}

Fixed version (ground truth):
@Override protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  newShell.setText(Messages.getString("String_Node_Str"));
  newShell.setSize(500,450);
  setHelpAvailable(false);
}
Program: 127997
Project: 127997
Buggy source:
/** 
 * DOC xqliu Comment method "addTypesToSql".
 * @param sql
 * @param types
 * @param and
 * @return
 */
private String addTypesToSql(String sql,String[] types,String and){
  String result=sql;
  if (types != null && types.length > 0) {
    String typeClause="String_Node_Str";
    int len=types.length;
    boolean isTable=false;
    for (int i=0; i < len; ++i) {
      String comma="String_Node_Str";
      if (i > 0) {
        comma="String_Node_Str";
      }
      typeClause=typeClause + comma + "String_Node_Str"+ getDb2zosTypeName(types[i])+ "String_Node_Str";
      if (TABLE.equals(types[i])) {
        isTable=true;
      }
      if (TABLE.equals(types[i])) {
        isTable=true;
      }
    }
    typeClause=typeClause + "String_Node_Str";
    result=sql + and + typeClause;
    if (isTable) {
      result=result + "String_Node_Str";
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "addTypesToSql".
 * @param sql
 * @param types
 * @param and
 * @return
 */
private String addTypesToSql(String sql,String[] types,String and){
  String result=sql;
  boolean checkContainTable=checkContainTable(types);
  String typeClause="String_Node_Str";
  if (checkContainTable && types.length > 1) {
    typeClause+="String_Node_Str";
  }
  if (types != null && types.length > 0) {
    typeClause+="String_Node_Str";
    int len=types.length;
    String comma="String_Node_Str";
    for (int i=0; i < len; ++i) {
      if (TABLE.equals(types[i])) {
        continue;
      }
      typeClause=typeClause + comma + "String_Node_Str"+ getDb2zosTypeName(types[i])+ "String_Node_Str";
      comma="String_Node_Str";
    }
    if (checkContainTable && types.length == 1) {
      typeClause=typeClause + "String_Node_Str" + getDb2zosTypeName(types[0])+ "String_Node_Str"+ "String_Node_Str";
    }
 else {
      typeClause=typeClause + "String_Node_Str";
    }
    result=sql + and + typeClause;
    if (checkContainTable && types.length > 1) {
      result=result + "String_Node_Str";
    }
  }
  return result;
}
Program: 127998
Project: 127998
Buggy source:
private void collectContents(List<String> filteredContents,TreeItem[] items,INavigatorContentService navigatorContentService){
  if (items != null) {
    for (    TreeItem item : items) {
      Object data=item.getData();
      if (!item.getChecked()) {
        Set contentExtensions=navigatorContentService.findRootContentExtensions(data);
        for (Iterator itr=contentExtensions.iterator(); itr.hasNext(); ) {
          filteredContents.add(((NavigatorContentExtension)itr.next()).getId());
        }
      }
      collectContents(filteredContents,item.getItems(),navigatorContentService);
    }
  }
}

Fixed version (ground truth):
private void collectContents(List<String> filteredContents,TreeItem[] items,INavigatorContentService navigatorContentService){
  if (items != null) {
    for (    TreeItem item : items) {
      Object data=item.getData();
      if (!item.getChecked()) {
        boolean isStandardJobsNode=false;
        if (GlobalServiceRegister.getDefault().isServiceRegistered(IMRProcessService.class)) {
          IMRProcessService service=(IMRProcessService)GlobalServiceRegister.getDefault().getService(IMRProcessService.class);
          isStandardJobsNode=service.collectStandardProcessNode(filteredContents,data);
        }
        if (!isStandardJobsNode) {
          Set contentExtensions=navigatorContentService.findRootContentExtensions(data);
          for (Iterator itr=contentExtensions.iterator(); itr.hasNext(); ) {
            filteredContents.add(((NavigatorContentExtension)itr.next()).getId());
          }
        }
      }
      collectContents(filteredContents,item.getItems(),navigatorContentService);
    }
  }
}
Program: 127999
Project: 127999
Buggy source:
private void restoreContents(List<String> filteredContents,TreeItem[] items,INavigatorContentService navigatorContentService){
  if (items != null) {
    for (    TreeItem item : items) {
      Object data=item.getData();
      boolean found=false;
      Set contentExtensions=navigatorContentService.findRootContentExtensions(data);
      for (Iterator itr=contentExtensions.iterator(); itr.hasNext(); ) {
        if (filteredContents.contains(((NavigatorContentExtension)itr.next()).getId())) {
          found=true;
          break;
        }
      }
      item.setChecked(!found);
      restoreContents(filteredContents,item.getItems(),navigatorContentService);
    }
  }
}

Fixed version (ground truth):
private void restoreContents(List<String> filteredContents,TreeItem[] items,INavigatorContentService navigatorContentService){
  if (items != null) {
    for (    TreeItem item : items) {
      Object data=item.getData();
      boolean found=false;
      Set contentExtensions=navigatorContentService.findRootContentExtensions(data);
      for (Iterator itr=contentExtensions.iterator(); itr.hasNext(); ) {
        if (filteredContents.contains(((NavigatorContentExtension)itr.next()).getId())) {
          found=true;
          break;
        }
      }
      if (!found && filteredContents.contains(data.getClass().getName())) {
        found=true;
      }
      item.setChecked(!found);
      restoreContents(filteredContents,item.getItems(),navigatorContentService);
    }
  }
}
Program: 128000
Project: 128000
Buggy source:
private static void generatePigudfInfor(JobInfo jobInfo,ProcessItem selectedProcessItem,IProcess currentProcess,IProcessor processor,Set<ModuleNeeded> neededLibraries) throws ProcessorException {
  Set<String> jarList=new HashSet<String>();
  Set<ModuleNeeded> neededModules=LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
  for (  ModuleNeeded module : neededModules) {
    jarList.add(module.getModuleName());
  }
  CorePlugin.getDefault().getRunProcessService().updateLibraries(jarList,currentProcess);
  String pigModuleName=null;
  if (selectedProcessItem != null) {
    IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
    pigModuleName=service.exportPigudf(processor,selectedProcessItem.getProperty(),exportConfig);
  }
  Set<ModuleNeeded> test=LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
  if (test != null && pigModuleName != null) {
    test.add(new ModuleNeeded(null,pigModuleName,null,true));
  }
}

Fixed version (ground truth):
private static void generatePigudfInfor(JobInfo jobInfo,ProcessItem selectedProcessItem,IProcess currentProcess,IProcessor processor,Set<ModuleNeeded> neededLibraries) throws ProcessorException {
  Set<String> jarList=new HashSet<String>();
  Set<ModuleNeeded> neededModules=LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
  for (  ModuleNeeded module : neededModules) {
    jarList.add(module.getModuleName());
  }
  Set<String> pigudfNeededWithSubjobPerJob=LastGenerationInfo.getInstance().getPigudfNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
  String pigModuleName=null;
  if (selectedProcessItem != null && !pigudfNeededWithSubjobPerJob.isEmpty()) {
    CorePlugin.getDefault().getRunProcessService().updateLibraries(jarList,currentProcess);
    IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
    pigModuleName=service.exportPigudf(processor,selectedProcessItem.getProperty(),exportConfig);
  }
  Set<ModuleNeeded> test=LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
  if (test != null && pigModuleName != null) {
    test.add(new ModuleNeeded(null,pigModuleName,null,true));
  }
}
Program: 128002
Project: 128002
Buggy source:
@Override protected void run() throws LoginException, PersistenceException {
  resetItem();
  if (getItem() instanceof JobletProcessItem) {
    ((JobletProcessItem)getItem()).setJobletProcess((JobletProcess)processType);
  }
 else   if (getItem() instanceof ProcessItem) {
    ((ProcessItem)getItem()).setProcess(processType);
  }
  factory.save(getItem());
  loadedProcess.setProperty(getItem().getProperty());
  if (!avoidSaveRelations) {
    RelationshipItemBuilder.getInstance().addOrUpdateItem(getItem());
  }
}

Fixed version (ground truth):
@Override protected void run() throws LoginException, PersistenceException {
  resetItem();
  ProcessType processType;
  try {
    processType=loadedProcess.saveXmlFile();
  }
 catch (  IOException e) {
    throw new PersistenceException(e);
  }
  if (monitor != null) {
    monitor.worked(40);
  }
  if (getItem() instanceof JobletProcessItem) {
    ((JobletProcessItem)getItem()).setJobletProcess((JobletProcess)processType);
  }
 else   if (getItem() instanceof ProcessItem) {
    ((ProcessItem)getItem()).setProcess(processType);
  }
  factory.save(getItem());
  loadedProcess.setProperty(getItem().getProperty());
  if (!avoidSaveRelations) {
    RelationshipItemBuilder.getInstance().addOrUpdateItem(getItem());
  }
}
Program: 128003
Project: 128003
Buggy source:
private Resource saveScreenshots(Item item){
  Resource itemResource=xmiResourceManager.getScreenshotResource(item,true);
  EMap screenshots=null;
  if (item instanceof ProcessItem) {
    screenshots=((ProcessItem)item).getProcess().getScreenshots();
  }
 else   if (item instanceof JobletProcessItem) {
    screenshots=((JobletProcessItem)item).getJobletProcess().getScreenshots();
  }
  if (screenshots != null && !screenshots.isEmpty()) {
    itemResource.getContents().clear();
    itemResource.getContents().addAll(EcoreUtil.copyAll(screenshots));
  }
  return itemResource;
}

Fixed version (ground truth):
private Resource saveScreenshots(Item item){
  Resource itemResource=xmiResourceManager.getScreenshotResource(item,true,true);
  EMap screenshots=null;
  if (item instanceof ProcessItem) {
    screenshots=((ProcessItem)item).getProcess().getScreenshots();
  }
 else   if (item instanceof JobletProcessItem) {
    screenshots=((JobletProcessItem)item).getJobletProcess().getScreenshots();
  }
  if (screenshots != null && !screenshots.isEmpty()) {
    itemResource.getContents().clear();
    itemResource.getContents().addAll(EcoreUtil.copyAll(screenshots));
  }
  return itemResource;
}
Program: 128004
Project: 128004
Buggy source:
/** 
 * DOC plv Comment method "createLinkGroup".
 * @param parent
 */
private void createHadoopLinkPart(Composite parent){
  hadoopLinkComp=new Composite(parent,SWT.NONE);
  hadoopLinkComp.setLayout(new GridLayout(5,false));
  GridLayout parentLayout=(GridLayout)parent.getLayout();
  GridDataFactory.fillDefaults().span(parentLayout.numColumns,1).applyTo(hadoopLinkComp);
  String[] types=new String[]{Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")};
  hcPropertyTypeCombo=new LabelledCombo(hadoopLinkComp,Messages.getString("String_Node_Str"),"String_Node_Str",types,1,true);
  hcPropertyTypeCombo.select(0);
  GridDataFactory.fillDefaults().span(1,1).align(SWT.FILL,SWT.CENTER).applyTo(hcPropertyTypeCombo.getCombo());
  hcRepositoryText=new Text(hadoopLinkComp,SWT.BORDER);
  hcRepositoryText.setEditable(false);
  GridDataFactory.fillDefaults().grab(true,false).hint(SWT.DEFAULT,hcPropertyTypeCombo.getCombo().getItemHeight()).span(2,1).align(SWT.FILL,SWT.CENTER).applyTo(hcRepositoryText);
  hcSelectBtn=new Button(hadoopLinkComp,SWT.PUSH);
  hcSelectBtn.setImage(ImageProvider.getImage(EImage.THREE_DOTS_ICON));
  GridDataFactory.fillDefaults().grab(false,false).hint(SWT.DEFAULT,hcPropertyTypeCombo.getCombo().getItemHeight()).align(SWT.BEGINNING,SWT.FILL).span(1,1).applyTo(hcSelectBtn);
  hideHCLinkSettings(true);
}

Fixed version (ground truth):
/** 
 * DOC plv Comment method "createLinkGroup".
 * @param parent
 */
private void createHadoopLinkPart(Composite parent){
  hadoopLinkComp=new Composite(parent,SWT.NONE);
  hadoopLinkComp.setLayout(new GridLayout(4,false));
  GridLayout parentLayout=(GridLayout)parent.getLayout();
  GridDataFactory.fillDefaults().span(parentLayout.numColumns,1).applyTo(hadoopLinkComp);
  String[] types=new String[]{Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")};
  hcPropertyTypeCombo=new LabelledCombo(hadoopLinkComp,Messages.getString("String_Node_Str"),"String_Node_Str",types,1,true);
  hcPropertyTypeCombo.select(0);
  GridDataFactory.fillDefaults().span(1,1).align(SWT.FILL,SWT.CENTER).applyTo(hcPropertyTypeCombo.getCombo());
  hcRepositoryText=new Text(hadoopLinkComp,SWT.BORDER);
  hcRepositoryText.setEditable(false);
  GridDataFactory.fillDefaults().grab(true,false).span(1,1).align(SWT.FILL,SWT.CENTER).applyTo(hcRepositoryText);
  hcSelectBtn=new Button(hadoopLinkComp,SWT.PUSH);
  hcSelectBtn.setImage(ImageProvider.getImage(EImage.THREE_DOTS_ICON));
  GridDataFactory.fillDefaults().grab(false,false).align(SWT.BEGINNING,SWT.CENTER).span(1,1).applyTo(hcSelectBtn);
  hideHCLinkSettings(true);
}