nus-yam/ex-repair huggingface dataset:
Program: 124031
Project: 124031
Buggy source:
private boolean collectProjectFilesFromProvider(Collection files,Object entry,int level){
  List children=structureProvider.getChildren(entry);
  if (children == null) {
    children=new ArrayList(1);
  }
  boolean isContainsFile=false;
  Iterator childrenEnum=children.iterator();
  for (int i=0; i < children.size(); i++) {
    Object child=children.get(i);
    if (!structureProvider.isFolder(child)) {
      String elementLabel=structureProvider.getLabel(child);
      if (elementLabel.equals("String_Node_Str")) {
        isContainsFile=true;
      }
    }
  }
  while (childrenEnum.hasNext()) {
    Object child=childrenEnum.next();
    if (structureProvider.isFolder(child)) {
      collectProjectFilesFromProvider(files,child,level + 1);
    }
    String elementLabel=structureProvider.getLabel(child);
    if (elementLabel.equals("String_Node_Str") && isContainsFile) {
      files.add(new TalendProjectRecord(child,entry,level));
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean collectProjectFilesFromProvider(Collection files,Object entry,int level){
  List children=structureProvider.getChildren(entry);
  if (children == null) {
    children=new ArrayList(1);
  }
  boolean isContainsFile=false;
  Iterator childrenEnum=children.iterator();
  for (int i=0; i < children.size(); i++) {
    Object child=children.get(i);
    if (!structureProvider.isFolder(child)) {
      String elementLabel=structureProvider.getLabel(child);
      if (elementLabel.equals(TALEND_PROJECT)) {
        isContainsFile=true;
      }
    }
  }
  while (childrenEnum.hasNext()) {
    Object child=childrenEnum.next();
    if (structureProvider.isFolder(child)) {
      collectProjectFilesFromProvider(files,child,level + 1);
    }
    String elementLabel=structureProvider.getLabel(child);
    if (elementLabel.equals("String_Node_Str") && isContainsFile) {
      files.add(new TalendProjectRecord(child,entry,level));
    }
  }
  return true;
}
Program: 124032
Project: 124032
Buggy source:
/** 
 * DOC JKWANG Comment method "isOracleAmazonStringContained".
 * @param string
 * @return
 */
private static boolean isOracleAmazonStringContained(String dbType,String emfName){
  if (dbType != null && emfName != null && Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE).matcher(dbType).matches()) {
    for (    String amazonString : ORACLE_AMAZON_STRING) {
      if (emfName.equals(amazonString)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * DOC JKWANG Comment method "isOracleAmazonStringContained".
 * @param string
 * @return
 */
private static boolean isOracleAmazonStringContained(String dbType,String emfName){
  if (dbType != null && !dbType.equals(EDatabaseTypeName.ORACLEFORSID.getDisplayName()) && emfName != null && Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE).matcher(dbType).matches()) {
    for (    String amazonString : ORACLE_AMAZON_STRING) {
      if (emfName.equals(amazonString)) {
        return true;
      }
    }
  }
  return false;
}
Program: 124035
Project: 124035
Buggy source:
/** 
 * DOC amaumont Comment method "updateGridDataHeightForTableConstraints".
 */
public void updateGridDataHeightForTableGlobalMap(){
  int moreSpace=WindowSystem.isGTK() ? tableForGlobalMap.getItemHeight() : 0;
  int size=((InputTable)abstractDataMapTable).getGlobalMapEntries().size();
  tableForGlobalMapGridData.heightHint=size * (tableForGlobalMap.getItemHeight() + tableForGlobalMap.getItemHeight() / 2) + moreSpace;
  if (WindowSystem.isGTK()) {
    tableViewerCreatorForGlobalMap.layout();
  }
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "updateGridDataHeightForTableConstraints".
 */
public void updateGridDataHeightForTableGlobalMap(){
  int moreSpace=WindowSystem.isGTK() ? tableForGlobalMap.getItemHeight() : 0;
  int size=((InputTable)abstractDataMapTable).getGlobalMapEntries().size();
  if (size < 3) {
    tableForGlobalMapGridData.heightHint=size * (tableForGlobalMap.getItemHeight() + tableForGlobalMap.getItemHeight() / 2) + moreSpace;
  }
 else {
    tableForGlobalMapGridData.heightHint=size * (tableForGlobalMap.getItemHeight()) + moreSpace;
  }
  if (WindowSystem.isGTK() || WindowSystem.isOSX()) {
    tableViewerCreatorForGlobalMap.layout();
  }
}
Program: 124041
Project: 124041
Buggy source:
@Override public void refresh(IElementParameter param,boolean check){
  String paramName=param.getName();
  CCombo combo=(CCombo)hashCurControls.get(paramName);
  if (combo == null || combo.isDisposed()) {
    return;
  }
  Object value=param.getValue();
  if (value instanceof String) {
    String strValue="String_Node_Str";
    boolean strValueSet=false;
    int nbInList=0, nbMax=param.getListItemsValue().length;
    String name=(String)value;
    while (strValue.equals(new String("String_Node_Str")) && nbInList < nbMax) {
      if (name.equals(param.getListItemsValue()[nbInList])) {
        strValue=(String)param.getListItemsDisplayName()[nbInList];
        strValueSet=true;
      }
      nbInList++;
    }
    if (!strValueSet) {
      strValue=name;
    }
    String[] paramItems=getListToDisplay(param);
    String[] comboItems=combo.getItems();
    if (!Arrays.equals(paramItems,comboItems)) {
      combo.setItems(paramItems);
    }
    combo.setText(strValue);
    combo.setVisible(true);
  }
  if (param.isContextMode()) {
    combo.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));
    combo.setEnabled(false);
  }
}

Fixed version (ground truth):
@Override public void refresh(IElementParameter param,boolean check){
  String paramName=param.getName();
  CCombo combo=(CCombo)hashCurControls.get(paramName);
  if (combo == null || combo.isDisposed()) {
    return;
  }
  Object value=param.getValue();
  if (value instanceof String) {
    String strValue="String_Node_Str";
    boolean strValueSet=false;
    int nbInList=0, nbMax=param.getListItemsValue().length;
    String name=(String)value;
    while (strValue.equals(new String("String_Node_Str")) && nbInList < nbMax) {
      if (name.equals(param.getListItemsValue()[nbInList])) {
        strValue=(String)param.getListItemsDisplayName()[nbInList];
        strValueSet=true;
      }
      nbInList++;
    }
    if (!strValueSet) {
      strValue=name;
    }
    String[] paramItems=getListToDisplay(param);
    String[] comboItems=combo.getItems();
    if (!Arrays.equals(paramItems,comboItems)) {
      combo.setItems(paramItems);
    }
    if (param.isRepositoryValueUsed()) {
      combo.removeModifyListener(modifySelection);
      combo.setText(strValue);
      combo.addModifyListener(modifySelection);
    }
 else {
      combo.setText(strValue);
    }
    combo.setVisible(true);
  }
  if (param.isContextMode()) {
    combo.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));
    combo.setEnabled(false);
  }
}
Program: 124044
Project: 124044
Buggy source:
public void init(TreeViewer viewer,IStructuredSelection selection){
  boolean canWork=true;
  if (selection.isEmpty()) {
    setEnabled(false);
    return;
  }
  List<RepositoryNode> nodes=(List<RepositoryNode>)selection.toList();
  for (  RepositoryNode node : nodes) {
    if (node.getType() != ENodeType.REPOSITORY_ELEMENT || node.getProperties(EProperties.CONTENT_TYPE) != ERepositoryObjectType.PROCESS) {
      canWork=false;
      break;
    }
    if (canWork && node.getObject() != null && ProxyRepositoryFactory.getInstance().getStatus(node.getObject()) == ERepositoryStatus.DELETED) {
      canWork=false;
      break;
    }
  }
  setEnabled(canWork);
}

Fixed version (ground truth):
public void init(TreeViewer viewer,IStructuredSelection selection){
  boolean canWork=true;
  if (selection.isEmpty()) {
    setEnabled(false);
    return;
  }
  List<RepositoryNode> nodes=(List<RepositoryNode>)selection.toList();
  for (  RepositoryNode node : nodes) {
    if (node.getProperties(EProperties.CONTENT_TYPE) != ERepositoryObjectType.PROCESS) {
      canWork=false;
      break;
    }
    if (node.getType() != ENodeType.REPOSITORY_ELEMENT && node.getChildren().isEmpty()) {
      canWork=false;
      break;
    }
    if (canWork && node.getObject() != null && ProxyRepositoryFactory.getInstance().getStatus(node.getObject()) == ERepositoryStatus.DELETED) {
      canWork=false;
      break;
    }
  }
  setEnabled(canWork);
}
Program: 124048
Project: 124048
Buggy source:
protected void restoreWidgetValuesForOSGI(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    String[] directoryNames=settings.getArray(STORE_DESTINATION_NAMES_ID);
    if (directoryNames != null && directoryNames.length > 0) {
      String fileName=this.getDefaultFileName().get(0) + "String_Node_Str" + this.getDefaultFileName().get(1)+ getOutputSuffix();
      for (int i=0; i < directoryNames.length; i++) {
        String destination=new Path(directoryNames[i]).append(fileName).toOSString();
        addDestinationItem(destination);
        setDestinationValue(destination);
      }
    }
 else {
      setDefaultDestinationForOSGI();
    }
  }
 else {
    setDefaultDestinationForOSGI();
  }
}

Fixed version (ground truth):
protected void restoreWidgetValuesForOSGI(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    String[] directoryNames=settings.getArray(STORE_DESTINATION_NAMES_ID);
    if (directoryNames != null && directoryNames.length > 0) {
      String fileName=getDefaultFileNameWithType();
      for (int i=0; i < directoryNames.length; i++) {
        String destination=new Path(directoryNames[i]).append(fileName).toOSString();
        addDestinationItem(destination);
        setDestinationValue(destination);
      }
    }
 else {
      setDefaultDestinationForOSGI();
    }
  }
 else {
    setDefaultDestinationForOSGI();
  }
}
Program: 124050
Project: 124050
Buggy source:
/** 
 * yzhang Comment method "setDefaultDestination".
 */
