nus-yam/ex-repair huggingface dataset:
Program: 124847
Project: 124847
Buggy source:
@Override public ConnectionItem create(Map<String,Map<String,String>> initParams) throws CoreException {
  HDFSConnection connection=HDFSFactory.eINSTANCE.createHDFSConnection();
  Property connectionProperty=PropertiesFactory.eINSTANCE.createProperty();
  setPropertyParameters(connectionProperty);
  HadoopSubConnectionItem connectionItem=HDFSFactory.eINSTANCE.createHDFSConnectionItem();
  connectionItem.setProperty(connectionProperty);
  connectionItem.setConnection(connection);
  appendToHadoopCluster(connectionItem);
  return connectionItem;
}

Fixed version (ground truth):
@Override public ConnectionItem create(Map<String,Map<String,String>> initParams) throws CoreException {
  HDFSConnection connection=HDFSFactory.eINSTANCE.createHDFSConnection();
  Property connectionProperty=PropertiesFactory.eINSTANCE.createProperty();
  setPropertyParameters(connectionProperty);
  initializeConnectionParameters(connection);
  HadoopSubConnectionItem connectionItem=HDFSFactory.eINSTANCE.createHDFSConnectionItem();
  connectionItem.setProperty(connectionProperty);
  connectionItem.setConnection(connection);
  appendToHadoopCluster(connectionItem);
  return connectionItem;
}
Program: 124848
Project: 124848
Buggy source:
@Override public ConnectionItem create(Map<String,Map<String,String>> initParams) throws CoreException {
  OozieConnection connection=OozieFactory.eINSTANCE.createOozieConnection();
  Property connectionProperty=PropertiesFactory.eINSTANCE.createProperty();
  setPropertyParameters(connectionProperty);
  HadoopSubConnectionItem connectionItem=OozieFactory.eINSTANCE.createOozieConnectionItem();
  connectionItem.setProperty(connectionProperty);
  connectionItem.setConnection(connection);
  setParameters(connection,initParams);
  appendToHadoopCluster(connectionItem);
  return connectionItem;
}

Fixed version (ground truth):
@Override public ConnectionItem create(Map<String,Map<String,String>> initParams) throws CoreException {
  OozieConnection connection=OozieFactory.eINSTANCE.createOozieConnection();
  Property connectionProperty=PropertiesFactory.eINSTANCE.createProperty();
  setPropertyParameters(connectionProperty);
  HadoopSubConnectionItem connectionItem=OozieFactory.eINSTANCE.createOozieConnectionItem();
  connectionItem.setProperty(connectionProperty);
  connectionItem.setConnection(connection);
  setParameters(connection,initParams);
  initializeConnectionParameters(connection);
  appendToHadoopCluster(connectionItem);
  return connectionItem;
}
Program: 124849
Project: 124849
Buggy source:
public String getDistribution(){
  return this.distribution;
}

Fixed version (ground truth):
public String getDistribution(){
  return getRealValue(this.distribution);
}
Program: 124850
Project: 124850
Buggy source:
public String getResourceManager(){
  return this.resourceManager;
}

Fixed version (ground truth):
public String getResourceManager(){
  return getRealValue(this.resourceManager);
}
Program: 124851
Project: 124851
Buggy source:
public String getJtOrRmPrincipal(){
  return this.jtOrRmPrincipal;
}

Fixed version (ground truth):
public String getJtOrRmPrincipal(){
  return getRealValue(this.jtOrRmPrincipal);
}
Program: 124852
Project: 124852
Buggy source:
public String getJobTracker(){
  return this.jobTracker;
}

Fixed version (ground truth):
public String getJobTracker(){
  return getRealValue(this.jobTracker);
}
Program: 124853
Project: 124853
Buggy source:
public String getPrincipal(){
  return this.principal;
}

Fixed version (ground truth):
public String getPrincipal(){
  return getRealValue(this.principal);
}
Program: 124854
Project: 124854
Buggy source:
public String getUserName(){
  return this.userName;
}

Fixed version (ground truth):
public String getUserName(){
  return getRealValue(this.userName);
}
Program: 124855
Project: 124855
Buggy source:
public String getVersion(){
  return this.version;
}

Fixed version (ground truth):
public String getVersion(){
  return getRealValue(this.version);
}
Program: 124856
Project: 124856
Buggy source:
public String getJobHistoryPrincipal(){
  return this.jobHistoryPrincipal;
}

Fixed version (ground truth):
public String getJobHistoryPrincipal(){
  return getRealValue(this.jobHistoryPrincipal);
}
Program: 124857
Project: 124857
Buggy source:
public String getNameNode(){
  return this.nameNode;
}

Fixed version (ground truth):
public String getNameNode(){
  return getRealValue(this.nameNode);
}
Program: 124858
Project: 124858
Buggy source:
public String getGroup(){
  return this.group;
}

Fixed version (ground truth):
public String getGroup(){
  return getRealValue(this.group);
}
Program: 124859
Project: 124859
Buggy source:
public String getKeytabPrincipal(){
  return this.keytabPrincipal;
}

Fixed version (ground truth):
public String getKeytabPrincipal(){
  return getRealValue(this.keytabPrincipal);
}
Program: 124860
Project: 124860
Buggy source:
public String getKeytab(){
  return this.keytab;
}

Fixed version (ground truth):
public String getKeytab(){
  return getRealValue(this.keytab);
}
Program: 124861
Project: 124861
Buggy source:
public String getDistribution(){
  return this.distribution;
}

Fixed version (ground truth):
public String getDistribution(){
  return getRealValue(this.distribution,true);
}
Program: 124862
Project: 124862
Buggy source:
public String getDfVersion(){
  return this.dfVersion;
}

Fixed version (ground truth):
public String getDfVersion(){
  return getRealValue(this.dfVersion,true);
}
Program: 124863
Project: 124863
Buggy source:
public String getPrincipal(){
  return this.principal;
}

Fixed version (ground truth):
public String getPrincipal(){
  return getRealValue(this.principal,true);
}
Program: 124864
Project: 124864
Buggy source:
public String getUserName(){
  return this.userName;
}

