nus-yam/ex-repair huggingface dataset:
Program: 128750
Project: 128750
Buggy source:
private TableEditor addTableEditor(TableViewerCreatorColumnNotModifiable column,TableEditorContentNotModifiable tableEditorContent,String idProperty,TableItem tableItem){
  if (tableItem.getData() == null) {
    return null;
  }
  tableEditorContent.setLayoutEnabled(true);
  TableEditor tableEditor=tableEditorContent.createTableEditor(tableItem.getParent());
  tableEditorList.add(tableEditor);
  dataToMultipleDataEditor.put(tableItem.getData(),tableEditor);
  Object currentRowObject=tableItem.getData();
  Object value=column.getBeanPropertyAccessors().get(tableItem.getData());
  Control control=tableEditorContent.initialize(tableItem.getParent(),tableEditor,column,currentRowObject,value);
  if (tableItem != null && !tableItem.isDisposed()) {
    tableEditor.setEditor(control,tableItem,column.getIndex());
    fireEvent(new TableEditorManagerEvent(EVENT_TYPE.CONTROL_CREATED,tableEditor));
  }
  return tableEditor;
}

Fixed version (ground truth):
private TableEditor addTableEditor(TableViewerCreatorColumnNotModifiable column,TableEditorContentNotModifiable tableEditorContent,String idProperty,TableItem tableItem){
  if (tableItem.getData() == null) {
    return null;
  }
  tableEditorContent.setLayoutEnabled(true);
  TableEditor tableEditor=tableEditorContent.createTableEditor(tableItem.getParent());
  tableEditorList.add(tableEditor);
  dataToMultipleDataEditor.put(tableItem.getData(),tableEditor);
  Object currentRowObject=tableItem.getData();
  Object value=null;
  if (column.getBeanPropertyAccessors() != null) {
    value=column.getBeanPropertyAccessors().get(tableItem.getData());
  }
 else {
    value=tableViewerCreator.getCellModifier().getValue(currentRowObject,idProperty);
  }
  Control control=tableEditorContent.initialize(tableItem.getParent(),tableEditor,column,currentRowObject,value);
  if (tableItem != null && !tableItem.isDisposed()) {
    tableEditor.setEditor(control,tableItem,column.getIndex());
    fireEvent(new TableEditorManagerEvent(EVENT_TYPE.CONTROL_CREATED,tableEditor));
  }
  return tableEditor;
}
Program: 128751
Project: 128751
Buggy source:
@Override public boolean retrieve(Collection<String> jarsNeeded,String pathToStore,IProgressMonitor... monitorWrap){
  if (jarsNeeded == null || jarsNeeded.size() == 0) {
    return false;
  }
  List<String> jarNotFound=new ArrayList<String>();
  boolean allIsOK=true;
  for (  String jar : jarsNeeded) {
    if (!retrieve(jar,pathToStore,false,monitorWrap)) {
      jarNotFound.add(jar);
      allIsOK=false;
    }
  }
  if (!jarNotFound.isEmpty() && !CommonsPlugin.isHeadless()) {
    Shell shell=Display.getCurrent().getActiveShell();
    ModulesInstaller.installModules(new Shell(shell),jarNotFound.toArray(new String[jarNotFound.size()]));
    for (    String jar : jarNotFound) {
      if (!retrieve(jar,pathToStore,false,monitorWrap)) {
        allIsOK=false;
      }
    }
  }
  return allIsOK;
}

Fixed version (ground truth):
@Override public boolean retrieve(Collection<String> jarsNeeded,String pathToStore,IProgressMonitor... monitorWrap){
  if (jarsNeeded == null || jarsNeeded.size() == 0) {
    return false;
  }
  List<String> jarNotFound=new ArrayList<String>();
  boolean allIsOK=true;
  for (  String jar : jarsNeeded) {
    if (!retrieve(jar,pathToStore,false,monitorWrap)) {
      jarNotFound.add(jar);
      allIsOK=false;
    }
  }
  if (!jarNotFound.isEmpty() && !CommonsPlugin.isHeadless()) {
    Shell shell=Display.getCurrent().getActiveShell();
    ModulesInstaller.installModules(new Shell(shell),jarNotFound.toArray(new String[jarNotFound.size()]));
  }
  return allIsOK;
}
Program: 128752
Project: 128752
Buggy source:
@Override public void run(){
  String title="String_Node_Str";
  String text="String_Node_Str";
  ExternalModulesInstallDialog dialog=new ExternalModulesInstallDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),text,title);
}

Fixed version (ground truth):
@Override public void run(){
  String title="String_Node_Str";
  String text="String_Node_Str";
  ExternalModulesInstallDialog dialog=new ExternalModulesInstallDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),text,title);
  dialog.openDialog();
}
Program: 128753
Project: 128753
Buggy source:
public ComponentExternalModulesDialog(Shell shell,String[] neededJars,String text,String title){
  super(shell,neededJars,text,title);
}

Fixed version (ground truth):
public ComponentExternalModulesDialog(Shell shell,String text,String title){
  super(shell,text,title);
}
Program: 128754
Project: 128754
Buggy source:
private void refreshUI(){
  showMessage=false;
  updateModulesToInstall();
}

Fixed version (ground truth):
private void refreshUI(){
  showMessage=false;
  openDialog();
}
Program: 128755
Project: 128755
Buggy source:
public ExternalModulesInstallDialog(Shell shell,String[] neededJars,String text,String title){
  super(shell);
  this.text=text;
  this.title=title;
  this.neededJars=neededJars;
  updateModulesToInstall();
}

Fixed version (ground truth):
public ExternalModulesInstallDialog(Shell shell,String text,String title){
  super(shell);
  this.text=text;
  this.title=title;
}
Program: 128757
Project: 128757
Buggy source:
/** 
 * DOC WCHEN OperationExternalModulesDialog constructor comment.
 * @param shell
 * @param modules
 * @param text
 * @param title
 */
public OperationExternalModulesDialog(Shell shell,String[] neededJars,String text,String title){
  super(shell,neededJars,text,title);
}

Fixed version (ground truth):
/** 
 * DOC WCHEN OperationExternalModulesDialog constructor comment.
 * @param shell
 * @param modules
 * @param text
 * @param title
 */
