Program: 140523
Project: 140523
Buggy source:
@Override public boolean performFinish(){
  Set<String> names=getAllPatternNames();
  String xlsFile=page.getXLSFile();
  boolean skip=page.getSkip();
  boolean rename=page.getRename();
  try {
    File file=new File(xlsFile);
    WorkbookSettings settings=new WorkbookSettings();
    settings.setEncoding("String_Node_Str");
    Workbook rwb=Workbook.getWorkbook(file,settings);
    Sheet[] sheets=rwb.getSheets();
    for (    Sheet sheet : sheets) {
      int rows=sheet.getRows();
      for (int i=1; i < rows; i++) {
        Cell[] row=sheet.getRow(i);
        Cell cell=row[0];
        if (CellType.LABEL.equals(cell.getType())) {
          String contents=cell.getContents();
          if (names.contains(contents)) {
            if (skip) {
              continue;
            }
            if (rename) {
              contents=contents + "String_Node_Str" + new Date()+ "String_Node_Str";
            }
          }
          Pattern pattern=PatternResourceFileHelper.getInstance().createPattern(contents,row[6].getContents(),row[2].getContents(),row[1].getContents(),DevelopmentStatus.DRAFT.getLiteral());
          addComponents(pattern,row[3].getContents(),row[4].getContents(),row[5].getContents());
          EMFUtil util=EMFSharedResources.getSharedEmfUtil();
          String fname=DqRepositoryViewService.createFilename(contents,NewSourcePatternActionProvider.EXTENSION_PATTERN);
          IFile pfile=folder.getFile(fname);
          util.addPoolToResourceSet(pfile.getFullPath().toString(),pattern);
          util.saveLastResource();
          names.add(contents);
        }
      }
    }
  }
 catch (  BiffException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  Set<String> names=getAllPatternNames();
  String xlsFile=page.getXLSFile();
  boolean skip=page.getSkip();
  boolean rename=page.getRename();
  try {
    File file=new File(xlsFile);
    WorkbookSettings settings=new WorkbookSettings();
    settings.setEncoding("String_Node_Str");
    Workbook rwb=Workbook.getWorkbook(file,settings);
    Sheet[] sheets=rwb.getSheets();
    for (    Sheet sheet : sheets) {
      int rows=sheet.getRows();
      for (int i=1; i < rows; i++) {
        Cell[] row=sheet.getRow(i);
        Cell cell=row[0];
        if (CellType.LABEL.equals(cell.getType())) {
          String contents=cell.getContents();
          if (names.contains(contents)) {
            if (skip) {
              continue;
            }
            if (rename) {
              contents=contents + "String_Node_Str" + new Date()+ "String_Node_Str";
            }
          }
          Pattern pattern=PatternResourceFileHelper.getInstance().createPattern(contents,row[6].getContents(),row[2].getContents(),row[1].getContents(),DevelopmentStatus.DRAFT.getLiteral());
          addComponents(pattern,row[3].getContents(),row[4].getContents(),row[5].getContents());
          boolean validStatus=PatternUtilities.isPatternValid(pattern);
          TaggedValueHelper.setValidStatus(validStatus,pattern);
          EMFUtil util=EMFSharedResources.getSharedEmfUtil();
          String fname=DqRepositoryViewService.createFilename(contents,NewSourcePatternActionProvider.EXTENSION_PATTERN);
          IFile pfile=folder.getFile(fname);
          util.addPoolToResourceSet(pfile.getFullPath().toString(),pattern);
          util.saveLastResource();
          names.add(contents);
        }
      }
    }
  }
 catch (  BiffException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  return true;
}