Fixed version (ground truth):
public String getUserName(){
  return getRealValue(this.userName);
}
Program: 124865
Project: 124865
Buggy source:
public String getNameNodeURI(){
  return this.nameNodeURI;
}

Fixed version (ground truth):
public String getNameNodeURI(){
  return getRealValue(this.nameNodeURI,true);
}
Program: 124866
Project: 124866
Buggy source:
public String getJobtrackerURI(){
  return this.jobtrackerURI;
}

Fixed version (ground truth):
public String getJobtrackerURI(){
  return getRealValue(this.jobtrackerURI,true);
}
Program: 124867
Project: 124867
Buggy source:
public String getFieldSeparator(){
  return this.fieldSeparator;
}

Fixed version (ground truth):
public String getFieldSeparator(){
  return getRealValue(this.fieldSeparator);
}
Program: 124868
Project: 124868
Buggy source:
public String getGroup(){
  return this.group;
}

Fixed version (ground truth):
public String getGroup(){
  return getRealValue(this.group,true);
}
Program: 124869
Project: 124869
Buggy source:
public String getRowSeparator(){
  return this.rowSeparator;
}

Fixed version (ground truth):
public String getRowSeparator(){
  return getRealValue(this.rowSeparator);
}
Program: 124870
Project: 124870
Buggy source:
public String getKeytabPrincipal(){
  return this.keytabPrincipal;
}

Fixed version (ground truth):
public String getKeytabPrincipal(){
  return getRealValue(this.keytabPrincipal,true);
}
Program: 124871
Project: 124871
Buggy source:
public String getKeytab(){
  return this.keytab;
}

Fixed version (ground truth):
public String getKeytab(){
  return getRealValue(this.keytab,true);
}
Program: 124872
Project: 124872
Buggy source:
private void initCommonProperties(HadoopServiceProperties properties){
  HadoopClusterConnection connection=getConnection();
  properties.setDistribution(connection.getDistribution());
  properties.setVersion(connection.getDfVersion());
  properties.setGroup(connection.getGroup());
  properties.setUseKrb(connection.isEnableKerberos());
  properties.setCustom(connection.isUseCustomVersion());
  properties.setPrincipal(connection.getPrincipal());
  properties.setJtOrRmPrincipal(connection.getJtOrRmPrincipal());
  properties.setJobHistoryPrincipal(connection.getJobHistoryPrincipal());
  properties.setUseKeytab(connection.isUseKeytab());
  properties.setKeytabPrincipal(connection.getKeytabPrincipal());
  properties.setKeytab(connection.getKeytab());
  properties.setHadoopProperties(HadoopRepositoryUtil.getHadoopPropertiesList(connection.getHadoopProperties()));
  properties.setRelativeHadoopClusterId(connectionItem.getProperty().getId());
}

Fixed version (ground truth):
private void initCommonProperties(HadoopServiceProperties properties){
  HadoopClusterConnection connection=getConnection();
  ContextType contextType=null;
  if (getConnection().isContextMode()) {
    contextType=ConnectionContextHelper.getContextTypeForContextMode(connection);
  }
  properties.setContextType(contextType);
  properties.setDistribution(connection.getDistribution());
  properties.setVersion(connection.getDfVersion());
  properties.setGroup(connection.getGroup());
  properties.setUseKrb(connection.isEnableKerberos());
  properties.setCustom(connection.isUseCustomVersion());
  properties.setPrincipal(connection.getPrincipal());
  properties.setJtOrRmPrincipal(connection.getJtOrRmPrincipal());
  properties.setJobHistoryPrincipal(connection.getJobHistoryPrincipal());
  properties.setUseKeytab(connection.isUseKeytab());
  properties.setKeytabPrincipal(connection.getKeytabPrincipal());
  properties.setKeytab(connection.getKeytab());
  properties.setHadoopProperties(HadoopRepositoryUtil.getHadoopPropertiesList(connection.getHadoopProperties()));
  properties.setRelativeHadoopClusterId(connectionItem.getProperty().getId());
}
Program: 124874
Project: 124874
Buggy source:
public static HDFSConnectionBean convert2HDFSConnectionBean(OozieConnection connection){
  HDFSConnectionBean bean=new HDFSConnectionBean();
  try {
    HadoopClusterConnection hcConnection=HCRepositoryUtil.getRelativeHadoopClusterConnection(connection);
    if (hcConnection != null) {
      BeanUtils.copyProperties(bean,hcConnection);
      Map<String,Object> properties=bean.getAdditionalProperties();
      Map<String,Set<String>> customVersionMap=HCVersionUtil.getCustomVersionMap(hcConnection);
      Iterator<Entry<String,Set<String>>> iter=customVersionMap.entrySet().iterator();
      while (iter.hasNext()) {
        Map.Entry<String,Set<String>> entry=iter.next();
        String groupName=entry.getKey();
        Set<String> jars=entry.getValue();
        if (jars != null && jars.size() > 0) {
          properties.put(groupName,jars);
        }
      }
    }
    bean.setUserName(connection.getUserName());
    bean.setRelativeHadoopClusterId(connection.getRelativeHadoopClusterId());
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
  }
  return bean;
}

