nus-yam/ex-repair huggingface dataset:
Program: 128135
Project: 128135
Buggy source:
@Override public Item copy(Item originalItem,IPath path,boolean changeLabelWithCopyPrefix) throws PersistenceException, BusinessException {
  Resource resource;
  ProjectManager projectManage=ProjectManager.getInstance();
  if (!projectManage.getProject(originalItem).equals(projectManage.getCurrentProject().getEmfProject())) {
    originalItem.getProperty().eResource().getContents().add(originalItem);
  }
  resource=originalItem.getProperty().eResource();
  ByteArrayOutputStream out=new ByteArrayOutputStream();
  try {
    resource.save(out,null);
    Resource createResource=new ResourceSetImpl().createResource(resource.getURI());
    ByteArrayInputStream in=new ByteArrayInputStream(out.toByteArray());
    createResource.load(in,null);
    Item newItem=copyFromResource(createResource,changeLabelWithCopyPrefix);
    copyReferenceFiles(originalItem,newItem);
    create(getRepositoryContext().getProject(),newItem,path);
    copyScreenshotFile(originalItem,newItem);
    if (newItem instanceof ConnectionItem) {
      ConnectionItem connectionItem=(ConnectionItem)newItem;
      Resource itemResource=xmiResourceManager.getItemResource(connectionItem);
      if (itemResource != null && itemResource instanceof XMLResource) {
        XMLResource xmlResource=(XMLResource)itemResource;
        xmlResource.setID(connectionItem.getConnection(),EcoreUtil.generateUUID());
      }
    }
    return newItem;
  }
 catch (  IOException e) {
    ExceptionHandler.process(e);
  }
  return null;
}

