nus-yam/ex-repair huggingface dataset:
Program: 149105
Project: 149105
Buggy source:
public CalendarSelectWidget(FormToolkit toolkit,final Composite composite,boolean hasDefaultTime){
  text=toolkit.createText(composite,"String_Node_Str",SWT.BORDER | SWT.MULTI);
  text.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,1,1));
  ((GridData)text.getLayoutData()).widthHint=100;
  if (hasDefaultTime) {
    Calendar c=Calendar.getInstance();
    long yesterday=c.getTimeInMillis() - (1000 * 60 * 60* 24);
    c.setTimeInMillis(yesterday);
    text.setText(sdf.format(c.getTime()));
    text.pack();
  }
  btn=toolkit.createButton(composite,"String_Node_Str",SWT.CENTER | SWT.ARROW | SWT.DOWN);
  btn.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event event){
      if (cal == null || cal.getShell().isDisposed())       cal=new CalendarDialog(composite.getShell());
      if (text.getText() != null && text.getText().length() > 0) {
        try {
          Date d=sdf.parse(text.getText());
          cal.setDate(d);
        }
 catch (        ParseException pe) {
        }
      }
      cal.addDateChangedListener(new SWTCalendarListener(){
        public void dateChanged(        SWTCalendarEvent calendarEvent){
          text.setText(sdf.format(calendarEvent.getCalendar().getTime()));
        }
      }
);
      Point sbPoint=btn.getDisplay().map(btn.getParent(),null,btn.getLocation());
      cal.getShell().setLocation(new Point(sbPoint.x,sbPoint.y + btn.getSize().y));
      cal.open();
    }
  }
);
}

Fixed version (ground truth):
public CalendarSelectWidget(FormToolkit toolkit,final Composite composite,boolean hasDefaultTime){
  text=toolkit.createText(composite,"String_Node_Str",SWT.BORDER | SWT.MULTI);
  text.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,1,1));
  ((GridData)text.getLayoutData()).widthHint=100;
  if (hasDefaultTime) {
    Calendar c=Calendar.getInstance();
    long yesterday=c.getTimeInMillis() - (1000 * 60 * 60* 24);
    c.setTimeInMillis(yesterday);
    text.pack();
  }
  btn=toolkit.createButton(composite,"String_Node_Str",SWT.CENTER | SWT.ARROW | SWT.DOWN);
  btn.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event event){
      if (cal == null || cal.getShell().isDisposed())       cal=new CalendarDialog(composite.getShell());
      if (text.getText() != null && text.getText().length() > 0) {
        try {
          Date d=sdf.parse(text.getText());
          cal.setDate(d);
        }
 catch (        ParseException pe) {
        }
      }
      cal.addDateChangedListener(new SWTCalendarListener(){
        public void dateChanged(        SWTCalendarEvent calendarEvent){
          text.setText(sdf.format(calendarEvent.getCalendar().getTime()));
        }
      }
);
      Point sbPoint=btn.getDisplay().map(btn.getParent(),null,btn.getLocation());
      cal.getShell().setLocation(new Point(sbPoint.x,sbPoint.y + btn.getSize().y));
      cal.open();
    }
  }
);
}
Program: 149106
Project: 149106
Buggy source:
private Composite getViewParametersComposite(){
  FormToolkit toolkit=this.getManagedForm().getToolkit();
  Composite composite=toolkit.createComposite(paramsClientComposite,SWT.BORDER);
  composite.setLayout(new GridLayout(2,false));
  conditionsColumns[0].setColumnWidth(200);
  conditionsColumns[1].setColumnWidth(150);
  conditionsColumns[3].setColumnWidth(120);
  conditionViewer=new TisTableViewer(Arrays.asList(conditionsColumns),this.getManagedForm().getToolkit(),composite);
  conditionViewer.setMainPage(this);
  conditionViewer.create();
  conditionViewer.setHeight(110);
  return composite;
}

Fixed version (ground truth):
private Composite getViewParametersComposite(){
  FormToolkit toolkit=this.getManagedForm().getToolkit();
  Composite composite=toolkit.createComposite(paramsClientComposite,SWT.BORDER);
  composite.setLayout(new GridLayout(2,false));
  conditionsColumns[0].setColumnWidth(200);
  conditionsColumns[1].setColumnWidth(150);
  conditionsColumns[3].setColumnWidth(120);
  conditionViewer=new TisTableViewer(Arrays.asList(conditionsColumns),this.getManagedForm().getToolkit(),composite);
  conditionViewer.setMainPage(this);
  conditionViewer.setAddMulti(true);
  conditionViewer.create();
  conditionViewer.setHeight(110);
  return composite;
}
Program: 149110
Project: 149110
Buggy source:
public void mouseUp(MouseEvent e){
  deactive();
}

Fixed version (ground truth):
public void mouseUp(MouseEvent e){
  if (!isMouseInControl(e)) {
    deactive();
  }
}
Program: 149111
Project: 149111
Buggy source:
@Override protected Control createControl(Composite parent){
  xpath=new XpathWidget(parent,mainPage,false);
  ((GridData)xpath.getComposite().getChildren()[0].getLayoutData()).heightHint=15;
  ((GridData)xpath.getComposite().getChildren()[1].getLayoutData()).heightHint=15;
  if (parent instanceof Table) {
    ((Table)parent).addMouseListener(new MouseListener(){
      public void mouseDoubleClick(      MouseEvent e){
      }
      public void mouseDown(      MouseEvent e){
      }
      public void mouseUp(      MouseEvent e){
        deactive();
      }
    }
);
  }
  return xpath.getComposite();
}

