nus-yam/ex-repair huggingface dataset:
Program: 102002
Project: 102002
Buggy source:
/** 
 * @throws Exception
 */
public abstract void write() throws Exception ;

Fixed version (ground truth):
/** 
 * @throws Exception
 */
protected void write() throws Exception {
  refreshOutputLocation();
  IProject project=getOutputLocation().getProject();
  project.build(IncrementalProjectBuilder.CLEAN_BUILD,new NullProgressMonitor());
}
Program: 102003
Project: 102003
Buggy source:
@Override public void write() throws Exception {
  if (isGenerateRequired())   return;
  getArchiveVdb().save();
  refreshOutputLocation();
}

Fixed version (ground truth):
@Override public void write() throws Exception {
  if (isGenerateRequired())   return;
  getArchiveVdb().save();
  super.write();
}
Program: 102004
Project: 102004
Buggy source:
/** 
 * @throws Exception
 */
@Override public void write() throws Exception {
  checkDynamicVdbGenerated();
  StringWriter writer=new StringWriter();
  getDynamicVdb().write(writer);
  String xml=writer.toString();
  IFile destination=getDestination();
  ByteArrayInputStream inputStream=new ByteArrayInputStream(xml.getBytes("String_Node_Str"));
  destination.create(inputStream,true,new NullProgressMonitor());
}

Fixed version (ground truth):
/** 
 * @throws Exception
 */
@Override public void write() throws Exception {
  checkDynamicVdbGenerated();
  StringWriter writer=new StringWriter();
  getDynamicVdb().write(writer);
  String xml=writer.toString();
  IFile destination=getDestination();
  ByteArrayInputStream inputStream=new ByteArrayInputStream(xml.getBytes("String_Node_Str"));
  destination.create(inputStream,true,new NullProgressMonitor());
  super.write();
}
Program: 102008
Project: 102008
Buggy source:
private Synchronization synchronizeEntry() throws Exception {
  final IFile workspaceFile=findFileInWorkspace();
  if (workspaceFile == null)   return Synchronization.NotApplicable;
  long oldChecksum=0L;
  checksumLock.writeLock().lock();
  try {
    oldChecksum=checksum;
    checksum=computeChecksum(workspaceFile);
    FileUtils.copy(workspaceFile.getLocation().toFile(),new File(getVdb().getStagingFolder(),getName()).getParentFile(),true);
  }
  finally {
    checksumLock.writeLock().unlock();
  }
  setModified(this,ENTRY_CHECKSUM,oldChecksum,checksum);
  return Synchronization.Synchronized;
}

Fixed version (ground truth):
protected Synchronization synchronizeEntry() throws Exception {
  final IFile workspaceFile=findFileInWorkspace();
  if (workspaceFile == null)   return Synchronization.NotApplicable;
  long oldChecksum=0L;
  checksumLock.writeLock().lock();
  try {
    oldChecksum=checksum;
    checksum=computeChecksum(workspaceFile);
    FileUtils.copy(workspaceFile.getLocation().toFile(),new File(getVdb().getStagingFolder(),getPath().toOSString()).getParentFile(),true);
  }
  finally {
    checksumLock.writeLock().unlock();
  }
  setModified(this,ENTRY_CHECKSUM,oldChecksum,checksum);
  return Synchronization.Synchronized;
}
Program: 102009
Project: 102009
Buggy source:
/** 
 * @return the associated workspace file, or <code>null</code> if it doesn't exist
 */
public final IFile findFileInWorkspace(){
  IResource resource=ModelerCore.getWorkspace().getRoot().findMember(getPath());
  if (resource == null) {
    if (getVdb() != null && getVdb().getSourceFile() != null && getVdb().getSourceFile().getProject() != null) {
      IProject vdbProject=getVdb().getSourceFile().getProject();
      resource=vdbProject.findMember(getPath());
    }
  }
  if (!(resource instanceof IFile)) {
    setSynchronization(Synchronization.NotApplicable);
    return null;
  }
  return (IFile)resource;
}

Fixed version (ground truth):
/** 
 * @return the associated workspace file, or <code>null</code> if it doesn't exist
 */
public IFile findFileInWorkspace(){
  IResource resource=ModelerCore.getWorkspace().getRoot().findMember(getPath());
  if (resource == null) {
    if (getVdb() != null && getVdb().getSourceFile() != null && getVdb().getSourceFile().getProject() != null) {
      IProject vdbProject=getVdb().getSourceFile().getProject();
      resource=vdbProject.findMember(getPath());
    }
  }
  if (!(resource instanceof IFile)) {
    setSynchronization(Synchronization.NotApplicable);
    return null;
  }
  return (IFile)resource;
}
Program: 102010
Project: 102010
Buggy source:
@Override public void save(final ZipOutputStream out) throws Exception {
  String zipName=getName().toString();
  if (zipName.startsWith(StringConstants.FORWARD_SLASH)) {
    zipName=zipName.substring(1,zipName.length());
  }
  final ZipEntry zipEntry=new ZipEntry(zipName);
  zipEntry.setComment(getDescription());
  IProject vdbProject=getVdb().getSourceFile().getProject();
  File theFile=findUdfFile(vdbProject);
  if (theFile != null && theFile.exists()) {
    save(out,zipEntry,theFile);
  }
}

Fixed version (ground truth):
@Override public void save(final ZipOutputStream out) throws Exception {
  String zipName=getPath().toOSString();
  if (zipName.startsWith(StringConstants.FORWARD_SLASH)) {
    zipName=zipName.substring(1,zipName.length());
  }
  final ZipEntry zipEntry=new ZipEntry(zipName);
  zipEntry.setComment(getDescription());
  File theFile=findSourceFile();
  save(out,zipEntry,theFile);
}
Program: 102011
Project: 102011
Buggy source:
/** 
 * Constructs a file entry and adds it to the specified VDB. 
 * @param vdb the VDB where the resource is be added to (may not be <code>null</code>)
 * @param element the EntryElement
 * @throws Exception
 */
public VdbFileEntry(final Vdb vdb,final EntryElement element) throws Exception {
  super(vdb,Path.fromPortableString(element.getPath()));
  this.sourceFilePath=Path.fromPortableString(element.getPath());
  if (element.getPath().startsWith(StringConstants.FORWARD_SLASH + VdbFolders.UDF.getReadFolder())) {
    this.fileType=FileEntryType.UDFJar;
  }
 else {
    this.fileType=FileEntryType.UserFile;
  }
  setPath(determinePath(this.sourceFilePath,this.fileType));
}