Fixed version (ground truth):
public static HDFSConnectionBean convert2HDFSConnectionBean(OozieConnection connection){
  ContextType contextType=null;
  if (connection.isContextMode()) {
    contextType=ConnectionContextHelper.getContextTypeForContextMode(connection);
  }
  HDFSConnectionBean bean=new HDFSConnectionBean();
  bean.setContextType(contextType);
  try {
    HadoopClusterConnection hcConnection=HCRepositoryUtil.getRelativeHadoopClusterConnection(connection);
    if (hcConnection != null) {
      ContextType parentContextType=null;
      if (hcConnection.isContextMode()) {
        parentContextType=ConnectionContextHelper.getContextTypeForContextMode(connection);
      }
      bean.setParentContextType(parentContextType);
      BeanUtils.copyProperties(bean,hcConnection);
      Map<String,Object> properties=bean.getAdditionalProperties();
      Map<String,Set<String>> customVersionMap=HCVersionUtil.getCustomVersionMap(hcConnection);
      Iterator<Entry<String,Set<String>>> iter=customVersionMap.entrySet().iterator();
      while (iter.hasNext()) {
        Map.Entry<String,Set<String>> entry=iter.next();
        String groupName=entry.getKey();
        Set<String> jars=entry.getValue();
        if (jars != null && jars.size() > 0) {
          properties.put(groupName,jars);
        }
      }
    }
    bean.setUserName(connection.getUserName());
    bean.setRelativeHadoopClusterId(connection.getRelativeHadoopClusterId());
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
  }
  return bean;
}
Program: 124877
Project: 124877
Buggy source:
@Override protected void doRun(){
  if (repositoryNode == null) {
    repositoryNode=(RepositoryNode)((IStructuredSelection)getSelection()).getFirstElement();
  }
  PigudfItem pigudfItem=(PigudfItem)repositoryNode.getObject().getProperty().getItem();
  try {
    openRoutineEditor(pigudfItem,false);
    CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
    CorePlugin.getDefault().getRunProcessService().updateLibraries(new HashSet<String>(),null);
  }
 catch (  PartInitException e) {
    MessageBoxExceptionHandler.process(e);
  }
catch (  SystemException e) {
    MessageBoxExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
@Override protected void doRun(){
  if (repositoryNode == null) {
    repositoryNode=(RepositoryNode)((IStructuredSelection)getSelection()).getFirstElement();
  }
  PigudfItem pigudfItem=(PigudfItem)repositoryNode.getObject().getProperty().getItem();
  try {
    openRoutineEditor(pigudfItem,false);
    CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
    CorePlugin.getDefault().getRunProcessService().updateLibraries(new HashSet<ModuleNeeded>(),null);
  }
 catch (  PartInitException e) {
    MessageBoxExceptionHandler.process(e);
  }
catch (  SystemException e) {
    MessageBoxExceptionHandler.process(e);
  }
}
Program: 124879
Project: 124879
Buggy source:
@Override public void setVisible(boolean visible){
  super.setVisible(visible);
  if (visible) {
    AbstractHadoopForm form=getForm();
    if (form != null) {
      form.processWhenShowPage(this);
    }
  }
}

Fixed version (ground truth):
@Override public void setVisible(boolean visible){
  super.setVisible(visible);
  if (visible) {
    AbstractHadoopForm form=getForm();
    if (form != null) {
      form.processWhenShowPage(this);
      form.checkFieldsValue();
    }
  }
}
Program: 124882
Project: 124882
Buggy source:
@Override public boolean isValidForDataViewer(Connection connection,IMetadataTable metadataTable){
  if (!canHandle(connection)) {
    return false;
  }
  if (metadataTable == null) {
    return false;
  }
  Map<String,String> additionalProperties=metadataTable.getAdditionalProperties();
  if (additionalProperties == null) {
    return false;
  }
  String strFileType=additionalProperties.get(HDFSConstants.HDFS_FILE_TYPE);
  if (StringUtils.isEmpty(strFileType)) {
    return false;
  }
  EHDFSFileTypes hdfsFileType=EHDFSFileTypes.valueOf(strFileType);
  if (EHDFSFileTypes.AVRO == hdfsFileType) {
    Shell shell=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    MessageDialog.openWarning(shell,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean isValidForDataViewer(Connection connection,IMetadataTable metadataTable){
  if (!canHandle(connection)) {
    return false;
  }
  if (isAvroType(metadataTable)) {
    Shell shell=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    MessageDialog.openWarning(shell,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    return false;
  }
  return true;
}
Program: 124883
Project: 124883
Buggy source:
protected boolean isSubValid(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  boolean tableWithMap=true;
  if (type == ERepositoryObjectType.METADATA_CON_TABLE) {
    if (component.getName().toUpperCase().endsWith(MAP)) {
      tableWithMap=false;
    }
  }
  return tableWithMap;
}

Fixed version (ground truth):
protected boolean isSubValid(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  boolean isValid=true;
  String componentName=component.getName();
  if (type == ERepositoryObjectType.METADATA_CON_TABLE) {
    if (componentName.toUpperCase().endsWith(MAP)) {
      isValid=false;
    }
  }
  if (seletetedNode != null) {
    IRepositoryViewObject repObject=seletetedNode.getObject();
    if (repObject instanceof MetadataTableRepositoryObject) {
      MetadataTable table=((MetadataTableRepositoryObject)repObject).getTable();
      if (table != null) {
        IMetadataTable metadataTable=ConvertionHelper.convert(table);
        if (isAvroType(metadataTable) && ("String_Node_Str".equals(componentName) || "String_Node_Str".equals(componentName))) {
          isValid=false;
        }
      }
    }
  }
  return isValid;
}
Program: 124885
Project: 124885
Buggy source:
/** 
 * Getter for isCanceled.
 * @return the isCanceled
 */
public boolean isCanceled(){
  return this.isCanceled;
}

Fixed version (ground truth):
/** 
 * Getter for isCanceled.
 * @return the isCanceled
 */
public boolean isCanceled(){
  return this.isCanceled || Thread.currentThread().isInterrupted();
}
Program: 124886
Project: 124886
Buggy source:
@Override public void run(){
  int unCompletedTaskCount=threadExecutor.getUncompletedTaskCount();
  boolean hasThreadRunning=!(unCompletedTaskCount == 1);
  parentWizardPage.setPageComplete(!hasThreadRunning);
  if (!hasThreadRunning) {
    notShowAgain=false;
  }
}

Fixed version (ground truth):
@Override public void run(){
  boolean hasThreadRunning=!(threadExecutor.getActiveCount() == 1);
  parentWizardPage.setPageComplete(!hasThreadRunning);
  if (!hasThreadRunning) {
    notShowAgain=false;
  }
}
Program: 124887
Project: 124887
Buggy source:
private void refreshTable(final TreeItem treeItem,final int size){
  IHDFSNode node=(IHDFSNode)treeItem.getData();
  if (!threadExecutor.isThreadRunning(treeItem)) {
    if (node.getType() == EHadoopFileTypes.FILE) {
      RetrieveColumnRunnable runnable=new RetrieveColumnRunnable(treeItem,threadExecutor);
      threadExecutor.execute(runnable);
    }
  }
 else {
    RetrieveColumnRunnable runnable=threadExecutor.getRunnable(node.getPath());
    runnable.setCanceled(false);
  }
}

Fixed version (ground truth):
private void refreshTable(final TreeItem treeItem,final int size){
  IHDFSNode node=(IHDFSNode)treeItem.getData();
  if (!threadExecutor.isThreadRunning(treeItem)) {
    if (node.getType() == EHadoopFileTypes.FILE) {
      RetrieveColumnRunnable runnable=new RetrieveColumnRunnable(treeItem);
      threadExecutor.execute(runnable);
    }
  }
 else {
    RetrieveColumnRunnable runnable=threadExecutor.getRunnable(node.getPath());
    runnable.setCanceled(false);
  }
}
Program: 124888
Project: 124888
Buggy source:
/** 
 * DOC cmeng Comment method "updateCompleteStatus".
 */
private void updateCompleteStatus(){
  Display.getDefault().syncExec(new Runnable(){
    @Override public void run(){
      int unCompletedTaskCount=threadExecutor.getUncompletedTaskCount();
      boolean hasThreadRunning=!(unCompletedTaskCount == 1);
      parentWizardPage.setPageComplete(!hasThreadRunning);
      if (!hasThreadRunning) {
        notShowAgain=false;
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC cmeng Comment method "updateCompleteStatus".
 */
private void updateCompleteStatus(){
  Display.getDefault().syncExec(new Runnable(){
    @Override public void run(){
      boolean hasThreadRunning=!(threadExecutor.getActiveCount() == 1);
      parentWizardPage.setPageComplete(!hasThreadRunning);
      if (!hasThreadRunning) {
        notShowAgain=false;
      }
    }
  }
);
}
Program: 124889
Project: 124889
Buggy source:
private RetrieveSchemaThreadPoolExecutor(int queueCapacity,int maxPoolSize,RejectedExecutionHandler handler,Map<String,RetrieveColumnRunnable> runnableMap,List<RetrieveSchemaThreadPoolExecutor> executors){
  super(queueCapacity,maxPoolSize,0,TimeUnit.SECONDS,new ArrayBlockingQueue<Runnable>(queueCapacity),handler);
  this.queueCapacity=queueCapacity;
  this.runnableMap=runnableMap;
  this.executors=executors;
}

Fixed version (ground truth):
private RetrieveSchemaThreadPoolExecutor(int queueCapacity,int maxPoolSize,RejectedExecutionHandler handler,Map<String,RetrieveColumnRunnable> runnableMap,List<RetrieveSchemaThreadPoolExecutor> executors){
  super(queueCapacity,maxPoolSize,0,TimeUnit.MILLISECONDS,new LinkedBlockingQueue<Runnable>(),handler);
  this.runnableMap=runnableMap;
}
Program: 124890
Project: 124890
Buggy source:
/** 
 * Find the RetrieveColumnRunnable from map and waiting queue. Map stores running runnables
 * @param key
 * @return
 */
public RetrieveColumnRunnable getRunnable(String key){
  RetrieveColumnRunnable runnable=runnableMap.get(key);
  if (runnable != null) {
    return runnable;
  }
  for (  RetrieveSchemaThreadPoolExecutor executor : executors) {
    BlockingQueue<Runnable> queue=executor.getQueue();
    for (    Object element2 : queue) {
      RetrieveColumnRunnable element=(RetrieveColumnRunnable)element2;
      if (key.equals(element.getKey())) {
        return element;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Find the RetrieveColumnRunnable from map and waiting queue. Map stores running runnables
 * @param key
 * @return
 */
public RetrieveColumnRunnable getRunnable(String key){
  RetrieveColumnRunnable runnable=runnableMap.get(key);
  if (runnable != null) {
    return runnable;
  }
  BlockingQueue<Runnable> queue=getQueue();
  for (  Object element2 : queue) {
    RetrieveColumnRunnable element=(RetrieveColumnRunnable)element2;
    if (key.equals(element.getKey())) {
      return element;
    }
  }
  return null;
}
Program: 124891
Project: 124891
Buggy source:
RetrieveColumnRunnable(TreeItem treeItem,RetrieveSchemaThreadPoolExecutor _parentExecutor){
  this.treeItem=treeItem;
  this.fileNode=(IHDFSNode)treeItem.getData();
  this.key=this.fileNode.getPath();
  this.parentExecutor=_parentExecutor;
  setup();
}

Fixed version (ground truth):
RetrieveColumnRunnable(TreeItem treeItem){
  this.treeItem=treeItem;
  this.fileNode=(IHDFSNode)treeItem.getData();
  this.key=this.fileNode.getPath();
  setup();
}
Program: 124892
Project: 124892
Buggy source:
@Override protected void addUtilsButtonListeners(){
  checkConnectionBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      checkConnection();
    }
  }
);
  selectAllBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      updateStatus(IStatus.ERROR,null);
      long checkedSize=0;
      checkedSize=fetchAllChildren(schemaTree.getItems());
      boolean continueCheck=true;
      if (INFORM_SIZE < checkedSize) {
        continueCheck=MessageDialog.openConfirm(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str",new Object[]{INFORM_SIZE}));
      }
      if (continueCheck) {
        updateItems(schemaTree.getItems(),true,false);
      }
    }
  }
);
  selectNoneBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      threadExecutor.clearThreads();
      initializeThreadExecutor();
      fetchAllChildren(schemaTree.getItems());
      updateItems(schemaTree.getItems(),false,false);
    }
  }
);
}

Fixed version (ground truth):
@Override protected void addUtilsButtonListeners(){
  checkConnectionBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      checkConnection();
    }
  }
);
  selectAllBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      updateStatus(IStatus.ERROR,null);
      long checkedSize=0;
      checkedSize=fetchAllChildren(schemaTree.getItems());
      boolean continueCheck=true;
      if (INFORM_SIZE < checkedSize) {
        continueCheck=MessageDialog.openConfirm(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str",new Object[]{INFORM_SIZE}));
      }
      if (continueCheck) {
        updateItems(schemaTree.getItems(),true,false);
      }
    }
  }
);
  selectNoneBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      threadExecutor.clearThreads();
      fetchAllChildren(schemaTree.getItems());
      updateItems(schemaTree.getItems(),false,false);
    }
  }
);
}
Program: 124894
Project: 124894
Buggy source:
@Override protected void afterExecute(Runnable r,Throwable t){
  RetrieveColumnRunnable runnable=(RetrieveColumnRunnable)r;
  runnableMap.remove(runnable.getKey());
  --currentTaskSize;
}