Fixed version (ground truth):
public Item copy(Item originalItem,IPath path,String newItemName) throws PersistenceException, BusinessException {
  Resource resource;
  ProjectManager projectManage=ProjectManager.getInstance();
  if (!projectManage.getProject(originalItem).equals(projectManage.getCurrentProject().getEmfProject())) {
    originalItem.getProperty().eResource().getContents().add(originalItem);
  }
  resource=originalItem.getProperty().eResource();
  ByteArrayOutputStream out=new ByteArrayOutputStream();
  try {
    resource.save(out,null);
    Resource createResource=new ResourceSetImpl().createResource(resource.getURI());
    ByteArrayInputStream in=new ByteArrayInputStream(out.toByteArray());
    createResource.load(in,null);
    Item newItem=copyFromResource(createResource,newItemName);
    copyReferenceFiles(originalItem,newItem);
    create(getRepositoryContext().getProject(),newItem,path);
    copyScreenshotFile(originalItem,newItem);
    if (newItem instanceof ConnectionItem) {
      ConnectionItem connectionItem=(ConnectionItem)newItem;
      Resource itemResource=xmiResourceManager.getItemResource(connectionItem);
      if (itemResource != null && itemResource instanceof XMLResource) {
        XMLResource xmlResource=(XMLResource)itemResource;
        xmlResource.setID(connectionItem.getConnection(),EcoreUtil.generateUUID());
      }
    }
    return newItem;
  }
 catch (  IOException e) {
    ExceptionHandler.process(e);
  }
  return null;
}
Program: 128136
Project: 128136
Buggy source:
@Override protected boolean visit(IResourceDelta delta,Collection<Runnable> runnables){
  IResource resource=delta.getResource();
  IPath path=resource.getFullPath();
  Set<RepositoryNode> topLevelNodes=getTopLevelNodes();
  for (  final RepositoryNode repoNode : topLevelNodes) {
    IPath topLevelNodeWorkspaceRelativePath=topLevelNodeToPathMap.get(repoNode);
    if (topLevelNodeWorkspaceRelativePath != null) {
      int matchingFirstSegments=path.matchingFirstSegments(topLevelNodeWorkspaceRelativePath);
      if (path.segmentCount() == matchingFirstSegments || matchingFirstSegments == topLevelNodeWorkspaceRelativePath.segmentCount()) {
        if ((delta.getAffectedChildren().length == 0) && (FileConstants.PROPERTIES_EXTENSION.equals(path.getFileExtension()) || (resource instanceof IContainer))) {
          if (viewer instanceof RepoViewCommonViewer) {
            runnables.add(new Runnable(){
              @Override public void run(){
                refreshTopLevelNode(repoNode);
              }
            }
);
          }
          return false;
        }
 else {
          return true;
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override protected boolean visit(IResourceDelta delta,Collection<Runnable> runnables){
  boolean talendProChange=false;
  IResource resource=delta.getResource();
  IPath path=resource.getFullPath();
  if (path != null && path.lastSegment() != null) {
    talendProChange=FileConstants.LOCAL_PROJECT_FILENAME.equals(path.lastSegment());
  }
  Set<RepositoryNode> topLevelNodes=getTopLevelNodes();
  for (  final RepositoryNode repoNode : topLevelNodes) {
    IPath topLevelNodeWorkspaceRelativePath=topLevelNodeToPathMap.get(repoNode);
    if (topLevelNodeWorkspaceRelativePath != null) {
      int matchingFirstSegments=path.matchingFirstSegments(topLevelNodeWorkspaceRelativePath);
      if (path.segmentCount() == matchingFirstSegments || matchingFirstSegments == topLevelNodeWorkspaceRelativePath.segmentCount() || talendProChange) {
        if ((delta.getAffectedChildren().length == 0) && (FileConstants.PROPERTIES_EXTENSION.equals(path.getFileExtension()) || talendProChange || (resource instanceof IContainer))) {
          if (viewer instanceof RepoViewCommonViewer) {
            runnables.add(new Runnable(){
              @Override public void run(){
                refreshTopLevelNode(repoNode);
              }
            }
);
          }
          return false;
        }
 else {
          return true;
        }
      }
    }
  }
  return false;
}
Program: 128138
Project: 128138
Buggy source:
private Resource saveScreenshots(Item item){
  Resource itemResource=xmiResourceManager.getScreenshotResource(item,true);
  if (itemResource.getContents().isEmpty()) {
    EMap screenshots=null;
    if (item instanceof ProcessItem) {
      screenshots=((ProcessItem)item).getProcess().getScreenshots();
      itemResource.getContents().addAll(EcoreUtil.copyAll(screenshots));
    }
 else     if (item instanceof JobletProcessItem) {
      screenshots=((JobletProcessItem)item).getJobletProcess().getScreenshots();
      itemResource.getContents().addAll(screenshots);
    }
  }
  return itemResource;
}

Fixed version (ground truth):
private Resource saveScreenshots(Item item){
  Resource itemResource=xmiResourceManager.getScreenshotResource(item,true);
  EMap screenshots=null;
  if (item instanceof ProcessItem) {
    screenshots=((ProcessItem)item).getProcess().getScreenshots();
  }
 else   if (item instanceof JobletProcessItem) {
    screenshots=((JobletProcessItem)item).getJobletProcess().getScreenshots();
  }
  if (screenshots != null && !screenshots.isEmpty()) {
    itemResource.getContents().clear();
    itemResource.getContents().addAll(EcoreUtil.copyAll(screenshots));
  }
  return itemResource;
}
Program: 128139
Project: 128139
Buggy source:
/** 
 * test string value as a date (with right pattern)
 * @param stringDate (A <code>String</code> whose beginning should be parsed)
 * @param pattern (the pattern to format, like: "yyyy-MM-dd HH:mm:ss")
 * @return the result wheather the stringDate is a date string that with a right pattern{talendTypes} Boolean {Category} TalendDate {param} String(mydate) stringDate : the date to judge {param} String("yyyy-MM-dd HH:mm:ss") pattern : the specified pattern {examples} ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm:ss") return true ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm") return false ->> isDate("2008-11-32 12:15:25", "yyyy-MM-dd HH:mm:ss") return false #
 */
public static boolean isDate(String stringDate,String pattern){
  if (stringDate == null) {
    return false;
  }
  if (pattern == null) {
    pattern="String_Node_Str";
  }
  java.text.SimpleDateFormat sdf=new java.text.SimpleDateFormat(pattern);
  java.util.Date testDate=null;
  try {
    testDate=sdf.parse(stringDate);
  }
 catch (  ParseException e) {
    return false;
  }
  if (!sdf.format(testDate).equalsIgnoreCase(stringDate)) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * test string value as a date (with right pattern)
 * @param stringDate (A <code>String</code> whose beginning should be parsed)
 * @param pattern (the pattern to format, like: "yyyy-MM-dd HH:mm:ss")
 * @return the result wheather the stringDate is a date string that with a right pattern{talendTypes} Boolean {Category} TalendDate {param} String(mydate) stringDate : the date to judge {param} String("yyyy-MM-dd HH:mm:ss") pattern : the specified pattern {examples} ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm:ss") return true ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm") return false ->> isDate("2008-11-32 12:15:25", "yyyy-MM-dd HH:mm:ss") return false #
 */
public static boolean isDate(String stringDate,String pattern){
  if (stringDate == null) {
    return false;
  }
  boolean hasZone=false;
  if (pattern == null) {
    pattern="String_Node_Str";
  }
 else {
    boolean inQuote=false;
    char[] ps=pattern.toCharArray();
    for (    char p : ps) {
      if (p == '\'') {
        inQuote=!inQuote;
      }
 else       if (!inQuote && (p == 'Z' || p == 'z')) {
        hasZone=true;
        break;
      }
    }
  }
  java.util.Date testDate=null;
  if (hasZone) {
    testDate=parseDate(pattern,stringDate);
    if (!formatDate(pattern,testDate).equalsIgnoreCase(stringDate)) {
      return false;
    }
  }
 else {
    java.text.SimpleDateFormat sdf=new java.text.SimpleDateFormat(pattern);
    sdf.setTimeZone(new java.util.SimpleTimeZone(0,sdf.getTimeZone().getID()));
    try {
      testDate=sdf.parse(stringDate);
      if (!sdf.format(testDate).equalsIgnoreCase(stringDate)) {
        return false;
      }
    }
 catch (    ParseException e) {
      return false;
    }
  }
  return true;
}
Program: 128140
Project: 128140
Buggy source:
public Resource getScreenshotResource(Item item,boolean createIfNotExist){
  URI itemResourceURI=null;
  itemResourceURI=getScreenshotResourceURI(getItemURI(item));
  boolean fileExist=false;
  if (itemResourceURI.isFile()) {
    fileExist=new File(itemResourceURI.toFileString()).exists();
  }
 else {
    IPath path=URIHelper.convert(itemResourceURI);
    if (path != null) {
      IFile file=ResourcesPlugin.getWorkspace().getRoot().getFile(path);
      if (file.exists()) {
        fileExist=true;
      }
    }
 else {
      fileExist=false;
    }
  }
  Resource itemResource=null;
  if (fileExist) {
    try {
      itemResource=resourceSet.getResource(itemResourceURI,true);
    }
 catch (    Exception e) {
      itemResource=null;
    }
  }
  if (itemResource == null && createIfNotExist) {
    itemResource=resourceSet.createResource(itemResourceURI);
  }
  return itemResource;
}

Fixed version (ground truth):
public Resource getScreenshotResource(Item item,boolean createIfNotExist){
  URI itemResourceURI=null;
  itemResourceURI=getScreenshotResourceURI(getItemURI(item));
  boolean fileExist=false;
  if (itemResourceURI.isFile()) {
    fileExist=new File(itemResourceURI.toFileString()).exists();
  }
 else {
    IPath path=URIHelper.convert(itemResourceURI);
    if (path != null) {
      IFile file=ResourcesPlugin.getWorkspace().getRoot().getFile(path);
      if (file.exists()) {
        fileExist=true;
      }
    }
 else {
      fileExist=false;
    }
  }
  Resource itemResource=null;
  if (fileExist) {
    List<Resource> resources=new ArrayList<Resource>(resourceSet.getResources());
    for (    Resource res : resources) {
      if (res != null) {
        if (itemResourceURI.toString().equals(res.getURI().toString())) {
          res.unload();
          resourceSet.getResources().remove(res);
          break;
        }
      }
    }
    try {
      itemResource=resourceSet.getResource(itemResourceURI,true);
    }
 catch (    Exception e) {
      itemResource=null;
    }
  }
  if (itemResource == null && createIfNotExist) {
    itemResource=resourceSet.createResource(itemResourceURI);
  }
  return itemResource;
}
Program: 128141
Project: 128141
Buggy source:
@Override public void done(IJobChangeEvent event){
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      String message="String_Node_Str";
      if (!job.installedModules.isEmpty()) {
        message=Messages.getString("String_Node_Str",data.getName());
      }
 else {
        message=Messages.getString("String_Node_Str",data.getName());
        ;
      }
      MessageDialog.openInformation(getShell(),Messages.getString("String_Node_Str"),message);
    }
  }
);
}

Fixed version (ground truth):
@Override public void done(IJobChangeEvent event){
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      String message="String_Node_Str";
      if (!job.installedModules.isEmpty()) {
        message=Messages.getString("String_Node_Str",data.getName());
        emptyLibs();
      }
 else {
        message=Messages.getString("String_Node_Str",data.getName());
        ;
      }
      MessageDialog.openInformation(getShell(),Messages.getString("String_Node_Str"),message);
    }
  }
);
}
Program: 128145
Project: 128145
Buggy source:
private Resource saveScreenshots(Item item){
  Resource itemResource=xmiResourceManager.getScreenshotResource(item,true);
  if (itemResource.getContents().isEmpty()) {
    EMap screenshots=null;
    if (item instanceof ProcessItem) {
      screenshots=((ProcessItem)item).getProcess().getScreenshots();
      itemResource.getContents().addAll(EcoreUtil.copyAll(screenshots));
    }
 else     if (item instanceof JobletProcessItem) {
      screenshots=((JobletProcessItem)item).getJobletProcess().getScreenshots();
      itemResource.getContents().addAll(screenshots);
    }
  }
  return itemResource;
}