Fixed version (ground truth):
@Override protected Control createControl(Composite parent){
  xpath=new XpathWidget(parent,mainPage,false);
  ((GridData)xpath.getComposite().getChildren()[0].getLayoutData()).heightHint=15;
  ((GridData)xpath.getComposite().getChildren()[1].getLayoutData()).heightHint=15;
  if (parent instanceof Table) {
    ((Table)parent).addMouseListener(new MouseListener(){
      public void mouseDoubleClick(      MouseEvent e){
      }
      public void mouseDown(      MouseEvent e){
      }
      public void mouseUp(      MouseEvent e){
        if (!isMouseInControl(e)) {
          deactive();
        }
      }
    }
);
  }
  return xpath.getComposite();
}
Program: 149112
Project: 149112
Buggy source:
private void initializeKeyPress(final SourceViewer viewer){
  StyledText styledText=viewer.getTextWidget();
  styledText.addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
    }
    public void keyReleased(    KeyEvent e){
      if (e.keyCode == 'x' && e.stateMask == SWT.CTRL) {
        viewer.doOperation(ITextOperationTarget.CUT);
      }
 else       if (e.keyCode == 'v' && e.stateMask == SWT.CTRL) {
        viewer.doOperation(ITextOperationTarget.PASTE);
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @deprecated
 * @param viewer
 */
private void initializeKeyPress(final SourceViewer viewer){
  StyledText styledText=viewer.getTextWidget();
  styledText.addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
    }
    public void keyReleased(    KeyEvent e){
      if (e.keyCode == 'x' && e.stateMask == SWT.CTRL) {
        viewer.doOperation(ITextOperationTarget.CUT);
      }
 else       if (e.keyCode == 'v' && e.stateMask == SWT.CTRL) {
        viewer.doOperation(ITextOperationTarget.PASTE);
      }
    }
  }
);
}
Program: 149113
Project: 149113
Buggy source:
public void createPartControl(Composite parent){
  super.createPartControl(parent);
  initializeKeyPress((SourceViewer)getSourceViewer());
}

Fixed version (ground truth):
public void createPartControl(Composite parent){
  super.createPartControl(parent);
}
Program: 149114
Project: 149114
Buggy source:
public void execute(){
  List<String> list=new ArrayList<String>();
  try {
    DocumentBuilder builder=DocumentBuilderFactory.newInstance().newDocumentBuilder();
    InputStream in=Thread.currentThread().getContextClassLoader().getResourceAsStream(MIGRATION_FILE_NAME);
    Document doc=builder.parse(in);
    NodeList nodelist=doc.getElementsByTagName("String_Node_Str");
    Node root=nodelist.item(0);
    Node child=root.getFirstChild();
    for (int id=0; id < root.getChildNodes().getLength(); id++) {
      Node node=root.getChildNodes().item(id);
      if (node instanceof Element)       list.add(node.getNodeName());
    }
  }
 catch (  Exception e) {
    org.apache.log4j.Logger.getLogger(this.getClass()).error(e.getCause());
    return;
  }
  Class[] clses=getDirectoryEntries(list);
  try {
    for (    Class cls : clses) {
      Constructor cons=cls.getConstructor(new Class[]{});
      Object handler=cons.newInstance(new Object[]{});
      Method executeMethod=cls.getMethod("String_Node_Str",new Class[]{});
      executeMethod.invoke(handler,new Object[]{});
    }
  }
 catch (  Exception ex) {
    org.apache.log4j.Logger.getLogger(this.getClass()).error(ex.getMessage());
  }
  ItemPOJO.clearCache();
  ObjectPOJO.clearCache();
}