Fixed version (ground truth):
@Override protected void afterExecute(Runnable r,Throwable t){
  RetrieveColumnRunnable runnable=(RetrieveColumnRunnable)r;
  runnableMap.remove(runnable.getKey());
}
Program: 124895
Project: 124895
Buggy source:
@Override public boolean isValidForDataViewer(IMetadataTable metadataTable){
  if (metadataTable == null) {
    return false;
  }
  String partition=metadataTable.getAdditionalProperties().get(HCatalogConstants.PARTITIONS);
  String partitionName=ExtractMetaDataFromHCatalog.extractPartitionNameByJsonStr(partition);
  if (StringUtils.isEmpty(partitionName)) {
    Shell shell=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    MessageDialog.openWarning(shell,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean isValidForDataViewer(Connection connection,IMetadataTable metadataTable){
  if (!canHandle(connection)) {
    return false;
  }
  if (metadataTable == null) {
    return false;
  }
  String partition=metadataTable.getAdditionalProperties().get(HCatalogConstants.PARTITIONS);
  String partitionName=ExtractMetaDataFromHCatalog.extractPartitionNameByJsonStr(partition);
  if (StringUtils.isEmpty(partitionName)) {
    Shell shell=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    MessageDialog.openWarning(shell,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    return false;
  }
  return true;
}
Program: 124896
Project: 124896
Buggy source:
@Override public boolean isValidForDataViewer(IMetadataTable metadataTable){
  if (metadataTable == null) {
    return false;
  }
  Map<String,String> additionalProperties=metadataTable.getAdditionalProperties();
  if (additionalProperties == null) {
    return false;
  }
  String strFileType=additionalProperties.get(HDFSConstants.HDFS_FILE_TYPE);
  if (StringUtils.isEmpty(strFileType)) {
    return false;
  }
  EHDFSFileTypes hdfsFileType=EHDFSFileTypes.valueOf(strFileType);
  if (EHDFSFileTypes.AVRO == hdfsFileType) {
    Shell shell=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    MessageDialog.openWarning(shell,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean isValidForDataViewer(Connection connection,IMetadataTable metadataTable){
  if (!canHandle(connection)) {
    return false;
  }
  if (metadataTable == null) {
    return false;
  }
  Map<String,String> additionalProperties=metadataTable.getAdditionalProperties();
  if (additionalProperties == null) {
    return false;
  }
  String strFileType=additionalProperties.get(HDFSConstants.HDFS_FILE_TYPE);
  if (StringUtils.isEmpty(strFileType)) {
    return false;
  }
  EHDFSFileTypes hdfsFileType=EHDFSFileTypes.valueOf(strFileType);
  if (EHDFSFileTypes.AVRO == hdfsFileType) {
    Shell shell=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    MessageDialog.openWarning(shell,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    return false;
  }
  return true;
}
Program: 124897
Project: 124897
Buggy source:
private void addVersionFields(Composite parent){
  Group versionGroup=Form.createGroup(parent,3,TOozieUIConstants.OOZIE_LBL_VERSION_GROUP);
  versionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  List<String> filterDistributionDisplayNames=EHadoopDistributions.getAllDistributionDisplayNames();
  filterDistributionDisplayNames.remove(EHadoopDistributions.APACHE.getDisplayName());
  filterDistributionDisplayNames.remove(EHadoopDistributions.AMAZON_EMR.getDisplayName());
  filterDistributionDisplayNames.remove(EHadoopDistributions.PIVOTAL_HD.getDisplayName());
  hadoopDistributionCombo=new LabelledCombo(versionGroup,TOozieUIConstants.OOZIE_LBL_HADOOP_DISTRIBUTION,"String_Node_Str",filterDistributionDisplayNames.toArray(new String[0]),2,true);
  hadoopVersionCombo=new LabelledCombo(versionGroup,TOozieUIConstants.OOZIE_LBL_HADOOP_VERSION,"String_Node_Str",new String[0],2,true);
  customButton=new Button(versionGroup,SWT.NULL);
  customButton.setImage(ImageProvider.getImage(EImage.THREE_DOTS_ICON));
  customButton.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,true,false,1,1));
  useYarnButton=new Button(versionGroup,SWT.CHECK);
  useYarnButton.setText("String_Node_Str");
  useYarnButton.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,true,false,2,1));
}

Fixed version (ground truth):
private void addVersionFields(Composite parent){
  Group versionGroup=Form.createGroup(parent,3,TOozieUIConstants.OOZIE_LBL_VERSION_GROUP);
  versionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  List<String> filterDistributionDisplayNames=EHadoopDistributions.getAllDistributionDisplayNames();
  filterDistributionDisplayNames.remove(EHadoopDistributions.APACHE.getDisplayName());
  filterDistributionDisplayNames.remove(EHadoopDistributions.AMAZON_EMR.getDisplayName());
  hadoopDistributionCombo=new LabelledCombo(versionGroup,TOozieUIConstants.OOZIE_LBL_HADOOP_DISTRIBUTION,"String_Node_Str",filterDistributionDisplayNames.toArray(new String[0]),2,true);
  hadoopVersionCombo=new LabelledCombo(versionGroup,TOozieUIConstants.OOZIE_LBL_HADOOP_VERSION,"String_Node_Str",new String[0],2,true);
  customButton=new Button(versionGroup,SWT.NULL);
  customButton.setImage(ImageProvider.getImage(EImage.THREE_DOTS_ICON));
  customButton.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,true,false,1,1));
  useYarnButton=new Button(versionGroup,SWT.CHECK);
  useYarnButton.setText("String_Node_Str");
  useYarnButton.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,true,false,2,1));
}
Program: 124898
Project: 124898
Buggy source:
private void updateVersionPart(EHadoopDistributions distribution){
  GridData distriData=(GridData)hadoopDistributionCombo.getCombo().getLayoutData();
  if (distribution == EHadoopDistributions.CUSTOM) {
    hadoopVersionCombo.setHideWidgets(true);
    distriData.horizontalSpan=1;
    hideControl(customButton,false);
    hideControl(useYarnButton,false);
    hideControl(customGroup,false);
  }
 else {
    hadoopVersionCombo.setHideWidgets(false);
    distriData.horizontalSpan=2;
    hideControl(customButton,true);
    hideControl(useYarnButton,true);
    hideControl(customGroup,true);
    List<String> items=getDistributionVersions(distribution);
    if (distribution == EHadoopDistributions.MAPR) {
      items.remove(EHadoopVersion4Drivers.MAPR1.getVersionDisplay());
    }
    String[] versions=new String[items.size()];
    items.toArray(versions);
    hadoopVersionCombo.getCombo().setItems(versions);
    if (versions.length > 0) {
      hadoopVersionCombo.getCombo().select(0);
    }
  }
}