protected void setDefaultDestination(){
  String userDir=System.getProperty("String_Node_Str");
  IPath path=new Path(userDir);
  int length=nodes.length;
  String destinationFile="String_Node_Str";
  if (getDialogSettings() != null) {
    IDialogSettings section=getDialogSettings().getSection(DESTINATION_FILE);
    if (section != null) {
      destinationFile=section.get(DESTINATION_FILE);
    }
  }
  if (destinationFile == null || "String_Node_Str".equals(destinationFile)) {
    if (length == 1) {
      path=path.append(this.getDefaultFileName().get(0) + "String_Node_Str" + this.getDefaultFileName().get(1)+ getOutputSuffix());
    }
 else     if (length > 1) {
      path=path.append(this.getDefaultFileName().get(0) + "String_Node_Str" + this.getDefaultFileName().get(1)+ getOutputSuffix());
    }
  }
 else {
    IPreferenceStore store=RepositoryManager.getPreferenceStore();
    if (store.getBoolean(IRepositoryPrefConstants.USE_EXPORT_SAVE)) {
      path=new Path(destinationFile);
    }
 else {
      path=path.append(this.getDefaultFileName().get(0) + "String_Node_Str" + this.getDefaultFileName().get(1)+ getOutputSuffix());
    }
  }
  setDestinationValue(path.toOSString());
}

Fixed version (ground truth):
/** 
 * yzhang Comment method "setDefaultDestination".
 */
protected void setDefaultDestination(){
  String userDir=System.getProperty("String_Node_Str");
  IPath path=new Path(userDir);
  int length=nodes.length;
  String destinationFile="String_Node_Str";
  if (getDialogSettings() != null) {
    IDialogSettings section=getDialogSettings().getSection(DESTINATION_FILE);
    if (section != null) {
      destinationFile=section.get(DESTINATION_FILE);
    }
  }
  if (destinationFile == null || "String_Node_Str".equals(destinationFile)) {
    if (length == 1) {
      path=path.append(getDefaultFileNameWithType());
    }
 else     if (length > 1) {
      path=path.append(getDefaultFileNameWithType());
    }
  }
 else {
    IPreferenceStore store=RepositoryManager.getPreferenceStore();
    if (store.getBoolean(IRepositoryPrefConstants.USE_EXPORT_SAVE)) {
      path=new Path(destinationFile);
    }
 else {
      path=path.append(getDefaultFileNameWithType());
    }
  }
  setDestinationValue(path.toOSString());
}
Program: 124051
Project: 124051
Buggy source:
protected void setDefaultDestinationForOSGI(){
  String bundleName=this.getDefaultFileName().get(0) + "String_Node_Str" + this.getDefaultFileName().get(1)+ getOutputSuffix();
  String userDir=System.getProperty("String_Node_Str");
  IPath path=new Path(userDir).append(bundleName);
  setDestinationValue(path.toOSString());
}