Fixed version (ground truth):
public void execute(){
  if (!isExeuted) {
    List<String> list=new ArrayList<String>();
    try {
      DocumentBuilder builder=DocumentBuilderFactory.newInstance().newDocumentBuilder();
      InputStream in=Thread.currentThread().getContextClassLoader().getResourceAsStream(MIGRATION_FILE_NAME);
      Document doc=builder.parse(in);
      NodeList nodelist=doc.getElementsByTagName("String_Node_Str");
      Node root=nodelist.item(0);
      Node child=root.getFirstChild();
      for (int id=0; id < root.getChildNodes().getLength(); id++) {
        Node node=root.getChildNodes().item(id);
        if (node instanceof Element)         list.add(node.getNodeName());
      }
    }
 catch (    Exception e) {
      org.apache.log4j.Logger.getLogger(this.getClass()).error(e.getCause());
      return;
    }
    for (    String clazz : list) {
      try {
        AbstractMigrationTask task=(AbstractMigrationTask)Class.forName(clazz).newInstance();
        task.start();
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
    ItemPOJO.clearCache();
    ObjectPOJO.clearCache();
  }
  isExeuted=true;
}
Program: 149117
Project: 149117
Buggy source:
public AMainPageV2(FormEditor editor,String id,String title){
  super(editor,id,title);
}

Fixed version (ground truth):
public AMainPageV2(FormEditor editor,String id,String title){
  super(editor,id,title);
  Version ver;
  try {
    ver=Util.getVersion(getXObject());
    version_greater_than_2_17_0=((ver.getMajor() > 2) || ((ver.getMajor() == 2) && (ver.getMinor() >= 17)));
  }
 catch (  XtentisException e) {
    e.printStackTrace();
  }
}
Program: 149118
Project: 149118
Buggy source:
public RoutingRuleMainPage(FormEditor editor){
  super(editor,RoutingRuleMainPage.class.getName(),"String_Node_Str" + ((XObjectEditorInput)editor.getEditorInput()).getName() + Util.getRevision((TreeObject)((XObjectEditorInput)editor.getEditorInput()).getModel()));
  try {
    Version ver=Util.getVersion(getXObject());
    version_greater_than_2_17_0=((ver.getMajor() > 2) || ((ver.getMajor() == 2) && (ver.getMinor() >= 17)));
    treeParent=this.getXObject().getParent();
    if (treeParent == null) {
      treeParent=this.getXObject().getServerRoot().findServerFolder(TreeObject.ROUTING_RULE);
    }
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
public RoutingRuleMainPage(FormEditor editor){
  super(editor,RoutingRuleMainPage.class.getName(),"String_Node_Str" + ((XObjectEditorInput)editor.getEditorInput()).getName() + Util.getRevision((TreeObject)((XObjectEditorInput)editor.getEditorInput()).getModel()));
  treeParent=this.getXObject().getParent();
  if (treeParent == null) {
    treeParent=this.getXObject().getServerRoot().findServerFolder(TreeObject.ROUTING_RULE);
  }
}
Program: 149121
Project: 149121
Buggy source:
public IStatus doAction(){
  try {
    IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
    XSDAnnotationsStructure struc=new XSDAnnotationsStructure((XSDComponent)selection.getFirstElement());
    if (struc.getAnnotation() == null) {
      throw new RuntimeException("String_Node_Str" + selection.getFirstElement().getClass().getName());
    }
    sxid=new SimpleXpathInputDialog(page,"String_Node_Str","String_Node_Str",struc.getForeignKey(),new SelectionListener(){
      public void widgetDefaultSelected(      SelectionEvent e){
      }
      public void widgetSelected(      SelectionEvent e){
        sxid.close();
      }
    }
,dataModelName);
    sxid.setBlockOnOpen(true);
    int ret=sxid.open();
    if (ret == Window.CANCEL) {
      return Status.CANCEL_STATUS;
    }
    struc.setForeignKey("String_Node_Str".equals(sxid.getXpath()) ? null : sxid.getXpath());
    if (struc.hasChanged()) {
      page.refresh();
      page.getTreeViewer().expandToLevel(selection.getFirstElement(),2);
      page.markDirty();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
public IStatus doAction(){
  try {
    IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
    XSDAnnotationsStructure struc=new XSDAnnotationsStructure((XSDComponent)selection.getFirstElement());
    if (struc.getAnnotation() == null) {
      throw new RuntimeException("String_Node_Str" + selection.getFirstElement().getClass().getName());
    }
    sxid=new SimpleXpathInputDialog(page,"String_Node_Str","String_Node_Str",struc.getForeignKey(),new SelectionListener(){
      public void widgetDefaultSelected(      SelectionEvent e){
      }
      public void widgetSelected(      SelectionEvent e){
        sxid.close();
      }
    }
,dataModelName);
    sxid.setBlockOnOpen(true);
    int ret=sxid.open();
    if (ret == Window.CANCEL) {
      return Status.CANCEL_STATUS;
    }
    struc.setForeignKey("String_Node_Str".equals(sxid.getXpath()) ? null : sxid.getXpath().replaceAll("String_Node_Str","String_Node_Str"));
    if (struc.hasChanged()) {
      page.refresh();
      page.getTreeViewer().expandToLevel(selection.getFirstElement(),2);
      page.markDirty();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(page.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return Status.CANCEL_STATUS;
  }
  return Status.OK_STATUS;
}
Program: 149122
Project: 149122
Buggy source:
private void updateParemeters(){
  if (conditionViewer == null)   return;
  java.util.List<Line> lines=(java.util.List<Line>)conditionViewer.getViewer().getInput();
  java.util.List<RoleWhereCondition> rcList=new ArrayList<RoleWhereCondition>();
  for (  Line item : lines) {
    String[] values=new String[]{item.keyValues.get(0).value,item.keyValues.get(1).value,item.keyValues.get(2).value,item.keyValues.get(3).value};
    RoleWhereCondition rc=Util.convertLineToRC(values);
    rcList.add(rc);
  }
  LinkedHashSet<String> parameters=new LinkedHashSet<String>();
  for (Iterator iter=rcList.iterator(); iter.hasNext(); ) {
    RoleWhereCondition rc=(RoleWhereCondition)iter.next();
    parameters.add(rc.toString());
  }
  String instanceName=((InstanceLine)((IStructuredSelection)instancesViewer.getSelection()).getFirstElement()).getInstanceName();
  role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).setParameters(parameters);
}

Fixed version (ground truth):
private void updateParemeters(){
  if (conditionViewer == null || ((IStructuredSelection)instancesViewer.getSelection()).getFirstElement() == null)   return;
  java.util.List<Line> lines=(java.util.List<Line>)conditionViewer.getViewer().getInput();
  java.util.List<RoleWhereCondition> rcList=new ArrayList<RoleWhereCondition>();
  for (  Line item : lines) {
    String[] values=new String[]{item.keyValues.get(0).value,item.keyValues.get(1).value,item.keyValues.get(2).value,item.keyValues.get(3).value};
    RoleWhereCondition rc=Util.convertLineToRC(values);
    rcList.add(rc);
  }
  LinkedHashSet<String> parameters=new LinkedHashSet<String>();
  for (Iterator iter=rcList.iterator(); iter.hasNext(); ) {
    RoleWhereCondition rc=(RoleWhereCondition)iter.next();
    parameters.add(rc.toString());
  }
  String instanceName=((InstanceLine)((IStructuredSelection)instancesViewer.getSelection()).getFirstElement()).getInstanceName();
  role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).setParameters(parameters);
}
Program: 149124
Project: 149124
Buggy source:
public Object[] getElements(Object inputElement){
  ArrayList<RoleWhereCondition> wcList=(ArrayList<RoleWhereCondition>)inputElement;
  return wcList.toArray(new RoleWhereCondition[wcList.size()]);
}

Fixed version (ground truth):
public Object[] getElements(Object inputElement){
  HashMap<String,Role.Specification.Instance> instances=(HashMap<String,Role.Specification.Instance>)inputElement;
  Set<String> names=instances.keySet();
  ArrayList<InstanceLine> lines=new ArrayList<InstanceLine>();
  for (Iterator iter=names.iterator(); iter.hasNext(); ) {
    String name=(String)iter.next();
    InstanceLine line=new InstanceLine(name,instances.get(name).isWritable());
    lines.add(line);
  }
  return lines.toArray(new InstanceLine[lines.size()]);
}
Program: 149125
Project: 149125
Buggy source:
private void deleteItems(Object view){
  List list=null;
  if (instancesViewer == view) {
    list=((IStructuredSelection)instancesViewer.getSelection()).toList();
  }
 else   if (wcListViewer != null) {
    IStructuredSelection selections=(IStructuredSelection)wcListViewer.getSelection();
    list=Arrays.asList(selections.toArray());
    String instanceName=((InstanceLine)((IStructuredSelection)instancesViewer.getSelection()).getFirstElement()).getInstanceName();
    ArrayList<RoleWhereCondition> wcList=(ArrayList<RoleWhereCondition>)wcListViewer.getInput();
    wcList.removeAll(list);
    LinkedHashSet<String> parameters=new LinkedHashSet<String>();
    for (Iterator iter=wcList.iterator(); iter.hasNext(); ) {
      RoleWhereCondition rwc=(RoleWhereCondition)iter.next();
      parameters.add(rwc.toString());
    }
    role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).setParameters(parameters);
    wcListViewer.refresh();
  }
  for (  Object le : list) {
    Object line=le;
    if (line instanceof InstanceLine) {
      HashMap map=role.getSpecifications().get(objectTypesCombo.getText()).getInstances();
      boolean is=map.containsKey(((InstanceLine)line).getInstanceName());
      map.remove(((InstanceLine)line).getInstanceName());
      instancesViewer.refresh();
      paramsContainerComposite.setVisible(false);
    }
    markDirty();
  }
}

Fixed version (ground truth):
private void deleteItems(Object view){
  List list=null;
  if (instancesViewer == view) {
    list=((IStructuredSelection)instancesViewer.getSelection()).toList();
  }
  for (  Object le : list) {
    Object line=le;
    if (line instanceof InstanceLine) {
      HashMap map=role.getSpecifications().get(objectTypesCombo.getText()).getInstances();
      boolean is=map.containsKey(((InstanceLine)line).getInstanceName());
      map.remove(((InstanceLine)line).getInstanceName());
      instancesViewer.refresh();
      paramsContainerComposite.setVisible(false);
    }
    markDirty();
  }
}
Program: 149126
Project: 149126
Buggy source:
public void dispose(){
}

Fixed version (ground truth):
public void dispose(){
  super.dispose();
  windowTarget.dispose();
}
Program: 149127
Project: 149127
Buggy source:
public void update(Observable o,Object arg){
  if (arg != null && (arg == instancesViewer || arg == wcListViewer)) {
    deleteItems(arg);
  }
}

Fixed version (ground truth):
public void update(Observable o,Object arg){
  if (arg != null && (arg == instancesViewer)) {
    deleteItems(arg);
  }
}
Program: 149129
Project: 149129
Buggy source:
protected void addWhereCondition(){
  markDirty();
  RoleWhereCondition wc=new RoleWhereCondition();
  wc.setLeftPath(wcLeftText.getText());
  wc.setOperator(wcOperatorCombo.getText());
  wc.setRightValueOrPath(wcRightText.getText());
  wc.setPredicate(wcPredicateCombo.getText());
  ArrayList<RoleWhereCondition> wcList=(ArrayList<RoleWhereCondition>)wcListViewer.getInput();
  wcList.add(wc);
  LinkedHashSet<String> parameters=new LinkedHashSet<String>();
  for (Iterator iter=wcList.iterator(); iter.hasNext(); ) {
    RoleWhereCondition wswc=(RoleWhereCondition)iter.next();
    parameters.add(wswc.toString());
  }
  String instanceName=((InstanceLine)((IStructuredSelection)instancesViewer.getSelection()).getFirstElement()).getInstanceName();
  role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).setParameters(parameters);
  wcListViewer.setInput(wcList);
  markDirty();
}

Fixed version (ground truth):
protected void addWhereCondition(){
  markDirty();
  RoleWhereCondition wc=new RoleWhereCondition();
  wc.setLeftPath(wcLeftText.getText());
  wc.setOperator(wcOperatorCombo.getText());
  wc.setRightValueOrPath(wcRightText.getText());
  wc.setPredicate(wcPredicateCombo.getText());
  ArrayList<RoleWhereCondition> wcList=(ArrayList<RoleWhereCondition>)conditionViewer.getViewer().getInput();
  wcList.add(wc);
  LinkedHashSet<String> parameters=new LinkedHashSet<String>();
  for (Iterator iter=wcList.iterator(); iter.hasNext(); ) {
    RoleWhereCondition wswc=(RoleWhereCondition)iter.next();
    parameters.add(wswc.toString());
  }
  String instanceName=((InstanceLine)((IStructuredSelection)instancesViewer.getSelection()).getFirstElement()).getInstanceName();
  role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).setParameters(parameters);
  conditionViewer.getViewer().setInput(wcList);
  markDirty();
}
Program: 149130
Project: 149130
Buggy source:
private void refreshViewParameters(String instanceName){
  paramsLabel.setText("String_Node_Str" + instanceName);
  wcLeftText.setText("String_Node_Str");
  wcOperatorCombo.select(0);
  wcRightText.setText("String_Node_Str");
  wcPredicateCombo.setEnabled(true);
  wcPredicateCombo.select(0);
  wcListViewer.setInput(new ArrayList<RoleWhereCondition>());
  wcListViewer.refresh();
  HashSet<String> parameters=role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).getParameters();
  ArrayList<RoleWhereCondition> wcList=new ArrayList<RoleWhereCondition>();
  for (Iterator iter=parameters.iterator(); iter.hasNext(); ) {
    String marshalledWC=(String)iter.next();
    wcList.add(RoleWhereCondition.parse(marshalledWC));
  }
  wcListViewer.setInput(wcList);
}

Fixed version (ground truth):
private void refreshViewParameters(String instanceName){
  paramsLabel.setText("String_Node_Str" + instanceName);
  HashSet<String> parameters=role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).getParameters();
  java.util.List<Line> lines=new ArrayList<Line>();
  for (Iterator iter=parameters.iterator(); iter.hasNext(); ) {
    String marshalledWC=(String)iter.next();
    Line line=new Line(conditionsColumns,Util.convertRoleWhereCondition(RoleWhereCondition.parse(marshalledWC)));
    lines.add(line);
  }
  conditionViewer.getViewer().setInput(lines);
}
Program: 149132
Project: 149132
Buggy source:
private void updateParemeters(){
  java.util.List<Line> lines=(java.util.List<Line>)conditionViewer.getViewer().getInput();
  java.util.List<RoleWhereCondition> rcList=new ArrayList<RoleWhereCondition>();
  for (  Line item : lines) {
    String[] values=new String[]{item.keyValues.get(0).value,item.keyValues.get(1).value,item.keyValues.get(2).value,item.keyValues.get(3).value};
    RoleWhereCondition rc=Util.convertLineToRC(values);
    rcList.add(rc);
  }
  LinkedHashSet<String> parameters=new LinkedHashSet<String>();
  for (Iterator iter=rcList.iterator(); iter.hasNext(); ) {
    RoleWhereCondition rc=(RoleWhereCondition)iter.next();
    parameters.add(rc.toString());
  }
  String instanceName=((InstanceLine)((IStructuredSelection)instancesViewer.getSelection()).getFirstElement()).getInstanceName();
  role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).setParameters(parameters);
}

Fixed version (ground truth):
private void updateParemeters(){
  if (conditionViewer == null)   return;
  java.util.List<Line> lines=(java.util.List<Line>)conditionViewer.getViewer().getInput();
  java.util.List<RoleWhereCondition> rcList=new ArrayList<RoleWhereCondition>();
  for (  Line item : lines) {
    String[] values=new String[]{item.keyValues.get(0).value,item.keyValues.get(1).value,item.keyValues.get(2).value,item.keyValues.get(3).value};
    RoleWhereCondition rc=Util.convertLineToRC(values);
    rcList.add(rc);
  }
  LinkedHashSet<String> parameters=new LinkedHashSet<String>();
  for (Iterator iter=rcList.iterator(); iter.hasNext(); ) {
    RoleWhereCondition rc=(RoleWhereCondition)iter.next();
    parameters.add(rc.toString());
  }
  String instanceName=((InstanceLine)((IStructuredSelection)instancesViewer.getSelection()).getFirstElement()).getInstanceName();
  role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).setParameters(parameters);
}
Program: 149133
Project: 149133
Buggy source:
@Override public IStatus run(IProgressMonitor monitor){
  try {
    File f=new File(filename);
    String dataCluster=f.getParentFile().getName();
    monitor.beginTask("String_Node_Str" + dataCluster + "String_Node_Str",IProgressMonitor.UNKNOWN);
    Util.importDataCluster(filename,server,monitor);
    if (!"String_Node_Str".equalsIgnoreCase(dataCluster)) {
      monitor.subTask("String_Node_Str" + dataCluster + "String_Node_Str");
      WSDataCluster dc=new WSDataCluster((String)dataCluster,"String_Node_Str","String_Node_Str");
      Util.getPort(xobject).putDataCluster(new WSPutDataCluster(dc));
    }
    monitor.done();
    return Status.OK_STATUS;
  }
 catch (  Exception e) {
    e.printStackTrace();
    return Status.CANCEL_STATUS;
  }
 finally {
    monitor.subTask("String_Node_Str");
    new ServerRefreshAction(view,xobject.getServerRoot()).run();
  }
}