Fixed version (ground truth):
private void updateVersionPart(EHadoopDistributions distribution){
  GridData distriData=(GridData)hadoopDistributionCombo.getCombo().getLayoutData();
  if (distribution == EHadoopDistributions.CUSTOM) {
    hadoopVersionCombo.setHideWidgets(true);
    distriData.horizontalSpan=1;
    hideControl(customButton,false);
    hideControl(useYarnButton,false);
    hideControl(customGroup,false);
  }
 else {
    hadoopVersionCombo.setHideWidgets(false);
    distriData.horizontalSpan=2;
    hideControl(customButton,true);
    hideControl(useYarnButton,true);
    hideControl(customGroup,true);
    List<String> items=getDistributionVersions(distribution);
    if (distribution == EHadoopDistributions.MAPR) {
      items.remove(EHadoopVersion4Drivers.MAPR1.getVersionDisplay());
    }
    if (distribution == EHadoopDistributions.PIVOTAL_HD) {
      items.remove(EHadoopVersion4Drivers.PIVOTAL_HD_1_0_1.getVersionDisplay());
    }
    String[] versions=new String[items.size()];
    items.toArray(versions);
    hadoopVersionCombo.getCombo().setItems(versions);
    if (versions.length > 0) {
      hadoopVersionCombo.getCombo().select(0);
    }
  }
}
Program: 124901
Project: 124901
Buggy source:
@Override protected ConnectionStatus runWithCancel(IProgressMonitor monitor) throws Exception {
  return HadoopOperationManager.getInstance().testConnection(connectionBean);
}