public OperationExternalModulesDialog(Shell shell,String[] neededJars,String text,String title){
  super(shell,text,title);
  this.neededJars=neededJars;
}
Program: 128758
Project: 128758
Buggy source:
public static void installModules(Shell shell,String[] jarNames){
  if (!Activator.getDefault().getPreferenceStore().getBoolean(ExternalModulesInstallDialog.DO_NOT_SHOW_EXTERNALMODULESINSTALLDIALOG)) {
    String text="String_Node_Str";
    String title="String_Node_Str";
    OperationExternalModulesDialog dialog=new OperationExternalModulesDialog(shell,jarNames,text,title);
  }
}

Fixed version (ground truth):
public static void installModules(Shell shell,String[] jarNames){
  if (!Activator.getDefault().getPreferenceStore().getBoolean(ExternalModulesInstallDialog.DO_NOT_SHOW_EXTERNALMODULESINSTALLDIALOG)) {
    String text="String_Node_Str";
    String title="String_Node_Str";
    OperationExternalModulesDialog dialog=new OperationExternalModulesDialog(shell,jarNames,text,title);
    dialog.openDialog();
  }
}
Program: 128759
Project: 128759
Buggy source:
/** 
 * Test method for studio have all the lib for the system of db connection .
 */
@Test public void testMissingJar() throws MalformedURLException {
  Set<String> names=new HashSet<String>();
  List<File> jarFiles=FilesUtils.getJarFilesFromFolder(getStorageDirectory(),null);
  if (jarFiles.size() > 0) {
    for (    File file : jarFiles) {
      names.add(file.getName());
    }
  }
  LibrariesIndexManager.getInstance().loadResource();
  EMap<String,String> jarsToRelative=LibrariesIndexManager.getInstance().getIndex().getJarsToRelativePath();
  names.addAll(jarsToRelative.keySet());
  List<String> allJars=new ArrayList<String>();
  EDatabaseVersion4Drivers[] values=EDatabaseVersion4Drivers.values();
  for (  EDatabaseVersion4Drivers driver : values) {
    Set<String> providerDrivers=driver.getProviderDrivers();
    allJars.addAll(providerDrivers);
  }
  List<String> missJars=new ArrayList<String>();
  for (  String jar : allJars) {
    boolean hadInstalled=false;
    for (    String installJar : names) {
      if (jar.equals(installJar)) {
        hadInstalled=true;
      }
    }
    if (!hadInstalled) {
      missJars.add(jar);
    }
  }
  if (missJars.size() > 0) {
    StringBuffer buffer=new StringBuffer();
    buffer.append("String_Node_Str");
    for (    String missJar : missJars) {
      buffer.append(missJar + "String_Node_Str");
    }
    throw new RuntimeException(buffer.toString());
  }
}

Fixed version (ground truth):
/** 
 * Test method for studio have all the lib for the system of db connection .
 */
@Test public void testMissingJar() throws MalformedURLException {
  Set<String> names=new HashSet<String>();
  List<File> jarFiles=FilesUtils.getJarFilesFromFolder(getStorageDirectory(),null);
  if (jarFiles.size() > 0) {
    for (    File file : jarFiles) {
      names.add(file.getName());
    }
  }
  LibrariesIndexManager.getInstance().loadResource();
  EMap<String,String> jarsToRelative=LibrariesIndexManager.getInstance().getIndex().getJarsToRelativePath();
  names.addAll(jarsToRelative.keySet());
  List<String> allJars=new ArrayList<String>();
  EDatabaseVersion4Drivers[] values=EDatabaseVersion4Drivers.values();
  for (  EDatabaseVersion4Drivers driver : values) {
    Set<String> providerDrivers=driver.getProviderDrivers();
    allJars.addAll(providerDrivers);
  }
  Set<String> missJars=new HashSet<String>();
  for (  String jar : allJars) {
    boolean hadInstalled=false;
    for (    String installJar : names) {
      if (jar.equals(installJar)) {
        hadInstalled=true;
      }
    }
    if (!hadInstalled) {
      missJars.add(jar);
    }
  }
  if (missJars.size() > 0) {
    for (    String notDiliver : notDilivers) {
      if (missJars.contains(notDiliver)) {
        missJars.remove(notDiliver);
      }
    }
    StringBuffer buffer=new StringBuffer();
    buffer.append("String_Node_Str");
    for (    String missJar : missJars) {
      buffer.append(missJar + "String_Node_Str");
    }
    throw new RuntimeException(buffer.toString());
  }
}
Program: 128760
Project: 128760
Buggy source:
/** 
 * DOC Administrator Comment method "setUp".
 * @throws java.lang.Exception
 */
@Before public void setUp() throws Exception {
}

Fixed version (ground truth):
/** 
 * DOC Administrator Comment method "setUp".
 * @throws java.lang.Exception
 */
@Before public void setUp() throws Exception {
  notDilivers.add("String_Node_Str");
  notDilivers.add("String_Node_Str");
  notDilivers.add("String_Node_Str");
  notDilivers.add("String_Node_Str");
  notDilivers.add("String_Node_Str");
}
Program: 128761
Project: 128761
Buggy source:
@Override public void run(){
  ExternalModulesInstallDialog dialog=new ExternalModulesInstallDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
  if (dialog.needOpen()) {
    dialog.open();
  }
 else {
    MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),"String_Node_Str","String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void run(){
  String title="String_Node_Str";
  String text="String_Node_Str";
  ExternalModulesInstallDialog dialog=new ExternalModulesInstallDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),text,title);
}
Program: 128762
Project: 128762
Buggy source:
public ComponentExternalModulesDialog(Shell shell,String text,String title){
  super(shell);
  this.text=text;
  this.title=title;
}

Fixed version (ground truth):
public ComponentExternalModulesDialog(Shell shell,String[] neededJars,String text,String title){
  super(shell,neededJars,text,title);
}
Program: 128763
Project: 128763
Buggy source:
/** 
 * DOC ycbai Comment method "handleDefaultValue".
 * @param column
 */