Fixed version (ground truth):
@Override public IStatus run(IProgressMonitor monitor){
  try {
    File f=new File(filename);
    String dataCluster=f.getParentFile().getName();
    monitor.beginTask("String_Node_Str" + dataCluster + "String_Node_Str",IProgressMonitor.UNKNOWN);
    Util.importDataCluster(filename,server,monitor);
    if (!"String_Node_Str".equalsIgnoreCase(dataCluster)) {
      monitor.subTask("String_Node_Str" + dataCluster + "String_Node_Str");
      WSDataCluster dc=new WSDataCluster((String)dataCluster,"String_Node_Str","String_Node_Str");
      Util.getPort(xobject).putDataCluster(new WSPutDataCluster(dc));
    }
    monitor.done();
    return Status.OK_STATUS;
  }
 catch (  Exception e) {
    e.printStackTrace();
    return Status.CANCEL_STATUS;
  }
 finally {
    monitor.subTask("String_Node_Str");
    new UIJob("String_Node_Str"){
      @Override public IStatus runInUIThread(      IProgressMonitor monitor){
        new ServerRefreshAction(view,xobject.getServerRoot()).run();
        return Status.OK_STATUS;
      }
    }
.schedule();
  }
}
Program: 149134
Project: 149134
Buggy source:
@Override protected Control createControl(Composite parent){
  xpath=new XpathWidget(parent,mainPage,false);
  ((GridData)xpath.getComposite().getChildren()[0].getLayoutData()).heightHint=15;
  ((GridData)xpath.getComposite().getChildren()[1].getLayoutData()).heightHint=15;
  return xpath.getComposite();
}