Fixed version (ground truth):
@Override protected ConnectionStatus runWithCancel(IProgressMonitor monitor) throws Throwable {
  return HadoopOperationManager.getInstance().testConnection(connectionBean);
}
Program: 124902
Project: 124902
Buggy source:
@Override public String getColumnText(Object element,int columnIndex){
  TableNode tableNode=(TableNode)element;
  int type=tableNode.getType();
switch (columnIndex) {
case 0:
    String value=tableNode.getValue();
  if (value == null) {
    return "String_Node_Str";
  }
return value;
case 1:
if (type == TableNode.CATALOG) {
return "String_Node_Str";
}
 else if (type == TableNode.SCHEMA) {
return "String_Node_Str";
}
 else {
return tableNode.getItemType();
}
default :
return "String_Node_Str";
}
}

Fixed version (ground truth):
@Override public String getColumnText(Object element,int columnIndex){
  TableNode tableNode=(TableNode)element;
  List<Object> columnData=tableNode.getColumnDataList();
  int type=tableNode.getType();
switch (columnIndex) {
case 0:
    String value=tableNode.getValue();
  if (value == null) {
    return "String_Node_Str";
  }
return value;
case 1:
if (type == TableNode.CATALOG) {
return "String_Node_Str";
}
 else if (type == TableNode.SCHEMA) {
return "String_Node_Str";
}
 else {
return tableNode.getItemType();
}
default :
if (columnData != null && columnIndex < columnData.size()) {
Object columnObj=columnData.get(columnIndex);
if (columnObj != null) {
return columnObj.toString();
}
}
return "String_Node_Str";
}
}
Program: 124905
Project: 124905
Buggy source:
/** 
 * DOC PLV Comment method "initPropertyCombo".
 */
protected void initPropertyCombo(){
  IProcess2 process=OozieJobTrackerListener.getProcess();
  if (process != null) {
    String connId=(String)process.getElementParameter(EOozieParameterName.REPOSITORY_CONNECTION_ID.getName()).getValue();
    if (StringUtils.isNotEmpty(connId)) {
      ooziePropertyTypeCombo.select(1);
      this.repositoryId=connId;
      Connection connection=TOozieParamUtils.getOozieConnectionById(connId);
      if (connection != null) {
        oozieRepositoryText.setText(connection.getLabel());
        oozieRepositoryText.setVisible(true);
        oozieSelectBtn.setVisible(true);
      }
    }
  }
 else {
    ooziePropertyTypeCombo.select(0);
    oozieRepositoryText.setVisible(false);
    oozieSelectBtn.setVisible(false);
  }
}

Fixed version (ground truth):
/** 
 * DOC PLV Comment method "initPropertyCombo".
 */
protected void initPropertyCombo(){
  IProcess2 process=OozieJobTrackerListener.getProcess();
  if (process != null) {
    String connId=(String)process.getElementParameter(EOozieParameterName.REPOSITORY_CONNECTION_ID.getName()).getValue();
    if (StringUtils.isNotEmpty(connId)) {
      ooziePropertyTypeCombo.select(1);
      this.repositoryId=connId;
      Connection connection=TOozieParamUtils.getOozieConnectionById(connId);
      if (connection != null) {
        oozieRepositoryText.setText(connection.getLabel());
        oozieRepositoryText.setVisible(true);
        oozieSelectBtn.setVisible(true);
        return;
      }
    }
  }
  ooziePropertyTypeCombo.select(0);
  oozieRepositoryText.setVisible(false);
  oozieSelectBtn.setVisible(false);
}
Program: 124906
Project: 124906
Buggy source:
@Override protected List<IRepositoryViewObject> loadRepViewObjectWithOtherTypes() throws PersistenceException {
  List<IRepositoryViewObject> list=new ArrayList<IRepositoryViewObject>();
  list.addAll(loadRepViewObjectWithOtherTypes(ERepositoryObjectType.PROCESS));
  ERepositoryObjectType mrRepObjType=ERepositoryObjectType.valueOf(ERepositoryObjectType.class,"String_Node_Str");
  list.addAll(loadRepViewObjectWithOtherTypes(mrRepObjType));
  list.addAll(loadRepViewObjectWithOtherTypes(ERepositoryObjectType.ROUTINES));
  return list;
}