Fixed version (ground truth):
protected void setDefaultDestinationForOSGI(){
  String bundleName=getDefaultFileNameWithType();
  String userDir=System.getProperty("String_Node_Str");
  IPath path=new Path(userDir).append(bundleName);
  setDestinationValue(path.toOSString());
}
Program: 124052
Project: 124052
Buggy source:
protected List<String> getDefaultFileName(){
  List<String> list=null;
  if (nodes.length >= 1) {
    String label=null;
    String version=null;
    RepositoryNode node=nodes[0];
    if (node.getType() == ENodeType.SYSTEM_FOLDER || node.getType() == ENodeType.SIMPLE_FOLDER) {
      label=node.getProperties(EProperties.LABEL).toString();
    }
 else     if (node.getType() == ENodeType.REPOSITORY_ELEMENT) {
      IRepositoryViewObject repositoryObject=node.getObject();
      if (repositoryObject.getProperty().getItem() instanceof ProcessItem) {
        ProcessItem processItem=(ProcessItem)repositoryObject.getProperty().getItem();
        label=processItem.getProperty().getLabel();
        version=processItem.getProperty().getVersion();
        list=new ArrayList<String>();
        list.add(label);
        list.add(version);
      }
    }
    return list;
  }
  return null;
}

Fixed version (ground truth):
protected List<String> getDefaultFileName(){
  List<String> list=new ArrayList<String>();
  if (nodes.length >= 1) {
    String label="String_Node_Str";
    String version="String_Node_Str";
    if (nodes.length > 1) {
      label=ProjectManager.getInstance().getCurrentProject().getLabel();
    }
 else {
      RepositoryNode node=nodes[0];
      if (node.getType() == ENodeType.SYSTEM_FOLDER || node.getType() == ENodeType.SIMPLE_FOLDER) {
        label=node.getProperties(EProperties.LABEL).toString();
      }
 else       if (node.getType() == ENodeType.REPOSITORY_ELEMENT) {
        IRepositoryViewObject repositoryObject=node.getObject();
        if (repositoryObject.getProperty().getItem() instanceof ProcessItem) {
          ProcessItem processItem=(ProcessItem)repositoryObject.getProperty().getItem();
          label=processItem.getProperty().getLabel();
          version=processItem.getProperty().getVersion();
        }
      }
    }
    list.add(label);
    list.add(version);
    return list;
  }
  return null;
}
Program: 124053
Project: 124053
Buggy source:
@Override public JobScriptsManager createJobScriptsManager(){
  Map<ExportChoice,Object> exportChoiceMap=getExportChoiceMap();
  String launcher=(getCurrentExportType() == JobExportType.POJO) ? launcherCombo.getText() : "String_Node_Str";
  String context=(contextCombo == null || contextCombo.isDisposed()) ? "String_Node_Str" : contextCombo.getText();
  JobScriptsManager manager=JobScriptsManagerFactory.createManagerInstance(exportChoiceMap,context,launcher,IProcessor.NO_STATISTICS,IProcessor.NO_TRACES,getCurrentExportType());
  manager.setDestinationPath(getDestinationValue());
  return manager;
}

Fixed version (ground truth):
@Override public JobScriptsManager createJobScriptsManager(){
  Map<ExportChoice,Object> exportChoiceMap=getExportChoiceMap();
  String launcher=(getCurrentExportType1() == JobExportType.POJO) ? launcherCombo.getText() : "String_Node_Str";
  String context=(contextCombo == null || contextCombo.isDisposed()) ? "String_Node_Str" : contextCombo.getText();
  JobScriptsManager manager=JobScriptsManagerFactory.createManagerInstance(exportChoiceMap,context,launcher,IProcessor.NO_STATISTICS,IProcessor.NO_TRACES,getCurrentExportType1());
  manager.setDestinationPath(getDestinationValue());
  return manager;
}
Program: 124057
Project: 124057
Buggy source:
@Override protected String getOutputSuffix(){
switch (getCurrentExportType()) {
case WSWAR:
    return "String_Node_Str";
case JBOSSESB:
  return "String_Node_Str";
case OSGI:
return "String_Node_Str";
default :
return "String_Node_Str";
}
}

Fixed version (ground truth):
@Override protected String getOutputSuffix(){
switch (getCurrentExportType1()) {
case WSWAR:
    return "String_Node_Str";
case JBOSSESB:
  return "String_Node_Str";
case OSGI:
return "String_Node_Str";
default :
return "String_Node_Str";
}
}
Program: 124058
Project: 124058
Buggy source:
protected void createOptionsGroupButtons(Composite parent){
  GridLayout layout=new GridLayout();
  optionsGroupComposite=new Composite(parent,SWT.NONE);
  GridData gridData=new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
  gridData.minimumHeight=200;
  optionsGroupComposite.setLayoutData(gridData);
  optionsGroupComposite.setLayout(layout);
  Group optionsGroup=new Group(optionsGroupComposite,SWT.NONE);
  optionsGroup.setLayout(layout);
  optionsGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
  optionsGroup.setText(IDEWorkbenchMessages.WizardExportPage_options);
  optionsGroup.setFont(parent.getFont());
  Font font=optionsGroup.getFont();
  optionsGroup.setLayout(new GridLayout(1,true));
  Composite left=new Composite(optionsGroup,SWT.NONE);
  gridData=new GridData(SWT.LEFT,SWT.TOP,true,false);
  left.setLayoutData(gridData);
  left.setLayout(new GridLayout(3,true));
switch (getCurrentExportType()) {
case POJO:
    createOptions(left,font);
  restoreWidgetValuesForPOJO();
break;
case JBOSSESB:
createOptionsForJbossESB(left,font);
restoreWidgetValuesForESB();
break;
case PETALSESB:
createOptionsforPetalsESB(left,font);
restoreWidgetValuesForPetalsESB();
restoreWidgetValues();
break;
case OSGI:
createOptionsForOSGIESB(left,font);
restoreWidgetValuesForOSGI();
break;
default :
createOptionsForWS(left,font);
break;
}
}