Fixed version (ground truth):
private Resource saveScreenshots(Item item){
  Resource itemResource=xmiResourceManager.getScreenshotResource(item,true);
  EMap screenshots=null;
  if (item instanceof ProcessItem) {
    screenshots=((ProcessItem)item).getProcess().getScreenshots();
  }
 else   if (item instanceof JobletProcessItem) {
    screenshots=((JobletProcessItem)item).getJobletProcess().getScreenshots();
  }
  if (screenshots != null && !screenshots.isEmpty()) {
    itemResource.getContents().clear();
    itemResource.getContents().addAll(EcoreUtil.copyAll(screenshots));
  }
  return itemResource;
}
Program: 128147
Project: 128147
Buggy source:
private Resource saveScreenshots(Item item){
  Resource itemResource=xmiResourceManager.getScreenshotResource(item,true);
  if (itemResource.getContents().isEmpty()) {
    EMap screenshots=null;
    if (item instanceof ProcessItem) {
      screenshots=((ProcessItem)item).getProcess().getScreenshots();
      itemResource.getContents().addAll(EcoreUtil.copyAll(screenshots));
    }
 else     if (item instanceof JobletProcessItem) {
      screenshots=((JobletProcessItem)item).getJobletProcess().getScreenshots();
      itemResource.getContents().addAll(screenshots);
    }
  }
  return itemResource;
}

Fixed version (ground truth):
private Resource saveScreenshots(Item item){
  Resource itemResource=xmiResourceManager.getScreenshotResource(item,true);
  EMap screenshots=null;
  if (item instanceof ProcessItem) {
    screenshots=((ProcessItem)item).getProcess().getScreenshots();
  }
 else   if (item instanceof JobletProcessItem) {
    screenshots=((JobletProcessItem)item).getJobletProcess().getScreenshots();
  }
  if (screenshots != null && !screenshots.isEmpty()) {
    itemResource.getContents().clear();
    itemResource.getContents().addAll(EcoreUtil.copyAll(screenshots));
  }
  return itemResource;
}
Program: 128148
Project: 128148
Buggy source:
/** 
 * test string value as a date (with right pattern)
 * @param stringDate (A <code>String</code> whose beginning should be parsed)
 * @param pattern (the pattern to format, like: "yyyy-MM-dd HH:mm:ss")
 * @return the result wheather the stringDate is a date string that with a right pattern{talendTypes} Boolean {Category} TalendDate {param} String(mydate) stringDate : the date to judge {param} String("yyyy-MM-dd HH:mm:ss") pattern : the specified pattern {examples} ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm:ss") return true ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm") return false ->> isDate("2008-11-32 12:15:25", "yyyy-MM-dd HH:mm:ss") return false #
 */
public static boolean isDate(String stringDate,String pattern){
  if (stringDate == null) {
    return false;
  }
  if (pattern == null) {
    pattern="String_Node_Str";
  }
  java.text.SimpleDateFormat sdf=new java.text.SimpleDateFormat(pattern);
  java.util.Date testDate=null;
  try {
    testDate=sdf.parse(stringDate);
  }
 catch (  ParseException e) {
    return false;
  }
  if (!sdf.format(testDate).equalsIgnoreCase(stringDate)) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * test string value as a date (with right pattern)
 * @param stringDate (A <code>String</code> whose beginning should be parsed)
 * @param pattern (the pattern to format, like: "yyyy-MM-dd HH:mm:ss")
 * @return the result wheather the stringDate is a date string that with a right pattern{talendTypes} Boolean {Category} TalendDate {param} String(mydate) stringDate : the date to judge {param} String("yyyy-MM-dd HH:mm:ss") pattern : the specified pattern {examples} ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm:ss") return true ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm") return false ->> isDate("2008-11-32 12:15:25", "yyyy-MM-dd HH:mm:ss") return false #
 */
