Program: 124182
Project: 124182
Buggy source:
private void addListenerForWSDLCom(){
  refreshbut.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      final Job job=new Job("String_Node_Str"){
        @Override protected IStatus run(        IProgressMonitor monitor){
          monitor.beginTask("String_Node_Str",IProgressMonitor.UNKNOWN);
          getDataFromNet();
          monitor.done();
          return Status.OK_STATUS;
        }
      }
;
      job.setSystem(true);
      job.schedule();
      ProgressMonitorDialog progressDialog=new ProgressMonitorDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell().getShell());
      IRunnableWithProgress runnable=new IRunnableWithProgress(){
        public void run(        final IProgressMonitor monitor){
          monitor.beginTask("String_Node_Str",IProgressMonitor.UNKNOWN);
          boolean f=true;
          while (f) {
            try {
              Thread.sleep(1000);
            }
 catch (            InterruptedException e) {
              e.printStackTrace();
            }
            if (monitor.isCanceled()) {
              job.done(Status.OK_STATUS);
              job.cancel();
            }
            if (job.getResult() != null && job.getResult().isOK()) {
              monitor.done();
              f=false;
            }
          }
        }
      }
;
      try {
        progressDialog.run(true,true,runnable);
      }
 catch (      InvocationTargetException e1) {
        ExceptionHandler.process(e1);
      }
catch (      InterruptedException e1) {
        ExceptionHandler.process(e1);
      }
catch (      WebServiceCancelException e1) {
        return;
      }
      if (connection != null) {
        if (listTable.getItemCount() > 0) {
          listTable.setSelection(listTable.getItem(0));
        }
        if (currentFunction != null) {
          if (currentFunction.getName() != null) {
            connection.setMethodName(currentFunction.getName());
          }
          if (currentFunction.getServerNameSpace() != null) {
            connection.setServerNameSpace(currentFunction.getServerNameSpace());
          }
          if (currentFunction.getServerName() != null) {
            connection.setServerName(currentFunction.getServerName());
          }
          if (currentFunction.getServerNameSpace() != null) {
            connection.setPortNameSpace(currentFunction.getServerNameSpace());
          }
        }
        if (currentPortName != null) {
          connection.setPortName(currentPortName.getPortName());
        }
 else         if (currentPortName == null && !allPortNames.isEmpty()) {
          currentPortName=allPortNames.get(0);
          connection.setPortName(currentPortName.getPortName());
        }
      }
      isFirst=false;
    }
  }
);
  listTable=listTableView.getTable();
  portListTable=portListTableView.getTable();
  listTable.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      TableItem[] item=listTable.getSelection();
      currentFunction=(Function)item[0].getData();
      List<ParameterInfo> listIn=currentFunction.getInputParameters();
      List<ParameterInfo> listOut=currentFunction.getOutputParameters();
      ExtendedTableModel<InputMappingData> columnModel=expressinPutTableView.getExtendedTableModel();
      columnModel.removeAll();
      if (listIn != null) {
        for (int i=0; i < listIn.size(); i++) {
          ParameterInfo pa=listIn.get(i);
          InputMappingData inData=new InputMappingData();
          inData.setParameterName(pa.getName());
          inData.setParameter(pa);
          columnModel.add(inData);
        }
      }
      expressTableForIn.setSelection(0);
      ExtendedTableModel<OutPutMappingData> rowForOutput=rowoutPutTableView.getExtendedTableModel();
      rowForOutput.removeAll();
      if (listOut != null) {
        for (int i=0; i < listOut.size(); i++) {
          OutPutMappingData outData=new OutPutMappingData();
          ParameterInfo pa=listOut.get(i);
          outData.setParameter(pa);
          rowForOutput.add(outData);
        }
      }
      ExtendedTableModel<OutPutMappingData> exforoutput=expressoutPutTableView.getExtendedTableModel();
      exforoutput.removeAll();
      for (      IMetadataColumn column : forOutColumnList) {
        OutPutMappingData outData=new OutPutMappingData();
        outData.setOutputColumnValue(column.getLabel());
        outData.setMetadataColumn(column);
        exforoutput.add(outData);
      }
      rowTableForout.setSelection(0);
      if (connection != null) {
        if (currentPortName != null) {
          connection.setPortName(currentPortName.getPortName());
        }
 else         if (currentPortName == null && allPortNames != null) {
          currentPortName=allPortNames.get(0);
          connection.setPortName(currentPortName.getPortName());
        }
        if (currentFunction != null) {
          if (currentFunction.getName() != null) {
            connection.setMethodName(currentFunction.getName());
          }
          if (currentFunction.getServerNameSpace() != null) {
            connection.setServerNameSpace(currentFunction.getServerNameSpace());
          }
          if (currentFunction.getServerName() != null) {
            connection.setServerName(currentFunction.getServerName());
          }
          if (currentFunction.getServerNameSpace() != null) {
            connection.setPortNameSpace(currentFunction.getServerNameSpace());
          }
        }
      }
    }
  }
);
  portListTable.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      TableItem[] item=portListTable.getSelection();
      currentPortName=(PortNames)item[0].getData();
      if (connection != null) {
        if (currentPortName != null) {
          connection.setPortName(currentPortName.getPortName());
        }
 else         if (currentPortName == null && allPortNames != null) {
          currentPortName=allPortNames.get(0);
          connection.setPortName(currentPortName.getPortName());
        }
 else {
          connection.setPortName("String_Node_Str");
        }
      }
    }
  }
);
}