Fixed version (ground truth):
/** 
 * Constructs a file entry and adds it to the specified VDB. 
 * @param vdb the VDB where the resource is be added to (may not be <code>null</code>)
 * @param element the EntryElement
 * @throws Exception
 */
public VdbFileEntry(final Vdb vdb,final EntryElement element) throws Exception {
  super(vdb,Path.fromPortableString(element.getPath()));
  this.sourceFilePath=Path.fromPortableString(element.getPath());
  if (element.getPath().startsWith(StringConstants.FORWARD_SLASH + VdbFolders.UDF.getReadFolder())) {
    this.fileType=FileEntryType.UDFJar;
  }
 else {
    this.fileType=FileEntryType.UserFile;
  }
  resetPath();
}
Program: 102019
Project: 102019
Buggy source:
@Override public boolean requiresPassword(IConnectionProfile connectionProfile){
  Properties props=connectionProfile.getBaseProperties();
  String contextFactory=props.getProperty(ICredentialsCommon.SECURITY_TYPE_ID);
  if (contextFactory != null && !contextFactory.equalsIgnoreCase(IWSProfileConstants.SecurityType.None.name())) {
    props.remove(ICredentialsCommon.USERNAME_PROP_ID);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean requiresPassword(IConnectionProfile connectionProfile){
  Properties props=connectionProfile.getBaseProperties();
  String contextFactory=props.getProperty(ICredentialsCommon.SECURITY_TYPE_ID);
  if (contextFactory != null & !contextFactory.isEmpty() && !contextFactory.equalsIgnoreCase(IWSProfileConstants.SecurityType.None.name())) {
    props.remove(ICredentialsCommon.USERNAME_PROP_ID);
    return true;
  }
  return false;
}
Program: 102020
Project: 102020
Buggy source:
@Override public Properties getTeiidRelatedProperties(IConnectionProfile connectionProfile){
  Properties connectionProps=new Properties();
  Properties props=connectionProfile.getBaseProperties();
  String password=props.getProperty(ICredentialsCommon.PASSWORD_PROP_ID);
  if (password != null) {
    connectionProps.setProperty(ICredentialsCommon.PASSWORD_PROP_ID,password);
  }
  String url=readEndPointProperty(props);
  if (null != url) {
    connectionProps.setProperty(IWSProfileConstants.END_POINT_URI_PROP_ID,url);
  }
  String contextFactory=props.getProperty(ICredentialsCommon.SECURITY_TYPE_ID);
  if (null != contextFactory) {
    connectionProps.setProperty(ICredentialsCommon.SECURITY_TYPE_ID,contextFactory);
  }
 else {
    connectionProps.setProperty(ICredentialsCommon.SECURITY_TYPE_ID,SecurityType.None.name());
  }
  if (!connectionProps.getProperty(ICredentialsCommon.SECURITY_TYPE_ID).equals(SecurityType.None.name())) {
    String user=props.getProperty(ICredentialsCommon.USERNAME_PROP_ID);
    if (null != user & !user.equals("String_Node_Str")) {
      connectionProps.setProperty(ICredentialsCommon.USERNAME_PROP_ID,user);
    }
  }
  connectionProps.setProperty(WS_CLASSNAME,WS_CONNECTION_FACTORY);
  return connectionProps;
}

Fixed version (ground truth):
@Override public Properties getTeiidRelatedProperties(IConnectionProfile connectionProfile){
  Properties connectionProps=new Properties();
  Properties props=connectionProfile.getBaseProperties();
  String password=props.getProperty(ICredentialsCommon.PASSWORD_PROP_ID);
  if (password != null) {
    connectionProps.setProperty(ICredentialsCommon.PASSWORD_PROP_ID,password);
  }
  String url=readEndPointProperty(props);
  if (null != url) {
    connectionProps.setProperty(IWSProfileConstants.END_POINT_URI_PROP_ID,url);
  }
  String contextFactory=props.getProperty(ICredentialsCommon.SECURITY_TYPE_ID);
  if (null != contextFactory & !contextFactory.isEmpty()) {
    connectionProps.setProperty(ICredentialsCommon.SECURITY_TYPE_ID,contextFactory);
  }
 else {
    connectionProps.setProperty(ICredentialsCommon.SECURITY_TYPE_ID,SecurityType.None.name());
  }
  if (!connectionProps.getProperty(ICredentialsCommon.SECURITY_TYPE_ID).equals(SecurityType.None.name())) {
    String user=props.getProperty(ICredentialsCommon.USERNAME_PROP_ID);
    if (null != user & !user.equals("String_Node_Str")) {
      connectionProps.setProperty(ICredentialsCommon.USERNAME_PROP_ID,user);
    }
  }
  connectionProps.setProperty(WS_CLASSNAME,WS_CONNECTION_FACTORY);
  return connectionProps;
}
Program: 102023
Project: 102023
Buggy source:
/** 
 * handler for convertAll Attributes Button pressed
 */
void changeAllColumnDatatypesPressed(){
  for (int i=0; i < bindingListInput.getBindingList().size(); i++) {
    Binding binding=bindingListInput.getBindingList().get(i);
    if (binding.hasTypeConflict() && binding.hasAttributeConversion()) {
      binding.acceptAttributeConversion();
    }
  }
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh(true);
  updateRowColors();
  updateMessageArea();
  selectFirstBinding();
}

Fixed version (ground truth):
/** 
 * handler for convertAll Attributes Button pressed
 */
void changeAllColumnDatatypesPressed(){
  for (int i=0; i < bindingListInput.getBindingList().size(); i++) {
    Binding binding=bindingListInput.getBindingList().get(i);
    if (binding.hasTypeConflict() && binding.hasAttributeConversion()) {
      binding.acceptAttributeConversion();
    }
  }
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh();
  updateRowColors();
  updateMessageArea();
  selectFirstBinding();
}
Program: 102024
Project: 102024
Buggy source:
/** 
 * handler for convert Selected Sql Button pressed
 */
void convertSelectedSqlPressed(){
  Binding binding=getSelectedBinding();
  if (binding.canConvertSqlSymbol()) {
    binding.acceptSqlConversion();
  }
  updateSymbolConversionPanel(binding);
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh(true);
  updateRowColors();
  updateMessageArea();
  selectBinding(binding);
}

Fixed version (ground truth):
/** 
 * handler for convert Selected Sql Button pressed
 */
void convertSelectedSqlPressed(){
  Binding binding=getSelectedBinding();
  if (binding.canConvertSqlSymbol()) {
    binding.acceptSqlConversion();
  }
  updateSymbolConversionPanel(binding);
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh(binding);
  updateRowColors();
  updateMessageArea();
  selectBinding(binding);
}
Program: 102025
Project: 102025
Buggy source:
/** 
 * handler for convert Selected Attribute Button pressed
 */
void convertSelectedAttrPressed(){
  Binding binding=getSelectedBinding();
  binding.setNewAttrDatatype(bindingListInput.getTargetDatatype(binding));
  updateAttributeConversionPanel(binding);
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh(true);
  updateRowColors();
  updateMessageArea();
  selectBinding(binding);
}

Fixed version (ground truth):
/** 
 * handler for convert Selected Attribute Button pressed
 */
void convertSelectedAttrPressed(){
  Binding binding=getSelectedBinding();
  binding.setNewAttrDatatype(bindingListInput.getTargetDatatype(binding));
  updateAttributeConversionPanel(binding);
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh(binding);
  updateRowColors();
  updateMessageArea();
  selectBinding(binding);
}
Program: 102026
Project: 102026
Buggy source:
/** 
 * handler for convertAll Sql Button pressed
 */
void changeAllColumnDatatypesButtonPressed(){
  for (int i=0; i < bindingListInput.getBindingList().size(); i++) {
    Binding binding=bindingListInput.getBindingList().get(i);
    if (binding.hasTypeConflict() && binding.canConvertSqlSymbol()) {
      binding.acceptSqlConversion();
    }
  }
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh(true);
  updateRowColors();
  updateMessageArea();
  selectFirstBinding();
}

Fixed version (ground truth):
/** 
 * handler for convertAll Sql Button pressed
 */
void changeAllColumnDatatypesButtonPressed(){
  for (int i=0; i < bindingListInput.getBindingList().size(); i++) {
    Binding binding=bindingListInput.getBindingList().get(i);
    if (binding.hasTypeConflict() && binding.canConvertSqlSymbol()) {
      binding.acceptSqlConversion();
    }
  }
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh();
  updateRowColors();
  updateMessageArea();
  selectFirstBinding();
}
Program: 102031
Project: 102031
Buggy source:
private boolean viewAlreadyExists(){
  if (!info.viewModelExists()) {
    return false;
  }
  IPath modelPath=new Path(viewModelFilePath.toOSString()).append(this.viewModelFileText.getText());
  if (!modelPath.toString().toUpperCase().endsWith("String_Node_Str")) {
    modelPath=modelPath.addFileExtension("String_Node_Str");
  }
  IResource viewModel=ModelerCore.getWorkspace().getRoot().getFile(modelPath);
  ModelResource smr=ModelUtilities.getModelResourceForIFile((IFile)viewModel,false);
  if (smr != null) {
    try {
      String existingName=fileInfo.getViewTableName();
      for (      Object obj : smr.getAllRootEObjects()) {
        EObject eObj=(EObject)obj;
        if (eObj instanceof BaseTable && existingName.equalsIgnoreCase(ModelObjectUtilities.getName(eObj))) {
          return true;
        }
      }
    }
 catch (    ModelWorkspaceException err) {
      Util.log(err);
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean viewAlreadyExists(){
  if (info == null && !info.viewModelExists()) {
    return false;
  }
  IPath modelPath=new Path(viewModelFilePath.toOSString()).append(this.viewModelFileText.getText());
  if (!modelPath.toString().toUpperCase().endsWith("String_Node_Str")) {
    modelPath=modelPath.addFileExtension("String_Node_Str");
  }
  IResource viewModel=ModelerCore.getWorkspace().getRoot().getFile(modelPath);
  ModelResource smr=ModelUtilities.getModelResourceForIFile((IFile)viewModel,false);
  if (smr != null) {
    try {
      String existingName=fileInfo.getViewTableName();
      for (      Object obj : smr.getAllRootEObjects()) {
        EObject eObj=(EObject)obj;
        if (eObj instanceof BaseTable && existingName.equalsIgnoreCase(ModelObjectUtilities.getName(eObj))) {
          return true;
        }
      }
    }
 catch (    ModelWorkspaceException err) {
      Util.log(err);
    }
  }
  return false;
}
Program: 102032
Project: 102032
Buggy source:
private void synchronizeUI(){
  synchronizing=true;
  java.io.File dataFile=fileInfo.getDataFile();
  String fileName=dataFile.getName();
  selectedFileText.setText(fileName);
  if (this.info.getViewModelLocation() != null) {
    viewModelContainerText.setText(this.info.getViewModelLocation().makeRelative().toString());
  }
 else {
    this.viewModelContainerText.setText(StringUtilities.EMPTY_STRING);
  }
  if (this.info.getViewModelName() != null) {
    String viewModelName=this.info.getViewModelName();
    this.viewModelFileText.setText(viewModelName);
  }
 else {
    this.viewModelFileText.setText(StringUtilities.EMPTY_STRING);
  }
{
    final String viewTableName=this.fileInfo.getViewTableName();
    if (viewTableName != null) {
      if (!StringUtilities.equalsIgnoreCase(viewTableName,this.viewTableNameText.getText())) {
        this.viewTableNameText.setText(viewTableName);
      }
    }
 else {
      this.viewTableNameText.setText(StringUtilities.EMPTY_STRING);
    }
  }
  synchronizing=false;
}

Fixed version (ground truth):
private void synchronizeUI(){
  synchronizing=true;
  java.io.File dataFile=fileInfo.getDataFile();
  String fileName=dataFile.getName();
  selectedFileText.setText(fileName);
  if (this.info.getViewModelLocation() != null) {
    viewModelContainerText.setText(this.info.getViewModelLocation().makeRelative().toString());
    this.viewModelFilePath=this.info.getViewModelLocation();
  }
 else {
    this.viewModelContainerText.setText(StringUtilities.EMPTY_STRING);
  }
  if (this.info.getViewModelName() != null) {
    String viewModelName=this.info.getViewModelName();
    this.viewModelFileText.setText(viewModelName);
  }
 else {
    this.viewModelFileText.setText(StringUtilities.EMPTY_STRING);
  }
{
    final String viewTableName=this.fileInfo.getViewTableName();
    if (viewTableName != null) {
      if (!StringUtilities.equalsIgnoreCase(viewTableName,this.viewTableNameText.getText())) {
        this.viewTableNameText.setText(viewTableName);
      }
    }
 else {
      this.viewTableNameText.setText(StringUtilities.EMPTY_STRING);
    }
  }
  synchronizing=false;
}
Program: 102033
Project: 102033
Buggy source:
/** 
 * handler for convertAll Attributes Button pressed
 */
void changeAllColumnDatatypesPressed(){
  for (int i=0; i < bindingListInput.getBindingList().size(); i++) {
    Binding binding=bindingListInput.getBindingList().get(i);
    if (binding.hasTypeConflict() && binding.hasAttributeConversion()) {
      binding.acceptAttributeConversion();
    }
  }
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh(true);
  updateRowColors();
  updateMessageArea();
  selectFirstBinding();
}

Fixed version (ground truth):
/** 
 * handler for convertAll Attributes Button pressed
 */
void changeAllColumnDatatypesPressed(){
  for (int i=0; i < bindingListInput.getBindingList().size(); i++) {
    Binding binding=bindingListInput.getBindingList().get(i);
    if (binding.hasTypeConflict() && binding.hasAttributeConversion()) {
      binding.acceptAttributeConversion();
    }
  }
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh();
  updateRowColors();
  updateMessageArea();
  selectFirstBinding();
}
Program: 102034
Project: 102034
Buggy source:
/** 
 * handler for convert Selected Sql Button pressed
 */
void convertSelectedSqlPressed(){
  Binding binding=getSelectedBinding();
  if (binding.canConvertSqlSymbol()) {
    binding.acceptSqlConversion();
  }
  updateSymbolConversionPanel(binding);
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh(true);
  updateRowColors();
  updateMessageArea();
  selectBinding(binding);
}

Fixed version (ground truth):
/** 
 * handler for convert Selected Sql Button pressed
 */
void convertSelectedSqlPressed(){
  Binding binding=getSelectedBinding();
  if (binding.canConvertSqlSymbol()) {
    binding.acceptSqlConversion();
  }
  updateSymbolConversionPanel(binding);
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh(binding);
  updateRowColors();
  updateMessageArea();
  selectBinding(binding);
}
Program: 102035
Project: 102035
Buggy source:
/** 
 * handler for convert Selected Attribute Button pressed
 */
void convertSelectedAttrPressed(){
  Binding binding=getSelectedBinding();
  binding.setNewAttrDatatype(bindingListInput.getTargetDatatype(binding));
  updateAttributeConversionPanel(binding);
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh(true);
  updateRowColors();
  updateMessageArea();
  selectBinding(binding);
}

Fixed version (ground truth):
/** 
 * handler for convert Selected Attribute Button pressed
 */
void convertSelectedAttrPressed(){
  Binding binding=getSelectedBinding();
  binding.setNewAttrDatatype(bindingListInput.getTargetDatatype(binding));
  updateAttributeConversionPanel(binding);
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh(binding);
  updateRowColors();
  updateMessageArea();
  selectBinding(binding);
}
Program: 102036
Project: 102036
Buggy source:
/** 
 * handler for convertAll Sql Button pressed
 */
void changeAllColumnDatatypesButtonPressed(){
  for (int i=0; i < bindingListInput.getBindingList().size(); i++) {
    Binding binding=bindingListInput.getBindingList().get(i);
    if (binding.hasTypeConflict() && binding.canConvertSqlSymbol()) {
      binding.acceptSqlConversion();
    }
  }
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh(true);
  updateRowColors();
  updateMessageArea();
  selectFirstBinding();
}

Fixed version (ground truth):
/** 
 * handler for convertAll Sql Button pressed
 */
void changeAllColumnDatatypesButtonPressed(){
  for (int i=0; i < bindingListInput.getBindingList().size(); i++) {
    Binding binding=bindingListInput.getBindingList().get(i);
    if (binding.hasTypeConflict() && binding.canConvertSqlSymbol()) {
      binding.acceptSqlConversion();
    }
  }
  bindingListInput.datatypeChanged();
  bindingTableViewer.refresh();
  updateRowColors();
  updateMessageArea();
  selectFirstBinding();
}
Program: 102038
Project: 102038
Buggy source:
private boolean viewAlreadyExists(){
  if (!info.viewModelExists()) {
    return false;
  }
  IPath modelPath=new Path(viewModelFilePath.toOSString()).append(this.viewModelFileText.getText());
  if (!modelPath.toString().toUpperCase().endsWith("String_Node_Str")) {
    modelPath=modelPath.addFileExtension("String_Node_Str");
  }
  IResource viewModel=ModelerCore.getWorkspace().getRoot().getFile(modelPath);
  ModelResource smr=ModelUtilities.getModelResourceForIFile((IFile)viewModel,false);
  if (smr != null) {
    try {
      String existingName=fileInfo.getViewTableName();
      for (      Object obj : smr.getAllRootEObjects()) {
        EObject eObj=(EObject)obj;
        if (eObj instanceof BaseTable && existingName.equalsIgnoreCase(ModelObjectUtilities.getName(eObj))) {
          return true;
        }
      }
    }
 catch (    ModelWorkspaceException err) {
      Util.log(err);
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean viewAlreadyExists(){
  if (info == null && !info.viewModelExists()) {
    return false;
  }
  IPath modelPath=new Path(viewModelFilePath.toOSString()).append(this.viewModelFileText.getText());
  if (!modelPath.toString().toUpperCase().endsWith("String_Node_Str")) {
    modelPath=modelPath.addFileExtension("String_Node_Str");
  }
  IResource viewModel=ModelerCore.getWorkspace().getRoot().getFile(modelPath);
  ModelResource smr=ModelUtilities.getModelResourceForIFile((IFile)viewModel,false);
  if (smr != null) {
    try {
      String existingName=fileInfo.getViewTableName();
      for (      Object obj : smr.getAllRootEObjects()) {
        EObject eObj=(EObject)obj;
        if (eObj instanceof BaseTable && existingName.equalsIgnoreCase(ModelObjectUtilities.getName(eObj))) {
          return true;
        }
      }
    }
 catch (    ModelWorkspaceException err) {
      Util.log(err);
    }
  }
  return false;
}
Program: 102039
Project: 102039
Buggy source:
private void synchronizeUI(){
  synchronizing=true;
  java.io.File dataFile=fileInfo.getDataFile();
  String fileName=dataFile.getName();
  selectedFileText.setText(fileName);
  if (this.info.getViewModelLocation() != null) {
    viewModelContainerText.setText(this.info.getViewModelLocation().makeRelative().toString());
  }
 else {
    this.viewModelContainerText.setText(StringUtilities.EMPTY_STRING);
  }
  if (this.info.getViewModelName() != null) {
    String viewModelName=this.info.getViewModelName();
    this.viewModelFileText.setText(viewModelName);
  }
 else {
    this.viewModelFileText.setText(StringUtilities.EMPTY_STRING);
  }
{
    final String viewTableName=this.fileInfo.getViewTableName();
    if (viewTableName != null) {
      if (!StringUtilities.equalsIgnoreCase(viewTableName,this.viewTableNameText.getText())) {
        this.viewTableNameText.setText(viewTableName);
      }
    }
 else {
      this.viewTableNameText.setText(StringUtilities.EMPTY_STRING);
    }
  }
  synchronizing=false;
}

Fixed version (ground truth):
private void synchronizeUI(){
  synchronizing=true;
  java.io.File dataFile=fileInfo.getDataFile();
  String fileName=dataFile.getName();
  selectedFileText.setText(fileName);
  if (this.info.getViewModelLocation() != null) {
    viewModelContainerText.setText(this.info.getViewModelLocation().makeRelative().toString());
    this.viewModelFilePath=this.info.getViewModelLocation();
  }
 else {
    this.viewModelContainerText.setText(StringUtilities.EMPTY_STRING);
  }
  if (this.info.getViewModelName() != null) {
    String viewModelName=this.info.getViewModelName();
    this.viewModelFileText.setText(viewModelName);
  }
 else {
    this.viewModelFileText.setText(StringUtilities.EMPTY_STRING);
  }
{
    final String viewTableName=this.fileInfo.getViewTableName();
    if (viewTableName != null) {
      if (!StringUtilities.equalsIgnoreCase(viewTableName,this.viewTableNameText.getText())) {
        this.viewTableNameText.setText(viewTableName);
      }
    }
 else {
      this.viewTableNameText.setText(StringUtilities.EMPTY_STRING);
    }
  }
  synchronizing=false;
}
Program: 102040
Project: 102040
Buggy source:
@Since(Version.TEIID_8_9) public static Datatype setDataType(String type,BaseColumn column,Map<String,Datatype> dataTypes,boolean allowNull){
  int arrayDimensions=0;
  while (DataTypeManagerService.isArrayType(type)) {
    arrayDimensions++;
    type=type.substring(0,type.length() - 2);
  }
  Datatype datatype=dataTypes.get(type);
  if (datatype == null && (!allowNull || !DataTypeManagerService.DefaultDataTypes.NULL.equals(type))) {
    throw new RuntimeException(Messages.gs(Messages.TEIID.TEIID60009,type));
  }
  column.setDatatype(datatype,true,arrayDimensions);
  return datatype;
}

Fixed version (ground truth):
@Since(Version.TEIID_8_9) public static Datatype setDataType(String type,BaseColumn column,Map<String,Datatype> dataTypes,boolean allowNull){
  int arrayDimensions=0;
  while (DataTypeManagerService.isArrayType(type)) {
    arrayDimensions++;
    type=type.substring(0,type.length() - 2);
  }
  Datatype datatype=dataTypes.get(type);
  if (datatype == null && (!allowNull || !DataTypeManagerService.DefaultDataTypes.NULL.getId().equals(type))) {
    throw new RuntimeException(Messages.gs(Messages.TEIID.TEIID60009,type));
  }
  column.setDatatype(datatype,true,arrayDimensions);
  return datatype;
}
Program: 102042
Project: 102042
Buggy source:
public static final void validateFunctionMethods(ITeiidServerVersion teiidVersion,Collection<FunctionMethod> methods,ValidatorReport report,Map<String,Datatype> runtimeTypeMap){
  if (runtimeTypeMap == null) {
    runtimeTypeMap=SystemMetadata.getInstance(teiidVersion).getRuntimeTypeMap();
  }
  if (methods != null) {
    for (    FunctionMethod method : methods) {
      validateFunctionMethod(teiidVersion,method,report,runtimeTypeMap);
    }
  }
}

Fixed version (ground truth):
public static final void validateFunctionMethods(ITeiidServerVersion teiidVersion,Collection<FunctionMethod> methods,ValidatorReport report,Map<String,Datatype> runtimeTypeMap){
  if (runtimeTypeMap == null && teiidVersion != null && teiidVersion.isGreaterThanOrEqualTo(TeiidServerVersion.Version.TEIID_8_0.get())) {
    runtimeTypeMap=SystemMetadata.getInstance(teiidVersion).getRuntimeTypeMap();
  }
  if (methods != null) {
    for (    FunctionMethod method : methods) {
      validateFunctionMethod(teiidVersion,method,report,runtimeTypeMap);
    }
  }
}
Program: 102046
Project: 102046
Buggy source:
private void updateState(){
  String msg=validateName();
  if (StringUtilities.isEmpty(msg)) {
    if (!this.btnOk.isEnabled()) {
      this.btnOk.setEnabled(true);
    }
    if (this.imageLabel.getImage() != null) {
      this.imageLabel.setImage(null);
    }
    this.imageLabel.setImage(getInfoImage());
    msg=UTIL.getString("String_Node_Str");
  }
 else {
    if (this.btnOk.isEnabled()) {
      this.btnOk.setEnabled(false);
    }
    this.imageLabel.setImage(getErrorImage());
  }
  this.messageLabel.setText(msg);
  this.messageLabel.pack();
}

Fixed version (ground truth):
private void updateState(){
  String msg=validateName();
  String defaultValueMsg=StringUtilities.isEmpty(this.defaultValue) ? UTIL.getString("String_Node_Str") : UTIL.getString("String_Node_Str");
  if (StringUtilities.isEmpty(msg)) {
    if (!this.btnOk.isEnabled()) {
      this.btnOk.setEnabled(true);
    }
    if (this.imageLabel.getImage() != null) {
      this.imageLabel.setImage(null);
    }
    this.imageLabel.setImage(getInfoImage());
  }
 else {
    if (this.btnOk.isEnabled()) {
      this.btnOk.setEnabled(false);
    }
    this.imageLabel.setImage(getErrorImage());
  }
  if (!StringUtilities.isEmpty(msg)) {
    this.messageLabel.setText(msg);
  }
 else {
    this.messageLabel.setText(defaultValueMsg);
  }
  this.messageLabel.pack();
}
Program: 102047
Project: 102047
Buggy source:
@Override protected void setValue(Object element,Object value){
  if (element instanceof Parameter) {
    String key=((Parameter)element).getPropertyKey();
    if (columnID == 1) {
      String oldType=((Parameter)element).getType().toString();
      String newType=(String)value;
      if (newType != null && newType.length() > 0 && !newType.equalsIgnoreCase(oldType)) {
        ((Parameter)element).setType(Parameter.Type.fromValue(newType));
        parameterMap.put(key,element);
        propertiesViewer.refresh();
      }
    }
 else     if (columnID == 2) {
      String oldDefaultValue=((Parameter)element).getDefaultValue();
      String newDefaultValue=(String)value;
      if (newDefaultValue != null && newDefaultValue.length() > 0 && !newDefaultValue.equalsIgnoreCase(oldDefaultValue)) {
        ((Parameter)element).setDefaultValue(newDefaultValue);
        parameterMap.put(key,element);
        propertiesViewer.refresh();
      }
    }
  }
}

Fixed version (ground truth):
@Override protected void setValue(Object element,Object value){
  if (element instanceof Parameter) {
    String key=((Parameter)element).getPropertyKey();
    if (columnID == 1) {
      String oldType=((Parameter)element).getType().toString();
      String newType=(String)value;
      if (newType != null && newType.length() > 0 && !newType.equalsIgnoreCase(oldType)) {
        ((Parameter)element).setType(Parameter.Type.fromValue(newType));
        parameterMap.put(key,element);
        propertiesViewer.refresh(element);
      }
    }
 else     if (columnID == 2) {
      String oldDefaultValue=((Parameter)element).getDefaultValue();
      String newDefaultValue=(String)value;
      if (newDefaultValue != null && newDefaultValue.length() > 0 && !newDefaultValue.equalsIgnoreCase(oldDefaultValue)) {
        ((Parameter)element).setDefaultValue(newDefaultValue);
        parameterMap.put(key,element);
        propertiesViewer.refresh(element);
      }
    }
  }
}
Program: 102048
Project: 102048
Buggy source:
void handleRemoveProperty(){
  Parameter selectedProperty=getSelectedProperty();
  assert(selectedProperty != null);
  parameterMap.remove(selectedProperty.getName());
  this.propertiesViewer.refresh();
  if (this.wsProfileDetailsWizardPage != null) {
    wsProfileDetailsWizardPage.urlPreviewText.setText(wsProfileDetailsWizardPage.updateUrlPreview().toString());
  }
 else {
    propertyPage.urlPreviewText.setText(wsProfileDetailsWizardPage.updateUrlPreview().toString());
  }
}

Fixed version (ground truth):
void handleRemoveProperty(){
  Parameter selectedProperty=getSelectedProperty();
  assert(selectedProperty != null);
  parameterMap.remove(selectedProperty.getName());
  this.propertiesViewer.refresh();
  if (this.wsProfileDetailsWizardPage != null) {
    wsProfileDetailsWizardPage.setParameterMap(this.parameterMap);
    wsProfileDetailsWizardPage.getProfileProperties().remove(selectedProperty.getName());
    wsProfileDetailsWizardPage.urlPreviewText.setText(wsProfileDetailsWizardPage.updateUrlPreview().toString());
  }
 else {
    propertyPage.setParameterMap(this.parameterMap);
    propertyPage.getExtraProperties().remove(Parameter.PREFIX + selectedProperty.getName());
    propertyPage.urlPreviewText.setText(propertyPage.updateUrlPreview().toString());
  }
}
Program: 102050
Project: 102050
Buggy source:
/** 
 * @return the extraProperties
 */
public Properties getExtraProperties(){
  for (  String key : this.getParameterMap().keySet()) {
    Parameter para=this.getParameterMap().get(key);
    this.extraProperties.put(para.getPropertyKey(),para.getPropertyValue());
  }
  return this.extraProperties;
}

Fixed version (ground truth):
/** 
 * @return the extraProperties
 */
public Properties getExtraProperties(){
  this.extraProperties=new Properties();
  for (  String key : this.getParameterMap().keySet()) {
    Parameter para=this.getParameterMap().get(key);
    this.extraProperties.put(para.getPropertyKey(),para.getPropertyValue());
  }
  return this.extraProperties;
}
Program: 102051
Project: 102051
Buggy source:
/** 
 * @param extraProperties the extraProperties to set
 */
public void setExtraProperties(Properties extraProperties){
  for (  String key : this.getParameterMap().keySet()) {
    Parameter para=this.getParameterMap().get(key);
    this.extraProperties.put(para.getPropertyKey(),para.getPropertyValue());
  }
  this.extraProperties=extraProperties;
}

Fixed version (ground truth):
/** 
 * @param extraProperties the extraProperties to set
 */
public void setExtraProperties(Properties extraProperties){
  for (  String key : this.getParameterMap().keySet()) {
    Parameter para=this.getParameterMap().get(key);
    extraProperties.put(para.getPropertyKey(),para.getPropertyValue());
  }
  this.extraProperties=extraProperties;
}
Program: 102052
Project: 102052
Buggy source:
private void updateState(){
  String msg=validateName();
  if (StringUtilities.isEmpty(msg)) {
    if (!this.btnOk.isEnabled()) {
      this.btnOk.setEnabled(true);
    }
    if (this.imageLabel.getImage() != null) {
      this.imageLabel.setImage(null);
    }
    this.imageLabel.setImage(getInfoImage());
    msg=UTIL.getString("String_Node_Str");
  }
 else {
    if (this.btnOk.isEnabled()) {
      this.btnOk.setEnabled(false);
    }
    this.imageLabel.setImage(getErrorImage());
  }
  this.messageLabel.setText(msg);
  this.messageLabel.pack();
}

Fixed version (ground truth):
private void updateState(){
  String msg=validateName();
  String defaultValueMsg=StringUtilities.isEmpty(this.defaultValue) ? UTIL.getString("String_Node_Str") : UTIL.getString("String_Node_Str");
  if (StringUtilities.isEmpty(msg)) {
    if (!this.btnOk.isEnabled()) {
      this.btnOk.setEnabled(true);
    }
    if (this.imageLabel.getImage() != null) {
      this.imageLabel.setImage(null);
    }
    this.imageLabel.setImage(getInfoImage());
  }
 else {
    if (this.btnOk.isEnabled()) {
      this.btnOk.setEnabled(false);
    }
    this.imageLabel.setImage(getErrorImage());
  }
  if (!StringUtilities.isEmpty(msg)) {
    this.messageLabel.setText(msg);
  }
 else {
    this.messageLabel.setText(defaultValueMsg);
  }
  this.messageLabel.pack();
}
Program: 102053
Project: 102053
Buggy source:
@Override protected void setValue(Object element,Object value){
  if (element instanceof Parameter) {
    String key=((Parameter)element).getPropertyKey();
    if (columnID == 1) {
      String oldType=((Parameter)element).getType().toString();
      String newType=(String)value;
      if (newType != null && newType.length() > 0 && !newType.equalsIgnoreCase(oldType)) {
        ((Parameter)element).setType(Parameter.Type.fromValue(newType));
        parameterMap.put(key,element);
        propertiesViewer.refresh();
      }
    }
 else     if (columnID == 2) {
      String oldDefaultValue=((Parameter)element).getDefaultValue();
      String newDefaultValue=(String)value;
      if (newDefaultValue != null && newDefaultValue.length() > 0 && !newDefaultValue.equalsIgnoreCase(oldDefaultValue)) {
        ((Parameter)element).setDefaultValue(newDefaultValue);
        parameterMap.put(key,element);
        propertiesViewer.refresh();
      }
    }
  }
}

Fixed version (ground truth):
@Override protected void setValue(Object element,Object value){
  if (element instanceof Parameter) {
    String key=((Parameter)element).getPropertyKey();
    if (columnID == 1) {
      String oldType=((Parameter)element).getType().toString();
      String newType=(String)value;
      if (newType != null && newType.length() > 0 && !newType.equalsIgnoreCase(oldType)) {
        ((Parameter)element).setType(Parameter.Type.fromValue(newType));
        parameterMap.put(key,element);
        propertiesViewer.refresh(element);
      }
    }
 else     if (columnID == 2) {
      String oldDefaultValue=((Parameter)element).getDefaultValue();
      String newDefaultValue=(String)value;
      if (newDefaultValue != null && newDefaultValue.length() > 0 && !newDefaultValue.equalsIgnoreCase(oldDefaultValue)) {
        ((Parameter)element).setDefaultValue(newDefaultValue);
        parameterMap.put(key,element);
        propertiesViewer.refresh(element);
      }
    }
  }
}
Program: 102054
Project: 102054
Buggy source:
void handleRemoveProperty(){
  Parameter selectedProperty=getSelectedProperty();
  assert(selectedProperty != null);
  parameterMap.remove(selectedProperty.getName());
  this.propertiesViewer.refresh();
  if (this.wsProfileDetailsWizardPage != null) {
    wsProfileDetailsWizardPage.urlPreviewText.setText(wsProfileDetailsWizardPage.updateUrlPreview().toString());
  }
 else {
    propertyPage.urlPreviewText.setText(wsProfileDetailsWizardPage.updateUrlPreview().toString());
  }
}

Fixed version (ground truth):
void handleRemoveProperty(){
  Parameter selectedProperty=getSelectedProperty();
  assert(selectedProperty != null);
  parameterMap.remove(selectedProperty.getName());
  this.propertiesViewer.refresh();
  if (this.wsProfileDetailsWizardPage != null) {
    wsProfileDetailsWizardPage.setParameterMap(this.parameterMap);
    wsProfileDetailsWizardPage.getProfileProperties().remove(selectedProperty.getName());
    wsProfileDetailsWizardPage.urlPreviewText.setText(wsProfileDetailsWizardPage.updateUrlPreview().toString());
  }
 else {
    propertyPage.setParameterMap(this.parameterMap);
    propertyPage.getExtraProperties().remove(Parameter.PREFIX + selectedProperty.getName());
    propertyPage.urlPreviewText.setText(propertyPage.updateUrlPreview().toString());
  }
}
Program: 102056
Project: 102056
Buggy source:
/** 
 * @return the extraProperties
 */
public Properties getExtraProperties(){
  for (  String key : this.getParameterMap().keySet()) {
    Parameter para=this.getParameterMap().get(key);
    this.extraProperties.put(para.getPropertyKey(),para.getPropertyValue());
  }
  return this.extraProperties;
}

Fixed version (ground truth):
/** 
 * @return the extraProperties
 */
public Properties getExtraProperties(){
  this.extraProperties=new Properties();
  for (  String key : this.getParameterMap().keySet()) {
    Parameter para=this.getParameterMap().get(key);
    this.extraProperties.put(para.getPropertyKey(),para.getPropertyValue());
  }
  return this.extraProperties;
}
Program: 102057
Project: 102057
Buggy source:
/** 
 * @param extraProperties the extraProperties to set
 */
public void setExtraProperties(Properties extraProperties){
  for (  String key : this.getParameterMap().keySet()) {
    Parameter para=this.getParameterMap().get(key);
    this.extraProperties.put(para.getPropertyKey(),para.getPropertyValue());
  }
  this.extraProperties=extraProperties;
}

Fixed version (ground truth):
/** 
 * @param extraProperties the extraProperties to set
 */
public void setExtraProperties(Properties extraProperties){
  for (  String key : this.getParameterMap().keySet()) {
    Parameter para=this.getParameterMap().get(key);
    extraProperties.put(para.getPropertyKey(),para.getPropertyValue());
  }
  this.extraProperties=extraProperties;
}
Program: 102058
Project: 102058
Buggy source:
@Override public void setConnectionInfo(ModelResource modelResource,IConnectionProfile connectionProfile) throws ModelWorkspaceException {
  Properties connectionProps=getCommonProfileProperties(connectionProfile);
  Properties props=connectionProfile.getBaseProperties();
  String url=readEndPointProperty(props);
  if (null != url) {
    connectionProps.setProperty(CONNECTION_NAMESPACE + IWSProfileConstants.END_POINT_URI_PROP_ID,url);
  }
  String user=props.getProperty(ICredentialsCommon.USERNAME_PROP_ID);
  if (null != user & !user.isEmpty()) {
    connectionProps.setProperty(CONNECTION_NAMESPACE + ICredentialsCommon.USERNAME_PROP_ID,user);
  }
  String security=props.getProperty(ICredentialsCommon.SECURITY_TYPE_ID);
  if (security == null) {
    security=SecurityType.None.name();
  }
  connectionProps.setProperty(CONNECTION_NAMESPACE + ICredentialsCommon.SECURITY_TYPE_ID,security);
  getHelper().removeProperties(modelResource,CONNECTION_PROFILE_NAMESPACE);
  getHelper().removeProperties(modelResource,TRANSLATOR_NAMESPACE);
  getHelper().removeProperties(modelResource,CONNECTION_NAMESPACE);
  connectionProps.put(TRANSLATOR_NAMESPACE + TRANSLATOR_NAME_KEY,"String_Node_Str");
  getHelper().setProperties(modelResource,connectionProps);
}

Fixed version (ground truth):
@Override public void setConnectionInfo(ModelResource modelResource,IConnectionProfile connectionProfile) throws ModelWorkspaceException {
  Properties connectionProps=getCommonProfileProperties(connectionProfile);
  Properties props=connectionProfile.getBaseProperties();
  String url=readEndPointProperty(props);
  if (null != url) {
    connectionProps.setProperty(CONNECTION_NAMESPACE + IWSProfileConstants.END_POINT_URI_PROP_ID,url);
  }
  String user=props.getProperty(ICredentialsCommon.USERNAME_PROP_ID);
  if (null != user && user.isEmpty()) {
    connectionProps.setProperty(CONNECTION_NAMESPACE + ICredentialsCommon.USERNAME_PROP_ID,user);
  }
  String security=props.getProperty(ICredentialsCommon.SECURITY_TYPE_ID);
  if (security == null) {
    security=SecurityType.None.name();
  }
  connectionProps.setProperty(CONNECTION_NAMESPACE + ICredentialsCommon.SECURITY_TYPE_ID,security);
  getHelper().removeProperties(modelResource,CONNECTION_PROFILE_NAMESPACE);
  getHelper().removeProperties(modelResource,TRANSLATOR_NAMESPACE);
  getHelper().removeProperties(modelResource,CONNECTION_NAMESPACE);
  connectionProps.put(TRANSLATOR_NAMESPACE + TRANSLATOR_NAME_KEY,"String_Node_Str");
  getHelper().setProperties(modelResource,connectionProps);
}
Program: 102059
Project: 102059
Buggy source:
@Override protected void addConnectionProfileInfoToModel(ModelResource sourceModel,IConnectionProfile profile) throws ModelWorkspaceException {
  if (profile != null) {
    IConnectionInfoProvider provider=null;
    if (getInfo().isXmlLocalFileMode()) {
      provider=new XmlFileConnectionInfoProvider();
    }
 else     if (getInfo().isXmlUrlFileMode()) {
      if (IWSProfileConstants.TEIID_WS_CONNECTION_PROFILE_ID.equalsIgnoreCase(profile.getProviderId())) {
        provider=new WSConnectionInfoProvider();
      }
 else {
        provider=new XmlUrlConnectionInfoProvider();
      }
    }
    if (provider != null) {
      provider.setConnectionInfo(sourceModel,profile);
    }
  }
}

Fixed version (ground truth):
@Override protected void addConnectionProfileInfoToModel(ModelResource sourceModel,IConnectionProfile profile) throws ModelWorkspaceException {
  if (profile != null) {
    IConnectionInfoProvider provider=null;
    if (getInfo().isXmlLocalFileMode()) {
      provider=new XmlFileConnectionInfoProvider();
    }
 else     if (getInfo().isRestUrlFileMode()) {
      if (IWSProfileConstants.TEIID_WS_CONNECTION_PROFILE_ID.equalsIgnoreCase(profile.getProviderId())) {
        provider=new WSConnectionInfoProvider();
      }
 else {
        provider=new XmlUrlConnectionInfoProvider();
      }
    }
    if (provider != null) {
      provider.setConnectionInfo(sourceModel,profile);
    }
  }
}
Program: 102060
Project: 102060
Buggy source:
@Override public void setVisible(boolean visible){
  if (visible == true && endPointCombo != null) {
    UiBusyIndicator.showWhile(getControl().getDisplay(),new Runnable(){
      @Override public void run(){
        try {
          WSDLReader wsdlReader=wizard.getWsdlReader();
          wsdlModel=wsdlReader.getModel();
          if (wsdlModel != null) {
            endPointCombo.setItems(wsdlModel.getModelablePortNames());
          }
 else {
            endPointCombo.removeAll();
          }
        }
 catch (        ModelGenerationException ex) {
          setErrorMessage(ex.getLocalizedMessage());
        }
      }
    }
);
  }
  profileText.setText(wizard.getProfileName());
  descriptionText.setText(wizard.getProfileDescription());
  super.setVisible(visible);
}

Fixed version (ground truth):
@Override public void setVisible(boolean visible){
  if (visible == true && endPointCombo != null) {
    UiBusyIndicator.showWhile(getControl().getDisplay(),new Runnable(){
      @Override public void run(){
        try {
          WSDLReader wsdlReader=wizard.getWsdlReader();
          wsdlModel=wsdlReader.getModel();
          if (wsdlModel != null) {
            endPointCombo.setItems(wsdlModel.getModelablePortNames());
          }
 else {
            endPointCombo.removeAll();
          }
        }
 catch (        ModelGenerationException ex) {
          setErrorMessage(ex.getLocalizedMessage());
        }
        String endPointName=profileProperties.getProperty(IWSProfileConstants.END_POINT_NAME_PROP_ID);
        if (null != endPointName && !endPointName.isEmpty()) {
          if (endPointCombo.getItemCount() == 1) {
            endPointCombo.select(0);
          }
 else           if (endPointCombo.getItemCount() > 0) {
            String[] endPoints=endPointCombo.getItems();
            int i=0;
            for (            String next : endPoints) {
              if (next.equals(endPointName)) {
                endPointCombo.select(i);
                break;
              }
              i++;
            }
          }
        }
      }
    }
);
  }
  profileText.setText(wizard.getProfileName());
  descriptionText.setText(wizard.getProfileDescription());
  super.setVisible(visible);
}