public static boolean isDate(String stringDate,String pattern){
  if (stringDate == null) {
    return false;
  }
  boolean hasZone=false;
  if (pattern == null) {
    pattern="String_Node_Str";
  }
 else {
    boolean inQuote=false;
    char[] ps=pattern.toCharArray();
    for (    char p : ps) {
      if (p == '\'') {
        inQuote=!inQuote;
      }
 else       if (!inQuote && (p == 'Z' || p == 'z')) {
        hasZone=true;
        break;
      }
    }
  }
  java.util.Date testDate=null;
  if (hasZone) {
    testDate=parseDate(pattern,stringDate);
    if (!formatDate(pattern,testDate).equalsIgnoreCase(stringDate)) {
      return false;
    }
  }
 else {
    java.text.SimpleDateFormat sdf=new java.text.SimpleDateFormat(pattern);
    sdf.setTimeZone(new java.util.SimpleTimeZone(0,sdf.getTimeZone().getID()));
    try {
      testDate=sdf.parse(stringDate);
      if (!sdf.format(testDate).equalsIgnoreCase(stringDate)) {
        return false;
      }
    }
 catch (    ParseException e) {
      return false;
    }
  }
  return true;
}
Program: 128149
Project: 128149
Buggy source:
@Override public void done(IJobChangeEvent event){
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      String message="String_Node_Str";
      if (!job.installedModules.isEmpty()) {
        message=Messages.getString("String_Node_Str",data.getName());
      }
 else {
        message=Messages.getString("String_Node_Str",data.getName());
        ;
      }
      MessageDialog.openInformation(getShell(),Messages.getString("String_Node_Str"),message);
    }
  }
);
}

Fixed version (ground truth):
@Override public void done(IJobChangeEvent event){
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      String message="String_Node_Str";
      if (!job.installedModules.isEmpty()) {
        message=Messages.getString("String_Node_Str",data.getName());
        emptyLibs();
      }
 else {
        message=Messages.getString("String_Node_Str",data.getName());
        ;
      }
      MessageDialog.openInformation(getShell(),Messages.getString("String_Node_Str"),message);
    }
  }
);
}
Program: 128153
Project: 128153
Buggy source:
/** 
 * test string value as a date (with right pattern)
 * @param stringDate (A <code>String</code> whose beginning should be parsed)
 * @param pattern (the pattern to format, like: "yyyy-MM-dd HH:mm:ss")
 * @return the result wheather the stringDate is a date string that with a right pattern{talendTypes} Boolean {Category} TalendDate {param} String(mydate) stringDate : the date to judge {param} String("yyyy-MM-dd HH:mm:ss") pattern : the specified pattern {examples} ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm:ss") return true ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm") return false ->> isDate("2008-11-32 12:15:25", "yyyy-MM-dd HH:mm:ss") return false #
 */
public static boolean isDate(String stringDate,String pattern){
  if (stringDate == null) {
    return false;
  }
  if (pattern == null) {
    pattern="String_Node_Str";
  }
  java.text.SimpleDateFormat sdf=new java.text.SimpleDateFormat(pattern);
  java.util.Date testDate=null;
  try {
    testDate=sdf.parse(stringDate);
  }
 catch (  ParseException e) {
    return false;
  }
  if (!sdf.format(testDate).equalsIgnoreCase(stringDate)) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * test string value as a date (with right pattern)
 * @param stringDate (A <code>String</code> whose beginning should be parsed)
 * @param pattern (the pattern to format, like: "yyyy-MM-dd HH:mm:ss")
 * @return the result wheather the stringDate is a date string that with a right pattern{talendTypes} Boolean {Category} TalendDate {param} String(mydate) stringDate : the date to judge {param} String("yyyy-MM-dd HH:mm:ss") pattern : the specified pattern {examples} ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm:ss") return true ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm") return false ->> isDate("2008-11-32 12:15:25", "yyyy-MM-dd HH:mm:ss") return false #
 */
public static boolean isDate(String stringDate,String pattern){
  if (stringDate == null) {
    return false;
  }
  boolean hasZone=false;
  if (pattern == null) {
    pattern="String_Node_Str";
  }
 else {
    boolean inQuote=false;
    char[] ps=pattern.toCharArray();
    for (    char p : ps) {
      if (p == '\'') {
        inQuote=!inQuote;
      }
 else       if (!inQuote && (p == 'Z' || p == 'z')) {
        hasZone=true;
        break;
      }
    }
  }
  java.util.Date testDate=null;
  if (hasZone) {
    testDate=parseDate(pattern,stringDate);
    if (!formatDate(pattern,testDate).equalsIgnoreCase(stringDate)) {
      return false;
    }
  }
 else {
    java.text.SimpleDateFormat sdf=new java.text.SimpleDateFormat(pattern);
    sdf.setTimeZone(new java.util.SimpleTimeZone(0,sdf.getTimeZone().getID()));
    try {
      testDate=sdf.parse(stringDate);
      if (!sdf.format(testDate).equalsIgnoreCase(stringDate)) {
        return false;
      }
    }
 catch (    ParseException e) {
      return false;
    }
  }
  return true;
}
Program: 128155
Project: 128155
Buggy source:
private void emptyLibs(){
  File libsDir=org.eclipse.core.runtime.Platform.getLocation().append(JavaUtils.JAVA_PROJECT_NAME).append("String_Node_Str").toFile();
  if (libsDir.exists() && libsDir.isDirectory()) {
    FilesUtils.emptyFolder(libsDir);
  }
}