public static void handleDefaultValue(MetadataColumn column,DatabaseMetaData dbMetaData){
  if (column == null) {
    return;
  }
  String talendType=column.getTalendType();
  if (talendType == null) {
    return;
  }
  Expression initialValue=column.getInitialValue();
  if (initialValue == null) {
    return;
  }
  String defautVal=initialValue.getBody();
  if (StringUtils.isEmpty(defautVal)) {
    return;
  }
  boolean defaultValueIsFunction=false;
  List<String> functions=getAllDBFuctions(dbMetaData);
  if (functions.contains(defautVal)) {
    defaultValueIsFunction=true;
  }
  if (!defaultValueIsFunction) {
    if (talendType.equals(JavaTypesManager.INTEGER.getId()) || talendType.equals(JavaTypesManager.FLOAT.getId()) || talendType.equals(JavaTypesManager.DOUBLE.getId())|| talendType.equals(JavaTypesManager.LONG.getId())|| talendType.equals(JavaTypesManager.SHORT.getId())|| talendType.equals(JavaTypesManager.BIGDECIMAL.getId())|| talendType.equals(JavaTypesManager.CHARACTER.getId())) {
      defautVal=TalendQuoteUtils.removeQuotes(defautVal);
      if (column.getTalendType().equals(JavaTypesManager.CHARACTER.getId())) {
        defautVal=TalendQuoteUtils.addQuotes(defautVal,TalendQuoteUtils.SINGLE_QUOTE);
      }
    }
 else {
      defautVal=TalendQuoteUtils.addSingleQuotesIfNotExist(defautVal);
    }
  }
  initialValue.setBody(defautVal);
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "handleDefaultValue".
 * @param column
 */
public static void handleDefaultValue(MetadataColumn column,DatabaseMetaData dbMetaData){
  if (column == null) {
    return;
  }
  String talendType=column.getTalendType();
  if (talendType == null) {
    return;
  }
  Expression initialValue=column.getInitialValue();
  if (initialValue == null) {
    return;
  }
  String defautVal=initialValue.getBody();
  if (StringUtils.isEmpty(defautVal)) {
    return;
  }
  defautVal=defautVal.trim();
  boolean defaultValueIsFunction=false;
  List<String> functions=getAllDBFuctions(dbMetaData);
  if (functions.contains(defautVal)) {
    defaultValueIsFunction=true;
  }
  if (!defaultValueIsFunction) {
    if (talendType.equals(JavaTypesManager.INTEGER.getId()) || talendType.equals(JavaTypesManager.FLOAT.getId()) || talendType.equals(JavaTypesManager.DOUBLE.getId())|| talendType.equals(JavaTypesManager.LONG.getId())|| talendType.equals(JavaTypesManager.SHORT.getId())|| talendType.equals(JavaTypesManager.BIGDECIMAL.getId())|| talendType.equals(JavaTypesManager.CHARACTER.getId())) {
      defautVal=TalendQuoteUtils.removeQuotes(defautVal);
      if (column.getTalendType().equals(JavaTypesManager.CHARACTER.getId())) {
        defautVal=TalendQuoteUtils.addQuotes(defautVal,TalendQuoteUtils.SINGLE_QUOTE);
      }
    }
 else {
      defautVal=TalendQuoteUtils.addSingleQuotesIfNotExist(defautVal);
    }
  }
  initialValue.setBody(defautVal);
}
Program: 128764
Project: 128764
Buggy source:
/** 
 * DOC ycbai Comment method "handleDefaultValue".
 * @param column
 */
public static void handleDefaultValue(MetadataColumn column,DatabaseMetaData dbMetaData){
  if (column == null) {
    return;
  }
  String talendType=column.getTalendType();
  if (talendType == null) {
    return;
  }
  Expression initialValue=column.getInitialValue();
  if (initialValue == null) {
    return;
  }
  String defautVal=initialValue.getBody();
  if (StringUtils.isEmpty(defautVal)) {
    return;
  }
  boolean defaultValueIsFunction=false;
  List<String> functions=getAllDBFuctions(dbMetaData);
  if (functions.contains(defautVal)) {
    defaultValueIsFunction=true;
  }
  if (!defaultValueIsFunction) {
    if (talendType.equals(JavaTypesManager.INTEGER.getId()) || talendType.equals(JavaTypesManager.FLOAT.getId()) || talendType.equals(JavaTypesManager.DOUBLE.getId())|| talendType.equals(JavaTypesManager.LONG.getId())|| talendType.equals(JavaTypesManager.SHORT.getId())|| talendType.equals(JavaTypesManager.BIGDECIMAL.getId())|| talendType.equals(JavaTypesManager.CHARACTER.getId())) {
      defautVal=TalendQuoteUtils.removeQuotes(defautVal);
      if (column.getTalendType().equals(JavaTypesManager.CHARACTER.getId())) {
        defautVal=TalendQuoteUtils.addQuotes(defautVal,TalendQuoteUtils.SINGLE_QUOTE);
      }
    }
 else {
      defautVal=TalendQuoteUtils.addSingleQuotesIfNotExist(defautVal);
    }
  }
  initialValue.setBody(defautVal);
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "handleDefaultValue".
 * @param column
 */
public static void handleDefaultValue(MetadataColumn column,DatabaseMetaData dbMetaData){
  if (column == null) {
    return;
  }
  String talendType=column.getTalendType();
  if (talendType == null) {
    return;
  }
  Expression initialValue=column.getInitialValue();
  if (initialValue == null) {
    return;
  }
  String defautVal=initialValue.getBody();
  if (StringUtils.isEmpty(defautVal)) {
    return;
  }
  defautVal=defautVal.trim();
  boolean defaultValueIsFunction=false;
  List<String> functions=getAllDBFuctions(dbMetaData);
  if (functions.contains(defautVal)) {
    defaultValueIsFunction=true;
  }
  if (!defaultValueIsFunction) {
    if (talendType.equals(JavaTypesManager.INTEGER.getId()) || talendType.equals(JavaTypesManager.FLOAT.getId()) || talendType.equals(JavaTypesManager.DOUBLE.getId())|| talendType.equals(JavaTypesManager.LONG.getId())|| talendType.equals(JavaTypesManager.SHORT.getId())|| talendType.equals(JavaTypesManager.BIGDECIMAL.getId())|| talendType.equals(JavaTypesManager.CHARACTER.getId())) {
      defautVal=TalendQuoteUtils.removeQuotes(defautVal);
      if (column.getTalendType().equals(JavaTypesManager.CHARACTER.getId())) {
        defautVal=TalendQuoteUtils.addQuotes(defautVal,TalendQuoteUtils.SINGLE_QUOTE);
      }
    }
 else {
      defautVal=TalendQuoteUtils.addSingleQuotesIfNotExist(defautVal);
    }
  }
  initialValue.setBody(defautVal);
}
Program: 128766
Project: 128766
Buggy source:
/** 
 * Parses text from the beginning of the given string to produce a date using the given pattern and the default date format symbols for the given locale. The method may not use the entire text of the given string. <p>
 * @param pattern the pattern to parse.
 * @param stringDate A <code>String</code> whose beginning should be parsed.
 * @return A <code>Date</code> parsed from the string.
 * @throws ParseException
 * @exception ParseException if the beginning of the specified string cannot be parsed.{talendTypes} Date {Category} TalendDate {param} string("yyyy-MM-dd HH:mm:ss") pattern : the pattern to parse {param} string("") stringDate : A <code>String</code> whose beginning should be parsed {example} parseDate("yyyy-MMM-dd HH:mm:ss", "23-Mar-1979 23:59:59") #
 */
public synchronized static Date parseDate(String pattern,String stringDate){
  try {
    return FastDateParser.getInstance(pattern).parse(stringDate);
  }
 catch (  ParseException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Parses text from the beginning of the given string to produce a date using the given pattern and the default date format symbols for the given locale. The method may not use the entire text of the given string. <p>
 * @param pattern the pattern to parse.
 * @param stringDate A <code>String</code> whose beginning should be parsed.
 * @return A <code>Date</code> parsed from the string.
 * @throws ParseException
 * @exception ParseException if the beginning of the specified string cannot be parsed.{talendTypes} Date {Category} TalendDate {param} string("yyyy-MM-dd HH:mm:ss") pattern : the pattern to parse {param} string("") stringDate : A <code>String</code> whose beginning should be parsed {example} parseDate("yyyy-MMM-dd HH:mm:ss", "23-Mar-1979 23:59:59") #
 */
public synchronized static Date parseDate(String pattern,String stringDate){
  try {
    DateFormat df=FastDateParser.getInstance(pattern);
    Date d=df.parse(stringDate);
    int offset=df.getCalendar().get(Calendar.ZONE_OFFSET);
    char sign=offset >= 0 ? '+' : '-';
    int hour=Math.abs(offset) / 1000 / 60/ 60;
    int min=Math.abs(offset) / 1000 / 60 % 60;
    String minStr=min < 10 ? "String_Node_Str" + min : min + "String_Node_Str";
    TalendTimestampWithTZ tstz=new TalendTimestampWithTZ(new java.sql.Timestamp(d.getTime()),TimeZone.getTimeZone("String_Node_Str" + sign + hour+ "String_Node_Str"+ minStr));
    return tstz;
  }
 catch (  ParseException e) {
    throw new RuntimeException(e);
  }
}
Program: 128768
Project: 128768
Buggy source:
@Override public List createPastableBeansList(ExtendedTableModel extendedTable,List copiedObjectsList){
  ArrayList list=new ArrayList();
  for (  Object current : copiedObjectsList) {
    if (current instanceof IMetadataColumn) {
      IMetadataColumn copy=((IMetadataColumn)current).clone();
      copy.setLabel(((MetadataTableEditor)extendedTable).getNextGeneratedColumnName(copy.getLabel()));
      if (copy instanceof XPathQueryMetadataColumnExt) {
        list.add(copy);
      }
    }
  }
  return list;
}

Fixed version (ground truth):
@Override public List createPastableBeansList(ExtendedTableModel extendedTable,List copiedObjectsList){
  ArrayList list=new ArrayList();
  ArrayList<String> labelsExisted=getLabelsExisted(extendedTable);
  for (  Object current : copiedObjectsList) {
    if (current instanceof IMetadataColumn) {
      IMetadataColumn copy=((IMetadataColumn)current).clone();
      String nextGeneratedColumnName=((MetadataTableEditor)extendedTable).getNextGeneratedColumnName(copy.getLabel());
      if (labelsExisted.contains(nextGeneratedColumnName)) {
        nextGeneratedColumnName=validateColumnName(nextGeneratedColumnName,labelsExisted);
      }
      labelsExisted.add(nextGeneratedColumnName);
      copy.setLabel(nextGeneratedColumnName);
      if (copy instanceof XPathQueryMetadataColumnExt) {
        list.add(copy);
      }
    }
  }
  return list;
}
Program: 128769
Project: 128769
Buggy source:
public String getUniqueString(ArrayList list,String columnName){
  int lstSize=list.size();
  String[] labels=new String[lstSize];
  for (int i=0; i < lstSize; i++) {
    labels[i]=list.get(i).toString();
  }
  boolean found=false;
  int indexNewColumn=0;
  String newColumnName=null;
  boolean firstTime=true;
  while (!found) {
    newColumnName=columnName + (firstTime ? "String_Node_Str" : (++indexNewColumn));
    firstTime=false;
    boolean allAreDifferent=true;
    for (int j=0; j < labels.length; j++) {
      String label=labels[j];
      if (label.equals(newColumnName)) {
        allAreDifferent=false;
        break;
      }
    }
    if (allAreDifferent) {
      found=true;
    }
  }
  return newColumnName;
}

Fixed version (ground truth):
public String getUniqueString(ArrayList list,String columnName){
  int lstSize=list.size();
  String[] labels=new String[lstSize];
  for (int i=0; i < lstSize; i++) {
    labels[i]=list.get(i).toString();
  }
  boolean found=false;
  int indexNewColumn=0;
  String newColumnName=null;
  boolean firstTime=true;
  while (!found) {
    newColumnName=columnName + (firstTime ? "String_Node_Str" : (++indexNewColumn));
    firstTime=false;
    boolean allAreDifferent=true;
    for (    String label : labels) {
      if (label.equals(newColumnName)) {
        allAreDifferent=false;
        break;
      }
    }
    if (allAreDifferent) {
      found=true;
    }
  }
  return newColumnName;
}
Program: 128771
Project: 128771
Buggy source:
public String getUniqueString(ArrayList list,String columnName){
  int lstSize=list.size();
  String[] labels=new String[lstSize];
  for (int i=0; i < lstSize; i++) {
    labels[i]=list.get(i).toString();
  }
  boolean found=false;
  int indexNewColumn=0;
  String newColumnName=null;
  boolean firstTime=true;
  while (!found) {
    newColumnName=columnName + (firstTime ? "String_Node_Str" : (++indexNewColumn));
    firstTime=false;
    boolean allAreDifferent=true;
    for (int j=0; j < labels.length; j++) {
      String label=labels[j];
      if (label.equals(newColumnName)) {
        allAreDifferent=false;
        break;
      }
    }
    if (allAreDifferent) {
      found=true;
    }
  }
  return newColumnName;
}

Fixed version (ground truth):
public String getUniqueString(ArrayList list,String columnName){
  int lstSize=list.size();
  String[] labels=new String[lstSize];
  for (int i=0; i < lstSize; i++) {
    labels[i]=list.get(i).toString();
  }
  boolean found=false;
  int indexNewColumn=0;
  String newColumnName=null;
  boolean firstTime=true;
  while (!found) {
    newColumnName=columnName + (firstTime ? "String_Node_Str" : (++indexNewColumn));
    firstTime=false;
    boolean allAreDifferent=true;
    for (    String label : labels) {
      if (label.equals(newColumnName)) {
        allAreDifferent=false;
        break;
      }
    }
    if (allAreDifferent) {
      found=true;
    }
  }
  return newColumnName;
}
Program: 128773
Project: 128773
Buggy source:
@Override protected void doRun(){
  if (repositoryNode == null) {
    repositoryNode=getCurrentRepositoryNode();
  }
  if (isToolbar()) {
    if (repositoryNode != null && repositoryNode.getContentType() != currentNodeType) {
      repositoryNode=null;
    }
    if (repositoryNode == null) {
      repositoryNode=getRepositoryNodeForDefault(currentNodeType);
    }
  }
  WizardDialog wizardDialog;
  if (isToolbar()) {
    init(repositoryNode);
    WSDLSchemaWizard wsdlSchemaWizard=new WSDLSchemaWizard(PlatformUI.getWorkbench(),creation,repositoryNode,getExistingNames(),false);
    wizardDialog=new WizardDialog(Display.getCurrent().getActiveShell(),wsdlSchemaWizard);
  }
 else {
    wizardDialog=new WizardDialog(Display.getCurrent().getActiveShell(),new WSDLSchemaWizard(PlatformUI.getWorkbench(),creation,repositoryNode,getExistingNames(),false));
  }
  if (!creation) {
    RepositoryManager.refreshSavedNode(repositoryNode);
  }
  wizardDialog.setPageSize(WIZARD_WIDTH,WIZARD_HEIGHT);
  wizardDialog.create();
  wizardDialog.open();
}

Fixed version (ground truth):
@Override protected void doRun(){
  if (repositoryNode == null) {
    repositoryNode=getCurrentRepositoryNode();
  }
  if (isToolbar()) {
    if (repositoryNode != null && repositoryNode.getContentType() != currentNodeType) {
      repositoryNode=null;
    }
    if (repositoryNode == null) {
      repositoryNode=getRepositoryNodeForDefault(currentNodeType);
    }
  }
  WizardDialog wizardDialog;
  if (isToolbar()) {
    init(repositoryNode);
    WSDLSchemaWizard wsdlSchemaWizard=new WSDLSchemaWizard(PlatformUI.getWorkbench(),creation,repositoryNode,getExistingNames(),false);
    wsdlSchemaWizard.setToolbar(true);
    wizardDialog=new WizardDialog(Display.getCurrent().getActiveShell(),wsdlSchemaWizard);
  }
 else {
    wizardDialog=new WizardDialog(Display.getCurrent().getActiveShell(),new WSDLSchemaWizard(PlatformUI.getWorkbench(),creation,repositoryNode,getExistingNames(),false));
  }
  if (!creation) {
    RepositoryManager.refreshSavedNode(repositoryNode);
  }
  wizardDialog.setPageSize(WIZARD_WIDTH,WIZARD_HEIGHT);
  wizardDialog.create();
  wizardDialog.open();
}
Program: 128774
Project: 128774
Buggy source:
/** 
 * Parses text from the beginning of the given string to produce a date using the given pattern and the default date format symbols for the given locale. The method may not use the entire text of the given string. <p>
 * @param pattern the pattern to parse.
 * @param stringDate A <code>String</code> whose beginning should be parsed.
 * @return A <code>Date</code> parsed from the string.
 * @throws ParseException
 * @exception ParseException if the beginning of the specified string cannot be parsed.{talendTypes} Date {Category} TalendDate {param} string("yyyy-MM-dd HH:mm:ss") pattern : the pattern to parse {param} string("") stringDate : A <code>String</code> whose beginning should be parsed {example} parseDate("yyyy-MMM-dd HH:mm:ss", "23-Mar-1979 23:59:59") #
 */
public synchronized static Date parseDate(String pattern,String stringDate){
  try {
    return FastDateParser.getInstance(pattern).parse(stringDate);
  }
 catch (  ParseException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Parses text from the beginning of the given string to produce a date using the given pattern and the default date format symbols for the given locale. The method may not use the entire text of the given string. <p>
 * @param pattern the pattern to parse.
 * @param stringDate A <code>String</code> whose beginning should be parsed.
 * @return A <code>Date</code> parsed from the string.
 * @throws ParseException
 * @exception ParseException if the beginning of the specified string cannot be parsed.{talendTypes} Date {Category} TalendDate {param} string("yyyy-MM-dd HH:mm:ss") pattern : the pattern to parse {param} string("") stringDate : A <code>String</code> whose beginning should be parsed {example} parseDate("yyyy-MMM-dd HH:mm:ss", "23-Mar-1979 23:59:59") #
 */
public synchronized static Date parseDate(String pattern,String stringDate){
  try {
    DateFormat df=FastDateParser.getInstance(pattern);
    Date d=df.parse(stringDate);
    int offset=df.getCalendar().get(Calendar.ZONE_OFFSET);
    char sign=offset >= 0 ? '+' : '-';
    int hour=Math.abs(offset) / 1000 / 60/ 60;
    int min=Math.abs(offset) / 1000 / 60 % 60;
    String minStr=min < 10 ? "String_Node_Str" + min : min + "String_Node_Str";
    TalendTimestampWithTZ tstz=new TalendTimestampWithTZ(new java.sql.Timestamp(d.getTime()),TimeZone.getTimeZone("String_Node_Str" + sign + hour+ "String_Node_Str"+ minStr));
    return tstz;
  }
 catch (  ParseException e) {
    throw new RuntimeException(e);
  }
}
Program: 128778
Project: 128778
Buggy source:
@Override protected void run() throws LoginException, PersistenceException {
  try {
    Item newItem=factory.copy(item,path,true);
    if (newItem instanceof RoutineItem) {
      synDuplicatedRoutine((RoutineItem)newItem);
    }
    ICamelDesignerCoreService service=null;
    if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
      service=(ICamelDesignerCoreService)GlobalServiceRegister.getDefault().getService(ICamelDesignerCoreService.class);
    }
    if (service != null && service.isInstanceofCamelBeans(item)) {
      synDuplicatedBean(newItem);
    }
    if (newItem instanceof ProcessItem || newItem instanceof JobletProcessItem) {
      RelationshipItemBuilder.getInstance().addOrUpdateItem(newItem);
    }
    if (newItem instanceof ConnectionItem) {
      ConnectionItem connectionItem=(ConnectionItem)newItem;
      connectionItem.getConnection().getSupplierDependency().clear();
    }
    factory.save(newItem);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  IWorkspace workspace=ResourcesPlugin.getWorkspace();
  try {
    ISchedulingRule schedulingRule=workspace.getRoot();
    workspace.run(op,schedulingRule,IWorkspace.AVOID_UPDATE,monitor);
  }
 catch (  CoreException e) {
    throw new InvocationTargetException(e);
  }
}
Program: 128780
Project: 128780
Buggy source:
@Override public List createPastableBeansList(ExtendedTableModel extendedTable,List copiedObjectsList){
  ArrayList list=new ArrayList();
  for (  Object current : copiedObjectsList) {
    if (current instanceof IMetadataColumn) {
      IMetadataColumn copy=((IMetadataColumn)current).clone();
      copy.setLabel(((MetadataTableEditor)extendedTable).getNextGeneratedColumnName(copy.getLabel()));
      if (copy instanceof XPathQueryMetadataColumnExt) {
        list.add(copy);
      }
    }
  }
  return list;
}

Fixed version (ground truth):
@Override public List createPastableBeansList(ExtendedTableModel extendedTable,List copiedObjectsList){
  ArrayList list=new ArrayList();
  ArrayList<String> labelsExisted=getLabelsExisted(extendedTable);
  for (  Object current : copiedObjectsList) {
    if (current instanceof IMetadataColumn) {
      IMetadataColumn copy=((IMetadataColumn)current).clone();
      String nextGeneratedColumnName=((MetadataTableEditor)extendedTable).getNextGeneratedColumnName(copy.getLabel());
      if (labelsExisted.contains(nextGeneratedColumnName)) {
        nextGeneratedColumnName=validateColumnName(nextGeneratedColumnName,labelsExisted);
      }
      labelsExisted.add(nextGeneratedColumnName);
      copy.setLabel(nextGeneratedColumnName);
      if (copy instanceof XPathQueryMetadataColumnExt) {
        list.add(copy);
      }
    }
  }
  return list;
}
Program: 128785
Project: 128785
Buggy source:
public void logOnProject(Project project) throws LoginException, PersistenceException {
  setLoggedOnProject(false);
  IStatusPreferenceInitService statusPreferenceInitService=CoreRuntimePlugin.getInstance().getStatusPreferenceInitService();
  if (statusPreferenceInitService != null) {
    statusPreferenceInitService.initStatusPreference();
  }
  String productVersion=VersionUtils.getVersion();
  IBrandingService brandingService=null;
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IBrandingService.class)) {
    brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
  }
  if (brandingService != null) {
    String version=brandingService.getFullProductName() + "String_Node_Str" + productVersion;
    if (!version.equals(project.getEmfProject().getProductVersion())) {
      project.getEmfProject().setProductVersion(version);
      project.getEmfProject().getFolders().clear();
    }
  }
  setLoggedOnProject(true);
}

Fixed version (ground truth):
@Override public void logOnProject(Project project) throws LoginException, PersistenceException {
  setLoggedOnProject(false);
  IStatusPreferenceInitService statusPreferenceInitService=CoreRuntimePlugin.getInstance().getStatusPreferenceInitService();
  if (statusPreferenceInitService != null) {
    statusPreferenceInitService.initStatusPreference();
  }
  String productVersion=VersionUtils.getVersion();
  IBrandingService brandingService=null;
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IBrandingService.class)) {
    brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
  }
  if (brandingService != null) {
    String version=brandingService.getFullProductName() + "String_Node_Str" + productVersion;
    if (!version.equals(project.getEmfProject().getProductVersion())) {
      project.getEmfProject().setProductVersion(version);
      project.getEmfProject().getFolders().clear();
    }
  }
  setLoggedOnProject(true);
}
Program: 128786
Project: 128786
Buggy source:
private void getAllVersions(Project project,Property property,List<IRepositoryViewObject> allVersion) throws PersistenceException {
  ERepositoryObjectType itemType=ERepositoryObjectType.getItemType(property.getItem());
  Object fullFolder=getFullFolder(project,itemType,property.getItem().getState().getPath());
  if (fullFolder != null) {
    allVersion.addAll(getSerializableFromFolder(project,fullFolder,property.getId(),itemType,true,false,false,true));
    if (allVersion.size() == 0) {
      allVersion.addAll(getAllVersion(project,property.getId(),false));
    }
  }
 else {
    allVersion.addAll(getAllVersion(project,property.getId(),false));
  }
  if (allVersion.size() == 0 && project.getEmfProject().getReferencedProjects().size() > 0) {
    String parentBranch=getRepositoryContext().getFields().get(IProxyRepositoryFactory.BRANCH_SELECTION + "String_Node_Str" + project.getTechnicalLabel());
    for (    ProjectReference refProject : (List<ProjectReference>)(List<ProjectReference>)project.getEmfProject().getReferencedProjects()) {
      if (refProject.getBranch() != null && !parentBranch.equals(refProject.getBranch())) {
        continue;
      }
      org.talend.core.model.properties.Project emfProject=refProject.getReferencedProject();
      getAllVersions(new Project(emfProject),property,allVersion);
      if (allVersion.size() > 0) {
        break;
      }
    }
  }
  if (allVersion.size() == 0) {
    allVersion.add(new RepositoryViewObject(property));
  }
}

Fixed version (ground truth):
private void getAllVersions(Project project,Property property,List<IRepositoryViewObject> allVersion) throws PersistenceException {
  ERepositoryObjectType itemType=ERepositoryObjectType.getItemType(property.getItem());
  Object fullFolder=getFullFolder(project,itemType,property.getItem().getState().getPath());
  if (fullFolder != null) {
    allVersion.addAll(getSerializableFromFolder(project,fullFolder,property.getId(),itemType,true,false,false,true));
    if (allVersion.size() == 0) {
      allVersion.addAll(getAllVersion(project,property.getId(),false));
    }
  }
 else {
    allVersion.addAll(getAllVersion(project,property.getId(),false));
  }
  if (allVersion.size() == 0 && project.getEmfProject().getReferencedProjects().size() > 0) {
    String parentBranch=getRepositoryContext().getFields().get(IProxyRepositoryFactory.BRANCH_SELECTION + "String_Node_Str" + project.getTechnicalLabel());
    for (    ProjectReference refProject : (List<ProjectReference>)project.getEmfProject().getReferencedProjects()) {
      if (refProject.getBranch() != null && !parentBranch.equals(refProject.getBranch())) {
        continue;
      }
      org.talend.core.model.properties.Project emfProject=refProject.getReferencedProject();
      getAllVersions(new Project(emfProject),property,allVersion);
      if (allVersion.size() > 0) {
        break;
      }
    }
  }
  if (allVersion.size() == 0) {
    allVersion.add(new RepositoryViewObject(property));
  }
}
Program: 128787
Project: 128787
Buggy source:
public LockInfo getLockInfo(Item item){
  if (item.getState().isLocked()) {
    return new LockInfo(item.getState().getLocker().getLogin(),"String_Node_Str",item.getState().getLockDate());
  }
  return new LockInfo("String_Node_Str","String_Node_Str",null);
}

Fixed version (ground truth):
@Override public LockInfo getLockInfo(Item item){
  if (item.getState().isLocked()) {
    return new LockInfo(item.getState().getLocker().getLogin(),"String_Node_Str",item.getState().getLockDate());
  }
  return new LockInfo("String_Node_Str","String_Node_Str",null);
}
Program: 128788
Project: 128788
Buggy source:
public List<IRepositoryViewObject> getAllVersion(Project project,String id,String relativeFolder,ERepositoryObjectType type) throws PersistenceException {
  List<IRepositoryViewObject> serializableAllVersion=null;
  Object fullFolder=getFullFolder(project,type,relativeFolder);
  if (fullFolder != null) {
    serializableAllVersion=getSerializableFromFolder(project,fullFolder,id,type,true,false,false,true);
    if (serializableAllVersion.isEmpty()) {
      serializableAllVersion=getSerializable(project,id,true,false);
    }
    return convert(serializableAllVersion);
  }
  serializableAllVersion=new ArrayList<IRepositoryViewObject>();
  return serializableAllVersion;
}

Fixed version (ground truth):
@Override public List<IRepositoryViewObject> getAllVersion(Project project,String id,String relativeFolder,ERepositoryObjectType type) throws PersistenceException {
  List<IRepositoryViewObject> serializableAllVersion=null;
  Object fullFolder=getFullFolder(project,type,relativeFolder);
  if (fullFolder != null) {
    serializableAllVersion=getSerializableFromFolder(project,fullFolder,id,type,true,false,false,true);
    if (serializableAllVersion.isEmpty()) {
      serializableAllVersion=getSerializable(project,id,true,false);
    }
    return convert(serializableAllVersion);
  }
  serializableAllVersion=new ArrayList<IRepositoryViewObject>();
  return serializableAllVersion;
}
Program: 128790
Project: 128790
Buggy source:
public boolean canLock(Item item) throws PersistenceException {
  return true;
}

Fixed version (ground truth):
@Override public boolean canLock(Item item) throws PersistenceException {
  return true;
}
Program: 128791
Project: 128791
Buggy source:
public RootContainer<String,IRepositoryViewObject> getRoutineFromProject(Project project) throws PersistenceException {
  RootContainer<String,IRepositoryViewObject> toReturn=new RootContainer<String,IRepositoryViewObject>();
  ERepositoryObjectType type=ERepositoryObjectType.ROUTINES;
  IProject fsProject=ResourceModelUtils.getProject(project);
  IFolder objectFolder=ResourceUtils.getFolder(fsProject,ERepositoryObjectType.getFolderName(ERepositoryObjectType.ROUTINES),true);
  addFolderMembers(project,type,toReturn,objectFolder,true);
  saveProject(project);
  return toReturn;
}

Fixed version (ground truth):
@Override public RootContainer<String,IRepositoryViewObject> getRoutineFromProject(Project project) throws PersistenceException {
  RootContainer<String,IRepositoryViewObject> toReturn=new RootContainer<String,IRepositoryViewObject>();
  ERepositoryObjectType type=ERepositoryObjectType.ROUTINES;
  IProject fsProject=ResourceModelUtils.getProject(project);
  IFolder objectFolder=ResourceUtils.getFolder(fsProject,ERepositoryObjectType.getFolderName(ERepositoryObjectType.ROUTINES),true);
  addFolderMembers(project,type,toReturn,objectFolder,true);
  saveProject(project);
  return toReturn;
}
Program: 128792
Project: 128792
Buggy source:
public boolean isNameAvailable(Project project,Item item,String name,List<IRepositoryViewObject>... givenList) throws PersistenceException {
  if (name == null) {
    name=item.getProperty().getLabel();
  }
  if (item instanceof FolderItem) {
    FolderHelper folderHelper=getFolderHelper(project.getEmfProject());
    return !folderHelper.pathExists((FolderItem)item,name);
  }
  ERepositoryObjectType type=ERepositoryObjectType.getItemType(item);
  if (type == ERepositoryObjectType.METADATA_CON_TABLE) {
    return false;
  }
  boolean isAllowMultipleName=(type == ERepositoryObjectType.SQLPATTERNS || type == ERepositoryObjectType.METADATA_FILE_XML);
  String path="String_Node_Str";
  if (item.getState() != null) {
    path=item.getState().getPath();
  }
  List<IRepositoryViewObject> list;
  if (givenList.length == 0) {
    list=getAll(project,type,true,false);
  }
 else {
    list=givenList[0];
  }
  for (  IRepositoryViewObject current : list) {
    if (name.equalsIgnoreCase(current.getProperty().getLabel()) && item.getProperty().getId() != current.getProperty().getId()) {
      if (!isAllowMultipleName || current.getProperty().getItem().getState().getPath().equals(path)) {
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean isNameAvailable(Project project,Item item,String name,List<IRepositoryViewObject>... givenList) throws PersistenceException {
  if (name == null) {
    name=item.getProperty().getLabel();
  }
  if (item instanceof FolderItem) {
    FolderHelper folderHelper=getFolderHelper(project.getEmfProject());
    return !folderHelper.pathExists((FolderItem)item,name);
  }
  ERepositoryObjectType type=ERepositoryObjectType.getItemType(item);
  if (type == ERepositoryObjectType.METADATA_CON_TABLE) {
    return false;
  }
  boolean isAllowMultipleName=(type == ERepositoryObjectType.SQLPATTERNS || type == ERepositoryObjectType.METADATA_FILE_XML);
  String path="String_Node_Str";
  if (item.getState() != null) {
    path=item.getState().getPath();
  }
  List<IRepositoryViewObject> list;
  if (givenList.length == 0) {
    list=getAll(project,type,true,false);
  }
 else {
    list=givenList[0];
  }
  for (  IRepositoryViewObject current : list) {
    if (name.equalsIgnoreCase(current.getProperty().getLabel()) && item.getProperty().getId() != current.getProperty().getId()) {
      if (!isAllowMultipleName || current.getProperty().getItem().getState().getPath().equals(path)) {
        return false;
      }
    }
  }
  return true;
}
Program: 128793
Project: 128793
Buggy source:
public List<ModuleNeeded> getModulesNeededForJobs() throws PersistenceException {
  List<ModuleNeeded> importNeedsList=new ArrayList<ModuleNeeded>();
  IProxyRepositoryFactory repositoryFactory=CoreRuntimePlugin.getInstance().getRepositoryService().getProxyRepositoryFactory();
  List<IRepositoryViewObject> jobs=repositoryFactory.getAll(ERepositoryObjectType.PROCESS,true);
  for (  IRepositoryViewObject cur : jobs) {
    if (!cur.isDeleted()) {
      ProcessItem item=(ProcessItem)cur.getProperty().getItem();
      if (item == null || item.getProcess() == null) {
        continue;
      }
      List<NodeType> nodes=item.getProcess().getNode();
      for (      NodeType node : nodes) {
        List<ElementParameterType> elementParameter=node.getElementParameter();
        for (        ElementParameterType elementParam : elementParameter) {
          if (elementParam.getField() != null && elementParam.getField().equals(EParameterFieldType.MODULE_LIST.getName())) {
            String uniquename=coreSerivce.getParameterUNIQUENAME(node);
            ModuleNeeded toAdd=new ModuleNeeded(Messages.getString("String_Node_Str") + item.getProperty().getLabel(),elementParam.getValue(),Messages.getString("String_Node_Str") + uniquename + "String_Node_Str",true);
            importNeedsList.add(toAdd);
          }
        }
      }
    }
  }
  return importNeedsList;
}

Fixed version (ground truth):
@Override public List<ModuleNeeded> getModulesNeededForJobs() throws PersistenceException {
  List<ModuleNeeded> importNeedsList=new ArrayList<ModuleNeeded>();
  IProxyRepositoryFactory repositoryFactory=CoreRuntimePlugin.getInstance().getRepositoryService().getProxyRepositoryFactory();
  List<IRepositoryViewObject> jobs=repositoryFactory.getAll(ERepositoryObjectType.PROCESS,true);
  for (  IRepositoryViewObject cur : jobs) {
    if (!cur.isDeleted()) {
      ProcessItem item=(ProcessItem)cur.getProperty().getItem();
      if (item == null || item.getProcess() == null) {
        continue;
      }
      List<NodeType> nodes=item.getProcess().getNode();
      for (      NodeType node : nodes) {
        List<ElementParameterType> elementParameter=node.getElementParameter();
        for (        ElementParameterType elementParam : elementParameter) {
          if (elementParam.getField() != null && elementParam.getField().equals(EParameterFieldType.MODULE_LIST.getName())) {
            String uniquename=coreSerivce.getParameterUNIQUENAME(node);
            ModuleNeeded toAdd=new ModuleNeeded(Messages.getString("String_Node_Str") + item.getProperty().getLabel(),elementParam.getValue(),Messages.getString("String_Node_Str") + uniquename + "String_Node_Str",true);
            importNeedsList.add(toAdd);
          }
        }
      }
    }
  }
  return importNeedsList;
}
Program: 128794
Project: 128794
Buggy source:
public RootContainer<String,IRepositoryViewObject> getMetadata(Project project,ERepositoryObjectType type,boolean... options) throws PersistenceException {
  return getObjectFromFolder(project,type,true,options);
}

Fixed version (ground truth):
@Override public RootContainer<String,IRepositoryViewObject> getMetadata(Project project,ERepositoryObjectType type,boolean... options) throws PersistenceException {
  return getObjectFromFolder(project,type,true,options);
}
Program: 128795
Project: 128795
Buggy source:
public Property getUptodateProperty(Project project,Property property) throws PersistenceException {
  List<IRepositoryViewObject> allVersion=new ArrayList<IRepositoryViewObject>();
  getAllVersions(project,property,allVersion);
  for (  IRepositoryViewObject repositoryObject : allVersion) {
    Property uptodateProperty=repositoryObject.getProperty();
    if (uptodateProperty.getVersion().equals(property.getVersion())) {
      return uptodateProperty;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public Property getUptodateProperty(Project project,Property property) throws PersistenceException {
  List<IRepositoryViewObject> allVersion=new ArrayList<IRepositoryViewObject>();
  getAllVersions(project,property,allVersion);
  for (  IRepositoryViewObject repositoryObject : allVersion) {
    Property uptodateProperty=repositoryObject.getProperty();
    if (uptodateProperty.getVersion().equals(property.getVersion())) {
      return uptodateProperty;
    }
  }
  return null;
}
Program: 128797
Project: 128797
Buggy source:
/** 
 * DOC zshen Comment method "getMetadataByFolder".
 * @param itemType
 * @param path
 * @return all of object under path.
 */
public List<IRepositoryViewObject> getMetadataByFolder(Project project,ERepositoryObjectType itemType,IPath path){
  return getMetadatasByFolder(project,itemType,path);
}

Fixed version (ground truth):
/** 
 * DOC zshen Comment method "getMetadataByFolder".
 * @param itemType
 * @param path
 * @return all of object under path.
 */
@Override public List<IRepositoryViewObject> getMetadataByFolder(Project project,ERepositoryObjectType itemType,IPath path){
  return getMetadatasByFolder(project,itemType,path);
}
Program: 128798
Project: 128798
Buggy source:
public void reloadProject(Project project) throws PersistenceException {
}

Fixed version (ground truth):
@Override public void reloadProject(Project project) throws PersistenceException {
}