Fixed version (ground truth):
protected void createOptionsGroupButtons(Composite parent){
  GridLayout layout=new GridLayout();
  optionsGroupComposite=new Composite(parent,SWT.NONE);
  GridData gridData=new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
  gridData.minimumHeight=200;
  optionsGroupComposite.setLayoutData(gridData);
  optionsGroupComposite.setLayout(layout);
  Group optionsGroup=new Group(optionsGroupComposite,SWT.NONE);
  optionsGroup.setLayout(layout);
  optionsGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
  optionsGroup.setText(IDEWorkbenchMessages.WizardExportPage_options);
  optionsGroup.setFont(parent.getFont());
  Font font=optionsGroup.getFont();
  optionsGroup.setLayout(new GridLayout(1,true));
  Composite left=new Composite(optionsGroup,SWT.NONE);
  gridData=new GridData(SWT.LEFT,SWT.TOP,true,false);
  left.setLayoutData(gridData);
  left.setLayout(new GridLayout(3,true));
switch (getCurrentExportType1()) {
case POJO:
    createOptions(left,font);
  restoreWidgetValuesForPOJO();
break;
case JBOSSESB:
createOptionsForJbossESB(left,font);
restoreWidgetValuesForESB();
break;
case PETALSESB:
createOptionsforPetalsESB(left,font);
restoreWidgetValuesForPetalsESB();
restoreWidgetValues();
break;
case OSGI:
createOptionsForOSGIESB(left,font);
restoreWidgetValuesForOSGI();
break;
default :
createOptionsForWS(left,font);
break;
}
}
Program: 124059
Project: 124059
Buggy source:
@Override public boolean checkExport(){
  setErrorMessage(null);
  if (!super.checkExport()) {
    return false;
  }
  if (getCurrentExportType().equals(JobExportType.PETALSESB)) {
    chkButton.setVisible(false);
    zipOption=null;
    if (isMultiNodes()) {
      setErrorMessage(Messages.getString("String_Node_Str"));
    }
    validateOptionsGroup();
  }
  if (getCurrentExportType().equals(JobExportType.JBOSSESB)) {
    if (isMultiNodes()) {
      setErrorMessage(Messages.getString("String_Node_Str"));
    }
    String requiredJar="String_Node_Str";
    List<ModuleNeeded> toCheck=ModulesNeededProvider.getModulesNeeded();
    for (    ModuleNeeded current : toCheck) {
      if (requiredJar.equals(current.getModuleName())) {
        if (current.getStatus() == ELibraryInstallStatus.NOT_INSTALLED) {
          StringBuilder buff=new StringBuilder();
          buff.append(Messages.getString("String_Node_Str"));
          buff.append(Messages.getString("String_Node_Str"));
          setErrorMessage(buff.toString());
          break;
        }
      }
    }
  }
  if (getCurrentExportType().equals(JobExportType.OSGI)) {
    if (isMultiNodes()) {
      setErrorMessage("String_Node_Str");
    }
  }
  if (getCheckNodes().length == 0) {
    setErrorMessage(Messages.getString("String_Node_Str"));
  }
  boolean noError=getErrorMessage() == null;
  setPageComplete(noError);
  return noError;
}

Fixed version (ground truth):
@Override public boolean checkExport(){
  setErrorMessage(null);
  if (!super.checkExport()) {
    return false;
  }
  if (getCurrentExportType1().equals(JobExportType.PETALSESB)) {
    chkButton.setVisible(false);
    zipOption=null;
    if (isMultiNodes()) {
      setErrorMessage(Messages.getString("String_Node_Str"));
    }
    validateOptionsGroup();
  }
  if (getCurrentExportType1().equals(JobExportType.JBOSSESB)) {
    if (isMultiNodes()) {
      setErrorMessage(Messages.getString("String_Node_Str"));
    }
    String requiredJar="String_Node_Str";
    List<ModuleNeeded> toCheck=ModulesNeededProvider.getModulesNeeded();
    for (    ModuleNeeded current : toCheck) {
      if (requiredJar.equals(current.getModuleName())) {
        if (current.getStatus() == ELibraryInstallStatus.NOT_INSTALLED) {
          StringBuilder buff=new StringBuilder();
          buff.append(Messages.getString("String_Node_Str"));
          buff.append(Messages.getString("String_Node_Str"));
          setErrorMessage(buff.toString());
          break;
        }
      }
    }
  }
  if (getCurrentExportType1().equals(JobExportType.OSGI)) {
    if (isMultiNodes()) {
      setErrorMessage("String_Node_Str");
    }
  }
  if (getCheckNodes().length == 0) {
    setErrorMessage(Messages.getString("String_Node_Str"));
  }
  boolean noError=getErrorMessage() == null;
  setPageComplete(noError);
  return noError;
}
Program: 124060
Project: 124060
Buggy source:
protected String getDefaultFileNameWithType(){
  String version="String_Node_Str";
  List<String> defaultFileName=getDefaultFileName();
  if (defaultFileName.get(1) != null && !"String_Node_Str".equals(defaultFileName.get(1))) {
    version=((JobExportType.OSGI.equals(getCurrentExportType())) ? "String_Node_Str" : "String_Node_Str") + defaultFileName.get(1);
  }
  String fileName=defaultFileName.get(0) + version + getOutputSuffix();
  return fileName;
}

Fixed version (ground truth):
protected String getDefaultFileNameWithType(){
  String version="String_Node_Str";
  List<String> defaultFileName=getDefaultFileName();
  if (defaultFileName.get(1) != null && !"String_Node_Str".equals(defaultFileName.get(1))) {
    version=((JobExportType.OSGI.equals(getCurrentExportType1())) ? "String_Node_Str" : "String_Node_Str") + defaultFileName.get(1);
  }
  String fileName=defaultFileName.get(0) + version + getOutputSuffix();
  return fileName;
}
Program: 124061
Project: 124061
Buggy source:
public void writeComment(String commentText) throws IOException {
  checkClosed();
  checkInit();
  outputStream.write(userSettings.Comment);
  outputStream.write(commentText);
  if (useCustomRecordDelimiter) {
    outputStream.write(userSettings.RecordDelimiter);
  }
 else {
    outputStream.println();
  }
  firstColumn=true;
}

Fixed version (ground truth):
public void writeComment(String commentText) throws IOException {
  checkClosed();
  checkInit();
  outputStream.write(userSettings.Comment);
  outputStream.write(commentText);
  if (useCustomRecordDelimiter) {
    outputStream.write(userSettings.RecordDelimiter);
  }
 else   if (useCRLFRecordDelimiter) {
    outputStream.print(CRLF);
  }
 else {
    outputStream.println();
  }
  firstColumn=true;
}
Program: 124062
Project: 124062
Buggy source:
/** 
 * Ends the current record by sending the record delimiter.
 * @exception IOException Thrown if an error occurs while writing data to the destination stream.
 */