Fixed version (ground truth):
private void emptyLibs(){
  File libsDir=org.eclipse.core.runtime.Platform.getLocation().append(JavaUtils.JAVA_PROJECT_NAME).append(File.separator).append(JavaUtils.JAVA_LIB_DIRECTORY).toFile();
  if (libsDir.exists() && libsDir.isDirectory()) {
    FilesUtils.emptyFolder(libsDir);
  }
}
Program: 128156
Project: 128156
Buggy source:
public void run(){
  for (int i=0; i < fileNames.length; i++) {
    final File file=new File(path + File.separatorChar + fileNames[i]);
    try {
      CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  for (  String fileName : fileNames) {
    final File file=new File(path + File.separatorChar + fileName);
    try {
      CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());
      emptyLibs();
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
}
Program: 128157
Project: 128157
Buggy source:
public void setElement(IElement element){
  if (element instanceof INode) {
    jobInfo=new BasicJobInfo(((INode)element).getProcess().getId(),null,((INode)element).getProcess().getVersion());
    jobInfo.setJobName(((INode)element).getProcess().getName());
    type=ProblemType.JOB;
    nodeName=((INode)element).getUniqueName();
    componentName=((INode)element).getComponent().getName();
  }
}

Fixed version (ground truth):
public void setElement(IElement element){
  if (element instanceof INode) {
    jobInfo=new BasicJobInfo(((INode)element).getProcess().getId(),null,((INode)element).getProcess().getVersion());
    jobInfo.setJobName(((INode)element).getProcess().getName());
    type=ProblemType.JOB;
    nodeName=((INode)element).getUniqueName();
    componentName=((INode)element).getComponent().getName();
  }
 else   if (element instanceof IProcess) {
    jobInfo=new BasicJobInfo(((IProcess)element).getId(),null,((IProcess)element).getVersion());
    jobInfo.setJobName(((IProcess)element).getName());
    type=ProblemType.JOB;
  }
}
Program: 128158
Project: 128158
Buggy source:
private void emptyLibs(){
  File libsDir=org.eclipse.core.runtime.Platform.getLocation().append("String_Node_Str").toFile();
  if (libsDir.exists() && libsDir.isDirectory()) {
    FilesUtils.emptyFolder(libsDir);
  }
}

Fixed version (ground truth):
private void emptyLibs(){
  File libsDir=org.eclipse.core.runtime.Platform.getLocation().append(JavaUtils.JAVA_PROJECT_NAME).append("String_Node_Str").toFile();
  if (libsDir.exists() && libsDir.isDirectory()) {
    FilesUtils.emptyFolder(libsDir);
  }
}
Program: 128159
Project: 128159
Buggy source:
/** 
 * test string value as a date (with right pattern)
 * @param stringDate (A <code>String</code> whose beginning should be parsed)
 * @param pattern (the pattern to format, like: "yyyy-MM-dd HH:mm:ss")
 * @return the result wheather the stringDate is a date string that with a right pattern{talendTypes} Boolean {Category} TalendDate {param} String(mydate) stringDate : the date to judge {param} String("yyyy-MM-dd HH:mm:ss") pattern : the specified pattern {examples} ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm:ss") return true ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm") return false ->> isDate("2008-11-32 12:15:25", "yyyy-MM-dd HH:mm:ss") return false #
 */
public static boolean isDate(String stringDate,String pattern){
  if (stringDate == null) {
    return false;
  }
  if (pattern == null) {
    pattern="String_Node_Str";
  }
  java.text.SimpleDateFormat sdf=new java.text.SimpleDateFormat(pattern);
  java.util.Date testDate=null;
  try {
    testDate=sdf.parse(stringDate);
  }
 catch (  ParseException e) {
    return false;
  }
  if (!sdf.format(testDate).equalsIgnoreCase(stringDate)) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * test string value as a date (with right pattern)
 * @param stringDate (A <code>String</code> whose beginning should be parsed)
 * @param pattern (the pattern to format, like: "yyyy-MM-dd HH:mm:ss")
 * @return the result wheather the stringDate is a date string that with a right pattern{talendTypes} Boolean {Category} TalendDate {param} String(mydate) stringDate : the date to judge {param} String("yyyy-MM-dd HH:mm:ss") pattern : the specified pattern {examples} ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm:ss") return true ->> isDate("2008-11-24 12:15:25", "yyyy-MM-dd HH:mm") return false ->> isDate("2008-11-32 12:15:25", "yyyy-MM-dd HH:mm:ss") return false #
 */
public static boolean isDate(String stringDate,String pattern){
  if (stringDate == null) {
    return false;
  }
  boolean hasZone=false;
  if (pattern == null) {
    pattern="String_Node_Str";
  }
 else {
    boolean inQuote=false;
    char[] ps=pattern.toCharArray();
    for (    char p : ps) {
      if (p == '\'') {
        inQuote=!inQuote;
      }
 else       if (!inQuote && (p == 'Z' || p == 'z')) {
        hasZone=true;
        break;
      }
    }
  }
  java.util.Date testDate=null;
  if (hasZone) {
    testDate=parseDate(pattern,stringDate);
    if (!formatDate(pattern,testDate).equalsIgnoreCase(stringDate)) {
      return false;
    }
  }
 else {
    java.text.SimpleDateFormat sdf=new java.text.SimpleDateFormat(pattern);
    sdf.setTimeZone(new java.util.SimpleTimeZone(0,sdf.getTimeZone().getID()));
    try {
      testDate=sdf.parse(stringDate);
      if (!sdf.format(testDate).equalsIgnoreCase(stringDate)) {
        return false;
      }
    }
 catch (    ParseException e) {
      return false;
    }
  }
  return true;
}
Program: 128160
Project: 128160
Buggy source:
public void run(){
  if (PlatformUI.isWorkbenchRunning()) {
    IEditorReference[] reference=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
    list.addAll(Arrays.asList(reference));
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (PlatformUI.isWorkbenchRunning()) {
    IEditorReference[] reference=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
    list.addAll(Arrays.asList(reference));
  }
}
Program: 128161
Project: 128161
Buggy source:
public static IEditorReference[] getEditors(){
  final List<IEditorReference> list=new ArrayList<IEditorReference>();
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      if (PlatformUI.isWorkbenchRunning()) {
        IEditorReference[] reference=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
        list.addAll(Arrays.asList(reference));
      }
    }
  }
);
  return list.toArray(new IEditorReference[0]);
}

Fixed version (ground truth):
public static IEditorReference[] getEditors(){
  final List<IEditorReference> list=new ArrayList<IEditorReference>();
  Display.getDefault().syncExec(new Runnable(){
    @Override public void run(){
      if (PlatformUI.isWorkbenchRunning()) {
        IEditorReference[] reference=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
        list.addAll(Arrays.asList(reference));
      }
    }
  }
);
  return list.toArray(new IEditorReference[0]);
}
Program: 128162
Project: 128162
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  final Problem other=(Problem)obj;
  if (this.description == null) {
    if (other.description != null)     return false;
  }
 else   if (!this.description.equals(other.description))   return false;
  if (this.jobInfo == null) {
    if (other.jobInfo != null)     return false;
  }
 else   if (!this.jobInfo.equals(other.jobInfo))   return false;
  if (this.nodeName == null) {
    if (other.nodeName != null)     return false;
  }
 else   if (!this.nodeName.equals(other.nodeName))   return false;
  if (this.componentName == null) {
    if (other.componentName != null)     return false;
  }
 else   if (!this.componentName.equals(other.componentName))   return false;
  if (this.status == null) {
    if (other.status != null)     return false;
  }
 else   if (!this.status.equals(other.status))   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null) {
    return false;
  }
  if (getClass() != obj.getClass()) {
    return false;
  }
  final Problem other=(Problem)obj;
  if (this.description == null) {
    if (other.description != null) {
      return false;
    }
  }
 else   if (!this.description.equals(other.description)) {
    return false;
  }
  if (this.jobInfo == null) {
    if (other.jobInfo != null) {
      return false;
    }
  }
 else   if (!this.jobInfo.equals(other.jobInfo)) {
    return false;
  }
  if (this.nodeName == null) {
    if (other.nodeName != null) {
      return false;
    }
  }
 else   if (!this.nodeName.equals(other.nodeName)) {
    return false;
  }
  if (this.componentName == null) {
    if (other.componentName != null) {
      return false;
    }
  }
 else   if (!this.componentName.equals(other.componentName)) {
    return false;
  }
  if (this.status == null) {
    if (other.status != null) {
      return false;
    }
  }
 else   if (!this.status.equals(other.status)) {
    return false;
  }
  return true;
}
Program: 128163
Project: 128163
Buggy source:
public void setElement(IElement element){
  if (element instanceof INode) {
    jobInfo=new BasicJobInfo(((INode)element).getProcess().getId(),null,((INode)element).getProcess().getVersion());
    jobInfo.setJobName(((INode)element).getProcess().getName());
    type=ProblemType.JOB;
    nodeName=((INode)element).getUniqueName();
    componentName=((INode)element).getComponent().getName();
  }
}

