nus-yam/ex-repair huggingface dataset:
Program: 148001
Project: 148001
Buggy source:
private String showRenameDlg(final ERepositoryObjectType type,final ContainerItem parentItem,final String originalName){
  InputDialog dlg=new InputDialog(getShell(),Messages.RenameObjectAction_rename,Messages.Common_rename,originalName,new IInputValidator(){
    public String isValid(    String newText){
      if (newText == null || newText.trim().length() == 0)       return Messages.Common_nameCanNotBeEmpty;
      if (!Pattern.matches("String_Node_Str",newText)) {
        return Messages.Common_nameInvalid;
      }
      if (RepositoryResourceUtil.isExistByName(parentItem.getRepObjType(),newText.trim())) {
        return Messages.Common_nameIsUsed;
      }
      return null;
    }
  }
);
  dlg.setBlockOnOpen(true);
  if (dlg.open() == Window.CANCEL)   return null;
  return dlg.getValue();
}

Fixed version (ground truth):
private String showRenameDlg(final ERepositoryObjectType type,final ContainerItem parentItem,final String originalName){
  InputDialog dlg=new InputDialog(getShell(),Messages.RenameObjectAction_rename,Messages.Common_rename,originalName,new IInputValidator(){
    public String isValid(    String newText){
      if (newText == null || newText.trim().length() == 0)       return Messages.Common_nameCanNotBeEmpty;
      if (type.equals(IServerObjectRepositoryType.TYPE_TRANSFORMERV2) || type.equals(IServerObjectRepositoryType.TYPE_VIEW)) {
        if (!Pattern.matches("String_Node_Str",newText)) {
          return Messages.Common_nameInvalid;
        }
      }
 else       if (!Pattern.matches("String_Node_Str",newText)) {
        return Messages.Common_nameInvalid;
      }
      if (RepositoryResourceUtil.isExistByName(parentItem.getRepObjType(),newText.trim())) {
        return Messages.Common_nameIsUsed;
      }
      return null;
    }
  }
);
  dlg.setBlockOnOpen(true);
  if (dlg.open() == Window.CANCEL)   return null;
  return dlg.getValue();
}
Program: 148002
Project: 148002
Buggy source:
/** 
 * DOC hbhong TransformerMainPage2 constructor comment.
 * @param editor
 */
public TransformerMainPage2(FormEditor editor){
  super(editor);
  this.editor2=(XObjectEditor2)editor;
  XObjectEditorInput2 input=(XObjectEditorInput2)editor2.getEditorInput();
  Item item=input.getInputItem();
  MDMServerObject serverObject=((MDMServerObjectItem)item).getMDMServerObject();
  lastServerDef=serverObject.getLastServerDef();
}

Fixed version (ground truth):
/** 
 * DOC hbhong TransformerMainPage2 constructor comment.
 * @param editor
 */
public TransformerMainPage2(FormEditor editor){
  super(editor);
  this.editor2=(XObjectEditor2)editor;
  setLastServerDef();
}
Program: 148003
Project: 148003
Buggy source:
public void initCommonViewer(CommonViewer commonViewer){
  importObjectAction=initRepositoryAction(new ImportObjectAction(),commonViewer);
  exportObjectAction=initRepositoryAction(new ExportObjectAction(),commonViewer);
  createFolderAction=initRepositoryAction(new CreateFolderAction(),commonViewer);
  removeFromRepositoryAction=initRepositoryAction(new RemoveFromRepositoryAction(),commonViewer);
  renameAction=initRepositoryAction(new RenameObjectAction(),commonViewer);
  duplicateAction=initRepositoryAction(new DuplicateAction(),commonViewer);
  deployToAction=initRepositoryAction(new DeployToAction(),commonViewer);
  deployToLastServerAction=initRepositoryAction(new DeployToLastServerAction(),commonViewer);
  deployAllAction=initRepositoryAction(new DeployAllAction(false),commonViewer);
  importServerObjectAction=initRepositoryAction(new ImportServerObjectAction(),commonViewer);
  mdmEditPropertyAction=initRepositoryAction(new MDMEditPropertyAction(),commonViewer);
  refreshAction=globalActionHandler.getGlobalAction(IRepositoryViewGlobalActionHandler.REFRESH);
  copyAction=globalActionHandler.getGlobalAction(IRepositoryViewGlobalActionHandler.COPY);
  pasteAction=globalActionHandler.getGlobalAction(IRepositoryViewGlobalActionHandler.PASTE);
  for (  IRepositoryNodeActionProvider provider : getExtendActionProviders()) {
    provider.initCommonViewer(commonViewer);
  }
  RepositoryNodeConfigurationManager.getRecycleBinNodeConfiguration().getActionProvider().initCommonViewer(commonViewer);
}

Fixed version (ground truth):
public void initCommonViewer(CommonViewer commonViewer){
  importObjectAction=initRepositoryAction(new ImportObjectAction(),commonViewer);
  exportObjectAction=initRepositoryAction(new ExportObjectAction(),commonViewer);
  createFolderAction=initRepositoryAction(new CreateFolderAction(),commonViewer);
  removeFromRepositoryAction=initRepositoryAction(new RemoveFromRepositoryAction(),commonViewer);
  renameAction=initRepositoryAction(new RenameObjectAction(),commonViewer);
  duplicateAction=initRepositoryAction(new DuplicateAction(),commonViewer);
  deployToAction=initRepositoryAction(new DeployToAction(),commonViewer);
  deployToLastServerAction=initRepositoryAction(new DeployToLastServerAction(),commonViewer);
  deployAllAction=initRepositoryAction(new DeployAllAction(false),commonViewer);
  emAction=initRepositoryAction(new MDMEventManagerAction(),commonViewer);
  importServerObjectAction=initRepositoryAction(new ImportServerObjectAction(),commonViewer);
  mdmEditPropertyAction=initRepositoryAction(new MDMEditPropertyAction(),commonViewer);
  refreshAction=globalActionHandler.getGlobalAction(IRepositoryViewGlobalActionHandler.REFRESH);
  copyAction=globalActionHandler.getGlobalAction(IRepositoryViewGlobalActionHandler.COPY);
  pasteAction=globalActionHandler.getGlobalAction(IRepositoryViewGlobalActionHandler.PASTE);
  for (  IRepositoryNodeActionProvider provider : getExtendActionProviders()) {
    provider.initCommonViewer(commonViewer);
  }
  RepositoryNodeConfigurationManager.getRecycleBinNodeConfiguration().getActionProvider().initCommonViewer(commonViewer);
}
Program: 148004
Project: 148004
Buggy source:
public List<AbstractRepositoryAction> getActions(IRepositoryViewObject viewObj){
  List<AbstractRepositoryAction> actions=new LinkedList<AbstractRepositoryAction>();
  Item item=viewObj.getProperty().getItem();
  if (item instanceof MDMItem) {
    if (item instanceof ContainerItem) {
      FolderType type=((FolderItem)item).getType();
switch (type.getValue()) {
case FolderType.SYSTEM_FOLDER:
        actions.add(createFolderAction);
      addAction(actions,pasteAction,viewObj);
    actions.add(importServerObjectAction);
  actions.add(importObjectAction);
break;
case FolderType.STABLE_SYSTEM_FOLDER:
break;
case FolderType.FOLDER:
actions.add(createFolderAction);
actions.add(removeFromRepositoryAction);
addAction(actions,pasteAction,viewObj);
break;
}
}
 else if (item instanceof MDMServerObjectItem) {
actions.add(removeFromRepositoryAction);
actions.add(mdmEditPropertyAction);
addAction(actions,copyAction,viewObj);
addAction(actions,pasteAction,viewObj);
actions.add(duplicateAction);
}
}
actions.add(refreshAction);
actions.add(exportObjectAction);
for (IRepositoryNodeActionProvider provider : getExtendActionProviders()) {
List<AbstractRepositoryAction> providerActions=provider.getActions(viewObj);
if (providerActions != null) {
actions.addAll(providerActions);
}
}
return actions;
}