public void endRecord() throws IOException {
  checkClosed();
  checkInit();
  if (useCustomRecordDelimiter) {
    outputStream.write(userSettings.RecordDelimiter);
  }
 else {
    outputStream.println();
  }
  firstColumn=true;
}

Fixed version (ground truth):
/** 
 * Ends the current record by sending the record delimiter.
 * @exception IOException Thrown if an error occurs while writing data to the destination stream.
 */
public void endRecord() throws IOException {
  checkClosed();
  checkInit();
  if (useCustomRecordDelimiter) {
    outputStream.write(userSettings.RecordDelimiter);
  }
 else   if (useCRLFRecordDelimiter) {
    outputStream.print(CRLF);
  }
 else {
    outputStream.println();
  }
  firstColumn=true;
}
Program: 124066
Project: 124066
Buggy source:
/** 
 * Return a list of all files in the project Method as taken in org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage.
 * @param provider The provider for the parent file
 * @param entry The root directory of the project
 * @return A list of all files in the project
 */
public static void getFilesForProject(Collection files,IImportStructureProvider provider,Object entry){
  List children=provider.getChildren(entry);
  Iterator childrenEnum=children.iterator();
  while (childrenEnum.hasNext()) {
    Object child=childrenEnum.next();
    files.add(child);
    if (provider.isFolder(child)) {
      getFilesForProject(files,provider,child);
    }
  }
}

Fixed version (ground truth):
/** 
 * Return a list of all files in the project Method as taken in org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage.
 * @param provider The provider for the parent file
 * @param entry The root directory of the project
 * @return A list of all files in the project
 */
public static void getFilesForProject(Collection files,IImportStructureProvider provider,Object entry){
  List children=provider.getChildren(entry);
  Iterator childrenEnum=children.iterator();
  while (childrenEnum.hasNext()) {
    Object child=childrenEnum.next();
    createUserDefinedIfSqlpattern(child);
    files.add(child);
    if (provider.isFolder(child)) {
      getFilesForProject(files,provider,child);
    }
  }
}
Program: 124067
Project: 124067
Buggy source:
/** 
 * DOC amaumont Comment method "updateGridDataHeightForTableConstraints".
 */
public void updateGridDataHeightForTableGlobalMap(){
  int moreSpace=WindowSystem.isGTK() ? tableForGlobalMap.getItemHeight() : 0;
  int size=((InputTable)abstractDataMapTable).getGlobalMapEntries().size();
  tableForGlobalMapGridData.heightHint=size * (tableForGlobalMap.getItemHeight() + tableForGlobalMap.getItemHeight() / 2) + moreSpace;
  if (WindowSystem.isGTK()) {
    tableViewerCreatorForGlobalMap.layout();
  }
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "updateGridDataHeightForTableConstraints".
 */
public void updateGridDataHeightForTableGlobalMap(){
  int moreSpace=WindowSystem.isGTK() ? tableForGlobalMap.getItemHeight() : 0;
  int size=((InputTable)abstractDataMapTable).getGlobalMapEntries().size();
  if (size < 3) {
    tableForGlobalMapGridData.heightHint=size * (tableForGlobalMap.getItemHeight() + tableForGlobalMap.getItemHeight() / 2) + moreSpace;
  }
 else {
    tableForGlobalMapGridData.heightHint=size * (tableForGlobalMap.getItemHeight()) + moreSpace;
  }
  if (WindowSystem.isGTK() || WindowSystem.isOSX()) {
    tableViewerCreatorForGlobalMap.layout();
  }
}
Program: 124071
Project: 124071
Buggy source:
/** 
 * fixed Table .
 * @param metaFromDB MetadataTable from Database
 * @param metaFromEMF MetadataTable from Emf
 * @param iMetadataConnection contain Connection.
 */
@SuppressWarnings("String_Node_Str") private void fixedTables(List<MetadataTable> metaFromDB,List<MetadataTable> metaFromEMF,IMetadataConnection iMetadataConnection,RepositoryNode oldNode){
  List<MetadataTable> removeEmfDB=new ArrayList<MetadataTable>();
  for (  MetadataTable emf : metaFromEMF) {
    boolean flag=modifyOldOneTableFromDB(metaFromDB,emf);
    if (flag) {
      removeEmfDB.add(emf);
    }
  }
  for (  MetadataTable metadataTable : removeEmfDB) {
    if (metadataTable.getLabel() == null || "String_Node_Str".equals(metadataTable.getLabel())) {
      metaFromEMF.remove(metadataTable);
    }
  }
  while (!metaFromDB.isEmpty()) {
    MetadataTable db=metaFromDB.remove(0);
    modifyOldOneTableFromEMF(metaFromEMF,iMetadataConnection,db);
  }
}

Fixed version (ground truth):
/** 
 * fixed Table .
 * @param metaFromDB MetadataTable from Database
 * @param metaFromEMF MetadataTable from Emf
 * @param iMetadataConnection contain Connection.
 */
@SuppressWarnings("String_Node_Str") private void fixedTables(List<MetadataTable> metaFromDB,List<MetadataTable> metaFromEMF,IMetadataConnection iMetadataConnection,RepositoryNode oldNode){
  List<MetadataTable> removeEmfDB=new ArrayList<MetadataTable>();
  for (  MetadataTable emf : metaFromEMF) {
    boolean flag=modifyOldOneTableFromDB(metaFromDB,emf);
    if (flag) {
      removeEmfDB.add(emf);
    }
  }
  for (  MetadataTable metadataTable : removeEmfDB) {
    if (metadataTable.getLabel() == null || "String_Node_Str".equals(metadataTable.getLabel())) {
      metaFromEMF.remove(metadataTable);
    }
  }
  int nbTables=0;
  while (!metaFromDB.isEmpty() && nbTables < 500) {
    MetadataTable db=metaFromDB.remove(0);
    modifyOldOneTableFromEMF(metaFromEMF,iMetadataConnection,db);
    nbTables++;
  }
}
Program: 124072
Project: 124072
Buggy source:
/** 
 * dev Comment method "ModifyOldConnection".
 * @param tablesFromEMF
 * @param iMetadataConnection
 * @param tablesFromDB
 */
@SuppressWarnings("String_Node_Str") private void modifyOldConnection(List<MetadataTable> tablesFromEMF,IMetadataConnection iMetadataConnection,List<MetadataTable> tablesFromDB,RepositoryNode oldNode){
  for (  MetadataTable tableFromDB : tablesFromDB) {
    List<MetadataColumn> columnsFromDB=new ArrayList<MetadataColumn>();
    columnsFromDB.addAll(ExtractMetaDataFromDataBase.returnMetadataColumnsFormTable(iMetadataConnection,tableFromDB.getSourceName()));
    for (    MetadataTable tableFromEMF : tablesFromEMF) {
      List<MetadataColumn> columnsFromEMF=tableFromEMF.getColumns();
      if (tableFromDB.getSourceName().equals(tableFromEMF.getSourceName())) {
        fixedColumns(columnsFromDB,columnsFromEMF);
      }
    }
  }
  fixedTables(tablesFromDB,tablesFromEMF,iMetadataConnection,oldNode);
}

Fixed version (ground truth):
/** 
 * dev Comment method "ModifyOldConnection".
 * @param tablesFromEMF
 * @param iMetadataConnection
 * @param tablesFromDB
 */
@SuppressWarnings("String_Node_Str") private void modifyOldConnection(List<MetadataTable> tablesFromEMF,IMetadataConnection iMetadataConnection,List<MetadataTable> tablesFromDB,RepositoryNode oldNode){
  for (  MetadataTable tableFromDB : tablesFromDB) {
    MetadataTable tableFromModel=null;
    for (    MetadataTable tableFromEMF : tablesFromEMF) {
      if (tableFromDB.getSourceName().equals(tableFromEMF.getSourceName())) {
        tableFromModel=tableFromEMF;
      }
    }
    if (tableFromModel != null) {
      List<MetadataColumn> columnsFromDB=new ArrayList<MetadataColumn>();
      columnsFromDB.addAll(ExtractMetaDataFromDataBase.returnMetadataColumnsFormTable(iMetadataConnection,tableFromDB.getSourceName()));
      List<MetadataColumn> columnsFromEMF=tableFromModel.getColumns();
      fixedColumns(columnsFromDB,columnsFromEMF);
    }
  }
  fixedTables(tablesFromDB,tablesFromEMF,iMetadataConnection,oldNode);
}
Program: 124075
Project: 124075
Buggy source:
/** 
 * dev Comment method "restoreConnection".
 * @param connection
 * @param tablesFromEMF
 */
@SuppressWarnings("String_Node_Str") private void restoreConnection(DatabaseConnection connection,List<MetadataTable> tablesFromEMF){
  tablesFromEMF=sortTableColumn(tablesFromEMF);
  if (tList == null) {
    tList=new ArrayList<MetadataTable>();
    tList.addAll(ConnectionHelper.getTables(connection));
  }
  Catalog c=(Catalog)ConnectionHelper.getPackage(connection.getSID(),connection,Catalog.class);
  Schema s=(Schema)ConnectionHelper.getPackage(connection.getSID(),connection,Schema.class);
  Schema schema=(Schema)ConnectionHelper.getPackage(connection.getUiSchema(),connection,Schema.class);
  if (c != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,c);
  }
 else   if (s != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,s);
  }
 else   if (schema != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,schema);
  }
}

