nus-yam/ex-repair huggingface dataset:
Program: 128920
Project: 128920
Buggy source:
/** 
 * <p> Create a new instance of <code>Table</code> with its <code>TableColumn</code>s and create also a new instance of <code>TableViewer</code> if these objects doesn't exist already. </p> <p> Initialize the <code>TableViewer</code> with by default the <code>DefaultStructuredContentProvider</code>, the <code>DefaultTableLabelProvider</code> and the <code>DefaultTableViewerSorter</code>. </p> <p> If you use the default ContentProvider, you must set as input an object which extends <code>Collection</code>. </p> <p> <b> If it is the second or more time than you call this method, only the input object is loaded. Call methods of <code>TableViewer</code> for others operations. </b> </p>
 * @param input by default a object which extends <code>Collection</code>.
 */
public void init(List list){
  if (!initCalled) {
    initCalled=true;
    if (this.table == null) {
      createTable();
    }
    attachLabelProvider();
    buildAndLayoutTable();
    attachViewerSorter();
    attachContentProvider();
    attachCellEditors();
    addListeners();
  }
  boolean hasChanged=false;
  if (this.list != list) {
    hasChanged=true;
  }
  setInputList(list);
  if (tableEditorManager != null && list != null) {
    tableEditorManager.init(this.listenableList);
  }
  if (hasChanged) {
  }
}

Fixed version (ground truth):
/** 
 * <p> Create a new instance of <code>Table</code> with its <code>TableColumn</code>s and create also a new instance of <code>TableViewer</code> if these objects doesn't exist already. </p> <p> Initialize the <code>TableViewer</code> with by default the <code>DefaultStructuredContentProvider</code>, the <code>DefaultTableLabelProvider</code> and the <code>DefaultTableViewerSorter</code>. </p> <p> If you use the default ContentProvider, you must set as input an object which extends <code>Collection</code>. </p> <p> <b> If it is the second or more time than you call this method, only the input object is loaded. Call methods of <code>TableViewer</code> for others operations. </b> </p>
 * @param input by default a object which extends <code>Collection</code>.
 */
public void init(List list){
  if (!initCalled) {
    initCalled=true;
    if (this.table == null) {
      createTable();
    }
    attachLabelProvider();
    buildAndLayoutTable();
    attachViewerSorter();
    attachContentProvider();
    attachCellEditors();
    addListeners();
  }
  boolean hasChanged=false;
  if (this.list != list) {
    hasChanged=true;
  }
  setInputList(list);
  if (tableEditorManager != null && list != null) {
    tableEditorManager.init(this.listenableList);
  }
  if (hasChanged) {
    refreshTableEditorControls();
  }
}
Program: 128921
Project: 128921
Buggy source:
@Override protected void inputChanged(Object input,Object oldInput){
  if (input instanceof List) {
    int newSize=((List)input).size();
    int oldSize=0;
    if (oldInput instanceof List) {
      oldSize=((List)oldInput).size();
    }
    if (newSize != oldSize) {
      tableViewer.setItemCount(newSize);
    }
  }
  super.inputChanged(input,oldInput);
}

Fixed version (ground truth):
@Override protected void inputChanged(Object input,Object oldInput){
  if (input instanceof List && contentProvider instanceof ILazyContentProvider) {
    int newSize=((List)input).size();
    int oldSize=0;
    if (oldInput instanceof List) {
      oldSize=((List)oldInput).size();
    }
    if (newSize != oldSize) {
      tableViewer.setItemCount(newSize);
    }
  }
  super.inputChanged(input,oldInput);
}
Program: 128922
Project: 128922
Buggy source:
protected void attachContentProvider(){
  if (this.contentProvider == null) {
    this.contentProvider=new LazyContentProvider(this);
  }
  tableViewer.setContentProvider(this.contentProvider);
}

Fixed version (ground truth):
protected void attachContentProvider(){
  if (this.contentProvider == null) {
    this.contentProvider=new DefaultStructuredContentProvider(this);
  }
  tableViewer.setContentProvider(this.contentProvider);
}
Program: 128923
Project: 128923
Buggy source:
@Override public void replace(Object element,int index){
  super.replace(element,index);
  refreshTableEditorColumn(index);
}

Fixed version (ground truth):
@Override public void replace(Object element,int index){
  super.replace(element,index);
  refreshTableEditorColumn(index);
  if (!(contentProvider instanceof ILazyContentProvider)) {
    refreshTableEditorControls();
  }
}
Program: 128925
Project: 128925
Buggy source:
public void refreshTableEditorColumn(int index){
  if (tableEditorManager != null) {
    tableEditorManager.refreshColumn(index);
  }
}

Fixed version (ground truth):
public void refreshTableEditorColumn(int index){
  if (tableEditorManager != null && contentProvider instanceof ILazyContentProvider) {
    tableEditorManager.refreshColumn(index);
  }
}
Program: 128926
Project: 128926
Buggy source:
/** 
 * DOC amaumont Comment method "handleListenableListEvent".
 * @param event
 */