Fixed version (ground truth):
public List<AbstractRepositoryAction> getActions(IRepositoryViewObject viewObj){
  List<AbstractRepositoryAction> actions=new LinkedList<AbstractRepositoryAction>();
  Item item=viewObj.getProperty().getItem();
  if (item instanceof MDMItem) {
    if (item instanceof ContainerItem) {
      FolderType type=((FolderItem)item).getType();
switch (type.getValue()) {
case FolderType.SYSTEM_FOLDER:
        actions.add(createFolderAction);
      addAction(actions,pasteAction,viewObj);
    actions.add(importServerObjectAction);
  actions.add(importObjectAction);
break;
case FolderType.STABLE_SYSTEM_FOLDER:
break;
case FolderType.FOLDER:
actions.add(createFolderAction);
actions.add(removeFromRepositoryAction);
addAction(actions,pasteAction,viewObj);
break;
}
}
 else if (item instanceof MDMServerObjectItem) {
actions.add(removeFromRepositoryAction);
actions.add(mdmEditPropertyAction);
addAction(actions,copyAction,viewObj);
addAction(actions,pasteAction,viewObj);
actions.add(duplicateAction);
}
}
actions.add(refreshAction);
actions.add(exportObjectAction);
for (IRepositoryNodeActionProvider provider : getExtendActionProviders()) {
List<AbstractRepositoryAction> providerActions=provider.getActions(viewObj);
if (providerActions != null) {
actions.addAll(providerActions);
}
}
if (viewObj.getRepositoryObjectType().equals(IServerObjectRepositoryType.TYPE_EVENTMANAGER)) {
actions.add(emAction);
}
return actions;
}
Program: 148006
Project: 148006
Buggy source:
public Item getInputItem(){
  return viewObject.getProperty().getItem();
}

Fixed version (ground truth):
public Item getInputItem(){
  if (viewObject != null && viewObject.getProperty() != null)   return viewObject.getProperty().getItem();
  return null;
}
Program: 148007
Project: 148007
Buggy source:
@Override protected void doSave(WSDataModel wsObject) throws Exception {
  XObjectEditorInput2 editorInput=(XObjectEditorInput2)getEditorInput();
  MDMServerObjectItem serverObjectItem=(MDMServerObjectItem)editorInput.getInputItem();
  MDMServerObject serverObject=serverObjectItem.getMDMServerObject();
  EObject eContainer=serverObject.eContainer();
  EObject eObj=Bean2EObjUtil.getInstance().convertFromBean2EObj(wsObject,serverObject);
  if (eObj != null) {
    serverObject.setChanged(true);
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    factory.save(serverObjectItem);
  }
  refreshDirtyCue();
  if (PlatformUI.getPreferenceStore().getBoolean(PreferenceConstants.P_AUTO_DEPLOY)) {
    autoDeploy(serverObject);
  }
}

Fixed version (ground truth):
@Override protected void doSave(WSDataModel wsObject) throws Exception {
  XObjectEditorInput2 editorInput=(XObjectEditorInput2)getEditorInput();
  if (xsdFile != null) {
    String xsd=getXSDSchemaString();
    xsdFile.setCharset("String_Node_Str",null);
    xsdFile.setContents(new ByteArrayInputStream(xsd.getBytes("String_Node_Str")),IFile.FORCE,null);
  }
  MDMServerObjectItem serverObjectItem=(MDMServerObjectItem)editorInput.getInputItem();
  MDMServerObject serverObject=serverObjectItem.getMDMServerObject();
  EObject eObj=Bean2EObjUtil.getInstance().convertFromBean2EObj(wsObject,serverObject);
  if (eObj != null) {
    serverObject.setChanged(true);
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    factory.save(serverObjectItem);
  }
  refreshDirtyCue();
  if (PlatformUI.getPreferenceStore().getBoolean(PreferenceConstants.P_AUTO_DEPLOY)) {
    autoDeploy(serverObject);
  }
}
Program: 148008
Project: 148008
Buggy source:
/** 
 * DOC hbhong DataModelMainPage2 constructor comment.
 * @param obj
 */
public DataModelMainPage2(TreeObject obj){
  super(obj);
}

Fixed version (ground truth):
/** 
 * DOC hbhong DataModelMainPage2 constructor comment.
 * @param obj
 */