Fixed version (ground truth):
/** 
 * dev Comment method "restoreConnection".
 * @param connection
 * @param tablesFromEMF
 */
@SuppressWarnings("String_Node_Str") private void restoreConnection(DatabaseConnection connection,List<MetadataTable> tablesFromEMF){
  tablesFromEMF=sortTableColumn(tablesFromEMF);
  if (tList == null) {
    tList=new ArrayList<MetadataTable>();
    tList.addAll(ConnectionHelper.getTables(connection));
  }
  Catalog c=(Catalog)ConnectionHelper.getPackage(connection.getSID(),connection,Catalog.class);
  Schema s=(Schema)ConnectionHelper.getPackage(connection.getSID(),connection,Schema.class);
  Schema schema=(Schema)ConnectionHelper.getPackage(connection.getUiSchema(),connection,Schema.class);
  if (c != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,c);
  }
 else   if (s != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,s);
  }
 else   if (schema != null) {
    PackageHelper.addMetadataTable(tablesFromEMF,schema);
  }
 else {
    Schema defaultSchema=null;
    List<Schema> schemas=ConnectionHelper.getSchema(connection);
    if (schemas.size() > 0) {
      for (      Schema sch : schemas) {
        if ("String_Node_Str".equals(sch.getName())) {
          defaultSchema=sch;
          break;
        }
      }
    }
    if (defaultSchema == null) {
      defaultSchema=SchemaHelper.createSchema("String_Node_Str");
      ConnectionHelper.addSchema(defaultSchema,connection);
    }
    PackageHelper.addMetadataTable(tablesFromEMF,defaultSchema);
  }
}
Program: 124076
Project: 124076
Buggy source:
private void checkItemDependencies(Item item,List<IRepositoryViewObject> repositoryObjects){
  if (item == null) {
    return;
  }
  IProxyRepositoryFactory factory=CorePlugin.getDefault().getProxyRepositoryFactory();
  RelationshipItemBuilder builder=RelationshipItemBuilder.getInstance();
  List<RelationshipItemBuilder.Relation> relations;
  if (item instanceof JobletProcessItem) {
    relations=builder.getItemsRelatedTo(item.getProperty().getId(),item.getProperty().getVersion(),RelationshipItemBuilder.JOBLET_RELATION);
  }
 else {
    relations=builder.getItemsRelatedTo(item.getProperty().getId(),item.getProperty().getVersion(),RelationshipItemBuilder.JOB_RELATION);
  }
  for (  RelationshipItemBuilder.Relation relation : relations) {
    IRepositoryViewObject obj=null;
    String id=relation.getId();
    try {
      if (RelationshipItemBuilder.ROUTINE_RELATION.equals(relation.getType())) {
        obj=RoutinesUtil.getRoutineFromName(id);
      }
 else {
        if (id != null && id.indexOf("String_Node_Str") != -1) {
          id=id.substring(0,id.lastIndexOf("String_Node_Str"));
        }
        obj=factory.getLastVersion(id);
      }
      if (obj != null) {
        RepositoryNode repositoryNode=RepositoryNodeUtilities.getRepositoryNode(obj,false);
        if (repositoryNode != null) {
          if (!repositoryObjects.contains(obj)) {
            repositoryObjects.add(obj);
            checkAllVerSionLatest(repositoryObjects,obj);
            checkItemDependencies(obj.getProperty().getItem(),repositoryObjects);
          }
        }
      }
    }
 catch (    PersistenceException et) {
      ExceptionHandler.process(et);
    }
  }
}