protected void handleAfterListenableListOperationEvent(ListenableListEvent<B> event){
  if (tableViewerCreator.getTable() != null && !tableViewerCreator.getTable().isDisposed()) {
    TableViewer tableViewer=tableViewerCreator.getTableViewer();
    if (event.type == TYPE.LIST_REGISTERED && tableViewerCreator.getInputList() == null && getExtendedTableModel().isDataRegistered()) {
      tableViewerCreator.setInputList(getBeansList());
      new AsynchronousThreading(100,true,tableViewerCreator.getTable().getDisplay(),new Runnable(){
        public void run(){
          tableViewerCreator.layout();
        }
      }
).start();
    }
 else {
      if (event.type == TYPE.ADDED) {
        tableViewer.refresh();
      }
 else       if (event.type == TYPE.SWAPED) {
        Object[] swapedObjects=event.swapedObjects;
        for (        Object data : swapedObjects) {
          tableViewer.refresh(data,true,true);
        }
      }
 else       if (event.type == TYPE.REMOVED) {
      }
 else {
        tableViewer.setItemCount(event.source.size());
        tableViewer.refresh();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "handleListenableListEvent".
 * @param event
 */
protected void handleAfterListenableListOperationEvent(ListenableListEvent<B> event){
  if (tableViewerCreator.getTable() != null && !tableViewerCreator.getTable().isDisposed()) {
    TableViewer tableViewer=tableViewerCreator.getTableViewer();
    if (event.type == TYPE.LIST_REGISTERED && tableViewerCreator.getInputList() == null && getExtendedTableModel().isDataRegistered()) {
      tableViewerCreator.setInputList(getBeansList());
      new AsynchronousThreading(100,true,tableViewerCreator.getTable().getDisplay(),new Runnable(){
        public void run(){
          tableViewerCreator.layout();
        }
      }
).start();
    }
 else {
      if (event.type == TYPE.ADDED) {
        tableViewer.refresh();
      }
 else       if (event.type == TYPE.SWAPED) {
        Object[] swapedObjects=event.swapedObjects;
        for (        Object data : swapedObjects) {
          tableViewer.refresh(data,true,true);
        }
      }
 else       if (event.type == TYPE.REMOVED) {
      }
 else {
        if (tableViewer.getContentProvider() instanceof ILazyContentProvider) {
          tableViewer.setItemCount(event.source.size());
        }
        tableViewer.refresh();
      }
    }
  }
}
Program: 128927
Project: 128927
Buggy source:
/** 
 * <p> Create a new instance of <code>Table</code> with its <code>TableColumn</code>s and create also a new instance of <code>TableViewer</code> if these objects doesn't exist already. </p> <p> Initialize the <code>TableViewer</code> with by default the <code>DefaultStructuredContentProvider</code>, the <code>DefaultTableLabelProvider</code> and the <code>DefaultTableViewerSorter</code>. </p> <p> If you use the default ContentProvider, you must set as input an object which extends <code>Collection</code>. </p> <p> <b> If it is the second or more time than you call this method, only the input object is loaded. Call methods of <code>TableViewer</code> for others operations. </b> </p>
 * @param input by default a object which extends <code>Collection</code>.
 */
public void init(List list){
  if (!initCalled) {
    initCalled=true;
    if (this.table == null) {
      createTable();
    }
    attachLabelProvider();
    buildAndLayoutTable();
    attachViewerSorter();
    attachContentProvider();
    attachCellEditors();
    addListeners();
  }
  boolean hasChanged=false;
  if (this.list != list) {
    hasChanged=true;
  }
  setInputList(list);
  if (tableEditorManager != null && list != null) {
    tableEditorManager.init(this.listenableList);
  }
  if (hasChanged) {
    refreshTableEditorControls();
  }
}

Fixed version (ground truth):
/** 
 * <p> Create a new instance of <code>Table</code> with its <code>TableColumn</code>s and create also a new instance of <code>TableViewer</code> if these objects doesn't exist already. </p> <p> Initialize the <code>TableViewer</code> with by default the <code>DefaultStructuredContentProvider</code>, the <code>DefaultTableLabelProvider</code> and the <code>DefaultTableViewerSorter</code>. </p> <p> If you use the default ContentProvider, you must set as input an object which extends <code>Collection</code>. </p> <p> <b> If it is the second or more time than you call this method, only the input object is loaded. Call methods of <code>TableViewer</code> for others operations. </b> </p>
 * @param input by default a object which extends <code>Collection</code>.
 */
public void init(List list){
  if (!initCalled) {
    initCalled=true;
    if (this.table == null) {
      createTable();
    }
    attachLabelProvider();
    buildAndLayoutTable();
    attachViewerSorter();
    attachContentProvider();
    attachCellEditors();
    addListeners();
  }
  boolean hasChanged=false;
  if (this.list != list) {
    hasChanged=true;
  }
  setInputList(list);
  if (tableEditorManager != null && list != null) {
    tableEditorManager.init(this.listenableList);
  }
  if (hasChanged && !(contentProvider instanceof ILazyContentProvider)) {
    refreshTableEditorControls();
  }
}
Program: 128928
Project: 128928
Buggy source:
/** 
 * Initiate the style intended for instanciate <code>Table</code>.
 * @return int style
 */
protected int checkTableStyles(){
  int style=SWT.NONE;
  if (lineSelection != null) {
    style|=lineSelection.getSwtStyle();
  }
  if (showLineSelection != null) {
    style|=showLineSelection.getSwtStyle();
  }
  if (checkboxInFirstColumn) {
    style|=SWT.CHECK;
  }
  if (borderVisible) {
    style|=SWT.BORDER;
  }
  if (horizontalScroll) {
    style|=SWT.H_SCROLL;
  }
  if (verticalScroll) {
    style|=SWT.V_SCROLL;
  }
  return style;
}

Fixed version (ground truth):
/** 
 * Initiate the style intended for instanciate <code>Table</code>.
 * @return int style
 */
protected int checkTableStyles(){
  int style=SWT.NONE;
  if (lineSelection != null) {
    style|=lineSelection.getSwtStyle();
  }
  if (showLineSelection != null) {
    style|=showLineSelection.getSwtStyle();
  }
  if (checkboxInFirstColumn) {
    style|=SWT.CHECK;
  }
  if (borderVisible) {
    style|=SWT.BORDER;
  }
  if (horizontalScroll) {
    style|=SWT.H_SCROLL;
  }
  if (verticalScroll) {
    style|=SWT.V_SCROLL;
  }
  if (lazyLoad) {
    style|=SWT.VIRTUAL;
  }
  return style;
}
Program: 128929
Project: 128929
Buggy source:
private void handleAddedEvent(final ListenableListEvent event){
  int indexStart=event.index;
  if (tableViewerCreator.getTable().isDisposed()) {
    return;
  }
  TableItem[] items=tableViewerCreator.getTable().getItems();
  List<TableEditor> addedTableEditor=new ArrayList<TableEditor>();
  for (  TableItem item : items) {
    TableItem tableItem=item;
    if (previousItemsHash == null || !previousItemsHash.contains(tableItem)) {
      for (int iEditorCol=0; iEditorCol < columnsWithEditorContent.size(); iEditorCol++) {
        TableViewerCreatorColumnNotModifiable column=columnsWithEditorContent.get(iEditorCol);
        TableEditorContentNotModifiable tableEditorContent=column.getTableEditorContent();
        String idProperty=column.getId();
        TableEditor tableEditor=addTableEditor(column,tableEditorContent,idProperty,tableItem);
        if (tableEditor != null) {
          addedTableEditor.add(tableEditor);
        }
      }
    }
  }
  for (int i=indexStart; i < items.length; i++) {
    TableItem tableItem=items[i];
    Object data=tableItem.getData();
    Collection<TableEditor> tableEditorCollection=dataToMultipleDataEditor.getCollection(data);
    for (    TableEditor tableEditor : tableEditorCollection) {
      tableEditor.setItem(tableItem);
    }
  }
  previousItemsHash=new HashSet<TableItem>(Arrays.asList(items));
}

Fixed version (ground truth):
private void handleAddedEvent(final ListenableListEvent event){
  int indexStart=event.index;
  if (tableViewerCreator.getTable().isDisposed()) {
    return;
  }
  if (!(tableViewerCreator.getContentProvider() instanceof ILazyContentProvider)) {
    TableItem[] items=tableViewerCreator.getTable().getItems();
    List<TableEditor> addedTableEditor=new ArrayList<TableEditor>();
    for (    TableItem item : items) {
      TableItem tableItem=item;
      if (previousItemsHash == null || !previousItemsHash.contains(tableItem)) {
        for (int iEditorCol=0; iEditorCol < columnsWithEditorContent.size(); iEditorCol++) {
          TableViewerCreatorColumnNotModifiable column=columnsWithEditorContent.get(iEditorCol);
          TableEditorContentNotModifiable tableEditorContent=column.getTableEditorContent();
          String idProperty=column.getId();
          TableEditor tableEditor=addTableEditor(column,tableEditorContent,idProperty,tableItem);
          if (tableEditor != null) {
            addedTableEditor.add(tableEditor);
          }
        }
      }
    }
    for (int i=indexStart; i < items.length; i++) {
      TableItem tableItem=items[i];
      Object data=tableItem.getData();
      Collection<TableEditor> tableEditorCollection=dataToMultipleDataEditor.getCollection(data);
      for (      TableEditor tableEditor : tableEditorCollection) {
        tableEditor.setItem(tableItem);
      }
    }
    previousItemsHash=new HashSet<TableItem>(Arrays.asList(items));
  }
 else {
    refreshColumn(indexStart);
  }
}
Program: 128930
Project: 128930
Buggy source:
/** 
 * DOC amaumont Comment method "handleListenableListEvent".
 * @param event
 */
protected void handleAfterListenableListOperationEvent(ListenableListEvent<B> event){
  if (tableViewerCreator.getTable() != null && !tableViewerCreator.getTable().isDisposed()) {
    TableViewer tableViewer=tableViewerCreator.getTableViewer();
    if (event.type == TYPE.LIST_REGISTERED && tableViewerCreator.getInputList() == null && getExtendedTableModel().isDataRegistered()) {
      tableViewerCreator.setInputList(getBeansList());
      new AsynchronousThreading(100,true,tableViewerCreator.getTable().getDisplay(),new Runnable(){
        public void run(){
          tableViewerCreator.layout();
        }
      }
).start();
    }
 else {
      if (event.type == TYPE.ADDED) {
        tableViewer.refresh();
      }
 else       if (event.type == TYPE.SWAPED) {
        Object[] swapedObjects=event.swapedObjects;
        for (        Object data : swapedObjects) {
          tableViewer.refresh(data,true,true);
        }
      }
 else       if (event.type == TYPE.REMOVED) {
      }
 else {
        if (tableViewer.getContentProvider() instanceof ILazyContentProvider) {
          tableViewer.setItemCount(event.source.size());
        }
        tableViewer.refresh();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "handleListenableListEvent".
 * @param event
 */
protected void handleAfterListenableListOperationEvent(ListenableListEvent<B> event){
  if (tableViewerCreator.getTable() != null && !tableViewerCreator.getTable().isDisposed()) {
    TableViewer tableViewer=tableViewerCreator.getTableViewer();
    if (event.type == TYPE.LIST_REGISTERED && tableViewerCreator.getInputList() == null && getExtendedTableModel().isDataRegistered()) {
      tableViewerCreator.setInputList(getBeansList());
      new AsynchronousThreading(100,true,tableViewerCreator.getTable().getDisplay(),new Runnable(){
        public void run(){
          tableViewerCreator.layout();
        }
      }
).start();
    }
 else {
      if (event.type == TYPE.ADDED) {
        if (tableViewer.getContentProvider() instanceof ILazyContentProvider) {
          tableViewer.setItemCount(event.source.size());
        }
        tableViewer.refresh();
      }
 else       if (event.type == TYPE.SWAPED) {
        Object[] swapedObjects=event.swapedObjects;
        for (        Object data : swapedObjects) {
          tableViewer.refresh(data,true,true);
        }
      }
 else       if (event.type == TYPE.REMOVED) {
      }
 else {
        if (tableViewer.getContentProvider() instanceof ILazyContentProvider) {
          tableViewer.setItemCount(event.source.size());
        }
        tableViewer.refresh();
      }
    }
  }
}
Program: 128932
Project: 128932
Buggy source:
public void setReadAction(boolean readAction){
  this.readAction=readAction;
}

Fixed version (ground truth):
@Override public void setReadAction(boolean readAction){
  this.readAction=readAction;
}
Program: 128933
Project: 128933
Buggy source:
public boolean isReadAction(){
  return readAction;
}

Fixed version (ground truth):
@Override public boolean isReadAction(){
  return readAction;
}
Program: 128934
Project: 128934
Buggy source:
/** 
 * Returns the class on wich this action may be call by double-click.
 * @return the class on wich this action may be call by double-click
 */
public Class getClassForDoubleClick(){
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the class on wich this action may be call by double-click.
 * @return the class on wich this action may be call by double-click
 */
@Override public Class getClassForDoubleClick(){
  return null;
}
Program: 128935
Project: 128935
Buggy source:
public void setGroupId(String groupId){
  this.groupId=groupId;
}

Fixed version (ground truth):
@Override public void setGroupId(String groupId){
  this.groupId=groupId;
}
Program: 128936
Project: 128936
Buggy source:
public boolean isEditAction(){
  return editAction;
}

Fixed version (ground truth):
@Override public boolean isEditAction(){
  return editAction;
}
Program: 128937
Project: 128937
Buggy source:
/** 
 * Display a "Save job" prompt dialog if the job eidtor of the selectedNode is unsaved.
 */
protected void promptForSavingIfNecessary(RepositoryNode selectedNode){
  try {
    IEditorReference[] references=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
    if (references == null || references.length == 0) {
      return;
    }
    String label=selectedNode.getObject().getProperty().getLabel();
    for (int i=0; i < references.length; i++) {
      IEditorPart part=references[i].getEditor(false);
      if (part == null || part.isDirty() == false) {
        continue;
      }
      IEditorInput input=part.getEditorInput();
      if (label.equals(input.getName())) {
        if (promptForSavingDialog(part) == ISaveablePart2.YES) {
          part.doSave(new NullProgressMonitor());
        }
      }
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
/** 
 * Display a "Save job" prompt dialog if the job eidtor of the selectedNode is unsaved.
 */
protected void promptForSavingIfNecessary(RepositoryNode selectedNode){
  try {
    IEditorReference[] references=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
    if (references == null || references.length == 0) {
      return;
    }
    String label=selectedNode.getObject().getProperty().getLabel();
    for (    IEditorReference reference : references) {
      IEditorPart part=reference.getEditor(false);
      if (part == null || part.isDirty() == false) {
        continue;
      }
      IEditorInput input=part.getEditorInput();
      if (label.equals(input.getName())) {
        if (promptForSavingDialog(part) == ISaveablePart2.YES) {
          part.doSave(new NullProgressMonitor());
        }
      }
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}
Program: 128938
Project: 128938
Buggy source:
public String getGroupId(){
  return this.groupId;
}

Fixed version (ground truth):
@Override public String getGroupId(){
  return this.groupId;
}
Program: 128939
Project: 128939
Buggy source:
/** 
 * Sets the level.
 * @param level the level to set
 */
public void setLevel(int level){
  this.level=level;
}

Fixed version (ground truth):
/** 
 * Sets the level.
 * @param level the level to set
 */
@Override public void setLevel(int level){
  this.level=level;
}
Program: 128940
Project: 128940
Buggy source:
public boolean isPropertiesAction(){
  return propertiesAction;
}

Fixed version (ground truth):
@Override public boolean isPropertiesAction(){
  return propertiesAction;
}
Program: 128941
Project: 128941
Buggy source:
/** 
 * Returns if this action is accessible by double-click.
 * @return <code>true</code> if action is accessible by double-click, <code>true</code> otherwise
 */
public final boolean isDoubleClickAction(){
  return getClassForDoubleClick() != null;
}

Fixed version (ground truth):
/** 
 * Returns if this action is accessible by double-click.
 * @return <code>true</code> if action is accessible by double-click, <code>true</code> otherwise
 */
@Override public final boolean isDoubleClickAction(){
  return getClassForDoubleClick() != null;
}
Program: 128942
Project: 128942
Buggy source:
/** 
 * Sets the workbenchPart.
 * @param workbenchPart the workbenchPart to set
 */
public void setWorkbenchPart(IWorkbenchPart workbenchPart){
  this.workbenchPart=workbenchPart;
}

Fixed version (ground truth):
/** 
 * Sets the workbenchPart.
 * @param workbenchPart the workbenchPart to set
 */
@Override public void setWorkbenchPart(IWorkbenchPart workbenchPart){
  this.workbenchPart=workbenchPart;
}
Program: 128943
Project: 128943
Buggy source:
public void setSpecialSelection(ISelectionProvider selectionProvider){
  this.specialSelectionProvider=selectionProvider;
}

Fixed version (ground truth):
@Override public void setSpecialSelection(ISelectionProvider selectionProvider){
  this.specialSelectionProvider=selectionProvider;
}
Program: 128944
Project: 128944
Buggy source:
public boolean isVisible(){
  return isEnabled();
}

Fixed version (ground truth):
@Override public boolean isVisible(){
  return isEnabled();
}
Program: 128946
Project: 128946
Buggy source:
/** 
 * Getter for level.
 * @return the level
 */
public int getLevel(){
  return this.level;
}

Fixed version (ground truth):
/** 
 * Getter for level.
 * @return the level
 */
@Override public int getLevel(){
  return this.level;
}
Program: 128947
Project: 128947
Buggy source:
private RepositoryNode searchRepositoryNode(IRepositoryNode root,ERepositoryObjectType type){
  if (root == null || type == null) {
    return null;
  }
  IRepositoryNode foundNode=null;
  List<IRepositoryNode> chindren=root.getChildren();
  for (  IRepositoryNode repositoryNode : chindren) {
    if (repositoryNode.getContentType() == type) {
      foundNode=repositoryNode;
    }
 else {
      foundNode=searchRepositoryNode((RepositoryNode)repositoryNode,type);
    }
    if (foundNode != null) {
      return (RepositoryNode)foundNode;
    }
  }
  return null;
}

Fixed version (ground truth):
private RepositoryNode searchRepositoryNode(IRepositoryNode root,ERepositoryObjectType type){
  if (root == null || type == null) {
    return null;
  }
  IRepositoryNode foundNode=null;
  List<IRepositoryNode> chindren=root.getChildren();
  for (  IRepositoryNode repositoryNode : chindren) {
    if (repositoryNode.getContentType() == type) {
      foundNode=repositoryNode;
    }
 else {
      foundNode=searchRepositoryNode(repositoryNode,type);
    }
    if (foundNode != null) {
      return (RepositoryNode)foundNode;
    }
  }
  return null;
}
Program: 128948
Project: 128948
Buggy source:
public void setPropertiesAction(boolean propertiesAction){
  this.propertiesAction=propertiesAction;
}

Fixed version (ground truth):
@Override public void setPropertiesAction(boolean propertiesAction){
  this.propertiesAction=propertiesAction;
}
Program: 128949
Project: 128949
Buggy source:
public void setEditAction(boolean editAction){
  this.editAction=editAction;
}

Fixed version (ground truth):
@Override public void setEditAction(boolean editAction){
  this.editAction=editAction;
}
Program: 128950
Project: 128950
Buggy source:
@Override public void lock(Item item) throws PersistenceException, LoginException {
  if (getStatus(item).isPotentiallyEditable()) {
    this.repositoryFactoryFromProvider.lock(item);
    if ((item instanceof JobletProcessItem || item instanceof ProcessItem) && getStatus(item) == ERepositoryStatus.LOCK_BY_USER) {
      String docId=item.getProperty().getId() + "String_Node_Str";
      IRepositoryViewObject repositoryViewObject=this.repositoryFactoryFromProvider.getLastVersion(projectManager.getCurrentProject(),docId);
      if (repositoryViewObject != null) {
        Property property=repositoryViewObject.getProperty();
        Item documentationItem=property.getItem();
        this.repositoryFactoryFromProvider.lock(documentationItem);
      }
    }
    notifyLock(item,true);
    String str[]=new String[]{item.toString(),getRepositoryContext().getUser().toString()};
    log.debug(Messages.getString("String_Node_Str",str));
  }
}

Fixed version (ground truth):
@Override public void lock(Item item) throws PersistenceException, LoginException {
  if (getStatus(item).isPotentiallyEditable()) {
    this.repositoryFactoryFromProvider.lock(item);
    notifyLock(item,true);
    String str[]=new String[]{item.toString(),getRepositoryContext().getUser().toString()};
    log.debug(Messages.getString("String_Node_Str",str));
  }
}
Program: 128951
Project: 128951
Buggy source:
@Override public void unlock(Item obj) throws PersistenceException, LoginException {
  if (getStatus(obj) == ERepositoryStatus.LOCK_BY_USER || obj instanceof JobletDocumentationItem || obj instanceof JobDocumentationItem) {
    Date commitDate=obj.getState().getCommitDate();
    Date modificationDate=obj.getProperty().getModificationDate();
    if (modificationDate == null || commitDate == null || modificationDate.before(commitDate)) {
      this.repositoryFactoryFromProvider.unlock(obj);
      if (obj instanceof JobletProcessItem || obj instanceof ProcessItem) {
        String docId=obj.getProperty().getId() + "String_Node_Str";
        IRepositoryViewObject repositoryViewObject=this.repositoryFactoryFromProvider.getLastVersion(projectManager.getCurrentProject(),docId);
        if (repositoryViewObject != null) {
          Property property=repositoryViewObject.getProperty();
          Item documentationItem=property.getItem();
          this.repositoryFactoryFromProvider.unlock(documentationItem);
        }
      }
      notifyLock(obj,false);
      String str[]=new String[]{obj.toString(),getRepositoryContext().getUser().toString()};
      log.debug(Messages.getString("String_Node_Str",str));
    }
  }
}

Fixed version (ground truth):
@Override public void unlock(Item obj) throws PersistenceException, LoginException {
  if (getStatus(obj) == ERepositoryStatus.LOCK_BY_USER || obj instanceof JobletDocumentationItem || obj instanceof JobDocumentationItem) {
    Date commitDate=obj.getState().getCommitDate();
    Date modificationDate=obj.getProperty().getModificationDate();
    if (modificationDate == null || commitDate == null || modificationDate.before(commitDate)) {
      this.repositoryFactoryFromProvider.unlock(obj);
      notifyLock(obj,false);
      String str[]=new String[]{obj.toString(),getRepositoryContext().getUser().toString()};
      log.debug(Messages.getString("String_Node_Str",str));
    }
  }
}
Program: 128954
Project: 128954
Buggy source:
@Override public String getComponentValue(Connection connection,String value){
  if (value != null && canHandle(connection)) {
    ExampleDemoConnection demoConn=(ExampleDemoConnection)connection;
    if ("String_Node_Str".equals(value)) {
      return demoConn.getType();
    }
 else     if ("String_Node_Str".equals(value)) {
      return Boolean.toString(demoConn.isValid());
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public String getComponentValue(Connection connection,String value,IMetadataTable table){
  if (value != null && canHandle(connection)) {
    ExampleDemoConnection demoConn=(ExampleDemoConnection)connection;
    if ("String_Node_Str".equals(value)) {
      return demoConn.getType();
    }
 else     if ("String_Node_Str".equals(value)) {
      return Boolean.toString(demoConn.isValid());
    }
  }
  return null;
}
Program: 128955
Project: 128955
Buggy source:
@Override public void renameFolder(ERepositoryObjectType type,IPath path,String label) throws PersistenceException {
  this.repositoryFactoryFromProvider.renameFolder(type,path,label);
  if (type == ERepositoryObjectType.PROCESS) {
    fireRepositoryPropertyChange(ERepositoryActionName.FOLDER_RENAME.getName(),path,label);
  }
  if (type == ERepositoryObjectType.JOBLET) {
    fireRepositoryPropertyChange(ERepositoryActionName.JOBLET_FOLDER_RENAME.getName(),path,label);
  }
  this.repositoryFactoryFromProvider.updateItemsPath(type,path.removeLastSegments(1).append(label));
}

Fixed version (ground truth):
@Override public void renameFolder(ERepositoryObjectType type,IPath path,String label) throws PersistenceException {
  if (hasLockedItems(type,path)) {
    throw new PersistenceException("String_Node_Str");
  }
  this.repositoryFactoryFromProvider.renameFolder(type,path,label);
  if (type == ERepositoryObjectType.PROCESS) {
    fireRepositoryPropertyChange(ERepositoryActionName.FOLDER_RENAME.getName(),path,label);
  }
  if (type == ERepositoryObjectType.JOBLET) {
    fireRepositoryPropertyChange(ERepositoryActionName.JOBLET_FOLDER_RENAME.getName(),path,label);
  }
  this.repositoryFactoryFromProvider.updateItemsPath(type,path.removeLastSegments(1).append(label));
}
Program: 128956
Project: 128956
Buggy source:
@Override public synchronized void deleteFolder(Project project,ERepositoryObjectType type,IPath path,boolean fromEmptyRecycleBin) throws PersistenceException {
  this.repositoryFactoryFromProvider.deleteFolder(project,type,path,fromEmptyRecycleBin);
  if (type == ERepositoryObjectType.PROCESS) {
    fireRepositoryPropertyChange(ERepositoryActionName.FOLDER_DELETE.getName(),path,type);
  }
  if (type == ERepositoryObjectType.JOBLET) {
    fireRepositoryPropertyChange(ERepositoryActionName.JOBLET_FOLDER_DELETE.getName(),path,type);
  }
}

Fixed version (ground truth):
@Override public synchronized void deleteFolder(Project project,ERepositoryObjectType type,IPath path,boolean fromEmptyRecycleBin) throws PersistenceException {
  if (hasLockedItems(type,path)) {
    throw new PersistenceException("String_Node_Str");
  }
  this.repositoryFactoryFromProvider.deleteFolder(project,type,path,fromEmptyRecycleBin);
  if (type == ERepositoryObjectType.PROCESS) {
    fireRepositoryPropertyChange(ERepositoryActionName.FOLDER_DELETE.getName(),path,type);
  }
  if (type == ERepositoryObjectType.JOBLET) {
    fireRepositoryPropertyChange(ERepositoryActionName.JOBLET_FOLDER_DELETE.getName(),path,type);
  }
}
Program: 128957
Project: 128957
Buggy source:
@Override public void moveFolder(ERepositoryObjectType type,IPath sourcePath,IPath targetPath) throws PersistenceException {
  this.repositoryFactoryFromProvider.moveFolder(type,sourcePath,targetPath);
  if (type == ERepositoryObjectType.PROCESS) {
    fireRepositoryPropertyChange(ERepositoryActionName.FOLDER_MOVE.getName(),sourcePath,targetPath);
  }
  if (type == ERepositoryObjectType.JOBLET) {
    fireRepositoryPropertyChange(ERepositoryActionName.JOBLET_FOLDER_MOVE.getName(),sourcePath,targetPath);
  }
  this.repositoryFactoryFromProvider.updateItemsPath(type,targetPath.append(sourcePath.lastSegment()));
}

Fixed version (ground truth):
@Override public void moveFolder(ERepositoryObjectType type,IPath sourcePath,IPath targetPath) throws PersistenceException {
  if (hasLockedItems(type,sourcePath)) {
    throw new PersistenceException("String_Node_Str");
  }
  this.repositoryFactoryFromProvider.moveFolder(type,sourcePath,targetPath);
  if (type == ERepositoryObjectType.PROCESS) {
    fireRepositoryPropertyChange(ERepositoryActionName.FOLDER_MOVE.getName(),sourcePath,targetPath);
  }
  if (type == ERepositoryObjectType.JOBLET) {
    fireRepositoryPropertyChange(ERepositoryActionName.JOBLET_FOLDER_MOVE.getName(),sourcePath,targetPath);
  }
  this.repositoryFactoryFromProvider.updateItemsPath(type,targetPath.append(sourcePath.lastSegment()));
}
Program: 128960
Project: 128960
Buggy source:
private void moveOldContentToNewFolder(Project project,String completeNewPath,FolderItem emfFolder,FolderItem newFolder,Item child) throws PersistenceException {
  emfFolder.getChildren().remove(child);
  newFolder.getChildren().add(child);
  child.setParent(newFolder);
  List<Resource> affectedResources=xmiResourceManager.getAffectedResources(child.getProperty());
  for (  Resource resource : affectedResources) {
    IPath path=getPhysicalProject(project).getFullPath().append(completeNewPath).append(resource.getURI().lastSegment());
    Map<EObject,Collection<Setting>> find=EcoreUtil.ExternalCrossReferencer.find(resource);
    List<Resource> needSaves=new ArrayList<Resource>();
    for (    EObject object : find.keySet()) {
      Resource re=object.eResource();
      if (re == null) {
        continue;
      }
      EcoreUtil.resolveAll(re);
      needSaves.add(re);
    }
    xmiResourceManager.moveResource(resource,path);
    AbstractResourceChangesService resChangeService=TDQServiceRegister.getInstance().getResourceChangeService(AbstractResourceChangesService.class);
    if (resChangeService != null) {
      for (      Resource toSave : needSaves) {
        resChangeService.saveResourceByEMFShared(toSave);
      }
    }
  }
  affectedResources=xmiResourceManager.getAffectedResources(child.getProperty());
  for (  Resource resource : affectedResources) {
    xmiResourceManager.saveResource(resource);
  }
}

Fixed version (ground truth):
private void moveOldContentToNewFolder(Project project,String completeNewPath,FolderItem emfFolder,FolderItem newFolder,Item child) throws PersistenceException {
  emfFolder.getChildren().remove(child);
  newFolder.getChildren().add(child);
  child.setParent(newFolder);
  List<Resource> affectedResources=xmiResourceManager.getAffectedResources(child.getProperty());
  for (  Resource resource : affectedResources) {
    IPath path=getPhysicalProject(project).getFullPath().append(completeNewPath).append(resource.getURI().lastSegment());
    Map<EObject,Collection<Setting>> find=EcoreUtil.ExternalCrossReferencer.find(resource);
    List<Resource> needSaves=new ArrayList<Resource>();
    for (    EObject object : find.keySet()) {
      Resource re=object.eResource();
      if (re == null) {
        continue;
      }
      EcoreUtil.resolveAll(re);
      needSaves.add(re);
    }
    moveResource(resource,path);
    AbstractResourceChangesService resChangeService=TDQServiceRegister.getInstance().getResourceChangeService(AbstractResourceChangesService.class);
    if (resChangeService != null) {
      for (      Resource toSave : needSaves) {
        resChangeService.saveResourceByEMFShared(toSave);
      }
    }
  }
  affectedResources=xmiResourceManager.getAffectedResources(child.getProperty());
  for (  Resource resource : affectedResources) {
    xmiResourceManager.saveResource(resource);
  }
}
Program: 128961
Project: 128961
Buggy source:
@Override public Folder createFolder(Project project,ERepositoryObjectType type,IPath path,String label,boolean isImportItem) throws PersistenceException {
  if (type == null) {
    throw new IllegalArgumentException(Messages.getString("String_Node_Str"));
  }
  if (path == null) {
    throw new IllegalArgumentException(Messages.getString("String_Node_Str"));
  }
  if (label == null || label.length() == 0) {
    throw new IllegalArgumentException(Messages.getString("String_Node_Str"));
  }
  IProject fsProject=ResourceModelUtils.getProject(project);
  String parentPath=ERepositoryObjectType.getFolderName(type);
  if (!path.isEmpty()) {
    parentPath+=IPath.SEPARATOR + path.toString();
  }
  String completePath=parentPath + IPath.SEPARATOR + label;
  FolderItem folderItem=getFolderHelper(project.getEmfProject()).createFolder(completePath);
  IFolder folder=ResourceUtils.getFolder(fsProject,completePath,false);
  if (!folder.exists()) {
    ResourceUtils.createFolder(folder);
  }
  return new Folder(folderItem.getProperty(),type);
}

Fixed version (ground truth):
protected void createFolder(IFolder folder) throws PersistenceException {
  ResourceUtils.createFolder(folder);
}
Program: 128964
Project: 128964
Buggy source:
@Override public void setMigrationTasksDone(Project project,List<MigrationTask> list) throws PersistenceException {
  project.getEmfProject().getMigrationTask().clear();
  project.getEmfProject().getMigrationTask().addAll(list);
  saveProject(project);
}

Fixed version (ground truth):
@Override public void setMigrationTasksDone(Project project,List<MigrationTask> list) throws PersistenceException {
  List oldMigrationTasks=project.getEmfProject().getMigrationTask();
  if (oldMigrationTasks.size() == list.size()) {
    return;
  }
  project.getEmfProject().getMigrationTask().clear();
  project.getEmfProject().getMigrationTask().addAll(list);
  saveProject(project);
}
Program: 128967
Project: 128967
Buggy source:
public void applyEditorValue(){
  String text=getControl().getText();
  onValueChanged(text,true,property);
}

Fixed version (ground truth):
@Override public void applyEditorValue(){
  String text=getControl().getText();
  onValueChanged(text,true,property);
}
Program: 128968
Project: 128968
Buggy source:
public List<FOXTreeNode> getTreeData(){
  return treeData;
}

Fixed version (ground truth):
@Override public List<FOXTreeNode> getTreeData(){
  return treeData;
}
Program: 128969
Project: 128969
Buggy source:
private void initLinker(TreeItem node,TableItem[] tableItems){
  FOXTreeNode treeNode=(FOXTreeNode)node.getData();
  IMetadataColumn column=treeNode.getColumn();
  if (column != null) {
    for (int i=0; i < tableItems.length; i++) {
      MetadataColumn metadataColumn=(MetadataColumn)tableItems[i].getData();
      if (metadataColumn.getLabel().equals(column.getLabel())) {
        linker.addLoopLink(tableItems[i],tableItems[i].getData(),xmlViewer.getTree(),treeNode,false);
        break;
      }
    }
  }
  TreeItem[] children=node.getItems();
  for (int i=0; i < children.length; i++) {
    initLinker(children[i],tableItems);
  }
}

Fixed version (ground truth):
private void initLinker(TreeItem node,TableItem[] tableItems){
  FOXTreeNode treeNode=(FOXTreeNode)node.getData();
  IMetadataColumn column=treeNode.getColumn();
  if (column != null) {
    for (    TableItem tableItem : tableItems) {
      MetadataColumn metadataColumn=(MetadataColumn)tableItem.getData();
      if (metadataColumn.getLabel().equals(column.getLabel())) {
        linker.addLoopLink(tableItem,tableItem.getData(),xmlViewer.getTree(),treeNode,false);
        break;
      }
    }
  }
  TreeItem[] children=node.getItems();
  for (  TreeItem element : children) {
    initLinker(element,tableItems);
  }
}
Program: 128970
Project: 128970
Buggy source:
protected FOXTreeNode addElement(FOXTreeNode current,String currentPath,String newPath,String defaultValue){
  String name=newPath.substring(newPath.lastIndexOf("String_Node_Str") + 1);
  String parentPath=newPath.substring(0,newPath.lastIndexOf("String_Node_Str"));
  FOXTreeNode temp=new Element(name,defaultValue);
  if (current == null) {
    return temp;
  }
  if (currentPath.equals(parentPath)) {
    current.addChild(temp);
  }
 else {
    String[] nods=currentPath.split("String_Node_Str");
    String[] newNods=parentPath.split("String_Node_Str");
    int parentLevel=0;
    int checkLength=nods.length < newNods.length ? nods.length : newNods.length;
    for (int i=1; i < checkLength; i++) {
      if (nods[i].equals(newNods[i])) {
        parentLevel=i;
      }
    }
    FOXTreeNode parent=current;
    for (int i=0; i < nods.length - (parentLevel + 1); i++) {
      FOXTreeNode tmpParent=parent.getParent();
      if (tmpParent == null) {
        break;
      }
      parent=tmpParent;
    }
    if (parent != null)     parent.addChild(temp);
  }
  return temp;
}

Fixed version (ground truth):
protected FOXTreeNode addElement(FOXTreeNode current,String currentPath,String newPath,String defaultValue){
  String name=newPath.substring(newPath.lastIndexOf("String_Node_Str") + 1);
  String parentPath=newPath.substring(0,newPath.lastIndexOf("String_Node_Str"));
  FOXTreeNode temp=new Element(name,defaultValue);
  if (current == null) {
    return temp;
  }
  if (currentPath.equals(parentPath)) {
    current.addChild(temp);
  }
 else {
    String[] nods=currentPath.split("String_Node_Str");
    String[] newNods=parentPath.split("String_Node_Str");
    int parentLevel=0;
    int checkLength=nods.length < newNods.length ? nods.length : newNods.length;
    for (int i=1; i < checkLength; i++) {
      if (nods[i].equals(newNods[i])) {
        parentLevel=i;
      }
    }
    FOXTreeNode parent=current;
    for (int i=0; i < nods.length - (parentLevel + 1); i++) {
      FOXTreeNode tmpParent=parent.getParent();
      if (tmpParent == null) {
        break;
      }
      parent=tmpParent;
    }
    if (parent != null) {
      parent.addChild(temp);
    }
  }
  return temp;
}
Program: 128971
Project: 128971
Buggy source:
public void menuAboutToShow(IMenuManager manager){
  fillContextMenu(manager);
}

Fixed version (ground truth):
@Override public void menuAboutToShow(IMenuManager manager){
  fillContextMenu(manager);
}
Program: 128972
Project: 128972
Buggy source:
public MetadataTable getMetadataTable(){
  return ConnectionHelper.getTables(getConnection()).toArray(new MetadataTable[0])[0];
}

Fixed version (ground truth):
@Override public MetadataTable getMetadataTable(){
  return ConnectionHelper.getTables(getConnection()).toArray(new MetadataTable[0])[0];
}
Program: 128973
Project: 128973
Buggy source:
public void setSelectedText(String label){
  selectedText=label;
}

Fixed version (ground truth):
@Override public void setSelectedText(String label){
  selectedText=label;
}
Program: 128974
Project: 128974
Buggy source:
public void updateConnection(){
  ConnectionHelper.getTables(getConnection());
  EList root=getConnection().getRoot();
  EList loop=getConnection().getLoop();
  EList group=getConnection().getGroup();
  root.clear();
  loop.clear();
  group.clear();
  List<FOXTreeNode> node=(List<FOXTreeNode>)xmlViewer.getInput();
  FOXTreeNode foxTreeNode=node.get(0);
  if (foxTreeNode != null) {
    initNodeOrder(foxTreeNode);
    if (!foxTreeNode.isLoop()) {
      tableLoader((Element)foxTreeNode,"String_Node_Str",root,foxTreeNode.getDefaultValue());
    }
    Element loopNode=(Element)TreeUtil.getLoopNode(foxTreeNode);
    if (loopNode != null) {
      String path=TreeUtil.getPath(loopNode);
      tableLoader(loopNode,path.substring(0,path.lastIndexOf("String_Node_Str")),loop,loopNode.getDefaultValue());
    }
    Element groupNode=(Element)TreeUtil.getGroupNode(foxTreeNode);
    if (groupNode != null) {
      String path=TreeUtil.getPath(groupNode);
      tableLoader(groupNode,path.substring(0,path.lastIndexOf("String_Node_Str")),group,groupNode.getDefaultValue());
    }
  }
}

Fixed version (ground truth):
@Override public void updateConnection(){
  ConnectionHelper.getTables(getConnection());
  EList root=getConnection().getRoot();
  EList loop=getConnection().getLoop();
  EList group=getConnection().getGroup();
  root.clear();
  loop.clear();
  group.clear();
  List<FOXTreeNode> node=(List<FOXTreeNode>)xmlViewer.getInput();
  FOXTreeNode foxTreeNode=node.get(0);
  if (foxTreeNode != null) {
    initNodeOrder(foxTreeNode);
    if (!foxTreeNode.isLoop()) {
      tableLoader((Element)foxTreeNode,"String_Node_Str",root,foxTreeNode.getDefaultValue());
    }
    Element loopNode=(Element)TreeUtil.getLoopNode(foxTreeNode);
    if (loopNode != null) {
      String path=TreeUtil.getPath(loopNode);
      tableLoader(loopNode,path.substring(0,path.lastIndexOf("String_Node_Str")),loop,loopNode.getDefaultValue());
    }
    Element groupNode=(Element)TreeUtil.getGroupNode(foxTreeNode);
    if (groupNode != null) {
      String path=TreeUtil.getPath(groupNode);
      tableLoader(groupNode,path.substring(0,path.lastIndexOf("String_Node_Str")),group,groupNode.getDefaultValue());
    }
  }
}
Program: 128975
Project: 128975
Buggy source:
public boolean canModify(Object element,String property){
  FOXTreeNode node=(FOXTreeNode)element;
  if (property.equals("String_Node_Str")) {
    if (node.getLabel() != null && node.getLabel().length() > 0) {
      return true;
    }
  }
  if (property.equals("String_Node_Str")) {
    if (node.getDefaultValue() != null && node.getDefaultValue().length() > 0) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean canModify(Object element,String property){
  FOXTreeNode node=(FOXTreeNode)element;
  if (property.equals("String_Node_Str")) {
    if (node.getLabel() != null && node.getLabel().length() > 0) {
      return true;
    }
  }
  if (property.equals("String_Node_Str")) {
    if (node.getDefaultValue() != null && node.getDefaultValue().length() > 0) {
      return true;
    }
  }
  return false;
}
Program: 128976
Project: 128976
Buggy source:
public void editorValueChanged(boolean oldValidState,boolean newValidState){
  onValueChanged(getControl().getText(),false,property);
}

Fixed version (ground truth):
@Override public void editorValueChanged(boolean oldValidState,boolean newValidState){
  onValueChanged(getControl().getText(),false,property);
}
Program: 128977
Project: 128977
Buggy source:
public void cancelEditor(){
}

Fixed version (ground truth):
@Override public void cancelEditor(){
}
Program: 128978
Project: 128978
Buggy source:
public TableViewer getSchemaViewer(){
  return this.schemaViewer;
}

Fixed version (ground truth):
@Override public TableViewer getSchemaViewer(){
  return this.schemaViewer;
}
Program: 128979
Project: 128979
Buggy source:
private void displayRootCombo(boolean visible){
  if (rootCombo == null)   return;
  rootCombo.setVisible(visible);
  GridData layoutData=(GridData)rootCombo.getLayoutData();
  layoutData.exclude=!visible;
  rootCombo.getParent().layout();
}

Fixed version (ground truth):
private void displayRootCombo(boolean visible){
  if (rootCombo == null) {
    return;
  }
  rootCombo.setVisible(visible);
  GridData layoutData=(GridData)rootCombo.getLayoutData();
  layoutData.exclude=!visible;
  rootCombo.getParent().layout();
}
Program: 128980
Project: 128980
Buggy source:
public void redrawLinkers(){
  int maxColumnsNumber=CoreRuntimePlugin.getInstance().getPreferenceStore().getInt(ITalendCorePrefConstants.MAXIMUM_AMOUNT_OF_COLUMNS_FOR_XML);
  if (schemaViewer.getTable().getItems().length <= maxColumnsNumber + 1) {
    linker.removeAllLinks();
    TreeItem root=xmlViewer.getTree().getItem(0);
    TableItem[] tableItems=schemaViewer.getTable().getItems();
    initLinker(root,tableItems);
    linker.updateLinksStyleAndControlsSelection(xmlViewer.getTree(),true);
  }
}

Fixed version (ground truth):
@Override public void redrawLinkers(){
  int maxColumnsNumber=CoreRuntimePlugin.getInstance().getPreferenceStore().getInt(ITalendCorePrefConstants.MAXIMUM_AMOUNT_OF_COLUMNS_FOR_XML);
  if (schemaViewer.getTable().getItems().length <= maxColumnsNumber + 1) {
    linker.removeAllLinks();
    TreeItem root=xmlViewer.getTree().getItem(0);
    TableItem[] tableItems=schemaViewer.getTable().getItems();
    initLinker(root,tableItems);
    if (linker.linkSize() == 0) {
      linker.updateLinksStyleAndControlsSelection(xmlViewer.getTree(),true);
    }
  }
}