Fixed version (ground truth):
@Override protected List<IRepositoryViewObject> loadRepViewObjectWithOtherTypes() throws PersistenceException {
  List<IRepositoryViewObject> list=new ArrayList<IRepositoryViewObject>();
  List<IRepositoryViewObject> processList=getAllProcessTypeObjectsWithoutCurrentType();
  if (processList != null && !processList.isEmpty()) {
    list.addAll(processList);
  }
  list.addAll(loadRepViewObjectWithOtherTypes(ERepositoryObjectType.ROUTINES));
  return list;
}
Program: 124907
Project: 124907
Buggy source:
@Override protected void createButtonsForButtonBar(Composite parent){
  createButton(parent,IDialogConstants.CANCEL_ID,IDialogConstants.CANCEL_LABEL,true);
}

Fixed version (ground truth):
@Override protected void createButtonsForButtonBar(Composite parent){
  createButton(parent,IDialogConstants.CANCEL_ID,IDialogConstants.CLOSE_LABEL,true);
}
Program: 124909
Project: 124909
Buggy source:
private static void updateParentItemCheckStatus(TreeItem item){
  TreeItem parentItem=item.getParentItem();
  if (parentItem == null) {
    return;
  }
  boolean hasCheckedItem=false;
  boolean hasUncheckedItem=false;
  for (  TreeItem i : parentItem.getItems()) {
    if (hasCheckedItem && hasUncheckedItem) {
      break;
    }
    IHDFSNode node=(IHDFSNode)i.getData();
    if (node.getType() == EHadoopFileTypes.FOLDER && i.getGrayed() == true) {
      hasCheckedItem=true;
      hasUncheckedItem=true;
    }
    if (i.getChecked()) {
      hasCheckedItem=true;
    }
 else {
      hasUncheckedItem=true;
    }
  }
  if (!hasCheckedItem) {
    parentItem.setChecked(false);
  }
 else   if (hasCheckedItem && hasUncheckedItem) {
    parentItem.setGrayed(true);
  }
 else {
    parentItem.setChecked(true);
    parentItem.setGrayed(false);
  }
  updateParentItemCheckStatus(parentItem);
}

Fixed version (ground truth):
private static void updateParentItemCheckStatus(TreeItem item){
  TreeItem parentItem=item.getParentItem();
  if (parentItem == null) {
    return;
  }
  boolean hasCheckedItem=false;
  boolean hasUncheckedItem=false;
  for (  TreeItem i : parentItem.getItems()) {
    if (hasCheckedItem && hasUncheckedItem) {
      break;
    }
    IHDFSNode node=(IHDFSNode)i.getData();
    if (node.getType() == EHadoopFileTypes.FOLDER && i.getGrayed() == true) {
      hasCheckedItem=true;
      hasUncheckedItem=true;
    }
    if (i.getChecked()) {
      hasCheckedItem=true;
    }
 else {
      hasUncheckedItem=true;
    }
  }
  if (!hasCheckedItem) {
    parentItem.setChecked(false);
  }
 else   if (hasCheckedItem && hasUncheckedItem) {
    parentItem.setChecked(true);
    parentItem.setGrayed(true);
  }
 else {
    parentItem.setChecked(true);
    parentItem.setGrayed(false);
  }
  updateParentItemCheckStatus(parentItem);
}
Program: 124910
Project: 124910
Buggy source:
@Override public void handleEvent(Event event){
  TreeItem treeItem=(TreeItem)event.item;
  for (  TreeItem item : treeItem.getItems()) {
    if (item.getData() != null) {
      IHDFSNode node=(IHDFSNode)item.getData();
      if (node.getType() == EHadoopFileTypes.FILE) {
        if (isExistTable(node)) {
          item.setChecked(true);
        }
 else {
          TreeEditor treeEditor=treeEditorMap.get(item);
          if (treeEditor == null) {
            item.setChecked(false);
          }
        }
      }
 else {
      }
    }
  }
}

Fixed version (ground truth):
@Override public void handleEvent(Event event){
  TreeItem treeItem=(TreeItem)event.item;
  for (  TreeItem item : treeItem.getItems()) {
    if (item.getData() != null) {
      IHDFSNode node=(IHDFSNode)item.getData();
      if (node.getType() == EHadoopFileTypes.FILE) {
        if (isExistTable(node)) {
          item.setChecked(true);
          updateParentItemCheckStatus(item);
        }
 else {
          TreeEditor treeEditor=treeEditorMap.get(item);
          if (treeEditor == null) {
            item.setChecked(false);
          }
        }
      }
 else {
      }
    }
  }
}
Program: 124911
Project: 124911
Buggy source:
@Override public String getColumnDbType(Object column) throws NoSQLServerException {
  String dbType=null;
  try {
    String type=(String)NoSQLReflection.invokeMethod(column,"String_Node_Str");
    if (type != null && type.indexOf("String_Node_Str") != -1) {
      type=type.substring(type.lastIndexOf("String_Node_Str") + 1).toUpperCase();
    }
  }
 catch (  Exception e) {
    throw new NoSQLServerException(e);
  }
  return dbType;
}

Fixed version (ground truth):
@Override public String getColumnDbType(Object column) throws NoSQLServerException {
  String dbType=null;
  try {
    String type=(String)NoSQLReflection.invokeMethod(column,"String_Node_Str");
    if (type != null && type.indexOf("String_Node_Str") != -1) {
      dbType=type.substring(type.lastIndexOf("String_Node_Str") + 1);
    }
  }
 catch (  Exception e) {
    throw new NoSQLServerException(e);
  }
  return dbType;
}
Program: 124913
Project: 124913
Buggy source:
public List<String> getKeySpaceNames(NoSQLConnection connection) throws NoSQLServerException {
  List<String> ksNames=new ArrayList<String>();
  initCluster(connection);
  try {
    List<Object> keySpaces=getKeySpaces(connection);
    for (    Object keySpace : keySpaces) {
      String ksName=(String)NoSQLReflection.invokeMethod(keySpace,"String_Node_Str");
      ksNames.add(ksName);
    }
  }
 catch (  Exception e) {
    throw new NoSQLServerException(e);
  }
  return ksNames;
}