Fixed version (ground truth):
private void checkItemDependencies(IRepositoryViewObject obj,List<IRepositoryViewObject> repositoryObjects){
  if (obj != null) {
    RepositoryNode repositoryNode=RepositoryNodeUtilities.getRepositoryNode(obj,false);
    if (repositoryNode != null) {
      if (!repositoryObjects.contains(obj)) {
        repositoryObjects.add(obj);
        checkAllVerSionLatest(repositoryObjects,obj);
        checkItemDependencies(obj.getProperty().getItem(),repositoryObjects);
      }
    }
  }
}
Program: 124077
Project: 124077
Buggy source:
private void refreshExportDependNodes(){
  checkedNodes.clear();
  Object[] checkedObj=((CheckboxTreeViewer)viewer).getCheckedElements();
  for (int i=0; i < checkedObj.length; i++) {
    if (checkedObj[i] instanceof RepositoryNode) {
      RepositoryNode checkedNode=(RepositoryNode)checkedObj[i];
      if (checkedNode != null && !RepositoryNode.NO_ID.equals(checkedNode.getId())) {
        if (checkedNode.getChildren().isEmpty()) {
          checkedNodes.add(checkedNode);
        }
      }
    }
  }
  allNode.clear();
  allNode.addAll(repositoryNodes);
  allNode.addAll(checkedNodes);
}

Fixed version (ground truth):
private void refreshExportDependNodes(){
  checkedNodes.clear();
  Object[] checkedObj=((CheckboxTreeViewer)viewer).getCheckedElements();
  for (int i=0; i < checkedObj.length; i++) {
    if (checkedObj[i] instanceof RepositoryNode) {
      RepositoryNode checkedNode=(RepositoryNode)checkedObj[i];
      if (checkedNode != null && !RepositoryNode.NO_ID.equals(checkedNode.getId())) {
        if (ENodeType.REPOSITORY_ELEMENT.equals(checkedNode.getType())) {
          checkedNodes.add(checkedNode);
        }
      }
    }
  }
  allNode.clear();
  allNode.addAll(repositoryNodes);
  allNode.addAll(checkedNodes);
}
Program: 124079
Project: 124079
Buggy source:
public void addPath(String path,String originalPath,Boolean asXML){
  paths.add(path);
  originalPaths.add(originalPath);
  asXMLs.add(asXML);
}