Fixed version (ground truth):
@Override protected Control createControl(Composite parent){
  xpath=new XpathWidget(parent,mainPage,false);
  ((GridData)xpath.getComposite().getChildren()[0].getLayoutData()).heightHint=15;
  ((GridData)xpath.getComposite().getChildren()[1].getLayoutData()).heightHint=15;
  if (parent instanceof Table) {
    ((Table)parent).addMouseListener(new MouseListener(){
      public void mouseDoubleClick(      MouseEvent e){
      }
      public void mouseDown(      MouseEvent e){
      }
      public void mouseUp(      MouseEvent e){
        deactive();
      }
    }
);
  }
  return xpath.getComposite();
}
Program: 149135
Project: 149135
Buggy source:
@Override protected void doSetFocus(){
}

Fixed version (ground truth):
@Override protected void doSetFocus(){
  xpath.getTextWidget().setFocus();
}
Program: 149137
Project: 149137
Buggy source:
protected boolean isDone(){
  Boolean res=false;
  try {
    String content=Util.getXmlServerCtrlLocal().getDocumentAsString(null,CLUSTER_MIGRATION,UNIQUE_MIGRATION);
    if (content == null)     return false;
    AbstractMigrationTask cpy=unmarshal(content);
    handlerMap=cpy.getHandlerMap();
    res=handlerMap.get(this.getClass().getName());
    if (res == null)     return false;
  }
 catch (  Exception e) {
    org.apache.log4j.Logger.getLogger(this.getClass()).error(e.getMessage());
    return res;
  }
  return res;
}