Fixed version (ground truth):
public void setElement(IElement element){
  if (element instanceof INode) {
    jobInfo=new BasicJobInfo(((INode)element).getProcess().getId(),null,((INode)element).getProcess().getVersion());
    jobInfo.setJobName(((INode)element).getProcess().getName());
    type=ProblemType.JOB;
    nodeName=((INode)element).getUniqueName();
    componentName=((INode)element).getComponent().getName();
  }
 else   if (element instanceof IProcess) {
    jobInfo=new BasicJobInfo(((IProcess)element).getId(),null,((IProcess)element).getVersion());
    jobInfo.setJobName(((IProcess)element).getName());
    type=ProblemType.JOB;
  }
}
Program: 128164
Project: 128164
Buggy source:
public void run(){
  for (int i=0; i < fileNames.length; i++) {
    final File file=new File(path + File.separatorChar + fileNames[i]);
    try {
      CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
}

Fixed version (ground truth):
public void run(){
  for (int i=0; i < fileNames.length; i++) {
    final File file=new File(path + File.separatorChar + fileNames[i]);
    try {
      CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());
      emptyLibs();
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
}
Program: 128166
Project: 128166
Buggy source:
private void emptyLibs(){
  File libsDir=org.eclipse.core.runtime.Platform.getLocation().append("String_Node_Str").toFile();
  if (libsDir.exists() && libsDir.isDirectory()) {
    FilesUtils.emptyFolder(libsDir);
  }
}

Fixed version (ground truth):
private void emptyLibs(){
  File libsDir=org.eclipse.core.runtime.Platform.getLocation().append(JavaUtils.JAVA_PROJECT_NAME).append("String_Node_Str").toFile();
  if (libsDir.exists() && libsDir.isDirectory()) {
    FilesUtils.emptyFolder(libsDir);
  }
}
Program: 128167
Project: 128167
Buggy source:
private void emptyLibs(){
  File libsDir=org.eclipse.core.runtime.Platform.getLocation().append("String_Node_Str").toFile();
  if (libsDir.exists() && libsDir.isDirectory()) {
    FilesUtils.emptyFolder(libsDir);
  }
}

Fixed version (ground truth):
private void emptyLibs(){
  File libsDir=org.eclipse.core.runtime.Platform.getLocation().append(JavaUtils.JAVA_PROJECT_NAME).append("String_Node_Str").toFile();
  if (libsDir.exists() && libsDir.isDirectory()) {
    FilesUtils.emptyFolder(libsDir);
  }
}
Program: 128169
Project: 128169
Buggy source:
public void setElement(IElement element){
  if (element instanceof INode) {
    jobInfo=new BasicJobInfo(((INode)element).getProcess().getId(),null,((INode)element).getProcess().getVersion());
    jobInfo.setJobName(((INode)element).getProcess().getName());
    type=ProblemType.JOB;
    nodeName=((INode)element).getUniqueName();
    componentName=((INode)element).getComponent().getName();
  }
}

Fixed version (ground truth):
public void setElement(IElement element){
  if (element instanceof INode) {
    jobInfo=new BasicJobInfo(((INode)element).getProcess().getId(),null,((INode)element).getProcess().getVersion());
    jobInfo.setJobName(((INode)element).getProcess().getName());
    type=ProblemType.JOB;
    nodeName=((INode)element).getUniqueName();
    componentName=((INode)element).getComponent().getName();
  }
 else   if (element instanceof IProcess) {
    jobInfo=new BasicJobInfo(((IProcess)element).getId(),null,((IProcess)element).getVersion());
    jobInfo.setJobName(((IProcess)element).getName());
    type=ProblemType.JOB;
  }
}
Program: 128170
Project: 128170
Buggy source:
public void run(){
  for (int i=0; i < fileNames.length; i++) {
    final File file=new File(path + File.separatorChar + fileNames[i]);
    try {
      CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
}

Fixed version (ground truth):
public void run(){
  for (int i=0; i < fileNames.length; i++) {
    final File file=new File(path + File.separatorChar + fileNames[i]);
    try {
      CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());
      emptyLibs();
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
}
Program: 128172
Project: 128172
Buggy source:
/** 
 * DOC amaumont Comment method "init".
 * @param image
 * @param tooltip
 * @param parent2
 */
private void init(Composite parent,String tooltip,Image image){
  button=new Button(parent,SWT.PUSH);
  button.setToolTipText(tooltip);
  button.setImage(image);
  button.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event event){
      handleSelectionEvent(event);
    }
  }
);
  if (extendedControlViewer.getExtendedControlModel() == null) {
    button.setEnabled(false);
  }
  this.extendedControlViewer.addListener(new IExtendedControlListener(){
    public void handleEvent(    ExtendedControlEvent event){
      if (event.getType() == AbstractExtendedControlViewer.EVENT_TYPE.MODEL_CHANGED) {
        button.setEnabled(getEnabledState());
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "init".
 * @param image
 * @param tooltip
 * @param parent2
 */
private void init(Composite parent,String tooltip,Image image){
  button=new Button(parent,SWT.PUSH);
  button.setToolTipText(tooltip);
  button.setImage(image);
  button.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event event){
      handleSelectionEvent(event);
    }
  }
);
  if (extendedControlViewer.getExtendedControlModel() == null) {
    button.setEnabled(false);
  }
  this.extendedControlViewer.addListener(new IExtendedControlListener(){
    public void handleEvent(    ExtendedControlEvent event){
      if (event.getType() == AbstractExtendedControlViewer.EVENT_TYPE.MODEL_CHANGED) {
        handleModelChange();
      }
    }
  }
);
}
Program: 128173
Project: 128173
Buggy source:
public void handleEvent(ExtendedControlEvent event){
  if (event.getType() == AbstractExtendedControlViewer.EVENT_TYPE.MODEL_CHANGED) {
    button.setEnabled(getEnabledState());
  }
}

Fixed version (ground truth):
public void handleEvent(ExtendedControlEvent event){
  if (event.getType() == AbstractExtendedControlViewer.EVENT_TYPE.MODEL_CHANGED) {
    handleModelChange();
  }
}
Program: 128174
Project: 128174
Buggy source:
private void emptyLibs(){
  File libsDir=org.eclipse.core.runtime.Platform.getLocation().append(JavaUtils.JAVA_PROJECT_NAME).append("String_Node_Str").toFile();
  if (libsDir.exists() && libsDir.isDirectory()) {
    FilesUtils.emptyFolder(libsDir);
  }
}

Fixed version (ground truth):
private void emptyLibs(){
  File libsDir=org.eclipse.core.runtime.Platform.getLocation().append(JavaUtils.JAVA_PROJECT_NAME).append(File.separator).append(JavaUtils.JAVA_LIB_DIRECTORY).toFile();
  if (libsDir.exists() && libsDir.isDirectory()) {
    FilesUtils.emptyFolder(libsDir);
  }
}
Program: 128175
Project: 128175
Buggy source:
private void emptyLibs(){
  File libsDir=org.eclipse.core.runtime.Platform.getLocation().append(JavaUtils.JAVA_PROJECT_NAME).append("String_Node_Str").toFile();
  if (libsDir.exists() && libsDir.isDirectory()) {
    FilesUtils.emptyFolder(libsDir);
  }
}

Fixed version (ground truth):
private void emptyLibs(){
  File libsDir=org.eclipse.core.runtime.Platform.getLocation().append(JavaUtils.JAVA_PROJECT_NAME).append(File.separator).append(JavaUtils.JAVA_LIB_DIRECTORY).toFile();
  if (libsDir.exists() && libsDir.isDirectory()) {
    FilesUtils.emptyFolder(libsDir);
  }
}
Program: 128180
Project: 128180
Buggy source:
/** 
 * DOC amaumont Comment method "init".
 * @param image
 * @param tooltip
 * @param parent2
 */
private void init(Composite parent,String tooltip,Image image){
  button=new Button(parent,SWT.PUSH);
  button.setToolTipText(tooltip);
  button.setImage(image);
  button.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event event){
      handleSelectionEvent(event);
    }
  }
);
  if (extendedControlViewer.getExtendedControlModel() == null) {
    button.setEnabled(false);
  }
  this.extendedControlViewer.addListener(new IExtendedControlListener(){
    public void handleEvent(    ExtendedControlEvent event){
      if (event.getType() == AbstractExtendedControlViewer.EVENT_TYPE.MODEL_CHANGED) {
        button.setEnabled(getEnabledState());
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "init".
 * @param image
 * @param tooltip
 * @param parent2
 */
private void init(Composite parent,String tooltip,Image image){
  button=new Button(parent,SWT.PUSH);
  button.setToolTipText(tooltip);
  button.setImage(image);
  button.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event event){
      handleSelectionEvent(event);
    }
  }
);
  if (extendedControlViewer.getExtendedControlModel() == null) {
    button.setEnabled(false);
  }
  this.extendedControlViewer.addListener(new IExtendedControlListener(){
    public void handleEvent(    ExtendedControlEvent event){
      if (event.getType() == AbstractExtendedControlViewer.EVENT_TYPE.MODEL_CHANGED) {
        handleModelChange();
      }
    }
  }
);
}
Program: 128181
Project: 128181
Buggy source:
public void handleEvent(ExtendedControlEvent event){
  if (event.getType() == AbstractExtendedControlViewer.EVENT_TYPE.MODEL_CHANGED) {
    button.setEnabled(getEnabledState());
  }
}

Fixed version (ground truth):
public void handleEvent(ExtendedControlEvent event){
  if (event.getType() == AbstractExtendedControlViewer.EVENT_TYPE.MODEL_CHANGED) {
    handleModelChange();
  }
}
Program: 128183
Project: 128183
Buggy source:
/** 
 * We will accept the selection in the workbench to see if we can initialize from it.
 * @see IWorkbenchWizard#init(IWorkbench,IStructuredSelection)
 */
public void init(final IWorkbench workbench,final IStructuredSelection selection){
  this.selection=selection;
}

Fixed version (ground truth):
/** 
 * We will accept the selection in the workbench to see if we can initialize from it.
 * @see IWorkbenchWizard#init(IWorkbench,IStructuredSelection)
 */
@Override public void init(final IWorkbench workbench,final IStructuredSelection selection){
  this.selection=selection;
}
Program: 128184
Project: 128184
Buggy source:
/** 
 * Adding the page to the wizard.
 */
public void addPages(){
  setWindowTitle(Messages.getString("String_Node_Str"));
  tableWizardpage=new FileTableWizardPage(connectionItem,metadataTable,isRepositoryObjectEditable());
  if (creation) {
    tableWizardpage.setTitle(Messages.getString("String_Node_Str",connectionItem.getProperty().getLabel()));
    tableWizardpage.setDescription(Messages.getString("String_Node_Str"));
    tableWizardpage.setPageComplete(false);
  }
 else {
    tableWizardpage.setTitle(Messages.getString("String_Node_Str",metadataTable.getLabel()));
    tableWizardpage.setDescription(Messages.getString("String_Node_Str"));
    tableWizardpage.setPageComplete(isRepositoryObjectEditable());
  }
  addPage(tableWizardpage);
}

Fixed version (ground truth):
/** 
 * Adding the page to the wizard.
 */
@Override public void addPages(){
  setWindowTitle(Messages.getString("String_Node_Str"));
  tableWizardpage=new FileTableWizardPage(connectionItem,metadataTable,isRepositoryObjectEditable());
  if (creation) {
    tableWizardpage.setTitle(Messages.getString("String_Node_Str",connectionItem.getProperty().getLabel()));
    tableWizardpage.setDescription(Messages.getString("String_Node_Str"));
    tableWizardpage.setPageComplete(false);
  }
 else {
    tableWizardpage.setTitle(Messages.getString("String_Node_Str",metadataTable.getLabel()));
    tableWizardpage.setDescription(Messages.getString("String_Node_Str"));
    tableWizardpage.setPageComplete(isRepositoryObjectEditable());
  }
  addPage(tableWizardpage);
}
Program: 128185
Project: 128185
Buggy source:
/** 
 * This method determine if the 'Finish' button is enable This method is called when 'Finish' button is pressed in the wizard. We will create an operation and run it using wizard as execution context.
 */
public boolean performFinish(){
  if (tableWizardpage.isPageComplete()) {
    RepositoryUpdateManager.updateSingleSchema(connectionItem,metadataTable,oldMetadataTable,oldTableMap);
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    try {
      factory.save(repositoryObject.getProperty().getItem());
      closeLockStrategy();
    }
 catch (    PersistenceException e) {
      String detailError=e.toString();
      new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),detailError);
      log.error(Messages.getString("String_Node_Str") + "String_Node_Str" + detailError);
    }
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * This method determine if the 'Finish' button is enable This method is called when 'Finish' button is pressed in the wizard. We will create an operation and run it using wizard as execution context.
 */
@Override public boolean performFinish(){
  if (tableWizardpage.isPageComplete()) {
    RepositoryUpdateManager.updateSingleSchema(connectionItem,metadataTable,oldMetadataTable,oldTableMap);
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    try {
      factory.save(repositoryObject.getProperty().getItem());
      closeLockStrategy();
    }
 catch (    PersistenceException e) {
      String detailError=e.toString();
      new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),detailError);
      log.error(Messages.getString("String_Node_Str") + "String_Node_Str" + detailError);
    }
    return true;
  }
 else {
    return false;
  }
}
Program: 128186
Project: 128186
Buggy source:
/** 
 * We will accept the selection in the workbench to see if we can initialize from it.
 * @see IWorkbenchWizard#init(IWorkbench,IStructuredSelection)
 */
public void init(final IWorkbench workbench,final IStructuredSelection selection){
  this.selection=selection;
}

Fixed version (ground truth):
/** 
 * We will accept the selection in the workbench to see if we can initialize from it.
 * @see IWorkbenchWizard#init(IWorkbench,IStructuredSelection)
 */
@Override public void init(final IWorkbench workbench,final IStructuredSelection selection){
  this.selection=selection;
}
Program: 128187
Project: 128187
Buggy source:
/** 
 * Adding the page to the wizard.
 */
public void addPages(){
  setWindowTitle(Messages.getString("String_Node_Str"));
  tableWizardpage=new FileTableWizardPage(connectionItem,metadataTable,isRepositoryObjectEditable());
  if (creation) {
    tableWizardpage.setTitle(Messages.getString("String_Node_Str",connectionItem.getProperty().getLabel()));
    tableWizardpage.setDescription(Messages.getString("String_Node_Str"));
    tableWizardpage.setPageComplete(false);
  }
 else {
    tableWizardpage.setTitle(Messages.getString("String_Node_Str",metadataTable.getLabel()));
    tableWizardpage.setDescription(Messages.getString("String_Node_Str"));
    tableWizardpage.setPageComplete(isRepositoryObjectEditable());
  }
  addPage(tableWizardpage);
}

Fixed version (ground truth):
/** 
 * Adding the page to the wizard.
 */
@Override public void addPages(){
  setWindowTitle(Messages.getString("String_Node_Str"));
  tableWizardpage=new FileTableWizardPage(connectionItem,metadataTable,isRepositoryObjectEditable());
  if (creation) {
    tableWizardpage.setTitle(Messages.getString("String_Node_Str",connectionItem.getProperty().getLabel()));
    tableWizardpage.setDescription(Messages.getString("String_Node_Str"));
    tableWizardpage.setPageComplete(false);
  }
 else {
    tableWizardpage.setTitle(Messages.getString("String_Node_Str",metadataTable.getLabel()));
    tableWizardpage.setDescription(Messages.getString("String_Node_Str"));
    tableWizardpage.setPageComplete(isRepositoryObjectEditable());
  }
  addPage(tableWizardpage);
}