Fixed version (ground truth):
public void addPath(String path,String originalPath,Boolean asXML,boolean isDot){
  paths.add(path);
  originalPaths.add(originalPath);
  asXMLs.add(asXML);
  isDots.add(isDot);
}
Program: 124084
Project: 124084
Buggy source:
public HttpEntity sendToServer(List<NameValuePair> qparams,String strAPIUrl) throws paloexception {
  try {
    URI uri=URIUtils.createURI("String_Node_Str",strServer,Integer.valueOf(strPort),strAPIUrl,URLEncodedUtils.format(qparams,"String_Node_Str"),null);
    HttpGet req=new HttpGet(uri);
    System.out.println(req.getURI());
    HttpResponse rsp=paloHttpClient.execute(paloTargetHost,req);
    HttpEntity entity=rsp.getEntity();
    if (rsp.getStatusLine().getStatusCode() != 200) {
      CsvReader csv=new CsvReader(entity.getContent(),Charset.forName("String_Node_Str"));
      csv.setDelimiter(';');
      csv.setTextQualifier('"');
      csv.readRecord();
      paloexception plX=new paloexception(csv.get(0),csv.get(1),csv.get(2));
      csv.close();
      entity.consumeContent();
      throw (plX);
    }
 else {
      return entity;
    }
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}

Fixed version (ground truth):
public HttpEntity sendToServer(List<NameValuePair> qparams,String strAPIUrl) throws paloexception {
  try {
    URI uri=URIUtils.createURI("String_Node_Str",strServer,Integer.valueOf(strPort),strAPIUrl,URLEncodedUtils.format(qparams,"String_Node_Str"),null);
    HttpGet req=new HttpGet(uri);
    HttpResponse rsp=paloHttpClient.execute(paloTargetHost,req);
    HttpEntity entity=rsp.getEntity();
    if (rsp.getStatusLine().getStatusCode() != 200) {
      CsvReader csv=new CsvReader(entity.getContent(),Charset.forName("String_Node_Str"));
      csv.setDelimiter(';');
      csv.setTextQualifier('"');
      csv.readRecord();
      paloexception plX=new paloexception(csv.get(0),csv.get(1),csv.get(2));
      csv.close();
      entity.consumeContent();
      throw (plX);
    }
 else {
      return entity;
    }
  }
 catch (  Exception e) {
    throw new paloexception(e.getMessage());
  }
}
Program: 124087
Project: 124087
Buggy source:
private void checkItemDependencies(Item item,List<IRepositoryViewObject> repositoryObjects){
  if (item == null) {
    return;
  }
  IProxyRepositoryFactory factory=CorePlugin.getDefault().getProxyRepositoryFactory();
  RelationshipItemBuilder builder=RelationshipItemBuilder.getInstance();
  List<RelationshipItemBuilder.Relation> relations;
  if (item instanceof JobletProcessItem) {
    relations=builder.getItemsRelatedTo(item.getProperty().getId(),item.getProperty().getVersion(),RelationshipItemBuilder.JOBLET_RELATION);
  }
 else {
    relations=builder.getItemsRelatedTo(item.getProperty().getId(),item.getProperty().getVersion(),RelationshipItemBuilder.JOB_RELATION);
  }
  for (  RelationshipItemBuilder.Relation relation : relations) {
    IRepositoryViewObject obj=null;
    String id=relation.getId();
    try {
      if (RelationshipItemBuilder.ROUTINE_RELATION.equals(relation.getType())) {
        obj=RoutinesUtil.getRoutineFromName(id);
      }
 else {
        if (id != null && id.indexOf("String_Node_Str") != -1) {
          id=id.substring(0,id.lastIndexOf("String_Node_Str"));
        }
        obj=factory.getLastVersion(id);
      }
      if (obj != null) {
        RepositoryNode repositoryNode=RepositoryNodeUtilities.getRepositoryNode(obj,false);
        if (repositoryNode != null) {
          if (!repositoryObjects.contains(obj)) {
            repositoryObjects.add(obj);
            checkAllVerSionLatest(repositoryObjects,obj);
            checkItemDependencies(obj.getProperty().getItem(),repositoryObjects);
          }
        }
      }
    }
 catch (    PersistenceException et) {
      ExceptionHandler.process(et);
    }
  }
}

Fixed version (ground truth):
private void checkItemDependencies(IRepositoryViewObject obj,List<IRepositoryViewObject> repositoryObjects){
  if (obj != null) {
    RepositoryNode repositoryNode=RepositoryNodeUtilities.getRepositoryNode(obj,false);
    if (repositoryNode != null) {
      if (!repositoryObjects.contains(obj)) {
        repositoryObjects.add(obj);
        checkAllVerSionLatest(repositoryObjects,obj);
        checkItemDependencies(obj.getProperty().getItem(),repositoryObjects);
      }
    }
  }
}
Program: 124088
Project: 124088
Buggy source:
private void refreshExportDependNodes(){
  checkedNodes.clear();
  Object[] checkedObj=((CheckboxTreeViewer)viewer).getCheckedElements();
  for (int i=0; i < checkedObj.length; i++) {
    if (checkedObj[i] instanceof RepositoryNode) {
      RepositoryNode checkedNode=(RepositoryNode)checkedObj[i];
      if (checkedNode != null && !RepositoryNode.NO_ID.equals(checkedNode.getId())) {
        if (checkedNode.getChildren().isEmpty()) {
          checkedNodes.add(checkedNode);
        }
      }
    }
  }
  allNode.clear();
  allNode.addAll(repositoryNodes);
  allNode.addAll(checkedNodes);
}

Fixed version (ground truth):
private void refreshExportDependNodes(){
  checkedNodes.clear();
  Object[] checkedObj=((CheckboxTreeViewer)viewer).getCheckedElements();
  for (int i=0; i < checkedObj.length; i++) {
    if (checkedObj[i] instanceof RepositoryNode) {
      RepositoryNode checkedNode=(RepositoryNode)checkedObj[i];
      if (checkedNode != null && !RepositoryNode.NO_ID.equals(checkedNode.getId())) {
        if (ENodeType.REPOSITORY_ELEMENT.equals(checkedNode.getType())) {
          checkedNodes.add(checkedNode);
        }
      }
    }
  }
  allNode.clear();
  allNode.addAll(repositoryNodes);
  allNode.addAll(checkedNodes);
}
Program: 124091
Project: 124091
Buggy source:
@Override public void notifyChanged(Notification notification){
  Object oldValue=notification.getOldValue();
  Object newValue=notification.getNewValue();
  boolean changed=(newValue == null && oldValue != null) || (newValue != null && !newValue.equals(oldValue));
  if (notification.getEventType() != Notification.REMOVING_ADAPTER && changed) {
    int featureID=notification.getFeatureID(Properties.class);
    if (featureID == PropertiesPackage.PROPERTY__INFORMATIONS) {
      return;
    }
 else     if (featureID == PropertiesPackage.PROPERTY__MAX_INFORMATION_LEVEL) {
      updateTitleImage();
      return;
    }
    if (Display.getCurrent() != null) {
      propertyIsDirty=true;
      firePropertyChange(IEditorPart.PROP_DIRTY);
    }
  }
}

Fixed version (ground truth):
@Override public void notifyChanged(Notification notification){
  if (notification.getEventType() != Notification.REMOVING_ADAPTER) {
    int featureID=notification.getFeatureID(Properties.class);
    if (featureID == PropertiesPackage.PROPERTY__INFORMATIONS) {
      return;
    }
 else     if (featureID == PropertiesPackage.PROPERTY__MAX_INFORMATION_LEVEL) {
      updateTitleImage();
      return;
    }
    if (Display.getCurrent() != null) {
      propertyIsDirty=true;
      firePropertyChange(IEditorPart.PROP_DIRTY);
    }
  }
}
Program: 124092
Project: 124092
Buggy source:
@Override public void notifyChanged(Notification notification){
  Object oldValue=notification.getOldValue();
  Object newValue=notification.getNewValue();
  boolean changed=(newValue == null && oldValue != null) || (newValue != null && !newValue.equals(oldValue));
  if (notification.getEventType() != Notification.REMOVING_ADAPTER && changed) {
    propertyIsDirty=true;
    Display.getDefault().syncExec(new Runnable(){
      public void run(){
        firePropertyChange(IEditorPart.PROP_DIRTY);
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void notifyChanged(Notification notification){
  if (notification.getEventType() != Notification.REMOVING_ADAPTER) {
    propertyIsDirty=true;
    Display.getDefault().syncExec(new Runnable(){
      public void run(){
        firePropertyChange(IEditorPart.PROP_DIRTY);
      }
    }
);
  }
}
Program: 124094
Project: 124094
Buggy source:
public void getAllExistPaloDimensionElements(paloelements pleles) throws paloexception {
  tPaloDimensionElements tPaloDimele=null;
  int elementPosition=0;
  String elementName="String_Node_Str";
  int elementParentPosition=0;
  int elementLevel=0;
  for (  paloelement plElm : pleles.getElements()) {
    elementPosition=(int)plElm.getElementPosition();
    elementName=plElm.getName();
    elementParentPosition=(int)plElm.getFatherPaloelement().getElementPosition();
    elementLevel=getElementLevel(elementName,elementPosition);
    tPaloDimele=new tPaloDimensionElements(elementPosition,elementName,elementParentPosition,elementLevel);
    lstPaloDimensionElements.add(tPaloDimele);
  }
}

Fixed version (ground truth):
public void getAllExistPaloDimensionElements(paloelements pleles) throws paloexception {
  tPaloDimensionElements tPaloDimele=null;
  int elementPosition=0;
  String elementName="String_Node_Str";
  int elementParentPosition=0;
  int elementLevel=0;
  for (  paloelement plElm : pleles.getElements()) {
    elementPosition=(int)plElm.getElementPosition();
    elementName=plElm.getName();
    elementParentPosition=(int)plElm.getFatherPaloelement().getElementPosition();
    if (elementParentPosition == 0 && elementPosition == 0) {
      elementParentPosition=-1;
    }
    elementLevel=getElementLevel(elementName,elementPosition);
    tPaloDimele=new tPaloDimensionElements(elementPosition,elementName,elementParentPosition,elementLevel);
    lstPaloDimensionElements.add(tPaloDimele);
  }
}