public DataModelMainPage2(TreeObject obj,IFile xsdFile){
  super(obj);
  this.xsdFile=xsdFile;
}
Program: 148010
Project: 148010
Buggy source:
public void widgetSelected(SelectionEvent e){
  if (accommodation != null) {
    if (dlg == null) {
      dlg=new XpathSelectDialog2(accommodation.getSite().getShell(),dlgTitle,accommodation.getSite(),isMulti,dataModelName);
      dlg.setConceptName(conceptName);
    }
  }
 else {
    if (dlg == null) {
      dlg=new XpathSelectDialog2(parent.getShell(),dlgTitle,site,false,dataModelName);
      dlg.setConceptName(conceptName);
    }
  }
  dlg.setBlockOnOpen(true);
  dlg.open();
  if (dlg.getReturnCode() == Window.OK) {
    descriptionText.setText(dlg.getXpath());
    dataModelName=dlg.getDataModelName();
    dlg.close();
    setOutFocus();
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  if (accommodation != null) {
    if (dlg == null) {
      dlg=new XpathSelectDialog2(accommodation.getSite().getShell(),dlgTitle,accommodation.getSite(),isMulti,dataModelName);
      dlg.setConceptName(conceptName);
    }
  }
 else {
    if (dlg == null) {
      dlg=new XpathSelectDialog2(parent.getShell(),dlgTitle,MDMRepositoryView.show().getSite(),false,dataModelName);
      dlg.setConceptName(conceptName);
    }
  }
  dlg.setBlockOnOpen(true);
  dlg.open();
  if (dlg.getReturnCode() == Window.OK) {
    descriptionText.setText(dlg.getXpath());
    dataModelName=dlg.getDataModelName();
    dlg.close();
    setOutFocus();
  }
}
Program: 148013
Project: 148013
Buggy source:
private void removeServerObject(IRepositoryViewObject viewObj){
  try {
    Item item=viewObj.getProperty().getItem();
    MDMServerObject serverObj=((MDMServerObjectItem)item).getMDMServerObject();
    if (serverObj.getLastServerDef() != null) {
      viewObjectsListRemoved.add(viewObj);
    }
    factory.deleteObjectLogical(viewObj);
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}

Fixed version (ground truth):
private void removeServerObject(IRepositoryViewObject viewObj){
  try {
    Item item=viewObj.getProperty().getItem();
    IEditorReference ref=RepositoryResourceUtil.isOpenedInEditor((IRepositoryViewObject)viewObj);
    if (ref != null) {
      RepositoryResourceUtil.closeEditor(ref,true);
    }
    MDMServerObject serverObj=((MDMServerObjectItem)item).getMDMServerObject();
    if (serverObj.getLastServerDef() != null) {
      viewObjectsListRemoved.add(viewObj);
    }
    factory.deleteObjectLogical(viewObj);
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}
Program: 148014
Project: 148014
Buggy source:
private void restoreServerObject(IRepositoryViewObject viewObj){
  Item item=viewObj.getProperty().getItem();
  try {
    factory.restoreObject(viewObj,new Path(item.getState().getPath()));
    if (RepositoryResourceUtil.isOpenedInEditor(viewObj)) {
      factory.lock(viewObj);
    }
  }
 catch (  PersistenceException e) {
    log.error(e.getMessage(),e);
  }
catch (  BusinessException e) {
    log.error(e.getMessage(),e);
  }
}

Fixed version (ground truth):
private void restoreServerObject(IRepositoryViewObject viewObj){
  Item item=viewObj.getProperty().getItem();
  try {
    factory.restoreObject(viewObj,new Path(item.getState().getPath()));
    if (RepositoryResourceUtil.isOpenedInEditor(viewObj) != null) {
      factory.lock(viewObj);
    }
  }
 catch (  PersistenceException e) {
    log.error(e.getMessage(),e);
  }
catch (  BusinessException e) {
    log.error(e.getMessage(),e);
  }
}
Program: 148015
Project: 148015
Buggy source:
public static boolean isOpenedInEditor(IRepositoryViewObject viewObj){
  IEditorReference[] editorReferences=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
  for (  IEditorReference ref : editorReferences) {
    if (ref != null) {
      try {
        IEditorInput editorInput=ref.getEditorInput();
        if (editorInput instanceof IRepositoryViewEditorInput) {
          Item inputItem=((IRepositoryViewEditorInput)editorInput).getInputItem();
          IRepositoryViewObject vObj=ContainerCacheService.get(inputItem.getProperty());
          if (vObj != null && vObj.equals(viewObj)) {
            return true;
          }
        }
      }
 catch (      PartInitException e) {
        log.error(e.getMessage(),e);
      }
    }
  }
  return false;
}

Fixed version (ground truth):
public static IEditorReference isOpenedInEditor(IRepositoryViewObject viewObj){
  IEditorReference[] editorReferences=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
  for (  IEditorReference ref : editorReferences) {
    if (ref != null) {
      try {
        IEditorInput editorInput=ref.getEditorInput();
        if (editorInput instanceof IRepositoryViewEditorInput) {
          Item inputItem=((IRepositoryViewEditorInput)editorInput).getInputItem();
          IRepositoryViewObject vObj=ContainerCacheService.get(inputItem.getProperty());
          if (vObj != null && vObj.equals(viewObj)) {
            return ref;
          }
        }
      }
 catch (      PartInitException e) {
        log.error(e.getMessage(),e);
      }
    }
  }
  return null;
}
Program: 148019
Project: 148019
Buggy source:
private void removeChild(TreeObject parent,TreeObject child){
  if (parent.getParent() == null && parent.getDisplayName().equals("String_Node_Str"))   return;
  if (synchronize) {
    synchronizeWithElem(child,(TreeParent)parent,true);
  }
  Element elemFolder=getParentElement(parent);
  String xpath="String_Node_Str" + filterOutBlank(child.getDisplayName()) + "String_Node_Str"+ child.getType()+ "String_Node_Str";
  List<Element> list=elemFolder.selectNodes(xpath);
  if (!list.isEmpty())   elemFolder.remove(list.get(0));
  saveDocument(parent);
}

Fixed version (ground truth):
private void removeChild(TreeObject parent,TreeObject child){
  if (parent.getParent() == null && parent.getDisplayName().equals("String_Node_Str"))   return;
  if (synchronize) {
    synchronizeWithElem(child,(TreeParent)parent,true);
  }
  Element elemFolder=getParentElement(parent);
  String xpath="String_Node_Str" + filterOutBlank(child.getDisplayName()) + "String_Node_Str"+ child.getType()+ "String_Node_Str";
  if (elemFolder == null)   return;
  List<Element> list=elemFolder.selectNodes(xpath);
  if (!list.isEmpty())   elemFolder.remove(list.get(0));
  saveDocument(parent);
}
Program: 148024
Project: 148024
Buggy source:
@Override public void mouseDoubleClick(MouseEvent e){
  editServerDef();
}

Fixed version (ground truth):
@Override public void mouseDoubleClick(MouseEvent e){
  IRepositoryViewObject viewObject=getCurSelectedViewObject();
  String name="String_Node_Str";
  if (viewObject != null) {
    MDMServerDefItem serverDefItem=getMDMItem(viewObject);
    name=serverDefItem.getServerDef().getName();
  }
  editServerDef();
  deleteServerDefForSerView(name);
  synchronizeMDMServerView();
}
Program: 148025
Project: 148025
Buggy source:
/** 
 * Create contents of the view part.
 * @param parent
 */
@Override public void createPartControl(Composite parent){
  Composite container=new Composite(parent,SWT.NONE);
  container.setLayout(new FillLayout(SWT.HORIZONTAL));
  treeViewer=new TreeViewer(container,SWT.BORDER);
  treeViewer.setSorter(new ServerSorter());
  tree=treeViewer.getTree();
  tree.addMouseListener(new MouseAdapter(){
    @Override public void mouseDoubleClick(    MouseEvent e){
      editServerDef();
    }
  }
);
  toolkit.paintBordersFor(tree);
  treeViewer.setContentProvider(new TreeContentProvider());
  treeViewer.setLabelProvider(new ViewerLabelProvider());
  createActions();
  initializeToolBar();
  initializeMenu();
  refreshServerDefs();
  synchronizeMDMServerView();
}

Fixed version (ground truth):
/** 
 * Create contents of the view part.
 * @param parent
 */
@Override public void createPartControl(Composite parent){
  Composite container=new Composite(parent,SWT.NONE);
  container.setLayout(new FillLayout(SWT.HORIZONTAL));
  treeViewer=new TreeViewer(container,SWT.BORDER);
  treeViewer.setSorter(new ServerSorter());
  tree=treeViewer.getTree();
  tree.addMouseListener(new MouseAdapter(){
    @Override public void mouseDoubleClick(    MouseEvent e){
      IRepositoryViewObject viewObject=getCurSelectedViewObject();
      String name="String_Node_Str";
      if (viewObject != null) {
        MDMServerDefItem serverDefItem=getMDMItem(viewObject);
        name=serverDefItem.getServerDef().getName();
      }
      editServerDef();
      deleteServerDefForSerView(name);
      synchronizeMDMServerView();
    }
  }
);
  toolkit.paintBordersFor(tree);
  treeViewer.setContentProvider(new TreeContentProvider());
  treeViewer.setLabelProvider(new ViewerLabelProvider());
  createActions();
  initializeToolBar();
  initializeMenu();
  refreshServerDefs();
  synchronizeMDMServerView();
}
Program: 148026
Project: 148026
Buggy source:
@Override public void run(){
  SelectServerDefDialog dialog=new SelectServerDefDialog(getShell());
  if (dialog.open() == IDialogConstants.OK_ID) {
    MDMServerDef serverDef=dialog.getSelectedServerDef();
    List<IRepositoryViewObject> viewObjs=new LinkedList<IRepositoryViewObject>();
    for (    Object obj : getSelectedObject()) {
      viewObjs.add((IRepositoryViewObject)obj);
    }
    IStatus status=deploy(serverDef,viewObjs);
    if (status.isMultiStatus()) {
      for (      IStatus childStatus : status.getChildren()) {
        DeployService.DeployStatus deployStatus=(DeployStatus)childStatus;
        if (deployStatus.isOK()) {
          if (deployStatus.getItem() instanceof MDMServerObjectItem)           saveLastServer((MDMServerObjectItem)deployStatus.getItem(),serverDef);
        }
      }
      showDeployStatus(status);
    }
    for (    IRepositoryViewObject viewObj : viewObjs) {
      commonViewer.refresh(viewObj);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true);
  SelectServerDefDialog dialog=new SelectServerDefDialog(getShell());
  if (dialog.open() == IDialogConstants.OK_ID) {
    MDMServerDef serverDef=dialog.getSelectedServerDef();
    List<IRepositoryViewObject> viewObjs=new LinkedList<IRepositoryViewObject>();
    for (    Object obj : getSelectedObject()) {
      viewObjs.add((IRepositoryViewObject)obj);
    }
    IStatus status=deploy(serverDef,viewObjs);
    if (status.isMultiStatus()) {
      for (      IStatus childStatus : status.getChildren()) {
        DeployService.DeployStatus deployStatus=(DeployStatus)childStatus;
        if (deployStatus.isOK()) {
          if (deployStatus.getItem() instanceof MDMServerObjectItem)           saveLastServer((MDMServerObjectItem)deployStatus.getItem(),serverDef);
        }
      }
      showDeployStatus(status);
    }
    for (    IRepositoryViewObject viewObj : viewObjs) {
      commonViewer.refresh(viewObj);
    }
  }
}
Program: 148027
Project: 148027
Buggy source:
@Override public void run(){
  List<IRepositoryViewObject> viewObjs=new LinkedList<IRepositoryViewObject>();
  for (  Object obj : getSelectedObject()) {
    viewObjs.add((IRepositoryViewObject)obj);
  }
  IRepositoryViewObject viewObj=(IRepositoryViewObject)getSelectedObject().get(0);
  MDMServerObjectItem item=(MDMServerObjectItem)viewObj.getProperty().getItem();
  MDMServerObject mdmServerObject=((MDMServerObjectItem)item).getMDMServerObject();
  MDMServerDef currentServerDef=mdmServerObject.getLastServerDef();
  IStatus status=deploy(currentServerDef,viewObjs);
  updateChangedStatus(status);
  if (status.isMultiStatus()) {
    showDeployStatus(status);
  }
  for (  IRepositoryViewObject viewObject : viewObjs) {
    commonViewer.refresh(viewObject);
  }
}

Fixed version (ground truth):
@Override public void run(){
  PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true);
  List<IRepositoryViewObject> viewObjs=new LinkedList<IRepositoryViewObject>();
  for (  Object obj : getSelectedObject()) {
    viewObjs.add((IRepositoryViewObject)obj);
  }
  IRepositoryViewObject viewObj=(IRepositoryViewObject)getSelectedObject().get(0);
  MDMServerObjectItem item=(MDMServerObjectItem)viewObj.getProperty().getItem();
  MDMServerObject mdmServerObject=((MDMServerObjectItem)item).getMDMServerObject();
  MDMServerDef currentServerDef=mdmServerObject.getLastServerDef();
  IStatus status=deploy(currentServerDef,viewObjs);
  updateChangedStatus(status);
  if (status.isMultiStatus()) {
    showDeployStatus(status);
  }
  for (  IRepositoryViewObject viewObject : viewObjs) {
    commonViewer.refresh(viewObject);
  }
}
Program: 148029
Project: 148029
Buggy source:
@Override protected void doSave(WSDataModel wsObject) throws Exception {
  XObjectEditorInput2 editorInput=(XObjectEditorInput2)getEditorInput();
  MDMServerObjectItem serverObjectItem=(MDMServerObjectItem)editorInput.getInputItem();
  MDMServerObject serverObject=serverObjectItem.getMDMServerObject();
  EObject eContainer=serverObject.eContainer();
  EObject eObj=Bean2EObjUtil.getInstance().convertFromBean2EObj(wsObject,serverObject);
  if (eObj != null) {
    serverObject.setChanged(true);
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    factory.save(serverObjectItem);
  }
}

Fixed version (ground truth):
@Override protected void doSave(WSDataModel wsObject) throws Exception {
  XObjectEditorInput2 editorInput=(XObjectEditorInput2)getEditorInput();
  MDMServerObjectItem serverObjectItem=(MDMServerObjectItem)editorInput.getInputItem();
  MDMServerObject serverObject=serverObjectItem.getMDMServerObject();
  EObject eContainer=serverObject.eContainer();
  EObject eObj=Bean2EObjUtil.getInstance().convertFromBean2EObj(wsObject,serverObject);
  if (eObj != null) {
    serverObject.setChanged(true);
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    factory.save(serverObjectItem);
  }
  refreshDirtyCue();
}
Program: 148030
Project: 148030
Buggy source:
private boolean saveResourceToRepository(){
  XObjectEditorInput2 editorInput=(XObjectEditorInput2)this.getEditorInput();
  TreeObject xobject=(TreeObject)editorInput.getModel();
  MDMServerObjectItem serverObjectItem=(MDMServerObjectItem)editorInput.getInputItem();
  MDMServerObject serverObject=serverObjectItem.getMDMServerObject();
  EObject eObj=Bean2EObjUtil.getInstance().convertFromBean2EObj(xobject.getWsObject(),serverObject);
  if (eObj != null) {
    serverObject.setChanged(true);
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    try {
      factory.save(serverObjectItem);
      editorDirtyStateChanged();
      return true;
    }
 catch (    PersistenceException e) {
      log.error(e.getMessage(),e);
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean saveResourceToRepository(){
  XObjectEditorInput2 editorInput=(XObjectEditorInput2)this.getEditorInput();
  TreeObject xobject=(TreeObject)editorInput.getModel();
  MDMServerObjectItem serverObjectItem=(MDMServerObjectItem)editorInput.getInputItem();
  MDMServerObject serverObject=serverObjectItem.getMDMServerObject();
  EObject eObj=Bean2EObjUtil.getInstance().convertFromBean2EObj(xobject.getWsObject(),serverObject);
  if (eObj != null) {
    serverObject.setChanged(true);
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    try {
      factory.save(serverObjectItem);
      editorDirtyStateChanged();
      refreshDirtyCue();
      return true;
    }
 catch (    PersistenceException e) {
      log.error(e.getMessage(),e);
    }
  }
  return false;
}
Program: 148031
Project: 148031
Buggy source:
@Override public void run(){
  Object obj=getSelectedObject().get(0);
  if (obj instanceof IRepositoryViewObject) {
    IRepositoryViewObject viewObj=(IRepositoryViewObject)obj;
    MDMServerObjectItem item=(MDMServerObjectItem)viewObj.getProperty().getItem();
    MDMServerObject serverObject=item.getMDMServerObject();
    IRepositoryNodeConfiguration configuration=RepositoryNodeConfigurationManager.getConfiguration(item);
    if (configuration != null) {
      ERepositoryObjectType type=configuration.getResourceProvider().getRepositoryObjectType(item);
      IRepositoryViewObject parentViewObj=ContainerCacheService.get(type,item.getState().getPath());
      try {
        if (serverObject != null) {
          String newName=showRenameDlg(type,(ContainerItem)parentViewObj.getProperty().getItem());
          if (newName != null) {
            serverObject.setName(newName);
            viewObj.getProperty().setLabel(newName);
            factory.save(viewObj.getProperty().getItem(),false);
          }
        }
        commonViewer.refresh(obj);
      }
 catch (      PersistenceException e) {
        log.error(e.getMessage(),e);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  Object obj=getSelectedObject().get(0);
  if (obj instanceof IRepositoryViewObject) {
    IRepositoryViewObject viewObj=(IRepositoryViewObject)obj;
    MDMServerObjectItem item=(MDMServerObjectItem)viewObj.getProperty().getItem();
    MDMServerObject serverObject=item.getMDMServerObject();
    IRepositoryNodeConfiguration configuration=RepositoryNodeConfigurationManager.getConfiguration(item);
    if (configuration != null) {
      ERepositoryObjectType type=configuration.getResourceProvider().getRepositoryObjectType(item);
      IRepositoryViewObject parentViewObj=ContainerCacheService.get(type,item.getState().getPath());
      try {
        if (serverObject != null) {
          String newName=showRenameDlg(type,(ContainerItem)parentViewObj.getProperty().getItem());
          if (newName != null) {
            serverObject.setName(newName);
            newName=RepositoryResourceUtil.escapeSpecialCharacters(newName);
            viewObj.getProperty().setLabel(newName);
            factory.save(viewObj.getProperty().getItem(),false);
          }
        }
        commonViewer.refresh(obj);
      }
 catch (      PersistenceException e) {
        log.error(e.getMessage(),e);
      }
    }
  }
}
Program: 148032
Project: 148032
Buggy source:
public static boolean createItem(Item item,String propLabel,String version){
  IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
  RepositoryContext context=factory.getRepositoryContext();
  Property prop=PropertiesFactory.eINSTANCE.createProperty();
  item.setProperty(prop);
  try {
    String nextId=factory.getNextId();
    Property property=item.getProperty();
    property.setId(nextId);
    property.setVersion(version);
    property.setAuthor(context.getUser());
    property.setLabel(propLabel);
    factory.create(item,new Path(item.getState().getPath()));
    IRepositoryNodeConfiguration configuration=RepositoryNodeConfigurationManager.getConfiguration(item);
    if (configuration != null) {
      IRepositoryNodeResourceProvider resourceProvider=configuration.getResourceProvider();
      if (resourceProvider.needSaveReferenceFile()) {
        resourceProvider.handleReferenceFile(item);
      }
    }
    return true;
  }
 catch (  PersistenceException e) {
    log.error(e.getMessage(),e);
  }
  return false;
}

Fixed version (ground truth):
public static boolean createItem(Item item,String propLabel,String version){
  propLabel=escapeSpecialCharacters(propLabel);
  IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
  RepositoryContext context=factory.getRepositoryContext();
  Property prop=PropertiesFactory.eINSTANCE.createProperty();
  item.setProperty(prop);
  try {
    String nextId=factory.getNextId();
    Property property=item.getProperty();
    property.setId(nextId);
    property.setVersion(version);
    property.setAuthor(context.getUser());
    property.setLabel(propLabel);
    factory.create(item,new Path(item.getState().getPath()));
    IRepositoryNodeConfiguration configuration=RepositoryNodeConfigurationManager.getConfiguration(item);
    if (configuration != null) {
      IRepositoryNodeResourceProvider resourceProvider=configuration.getResourceProvider();
      if (resourceProvider.needSaveReferenceFile()) {
        resourceProvider.handleReferenceFile(item);
      }
    }
    return true;
  }
 catch (  PersistenceException e) {
    log.error(e.getMessage(),e);
  }
  return false;
}
Program: 148033
Project: 148033
Buggy source:
/** 
 * Create contents of the dialog.
 * @param parent
 */
@Override protected Control createDialogArea(Composite parent){
  setTitle(Messages.SelectServerDefDialog_selectServerLocation);
  Composite area=(Composite)super.createDialogArea(parent);
  Composite container=new Composite(area,SWT.NONE);
  container.setLayout(new FillLayout(SWT.HORIZONTAL));
  container.setLayoutData(new GridData(GridData.FILL_BOTH));
  treeViewer=new TreeViewer(container,SWT.BORDER);
  treeViewer.setSorter(new ServerSorter());
  treeViewer.setContentProvider(new TreeContentProvider());
  treeViewer.setLabelProvider(new ViewerLabelProvider());
  treeViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      IRepositoryViewObject viewObject=getCurSelectedViewObject();
      MDMServerDefItem item=(MDMServerDefItem)viewObject.getProperty().getItem();
      serverDef=item.getServerDef();
      okBun.setEnabled(serverDef != null);
    }
  }
);
  initServerDefList();
  return area;
}

Fixed version (ground truth):
/** 
 * Create contents of the dialog.
 * @param parent
 */
@Override protected Control createDialogArea(Composite parent){
  setTitle(Messages.SelectServerDefDialog_selectServerLocation);
  Composite area=(Composite)super.createDialogArea(parent);
  Composite container=new Composite(area,SWT.NONE);
  container.setLayout(new FillLayout(SWT.HORIZONTAL));
  container.setLayoutData(new GridData(GridData.FILL_BOTH));
  treeViewer=new TreeViewer(container,SWT.BORDER);
  treeViewer.setSorter(new ServerSorter());
  treeViewer.setContentProvider(new TreeContentProvider());
  treeViewer.setLabelProvider(new ViewerLabelProvider());
  treeViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      IRepositoryViewObject viewObject=getCurSelectedViewObject();
      MDMServerDefItem item=(MDMServerDefItem)viewObject.getProperty().getItem();
      serverDef=item.getServerDef();
      okBun.setEnabled(serverDef != null);
    }
  }
);
  treeViewer.addDoubleClickListener(new IDoubleClickListener(){
    public void doubleClick(    DoubleClickEvent event){
      okPressed();
    }
  }
);
  initServerDefList();
  return area;
}
Program: 148034
Project: 148034
Buggy source:
@Override protected void doSave(WSDataModel wsObject) throws Exception {
  XObjectEditorInput2 editorInput=(XObjectEditorInput2)getEditorInput();
  MDMServerObjectItem serverObjectItem=(MDMServerObjectItem)editorInput.getInputItem();
  MDMServerObject serverObject=serverObjectItem.getMDMServerObject();
  EObject eContainer=serverObject.eContainer();
  EObject eObj=Bean2EObjUtil.getInstance().convertFromBean2EObj(wsObject,serverObject);
  if (eObj != null) {
    serverObject.setChanged(true);
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    factory.save(serverObjectItem);
  }
  refreshDirtyCue();
}

Fixed version (ground truth):
@Override protected void doSave(WSDataModel wsObject) throws Exception {
  XObjectEditorInput2 editorInput=(XObjectEditorInput2)getEditorInput();
  MDMServerObjectItem serverObjectItem=(MDMServerObjectItem)editorInput.getInputItem();
  MDMServerObject serverObject=serverObjectItem.getMDMServerObject();
  EObject eContainer=serverObject.eContainer();
  EObject eObj=Bean2EObjUtil.getInstance().convertFromBean2EObj(wsObject,serverObject);
  if (eObj != null) {
    serverObject.setChanged(true);
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    factory.save(serverObjectItem);
  }
  refreshDirtyCue();
  autoDeploy(serverObject);
}
Program: 148035
Project: 148035
Buggy source:
private boolean saveResourceToRepository(){
  XObjectEditorInput2 editorInput=(XObjectEditorInput2)this.getEditorInput();
  TreeObject xobject=(TreeObject)editorInput.getModel();
  MDMServerObjectItem serverObjectItem=(MDMServerObjectItem)editorInput.getInputItem();
  MDMServerObject serverObject=serverObjectItem.getMDMServerObject();
  EObject eObj=Bean2EObjUtil.getInstance().convertFromBean2EObj(xobject.getWsObject(),serverObject);
  if (eObj != null) {
    serverObject.setChanged(true);
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    try {
      factory.save(serverObjectItem);
      editorDirtyStateChanged();
      refreshDirtyCue();
      return true;
    }
 catch (    PersistenceException e) {
      log.error(e.getMessage(),e);
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean saveResourceToRepository(){
  XObjectEditorInput2 editorInput=(XObjectEditorInput2)this.getEditorInput();
  TreeObject xobject=(TreeObject)editorInput.getModel();
  MDMServerObjectItem serverObjectItem=(MDMServerObjectItem)editorInput.getInputItem();
  MDMServerObject serverObject=serverObjectItem.getMDMServerObject();
  EObject eObj=Bean2EObjUtil.getInstance().convertFromBean2EObj(xobject.getWsObject(),serverObject);
  if (eObj != null) {
    serverObject.setChanged(true);
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    try {
      factory.save(serverObjectItem);
      editorDirtyStateChanged();
      refreshDirtyCue();
      autoDeploy(serverObject);
      return true;
    }
 catch (    PersistenceException e) {
      log.error(e.getMessage(),e);
    }
  }
  return false;
}
Program: 148036
Project: 148036
Buggy source:
@Override public void doSave(IProgressMonitor monitor){
  this.saveInProgress=true;
  if (xmlEditor != null && this.getCurrentPage() == 1) {
    xmlEditor.doSave(monitor);
    ((AFormPage)(formPages.get(0))).refreshPage();
    return;
  }
  int numPages=formPages.size();
  monitor.beginTask(Messages.bind(Messages.XObjectEditor2_saving,this.getEditorInput().getName()),numPages + 1);
  for (int i=0; i < numPages; i++) {
    if ((formPages.get(i)) instanceof AFormPage) {
      if (!((AFormPage)(formPages.get(i))).beforeDoSave())       return;
    }
    (formPages.get(i)).doSave(monitor);
    monitor.worked(1);
    if (monitor.isCanceled()) {
      this.saveInProgress=false;
      return;
    }
  }
  boolean saved=saveResourceToRepository();
  if (xmlEditor != null && saved) {
    xmlEditor.refresh();
  }
  monitor.done();
}

Fixed version (ground truth):
@Override public void doSave(IProgressMonitor monitor){
  this.saveInProgress=true;
  try {
    if (xmlEditor != null && this.getCurrentPage() == 1) {
      xmlEditor.doSave(monitor);
      ((AFormPage)(formPages.get(0))).refreshPage();
      return;
    }
    int numPages=formPages.size();
    monitor.beginTask(Messages.bind(Messages.XObjectEditor2_saving,this.getEditorInput().getName()),numPages + 1);
    for (int i=0; i < numPages; i++) {
      if ((formPages.get(i)) instanceof AFormPage) {
        if (!((AFormPage)(formPages.get(i))).beforeDoSave())         return;
      }
      (formPages.get(i)).doSave(monitor);
      monitor.worked(1);
      if (monitor.isCanceled()) {
        this.saveInProgress=false;
        return;
      }
    }
    boolean saved=saveResourceToRepository();
    if (xmlEditor != null && saved) {
      xmlEditor.refresh();
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
 finally {
    monitor.done();
  }
}
Program: 148037
Project: 148037
Buggy source:
public void doSave(IProgressMonitor monitor){
  this.saveInProgress=true;
  if (xmlEditor != null && this.getCurrentPage() == 1) {
    xmlEditor.doSave(monitor);
    ((AFormPage)(formPages.get(0))).refreshPage();
    return;
  }
  int numPages=formPages.size();
  monitor.beginTask("String_Node_Str" + this.getEditorInput().getName(),numPages + 1);
  for (int i=0; i < numPages; i++) {
    if ((formPages.get(i)) instanceof AFormPage) {
      if (!((AFormPage)(formPages.get(i))).beforeDoSave())       return;
    }
    (formPages.get(i)).doSave(monitor);
    monitor.worked(1);
    if (monitor.isCanceled()) {
      this.saveInProgress=false;
      return;
    }
  }
  SaveXObjectAction action=new SaveXObjectAction(this);
  action.run();
  if (xmlEditor != null && action.getState() == 0) {
    xmlEditor.refresh();
  }
  monitor.done();
}

Fixed version (ground truth):
public void doSave(IProgressMonitor monitor){
  this.saveInProgress=true;
  try {
    if (xmlEditor != null && this.getCurrentPage() == 1) {
      xmlEditor.doSave(monitor);
      ((AFormPage)(formPages.get(0))).refreshPage();
      return;
    }
    int numPages=formPages.size();
    monitor.beginTask("String_Node_Str" + this.getEditorInput().getName(),numPages + 1);
    for (int i=0; i < numPages; i++) {
      if ((formPages.get(i)) instanceof AFormPage) {
        if (!((AFormPage)(formPages.get(i))).beforeDoSave())         return;
      }
      (formPages.get(i)).doSave(monitor);
      monitor.worked(1);
      if (monitor.isCanceled()) {
        this.saveInProgress=false;
        return;
      }
    }
    SaveXObjectAction action=new SaveXObjectAction(this);
    action.run();
    if (xmlEditor != null && action.getState() == 0) {
      xmlEditor.refresh();
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
 finally {
    monitor.done();
  }
}
Program: 148038
Project: 148038
Buggy source:
@Override public void doSave(IProgressMonitor monitor){
  super.doSave(monitor);
  try {
    if (getSelectedPage() instanceof DataModelMainPage) {
      DataModelMainPage mainPage=(DataModelMainPage)getSelectedPage();
      String xsd=mainPage.getXSDSchemaString();
      WSDataModel wsDataModel=(WSDataModel)xobject.getWsObject();
      wsDataModel.setXsdSchema(xsd);
      IFile file=getXSDFile(xobject);
      file.setCharset("String_Node_Str",null);
      file.setContents(new ByteArrayInputStream(xsd.getBytes("String_Node_Str")),IFile.FORCE,null);
    }
    IDocument doc=getTextEditor().getTextViewer().getDocument();
    String xsd=doc.get();
    IEditorPart[] editors=findEditors(xsdInput);
    if (editors.length == 1 && editors[0] instanceof DataModelMainPage) {
      DataModelMainPage mainPage=(DataModelMainPage)editors[0];
      mainPage.save(xsd);
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}

Fixed version (ground truth):
@Override public void doSave(IProgressMonitor monitor){
  super.doSave(monitor);
  try {
    if (getSelectedPage() instanceof DataModelMainPage) {
      DataModelMainPage mainPage=(DataModelMainPage)getSelectedPage();
      String xsd=mainPage.getXSDSchemaString();
      WSDataModel wsDataModel=(WSDataModel)xobject.getWsObject();
      wsDataModel.setXsdSchema(xsd);
      IFile file=getXSDFile(xobject);
      file.setCharset("String_Node_Str",null);
      file.setContents(new ByteArrayInputStream(xsd.getBytes("String_Node_Str")),IFile.FORCE,null);
    }
    IDocument doc=getTextEditor().getTextViewer().getDocument();
    String xsd=doc.get();
    IEditorPart[] editors=findEditors(xsdInput);
    if (editors.length == 1 && editors[0] instanceof DataModelMainPage) {
      DataModelMainPage mainPage=(DataModelMainPage)editors[0];
      mainPage.save(xsd);
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
 finally {
    monitor.done();
  }
}
Program: 148039
Project: 148039
Buggy source:
@Override public void run(){
  PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true);
  SelectServerDefDialog dialog=new SelectServerDefDialog(getShell());
  if (dialog.open() == IDialogConstants.OK_ID) {
    MDMServerDef serverDef=dialog.getSelectedServerDef();
    List<IRepositoryViewObject> viewObjs=new LinkedList<IRepositoryViewObject>();
    for (    Object obj : getSelectedObject()) {
      viewObjs.add((IRepositoryViewObject)obj);
    }
    IStatus status=deploy(serverDef,viewObjs);
    if (status.isMultiStatus()) {
      for (      IStatus childStatus : status.getChildren()) {
        DeployService.DeployStatus deployStatus=(DeployStatus)childStatus;
        if (deployStatus.isOK()) {
          if (deployStatus.getItem() instanceof MDMServerObjectItem)           saveLastServer((MDMServerObjectItem)deployStatus.getItem(),serverDef);
        }
      }
      showDeployStatus(status);
    }
    for (    IRepositoryViewObject viewObj : viewObjs) {
      commonViewer.refresh(viewObj);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true);
  SelectServerDefDialog dialog=new SelectServerDefDialog(getShell());
  if (dialog.open() == IDialogConstants.OK_ID) {
    MDMServerDef serverDef=dialog.getSelectedServerDef();
    List<IRepositoryViewObject> viewObjs=new LinkedList<IRepositoryViewObject>();
    for (    Object obj : getSelectedObject()) {
      viewObjs.add((IRepositoryViewObject)obj);
    }
    IStatus status=deploy(serverDef,viewObjs);
    if (status.isMultiStatus()) {
      showDeployStatus(status);
      for (      IStatus childStatus : status.getChildren()) {
        DeployService.DeployStatus deployStatus=(DeployStatus)childStatus;
        if (deployStatus.isOK()) {
          if (deployStatus.getItem() instanceof MDMServerObjectItem)           saveLastServer((MDMServerObjectItem)deployStatus.getItem(),serverDef);
        }
      }
    }
    for (    IRepositoryViewObject viewObj : viewObjs) {
      commonViewer.refresh(viewObj);
    }
  }
}
Program: 148040
Project: 148040
Buggy source:
public Image getColumnImage(Object element,int columnIndex){
  if (element instanceof DeployStatus) {
    DeployStatus deployStatus=(DeployStatus)element;
    Item item=deployStatus.getItem();
    MDMServerObject serverObj=null;
    if (item != null)     serverObj=((MDMServerObjectItem)item).getMDMServerObject();
    if (deployStatus.getSeverity() == IStatus.OK) {
      if (serverObj == null)       return IMG_DELETE;
      if (serverObj.getLastServerDef() != null) {
        return IMG_OK;
      }
      return IMG_ADD;
    }
    if (deployStatus.getSeverity() == IStatus.INFO)     return IMG_INFO;
    if (deployStatus.getSeverity() == IStatus.ERROR)     return IMG_ERR;
  }
  return null;
}

Fixed version (ground truth):
public Image getColumnImage(Object element,int columnIndex){
  if (element instanceof DeployStatus) {
    DeployStatus deployStatus=(DeployStatus)element;
    if (deployStatus.getMessage().toLowerCase().contains("String_Node_Str")) {
      return IMG_OK;
    }
    Item item=deployStatus.getItem();
    MDMServerObject serverObj=null;
    if (item != null)     serverObj=((MDMServerObjectItem)item).getMDMServerObject();
    if (deployStatus.getSeverity() == IStatus.OK) {
      if (serverObj == null)       return IMG_DELETE;
      if (serverObj.getLastServerDef() != null) {
        return IMG_OK;
      }
      return IMG_ADD;
    }
    if (deployStatus.getSeverity() == IStatus.INFO)     return IMG_INFO;
    if (deployStatus.getSeverity() == IStatus.ERROR)     return IMG_ERR;
  }
  return null;
}
Program: 148041
Project: 148041
Buggy source:
protected abstract T getEditedObj();

Fixed version (ground truth):
public abstract T getEditedObj();
Program: 148042
Project: 148042
Buggy source:
@Override protected XSDComplexTypeDefinition getEditedObj(){
  return complexType;
}

Fixed version (ground truth):
@Override public XSDComplexTypeDefinition getEditedObj(){
  return complexType;
}
Program: 148043
Project: 148043
Buggy source:
@Override protected XSDParticle getEditedObj(){
  return curXSDParticle;
}

Fixed version (ground truth):
@Override public XSDParticle getEditedObj(){
  return curXSDParticle;
}
Program: 148044
Project: 148044
Buggy source:
@Override protected XSDElementDeclaration getEditedObj(){
  return xsdElementDeclaration;
}

Fixed version (ground truth):
@Override public XSDElementDeclaration getEditedObj(){
  return xsdElementDeclaration;
}
Program: 148045
Project: 148045
Buggy source:
@Override protected XSDSimpleTypeDefinition getEditedObj(){
  return xsdSimpleType;
}

Fixed version (ground truth):
@Override public XSDSimpleTypeDefinition getEditedObj(){
  return xsdSimpleType;
}
Program: 148046
Project: 148046
Buggy source:
@Override protected XSDComponent getEditedObj(){
  return curXSDComponent;
}

Fixed version (ground truth):
@Override public XSDComponent getEditedObj(){
  return curXSDComponent;
}
Program: 148047
Project: 148047
Buggy source:
public XSDSchema getDataModel(String dataModelName){
  return Util.getXSDSchema(propSection.getTreeObject(),dataModelName);
}

Fixed version (ground truth):
public XSDSchema getDataModel(String dataModelName){
  if (propSection instanceof XSDComponentSection) {
    return ((XSDComponentSection)propSection).getEditedObj().getSchema();
  }
  return Util.getXSDSchema(propSection.getTreeObject(),dataModelName);
}