Fixed version (ground truth):
private void addListenerForWSDLCom(){
  refreshbut.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      final Job job=new Job("String_Node_Str"){
        @Override protected IStatus run(        IProgressMonitor monitor){
          monitor.beginTask("String_Node_Str",IProgressMonitor.UNKNOWN);
          getDataFromNet();
          monitor.done();
          return Status.OK_STATUS;
        }
      }
;
      job.setSystem(true);
      job.schedule();
      ProgressMonitorDialog progressDialog=new ProgressMonitorDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell().getShell());
      IRunnableWithProgress runnable=new IRunnableWithProgress(){
        public void run(        final IProgressMonitor monitor){
          monitor.beginTask("String_Node_Str",IProgressMonitor.UNKNOWN);
          boolean f=true;
          while (f) {
            try {
              Thread.sleep(1000);
            }
 catch (            InterruptedException e) {
              e.printStackTrace();
            }
            if (monitor.isCanceled()) {
              job.done(Status.OK_STATUS);
              job.cancel();
            }
            if (monitor.isCanceled() || (job.getResult() != null && job.getResult().isOK())) {
              monitor.done();
              f=false;
            }
          }
        }
      }
;
      try {
        progressDialog.run(true,true,runnable);
      }
 catch (      InvocationTargetException e1) {
        ExceptionHandler.process(e1);
      }
catch (      InterruptedException e1) {
        ExceptionHandler.process(e1);
      }
catch (      WebServiceCancelException e1) {
        return;
      }
      if (connection != null) {
        if (listTable.getItemCount() > 0) {
          listTable.setSelection(listTable.getItem(0));
        }
        if (currentFunction != null) {
          if (currentFunction.getName() != null) {
            connection.setMethodName(currentFunction.getName());
          }
          if (currentFunction.getServerNameSpace() != null) {
            connection.setServerNameSpace(currentFunction.getServerNameSpace());
          }
          if (currentFunction.getServerName() != null) {
            connection.setServerName(currentFunction.getServerName());
          }
          if (currentFunction.getServerNameSpace() != null) {
            connection.setPortNameSpace(currentFunction.getServerNameSpace());
          }
        }
        if (currentPortName != null) {
          connection.setPortName(currentPortName.getPortName());
        }
 else         if (currentPortName == null && !allPortNames.isEmpty()) {
          currentPortName=allPortNames.get(0);
          connection.setPortName(currentPortName.getPortName());
        }
      }
      isFirst=false;
    }
  }
);
  listTable=listTableView.getTable();
  portListTable=portListTableView.getTable();
  listTable.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      TableItem[] item=listTable.getSelection();
      currentFunction=(Function)item[0].getData();
      List<ParameterInfo> listIn=currentFunction.getInputParameters();
      List<ParameterInfo> listOut=currentFunction.getOutputParameters();
      ExtendedTableModel<InputMappingData> columnModel=expressinPutTableView.getExtendedTableModel();
      columnModel.removeAll();
      if (listIn != null) {
        for (int i=0; i < listIn.size(); i++) {
          ParameterInfo pa=listIn.get(i);
          InputMappingData inData=new InputMappingData();
          inData.setParameterName(pa.getName());
          inData.setParameter(pa);
          columnModel.add(inData);
        }
      }
      expressTableForIn.setSelection(0);
      ExtendedTableModel<OutPutMappingData> rowForOutput=rowoutPutTableView.getExtendedTableModel();
      rowForOutput.removeAll();
      if (listOut != null) {
        for (int i=0; i < listOut.size(); i++) {
          OutPutMappingData outData=new OutPutMappingData();
          ParameterInfo pa=listOut.get(i);
          outData.setParameter(pa);
          rowForOutput.add(outData);
        }
      }
      ExtendedTableModel<OutPutMappingData> exforoutput=expressoutPutTableView.getExtendedTableModel();
      exforoutput.removeAll();
      for (      IMetadataColumn column : forOutColumnList) {
        OutPutMappingData outData=new OutPutMappingData();
        outData.setOutputColumnValue(column.getLabel());
        outData.setMetadataColumn(column);
        exforoutput.add(outData);
      }
      rowTableForout.setSelection(0);
      if (connection != null) {
        if (currentPortName != null) {
          connection.setPortName(currentPortName.getPortName());
        }
 else         if (currentPortName == null && allPortNames != null) {
          currentPortName=allPortNames.get(0);
          connection.setPortName(currentPortName.getPortName());
        }
        if (currentFunction != null) {
          if (currentFunction.getName() != null) {
            connection.setMethodName(currentFunction.getName());
          }
          if (currentFunction.getServerNameSpace() != null) {
            connection.setServerNameSpace(currentFunction.getServerNameSpace());
          }
          if (currentFunction.getServerName() != null) {
            connection.setServerName(currentFunction.getServerName());
          }
          if (currentFunction.getServerNameSpace() != null) {
            connection.setPortNameSpace(currentFunction.getServerNameSpace());
          }
        }
      }
    }
  }
);
  portListTable.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      TableItem[] item=portListTable.getSelection();
      currentPortName=(PortNames)item[0].getData();
      if (connection != null) {
        if (currentPortName != null) {
          connection.setPortName(currentPortName.getPortName());
        }
 else         if (currentPortName == null && allPortNames != null) {
          currentPortName=allPortNames.get(0);
          connection.setPortName(currentPortName.getPortName());
        }
 else {
          connection.setPortName("String_Node_Str");
        }
      }
    }
  }
);
}