Fixed version (ground truth):
protected boolean isDone(){
  Boolean res=false;
  try {
    if (handlerMap == null) {
      String content=Util.getXmlServerCtrlLocal().getDocumentAsString(null,CLUSTER_MIGRATION,UNIQUE_MIGRATION);
      if (content == null)       return false;
      AbstractMigrationTask cpy=unmarshal(content);
      handlerMap=cpy.getHandlerMap();
    }
    res=handlerMap.get(this.getClass().getName());
    if (res == null)     return false;
  }
 catch (  Exception e) {
    org.apache.log4j.Logger.getLogger(this.getClass()).error(e.getMessage());
    return res;
  }
  return res;
}
Program: 149138
Project: 149138
Buggy source:
@Override protected void okPressed(){
  if (comboDataCluster.getCombo().getText().trim().length() == 0) {
    MessageDialog.openError(null,"String_Node_Str","String_Node_Str");
    comboDataCluster.getCombo().setFocus();
    return;
  }
  if (fw.getText().getText().trim().length() == 0) {
    MessageDialog.openError(null,"String_Node_Str","String_Node_Str");
    fw.getText().setFocus();
    return;
  }
  String url=xObject.getServerRoot().getEndpointAddress();
  server=null;
  try {
    server=new URL(url).getHost();
  }
 catch (  MalformedURLException e1) {
    e1.printStackTrace();
  }
  dataCluster=comboDataCluster.getCombo().getText();
  dataCluster=xpathMap.get(dataCluster);
  filename=fw.getText().getText();
  Job job=new Job("String_Node_Str" + dataCluster + "String_Node_Str"){
    @Override public IStatus run(    IProgressMonitor monitor){
      try {
        monitor.beginTask("String_Node_Str" + dataCluster + "String_Node_Str",IProgressMonitor.UNKNOWN);
        Util.exportDataCluster(dataCluster,filename,server,monitor);
        monitor.done();
        return Status.OK_STATUS;
      }
 catch (      Exception e) {
        e.printStackTrace();
        return Status.CANCEL_STATUS;
      }
    }
  }
;
  job.setPriority(Job.INTERACTIVE);
  job.schedule();
  super.okPressed();
}

Fixed version (ground truth):
@Override protected void okPressed(){
  if (comboDataCluster.getCombo().getText().trim().length() == 0) {
    MessageDialog.openError(null,"String_Node_Str","String_Node_Str");
    comboDataCluster.getCombo().setFocus();
    return;
  }
  if (fw.getText().getText().trim().length() == 0) {
    MessageDialog.openError(null,"String_Node_Str","String_Node_Str");
    fw.getText().setFocus();
    return;
  }
  String url=xObject.getServerRoot().getEndpointAddress();
  server=null;
  try {
    server=new URL(url).getHost();
  }
 catch (  MalformedURLException e1) {
    e1.printStackTrace();
  }
  dataCluster=comboDataCluster.getCombo().getText();
  dataCluster=xpathMap.get(dataCluster);
  filename=fw.getText().getText().trim();
  Job job=new Job("String_Node_Str" + dataCluster + "String_Node_Str"){
    @Override public IStatus run(    IProgressMonitor monitor){
      try {
        monitor.beginTask("String_Node_Str" + dataCluster + "String_Node_Str",IProgressMonitor.UNKNOWN);
        Util.exportDataCluster(dataCluster,filename,server,monitor);
        monitor.done();
        return Status.OK_STATUS;
      }
 catch (      Exception e) {
        e.printStackTrace();
        return Status.CANCEL_STATUS;
      }
    }
  }
;
  job.setPriority(Job.INTERACTIVE);
  job.schedule();
  super.okPressed();
}
Program: 149139
Project: 149139
Buggy source:
private void create(){
  GridData gd=new GridData(SWT.LEFT,SWT.TOP,true,true,1,1);
  Label label=factory.createLabel(parent,this.label,SWT.NONE);
  label.setLayoutData(gd);
  text=factory.createText(parent,"String_Node_Str",SWT.READ_ONLY | SWT.BORDER);
  gd=new GridData(SWT.FILL,SWT.CENTER,true,true,1,1);
  text.setLayoutData(gd);
  text.setText("String_Node_Str");
  Button button=factory.createButton(parent,"String_Node_Str",SWT.PUSH);
  button.setImage(ImageCache.getCreatedImage(EImage.DOTS_BUTTON.getPath()));
  gd=new GridData(SWT.LEFT,SWT.FILL,false,true,1,1);
  button.setLayoutData(gd);
  button.setToolTipText("String_Node_Str");
  button.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      FileDialog fileDialog=new FileDialog(parent.getShell(),SWT.OPEN);
      fileDialog.setFilterExtensions(fileExtents);
      fileDialog.setFileName(filename);
      String name=fileDialog.open();
      if (name != null) {
        text.setText(name);
      }
    }
  }
);
}

Fixed version (ground truth):
private void create(){
  GridData gd=new GridData(SWT.LEFT,SWT.TOP,true,true,1,1);
  Label label=factory.createLabel(parent,this.label,SWT.NONE);
  label.setLayoutData(gd);
  text=factory.createText(parent,"String_Node_Str",SWT.MULTI | SWT.BORDER);
  gd=new GridData(SWT.FILL,SWT.CENTER,true,true,1,1);
  text.setLayoutData(gd);
  text.setText("String_Node_Str");
  Button button=factory.createButton(parent,"String_Node_Str",SWT.PUSH);
  button.setImage(ImageCache.getCreatedImage(EImage.DOTS_BUTTON.getPath()));
  gd=new GridData(SWT.LEFT,SWT.FILL,false,true,1,1);
  button.setLayoutData(gd);
  button.setToolTipText("String_Node_Str");
  button.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      FileDialog fileDialog=new FileDialog(parent.getShell(),SWT.OPEN);
      fileDialog.setFilterExtensions(fileExtents);
      fileDialog.setFileName(filename);
      String name=fileDialog.open();
      if (name != null) {
        text.setText(name);
      }
    }
  }
);
}
Program: 149143
Project: 149143
Buggy source:
private void addChildListener(Composite parent,FocusListener listener){
  if (parent == null) {
    return;
  }
  for (  Control control : parent.getChildren()) {
    if ((control instanceof Combo) || (control instanceof Button)) {
      continue;
    }
 else     if ((control instanceof Text) || (control instanceof StyledText)) {
      control.addFocusListener(listener);
    }
 else {
      if (control instanceof Composite) {
        addChildListener((Composite)control,listener);
      }
    }
  }
}