Fixed version (ground truth):
@Override public List<String> getKeySpaceNames(NoSQLConnection connection) throws NoSQLServerException {
  List<String> ksNames=new ArrayList<String>();
  initCluster(connection);
  try {
    List<Object> keySpaces=getKeySpaces(connection);
    for (    Object keySpace : keySpaces) {
      String ksName=(String)NoSQLReflection.invokeMethod(keySpace,"String_Node_Str");
      ksNames.add(ksName);
    }
  }
 catch (  Exception e) {
    throw new NoSQLServerException(e);
  }
  return ksNames;
}
Program: 124914
Project: 124914
Buggy source:
@Override public String getColumnTalendType(Object column) throws NoSQLServerException {
  String talendType=null;
  try {
    Object type=NoSQLReflection.invokeMethod(column,"String_Node_Str");
    if (type != null) {
      Object typeName=NoSQLReflection.invokeMethod(type,"String_Node_Str");
      String dbType=(String)NoSQLReflection.invokeMethod(typeName,"String_Node_Str");
      MappingTypeRetriever mappingTypeRetriever=MetadataTalendType.getMappingTypeRetriever(ICassandraConstants.DBM_ID);
      talendType=mappingTypeRetriever.getDefaultSelectedTalendType(dbType);
      if (talendType == null) {
        talendType=JavaTypesManager.STRING.getId();
      }
    }
  }
 catch (  Exception e) {
    throw new NoSQLServerException(e);
  }
  return talendType;
}

Fixed version (ground truth):
@Override public String getColumnTalendType(Object column) throws NoSQLServerException {
  String talendType=null;
  try {
    String dbType=getColumnDbType(column);
    MappingTypeRetriever mappingTypeRetriever=MetadataTalendType.getMappingTypeRetriever(ICassandraConstants.DBM_ID);
    talendType=mappingTypeRetriever.getDefaultSelectedTalendType(dbType);
    if (talendType == null) {
      talendType=JavaTypesManager.STRING.getId();
    }
  }
 catch (  Exception e) {
    throw new NoSQLServerException(e);
  }
  return talendType;
}
Program: 124915
Project: 124915
Buggy source:
@Override public String getColumnTalendType(Object column) throws NoSQLServerException {
  String talendType=null;
  try {
    String type=(String)NoSQLReflection.invokeMethod(column,"String_Node_Str");
    if (type != null) {
      if (type.indexOf("String_Node_Str") != -1) {
        type=type.substring(type.lastIndexOf("String_Node_Str") + 1);
      }
      MappingTypeRetriever mappingTypeRetriever=MetadataTalendType.getMappingTypeRetriever(ICassandraConstants.DBM_ID);
      talendType=mappingTypeRetriever.getDefaultSelectedTalendType(type);
      if (talendType == null) {
        talendType=JavaTypesManager.STRING.getId();
      }
    }
  }
 catch (  Exception e) {
    throw new NoSQLServerException(e);
  }
  return talendType;
}

Fixed version (ground truth):
@Override public String getColumnTalendType(Object column) throws NoSQLServerException {
  String talendType=null;
  try {
    String dbType=getColumnDbType(column);
    MappingTypeRetriever mappingTypeRetriever=MetadataTalendType.getMappingTypeRetriever(ICassandraConstants.DBM_ID);
    talendType=mappingTypeRetriever.getDefaultSelectedTalendType(dbType);
    if (talendType == null) {
      talendType=JavaTypesManager.STRING.getId();
    }
  }
 catch (  Exception e) {
    throw new NoSQLServerException(e);
  }
  return talendType;
}
Program: 124916
Project: 124916
Buggy source:
private List<MetadataColumn> extractTheColumns(NoSQLConnection connection,String ksName,String cfName) throws NoSQLExtractSchemaException {
  List<MetadataColumn> metadataColumns=new ArrayList<MetadataColumn>();
  ICassandraMetadataHandler metadataHandler=CassandraConnectionUtil.getMetadataHandler(connection);
  try {
    List<Object> columndfs=metadataHandler.getColumns(connection,ksName,cfName);
    for (    Object columndf : columndfs) {
      MetadataColumn column=ConnectionFactory.eINSTANCE.createMetadataColumn();
      String colName=metadataHandler.getColumnName(connection,columndf);
      colName=MetadataToolHelper.validateValue(colName);
      column.setName(colName);
      column.setLabel(colName);
      String talendType=metadataHandler.getColumnTalendType(columndf);
      column.setTalendType(talendType);
      metadataColumns.add(column);
    }
  }
 catch (  Exception e) {
    throw new NoSQLExtractSchemaException(e);
  }
  return metadataColumns;
}

Fixed version (ground truth):
private List<MetadataColumn> extractTheColumns(NoSQLConnection connection,String ksName,String cfName) throws NoSQLExtractSchemaException {
  List<MetadataColumn> metadataColumns=new ArrayList<MetadataColumn>();
  ICassandraMetadataHandler metadataHandler=CassandraConnectionUtil.getMetadataHandler(connection);
  try {
    List<Object> columndfs=metadataHandler.getColumns(connection,ksName,cfName);
    for (    Object columndf : columndfs) {
      MetadataColumn column=ConnectionFactory.eINSTANCE.createMetadataColumn();
      String colName=metadataHandler.getColumnName(connection,columndf);
      colName=MetadataToolHelper.validateValue(colName);
      column.setName(colName);
      column.setLabel(colName);
      String talendType=metadataHandler.getColumnTalendType(columndf);
      column.setTalendType(talendType);
      String dbType=metadataHandler.getColumnDbType(columndf);
      column.setSourceType(dbType);
      metadataColumns.add(column);
    }
  }
 catch (  Exception e) {
    throw new NoSQLExtractSchemaException(e);
  }
  return metadataColumns;
}