Fixed version (ground truth):
private void addChildListener(Composite parent,FocusListener listener){
  if (parent == null) {
    return;
  }
  for (  Control control : parent.getChildren()) {
    if ((control instanceof Combo) || (control instanceof Button)) {
      continue;
    }
 else     if ((control instanceof Text) || (control instanceof StyledText)) {
      control.addFocusListener(listener);
      control.addTraverseListener(textTraverseListener);
    }
 else {
      if (control instanceof Composite) {
        addChildListener((Composite)control,listener);
      }
    }
  }
}
Program: 149144
Project: 149144
Buggy source:
public String getDataModelName(){
  return dataModelName;
}

Fixed version (ground truth):
public static String getDataModelName(){
  return dataModelName;
}
Program: 149147
Project: 149147
Buggy source:
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  try {
    monitor.beginTask("String_Node_Str",toAddViewableList.size());
    for (Iterator<String> iter=toAddViewableList.iterator(); iter.hasNext(); ) {
      String[] keyPath=new String[]{iter.next()};
      Line line=new Line(viewableElementColumns,keyPath);
      viewableBEsList.getViewer().add(line);
      commit();
      monitor.worked(1);
    }
    monitor.done();
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(parentShell,"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  try {
    monitor.beginTask("String_Node_Str",toAddViewableList.size());
    for (Iterator<String> iter=toAddViewableList.iterator(); iter.hasNext(); ) {
      String[] keyPath=new String[]{iter.next()};
      Line line=new Line(viewableElementColumns,keyPath);
      java.util.List<Line> vlines=(java.util.List<Line>)viewableViewer.getViewer().getInput();
      vlines.add(line);
      commit();
      monitor.worked(1);
    }
    monitor.done();
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(parentShell,"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 149149
Project: 149149
Buggy source:
public void createInitialLayout(IPageLayout layout){
  IFolderLayout leftTopLayout=layout.createFolder("String_Node_Str",IPageLayout.LEFT,new Float(0.32),IPageLayout.ID_EDITOR_AREA);
  leftTopLayout.addView(ServerView.VIEW_ID);
  layout.setEditorAreaVisible(true);
}

Fixed version (ground truth):
public void createInitialLayout(IPageLayout layout){
  IFolderLayout leftTopLayout=layout.createFolder("String_Node_Str",IPageLayout.LEFT,new Float(0.30),IPageLayout.ID_EDITOR_AREA);
  leftTopLayout.addView(ServerView.VIEW_ID);
  layout.setEditorAreaVisible(true);
}
Program: 149150
Project: 149150
Buggy source:
public void widgetSelected(SelectionEvent e){
  if (accommodation != null) {
    if (dlg == null) {
      dlg=new XpathSelectDialog(accommodation.getSite().getShell(),treeParent,dlgTitle,accommodation.getSite(),isMulti,dataModelName);
    }
  }
 else {
    if (dlg == null) {
      dlg=new XpathSelectDialog(parent.getShell(),treeParent,dlgTitle,site,false,dataModelName);
    }
  }
  dlg.setBlockOnOpen(true);
  dlg.open();
  if (dlg.getReturnCode() == Window.OK) {
    descriptionText.setText(dlg.getXpath());
    dataModelName=dlg.getDataModelName();
    putAppendInfo("String_Node_Str",dlg.getDataModelName());
    dlg.close();
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  if (accommodation != null) {
    if (dlg == null) {
      dlg=new XpathSelectDialog(accommodation.getSite().getShell(),treeParent,dlgTitle,accommodation.getSite(),isMulti,dataModelName);
    }
  }
 else {
    if (dlg == null) {
      dlg=new XpathSelectDialog(parent.getShell(),treeParent,dlgTitle,site,false,dataModelName);
    }
  }
  dlg.setBlockOnOpen(true);
  dlg.open();
  if (dlg.getReturnCode() == Window.OK) {
    descriptionText.setText(dlg.getXpath());
    dataModelName=dlg.getDataModelName();
    dlg.close();
  }
}
Program: 149154
Project: 149154
Buggy source:
@Override public void doSave(IProgressMonitor monitor){
  super.doSave(monitor);
  stepsList.setSelection(currentPlugin);
  parametersTextViewer.getUndoManager().disconnect();
}

Fixed version (ground truth):
@Override public void doSave(IProgressMonitor monitor){
  super.doSave(monitor);
  if (stepsList.getItemCount() > 0 && currentPlugin == -1) {
    refreshStep(0);
  }
 else {
    refreshStep(currentPlugin);
  }
  parametersTextViewer.getUndoManager().disconnect();
}
Program: 149155
Project: 149155
Buggy source:
protected void removeStep(int index){
  WSTransformerV2 wsTransformer=transformer;
  pluginsCombo.setText("String_Node_Str");
  pluginsCombo.select(-1);
  parametersTextViewer.setDocument(new Document("String_Node_Str"));
  TransformerMainPage.this.comitting=true;
  TransformerMainPage.this.stepsList.remove(index);
  TransformerMainPage.this.stepsList.select(index - 1);
  refreshStep(stepsList.getSelectionIndex());
  TransformerMainPage.this.stepsList.forceFocus();
  ArrayList<WSTransformerProcessStep> list=new ArrayList<WSTransformerProcessStep>(Arrays.asList(wsTransformer.getProcessSteps()));
  list.remove(index);
  currentPlugin=-1;
  wsTransformer.setProcessSteps(list.toArray(new WSTransformerProcessStep[list.size()]));
  TransformerMainPage.this.comitting=false;
  markDirty();
}

Fixed version (ground truth):
protected void removeStep(int index){
  WSTransformerV2 wsTransformer=transformer;
  pluginsCombo.setText("String_Node_Str");
  pluginsCombo.select(-1);
  parametersTextViewer.setDocument(new Document("String_Node_Str"));
  TransformerMainPage.this.comitting=true;
  TransformerMainPage.this.stepsList.remove(index);
  TransformerMainPage.this.stepsList.select(index - 1);
  refreshStep(stepsList.getSelectionIndex());
  TransformerMainPage.this.stepsList.forceFocus();
  ArrayList<WSTransformerProcessStep> list=new ArrayList<WSTransformerProcessStep>(Arrays.asList(wsTransformer.getProcessSteps()));
  list.remove(index);
  currentPlugin=stepsList.getSelectionIndex();
  wsTransformer.setProcessSteps(list.toArray(new WSTransformerProcessStep[list.size()]));
  TransformerMainPage.this.comitting=false;
  markDirty();
}
Program: 149156
Project: 149156
Buggy source:
protected void refreshData(){
  try {
    if (this.comitting)     return;
    this.refreshing=true;
    WSTransformerV2 wsTransformer=(WSTransformerV2)(getXObject().getWsObject());
    descriptionText.setText(wsTransformer.getDescription() == null ? "String_Node_Str" : wsTransformer.getDescription());
    stepsList.removeAll();
    WSTransformerProcessStep[] specs=wsTransformer.getProcessSteps();
    if (specs != null) {
      for (int i=0; i < specs.length; i++) {
        stepsList.add(specs[i].getDescription());
      }
    }
    stepsList.select(currentPlugin);
    refreshStep(stepsList.getSelectionIndex());
    this.refreshing=false;
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(this.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
protected void refreshData(){
  try {
    if (this.comitting)     return;
    this.refreshing=true;
    WSTransformerV2 wsTransformer=(WSTransformerV2)(getXObject().getWsObject());
    descriptionText.setText(wsTransformer.getDescription() == null ? "String_Node_Str" : wsTransformer.getDescription());
    stepsList.removeAll();
    WSTransformerProcessStep[] specs=wsTransformer.getProcessSteps();
    if (specs != null) {
      for (int i=0; i < specs.length; i++) {
        stepsList.add(specs[i].getDescription());
      }
    }
    stepsList.select(currentPlugin);
    if (stepsList.getItemCount() > 0 && stepsList.getSelectionIndex() == -1) {
      refreshStep(0);
    }
 else {
      refreshStep(stepsList.getSelectionIndex());
    }
    this.refreshing=false;
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(this.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 149157
Project: 149157
Buggy source:
public void modifyText(ModifyEvent e){
  if (TransformerMainPage.this.refreshing)   return;
  String jndi=pluginsCombo.getText();
  String description=pluginDescriptions.get(jndi);
  pluginDescription.setText(description == null ? "String_Node_Str" : description);
  if (stepsList.getSelectionIndex() == -1)   return;
  if (!jndi.contains("String_Node_Str"))   jndi=TRANSFORMER_PLUGIN + jndi;
  transformer.getProcessSteps()[stepsList.getSelectionIndex()].setPluginJNDI(jndi);
  TransformerMainPage.this.comitting=false;
  markDirty();
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  if (refreshing)   return;
  TransformerMainPage.this.comitting=true;
  transformer.setDescription(descriptionText.getText());
  TransformerMainPage.this.comitting=false;
  markDirty();
}
Program: 149159
Project: 149159
Buggy source:
private void updateTitle(){
  IEditorInput input=this.getEditorInput();
  setPartName(input.getName());
  setContentDescription("String_Node_Str");
}

Fixed version (ground truth):
private void updateTitle(){
  IEditorInput input=this.getEditorInput();
  TreeObject xobject=(TreeObject)((XObjectEditorInput)this.getEditorInput()).getModel();
  TreeParent parent=xobject.findServerFolder(xobject.getType());
  String revision="String_Node_Str";
  if (parent != null) {
    Pattern p=Pattern.compile("String_Node_Str");
    Matcher m=p.matcher(parent.getDisplayName());
    while (m.find()) {
      revision=m.group();
      break;
    }
  }
  if (revision.length() > 0)   setPartName(input.getName() + "String_Node_Str" + revision);
 else   setPartName(input.getName());
  setContentDescription("String_Node_Str");
}
Program: 149160
Project: 149160
Buggy source:
public boolean saveSyncItem(SynchronizationItem item) throws Exception {
  logger.debug("String_Node_Str");
  boolean ret=true;
  try {
    String resolvedXml=item.getNode().serialize();
    item.setStatus(SynchronizationItem.STATUS_RESOLVED);
    logger.debug("String_Node_Str" + resolvedXml + "String_Node_Str"+ item.getStatus());
    item.setResolvedProjection(resolvedXml);
    WSSynchronizationItem wsitem=new WSSynchronizationItem();
    wsitem=item.POJO2WS(item);
    logger.debug("String_Node_Str" + wsitem.getStatus().getValue());
    Util.getPort().putSynchronizationItem(new WSPutSynchronizationItem(wsitem));
    return true;
  }
 catch (  Exception e) {
    e.printStackTrace();
    ret=false;
    throw new Exception(e.getClass().getName() + "String_Node_Str" + e.getLocalizedMessage());
  }
 finally {
    return ret;
  }
}

Fixed version (ground truth):
public boolean saveSyncItem(SynchronizationItem item) throws Exception {
  logger.debug("String_Node_Str");
  boolean ret=true;
  try {
    String resolvedXml=item.getNode().serialize();
    item.setStatus(SynchronizationItem.STATUS_RESOLVED);
    logger.debug("String_Node_Str" + resolvedXml + "String_Node_Str"+ item.getStatus());
    item.setResolvedProjection(resolvedXml);
    Util.getPort().resolveSynchronizationItem(new WSResolveSynchronizationItem(new WSSynchronizationItemPK(new String[]{"String_Node_Str",item.getItemPOJOPK().getUniqueID()}),resolvedXml));
    return true;
  }
 catch (  Exception e) {
    e.printStackTrace();
    ret=false;
    throw new Exception(e.getClass().getName() + "String_Node_Str" + e.getLocalizedMessage());
  }
 finally {
    return ret;
  }
}