nus-yam/ex-repair huggingface dataset:
Program: 146073
Project: 146073
Buggy source:
@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str");
  try {
    XtentisPort port=Util.getPort(null,null,Util._FORCE_RMI_);
    if (!port.existsDataCluster(new WSExistsDataCluster(new WSDataClusterPK(Configuration.datacluster))).is_true()) {
      port.putDataCluster(new WSPutDataCluster(new WSDataCluster(Configuration.datacluster,"String_Node_Str","String_Node_Str")));
    }
    if (!port.existsDataModel(new WSExistsDataModel(new WSDataModelPK(Configuration.datamodel))).is_true()) {
      port.putDataModel(new WSPutDataModel(new WSDataModel(Configuration.datamodel,"String_Node_Str","String_Node_Str")));
    }
  }
 catch (  Exception e) {
    String err="String_Node_Str";
    org.apache.log4j.Logger.getLogger(this.getClass()).error(err,e);
    throw new ServletException(err);
  }
}

Fixed version (ground truth):
@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
}
Program: 146074
Project: 146074
Buggy source:
@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  try {
    Util.getAjaxSubject();
  }
 catch (  Exception e1) {
    return;
  }
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str");
  try {
    if (!Util.getPort().existsDataCluster(new WSExistsDataCluster(new WSDataClusterPK(Configuration.datacluster))).is_true()) {
      Util.getPort().putDataCluster(new WSPutDataCluster(new WSDataCluster(Configuration.datacluster,"String_Node_Str","String_Node_Str")));
    }
    if (!Util.getPort().existsDataModel(new WSExistsDataModel(new WSDataModelPK(Configuration.datamodel))).is_true()) {
      Util.getPort().putDataModel(new WSPutDataModel(new WSDataModel(Configuration.datamodel,"String_Node_Str","String_Node_Str")));
    }
  }
 catch (  Exception e) {
    String err="String_Node_Str";
    org.apache.log4j.Logger.getLogger(this.getClass()).error(err,e);
    throw new ServletException(err);
  }
}

Fixed version (ground truth):
@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str");
  try {
    XtentisPort port=Util.getPort(null,null,Util._FORCE_RMI_);
    if (!port.existsDataCluster(new WSExistsDataCluster(new WSDataClusterPK(Configuration.datacluster))).is_true()) {
      port.putDataCluster(new WSPutDataCluster(new WSDataCluster(Configuration.datacluster,"String_Node_Str","String_Node_Str")));
    }
    if (!port.existsDataModel(new WSExistsDataModel(new WSDataModelPK(Configuration.datamodel))).is_true()) {
      port.putDataModel(new WSPutDataModel(new WSDataModel(Configuration.datamodel,"String_Node_Str","String_Node_Str")));
    }
  }
 catch (  Exception e) {
    String err="String_Node_Str";
    org.apache.log4j.Logger.getLogger(this.getClass()).error(err,e);
    throw new ServletException(err);
  }
}
Program: 146075
Project: 146075
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: 146076
Project: 146076
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;
  }
}
Program: 146077
Project: 146077
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: 146082
Project: 146082
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  parent.getShell().setText("String_Node_Str");
  Composite composite=(Composite)super.createDialogArea(parent);
  composite.setBackground(composite.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  GridLayout layout=(GridLayout)composite.getLayout();
  layout.numColumns=1;
  comboDataCluster=new LabelCombo(toolkit,composite,"String_Node_Str",SWT.BORDER,2);
  comboDataCluster.getCombo().setEditable(false);
  List<String> dcs=Util.getCachedXObjectsNameSet(this.xObject,TreeObject.DATA_CLUSTER);
  dcs.add(0,"String_Node_Str");
  comboDataCluster.getCombo().setItems(dcs.toArray(new String[dcs.size()]));
  if (xObject != null && xObject.getDisplayName() != null) {
    if (EXtentisObjects.DataCluster.getDisplayName().equalsIgnoreCase(xObject.getDisplayName())) {
      comboDataCluster.getCombo().select(0);
    }
 else {
      comboDataCluster.getCombo().setText(xObject.getDisplayName());
    }
  }
  fw=new FileSelectWidget(composite,"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},comboDataCluster.getCombo().getText());
  comboDataCluster.getCombo().addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      if (comboDataCluster.getCombo().getText().length() > 0) {
        fw.getText().setText(comboDataCluster.getCombo().getText());
        fw.setFilename(comboDataCluster.getCombo().getText());
      }
    }
  }
);
  return composite;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  parent.getShell().setText("String_Node_Str");
  Composite composite=(Composite)super.createDialogArea(parent);
  composite.setBackground(composite.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  GridLayout layout=(GridLayout)composite.getLayout();
  layout.numColumns=1;
  comboDataCluster=new LabelCombo(toolkit,composite,"String_Node_Str",SWT.BORDER,2);
  comboDataCluster.getCombo().setEditable(false);
  List<String> dcs=Util.getChildren(this.xObject.getServerRoot(),TreeObject.DATA_CLUSTER);
  dcs.add(0,"String_Node_Str");
  comboDataCluster.getCombo().setItems(dcs.toArray(new String[dcs.size()]));
  if (xObject != null && xObject.getDisplayName() != null) {
    if (EXtentisObjects.DataCluster.getDisplayName().equalsIgnoreCase(xObject.getDisplayName())) {
      comboDataCluster.getCombo().select(0);
    }
 else {
      comboDataCluster.getCombo().setText(xObject.getDisplayName());
    }
  }
  fw=new FileSelectWidget(composite,"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},comboDataCluster.getCombo().getText());
  comboDataCluster.getCombo().addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      if (comboDataCluster.getCombo().getText().length() > 0) {
        fw.getText().setText(comboDataCluster.getCombo().getText());
        fw.setFilename(comboDataCluster.getCombo().getText());
      }
    }
  }
);
  return composite;
}
Program: 146086
Project: 146086
Buggy source:
public TreeObject findObject(int type,String name){
  TreeObject[] allchildren=this.getChildren();
  for (int i=0; i < allchildren.length; i++) {
    if (allchildren[i] instanceof TreeParent) {
      return ((TreeParent)allchildren[i]).findObject(type,name);
    }
    if ((allchildren[i].getType() == type) && (allchildren[i].getDisplayName().equals(name)))     return allchildren[i];
  }
  return null;
}

Fixed version (ground truth):
public TreeObject findObject(int type,String name){
  TreeObject[] allchildren=this.getChildren();
  TreeObject obj=null;
  for (int i=0; i < allchildren.length; i++) {
    if (allchildren[i] instanceof TreeParent) {
      obj=((TreeParent)allchildren[i]).findObject(type,name);
    }
 else     if ((allchildren[i].getType() == type) && (allchildren[i].getDisplayName().equals(name)))     obj=allchildren[i];
  }
  return obj;
}
Program: 146089
Project: 146089
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  parent.getShell().setText("String_Node_Str");
  Composite composite=(Composite)super.createDialogArea(parent);
  composite.setBackground(composite.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  GridLayout layout=(GridLayout)composite.getLayout();
  layout.numColumns=1;
  comboDataCluster=new LabelCombo(toolkit,composite,"String_Node_Str",SWT.BORDER,2);
  comboDataCluster.getCombo().setEditable(false);
  List<String> dcs=Util.getCachedXObjectsNameSet(this.xObject,TreeObject.DATA_CLUSTER);
  dcs.add(0,"String_Node_Str");
  comboDataCluster.getCombo().setItems(dcs.toArray(new String[dcs.size()]));
  if (xObject != null && xObject.getDisplayName() != null) {
    if (EXtentisObjects.DataCluster.getDisplayName().equalsIgnoreCase(xObject.getDisplayName())) {
      comboDataCluster.getCombo().select(0);
    }
 else {
      comboDataCluster.getCombo().setText(xObject.getDisplayName());
    }
  }
  fw=new FileSelectWidget(composite,"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},comboDataCluster.getCombo().getText());
  comboDataCluster.getCombo().addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      if (comboDataCluster.getCombo().getText().length() > 0) {
        fw.getText().setText(comboDataCluster.getCombo().getText());
        fw.setFilename(comboDataCluster.getCombo().getText());
      }
    }
  }
);
  return composite;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  parent.getShell().setText("String_Node_Str");
  Composite composite=(Composite)super.createDialogArea(parent);
  composite.setBackground(composite.getDisplay().getSystemColor(SWT.COLOR_WHITE));
  GridLayout layout=(GridLayout)composite.getLayout();
  layout.numColumns=1;
  comboDataCluster=new LabelCombo(toolkit,composite,"String_Node_Str",SWT.BORDER,2);
  comboDataCluster.getCombo().setEditable(false);
  List<String> dcs=Util.getChildren(this.xObject.getServerRoot(),TreeObject.DATA_CLUSTER);
  dcs.add(0,"String_Node_Str");
  comboDataCluster.getCombo().setItems(dcs.toArray(new String[dcs.size()]));
  if (xObject != null && xObject.getDisplayName() != null) {
    if (EXtentisObjects.DataCluster.getDisplayName().equalsIgnoreCase(xObject.getDisplayName())) {
      comboDataCluster.getCombo().select(0);
    }
 else {
      comboDataCluster.getCombo().setText(xObject.getDisplayName());
    }
  }
  fw=new FileSelectWidget(composite,"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},comboDataCluster.getCombo().getText());
  comboDataCluster.getCombo().addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      if (comboDataCluster.getCombo().getText().length() > 0) {
        fw.getText().setText(comboDataCluster.getCombo().getText());
        fw.setFilename(comboDataCluster.getCombo().getText());
      }
    }
  }
);
  return composite;
}
Program: 146093
Project: 146093
Buggy source:
public TreeObject findObject(int type,String name){
  TreeObject[] allchildren=this.getChildren();
  for (int i=0; i < allchildren.length; i++) {
    if (allchildren[i] instanceof TreeParent) {
      return ((TreeParent)allchildren[i]).findObject(type,name);
    }
    if ((allchildren[i].getType() == type) && (allchildren[i].getDisplayName().equals(name)))     return allchildren[i];
  }
  return null;
}

Fixed version (ground truth):
public TreeObject findObject(int type,String name){
  TreeObject[] allchildren=this.getChildren();
  TreeObject obj=null;
  for (int i=0; i < allchildren.length; i++) {
    if (allchildren[i] instanceof TreeParent) {
      obj=((TreeParent)allchildren[i]).findObject(type,name);
    }
 else     if ((allchildren[i].getType() == type) && (allchildren[i].getDisplayName().equals(name)))     obj=allchildren[i];
  }
  return obj;
}
Program: 146094
Project: 146094
Buggy source:
/** 
 * @ejb.interface-method view-type = "service-endpoint"
 * @ejb.permission role-name = "authenticated" view-type = "service-endpoint"
 */
public WSString serviceAction(WSServiceAction wsServiceAction) throws RemoteException {
  org.apache.log4j.Category.getInstance(this.getClass()).debug("String_Node_Str" + wsServiceAction.getJndiName());
  try {
    Object service=Util.retrieveComponent(null,wsServiceAction.getJndiName());
    String result="String_Node_Str";
    if (WSServiceActionCode.EXECUTE.equals(wsServiceAction.getWsAction())) {
      result=(String)Util.getMethod(service,wsServiceAction.getMethodName()).invoke(service,new Object[]{wsServiceAction.getMethodParameters()});
    }
 else {
      if (WSServiceActionCode.START.equals(wsServiceAction.getWsAction())) {
        Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
 else       if (WSServiceActionCode.STOP.equals(wsServiceAction.getWsAction())) {
        Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
      result=(String)Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
    }
    return new WSString(result);
  }
 catch (  XtentisException e) {
    throw (new RemoteException(e.getLocalizedMessage()));
  }
catch (  Exception e) {
    throw new RemoteException((e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()));
  }
}

Fixed version (ground truth):
/** 
 * @ejb.interface-method view-type = "service-endpoint"
 * @ejb.permission role-name = "authenticated" view-type = "service-endpoint"
 */
public WSString serviceAction(WSServiceAction wsServiceAction) throws RemoteException {
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str" + wsServiceAction.getJndiName());
  try {
    Object service=com.amalto.core.util.Util.retrieveComponent(null,wsServiceAction.getJndiName());
    String result="String_Node_Str";
    if (WSServiceActionCode.EXECUTE.equals(wsServiceAction.getWsAction())) {
      Method method=com.amalto.core.util.Util.getMethod(service,wsServiceAction.getMethodName());
      result=(String)method.invoke(service,wsServiceAction.getMethodParameters());
    }
 else {
      if (WSServiceActionCode.START.equals(wsServiceAction.getWsAction())) {
        com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
 else       if (WSServiceActionCode.STOP.equals(wsServiceAction.getWsAction())) {
        com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
      result=(String)com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
    }
    return new WSString(result);
  }
 catch (  com.amalto.core.util.XtentisException e) {
    e.printStackTrace();
    throw (new RemoteException(e.getLocalizedMessage()));
  }
catch (  Exception e) {
    e.printStackTrace();
    throw new RemoteException((e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()));
  }
}
Program: 146095
Project: 146095
Buggy source:
public WSString serviceAction(WSServiceAction wsServiceAction) throws RemoteException {
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str" + wsServiceAction.getJndiName());
  try {
    Object service=com.amalto.core.util.Util.retrieveComponent(null,wsServiceAction.getJndiName());
    String result="String_Node_Str";
    if (WSServiceActionCode.EXECUTE.equals(wsServiceAction.getWsAction())) {
      result=(String)com.amalto.core.util.Util.getMethod(service,wsServiceAction.getMethodName()).invoke(service,new Object[]{wsServiceAction.getMethodParameters()});
    }
 else {
      if (WSServiceActionCode.START.equals(wsServiceAction.getWsAction())) {
        com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
 else       if (WSServiceActionCode.STOP.equals(wsServiceAction.getWsAction())) {
        com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
      result=(String)com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
    }
    return new WSString(result);
  }
 catch (  com.amalto.core.util.XtentisException e) {
    throw (new RemoteException(e.getLocalizedMessage()));
  }
catch (  Exception e) {
    throw new RemoteException((e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()));
  }
}

Fixed version (ground truth):
public WSString serviceAction(WSServiceAction wsServiceAction) throws RemoteException {
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str" + wsServiceAction.getJndiName());
  try {
    Object service=com.amalto.core.util.Util.retrieveComponent(null,wsServiceAction.getJndiName());
    String result="String_Node_Str";
    if (WSServiceActionCode.EXECUTE.equals(wsServiceAction.getWsAction())) {
      Method method=com.amalto.core.util.Util.getMethod(service,wsServiceAction.getMethodName());
      result=(String)method.invoke(service,wsServiceAction.getMethodParameters());
    }
 else {
      if (WSServiceActionCode.START.equals(wsServiceAction.getWsAction())) {
        com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
 else       if (WSServiceActionCode.STOP.equals(wsServiceAction.getWsAction())) {
        com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
      result=(String)com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
    }
    return new WSString(result);
  }
 catch (  com.amalto.core.util.XtentisException e) {
    e.printStackTrace();
    throw (new RemoteException(e.getLocalizedMessage()));
  }
catch (  Exception e) {
    e.printStackTrace();
    throw new RemoteException((e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()));
  }
}
Program: 146096
Project: 146096
Buggy source:
/** 
 * @ejb.interface-method view-type = "service-endpoint"
 * @ejb.permission role-name = "authenticated" view-type = "service-endpoint"
 */
public WSString serviceAction(WSServiceAction wsServiceAction) throws RemoteException {
  org.apache.log4j.Category.getInstance(this.getClass()).debug("String_Node_Str" + wsServiceAction.getJndiName());
  try {
    Object service=Util.retrieveComponent(null,wsServiceAction.getJndiName());
    String result="String_Node_Str";
    if (WSServiceActionCode.EXECUTE.equals(wsServiceAction.getWsAction())) {
      result=(String)Util.getMethod(service,wsServiceAction.getMethodName()).invoke(service,new Object[]{wsServiceAction.getMethodParameters()});
    }
 else {
      if (WSServiceActionCode.START.equals(wsServiceAction.getWsAction())) {
        Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
 else       if (WSServiceActionCode.STOP.equals(wsServiceAction.getWsAction())) {
        Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
      result=(String)Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
    }
    return new WSString(result);
  }
 catch (  XtentisException e) {
    throw (new RemoteException(e.getLocalizedMessage()));
  }
catch (  Exception e) {
    throw new RemoteException((e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()));
  }
}

Fixed version (ground truth):
/** 
 * @ejb.interface-method view-type = "service-endpoint"
 * @ejb.permission role-name = "authenticated" view-type = "service-endpoint"
 */
public WSString serviceAction(WSServiceAction wsServiceAction) throws RemoteException {
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str" + wsServiceAction.getJndiName());
  try {
    Object service=com.amalto.core.util.Util.retrieveComponent(null,wsServiceAction.getJndiName());
    String result="String_Node_Str";
    if (WSServiceActionCode.EXECUTE.equals(wsServiceAction.getWsAction())) {
      Method method=com.amalto.core.util.Util.getMethod(service,wsServiceAction.getMethodName());
      result=(String)method.invoke(service,wsServiceAction.getMethodParameters());
    }
 else {
      if (WSServiceActionCode.START.equals(wsServiceAction.getWsAction())) {
        com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
 else       if (WSServiceActionCode.STOP.equals(wsServiceAction.getWsAction())) {
        com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
      result=(String)com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
    }
    return new WSString(result);
  }
 catch (  com.amalto.core.util.XtentisException e) {
    e.printStackTrace();
    throw (new RemoteException(e.getLocalizedMessage()));
  }
catch (  Exception e) {
    e.printStackTrace();
    throw new RemoteException((e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()));
  }
}
Program: 146097
Project: 146097
Buggy source:
public WSString serviceAction(WSServiceAction wsServiceAction) throws RemoteException {
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str" + wsServiceAction.getJndiName());
  try {
    Object service=com.amalto.core.util.Util.retrieveComponent(null,wsServiceAction.getJndiName());
    String result="String_Node_Str";
    if (WSServiceActionCode.EXECUTE.equals(wsServiceAction.getWsAction())) {
      result=(String)com.amalto.core.util.Util.getMethod(service,wsServiceAction.getMethodName()).invoke(service,new Object[]{wsServiceAction.getMethodParameters()});
    }
 else {
      if (WSServiceActionCode.START.equals(wsServiceAction.getWsAction())) {
        com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
 else       if (WSServiceActionCode.STOP.equals(wsServiceAction.getWsAction())) {
        com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
      result=(String)com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
    }
    return new WSString(result);
  }
 catch (  com.amalto.core.util.XtentisException e) {
    throw (new RemoteException(e.getLocalizedMessage()));
  }
catch (  Exception e) {
    throw new RemoteException((e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()));
  }
}

Fixed version (ground truth):
public WSString serviceAction(WSServiceAction wsServiceAction) throws RemoteException {
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str" + wsServiceAction.getJndiName());
  try {
    Object service=com.amalto.core.util.Util.retrieveComponent(null,wsServiceAction.getJndiName());
    String result="String_Node_Str";
    if (WSServiceActionCode.EXECUTE.equals(wsServiceAction.getWsAction())) {
      Method method=com.amalto.core.util.Util.getMethod(service,wsServiceAction.getMethodName());
      result=(String)method.invoke(service,wsServiceAction.getMethodParameters());
    }
 else {
      if (WSServiceActionCode.START.equals(wsServiceAction.getWsAction())) {
        com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
 else       if (WSServiceActionCode.STOP.equals(wsServiceAction.getWsAction())) {
        com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
      }
      result=(String)com.amalto.core.util.Util.getMethod(service,"String_Node_Str").invoke(service,new Object[]{});
    }
    return new WSString(result);
  }
 catch (  com.amalto.core.util.XtentisException e) {
    e.printStackTrace();
    throw (new RemoteException(e.getLocalizedMessage()));
  }
catch (  Exception e) {
    e.printStackTrace();
    throw new RemoteException((e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()));
  }
}
Program: 146098
Project: 146098
Buggy source:
protected void commit(){
  try {
    if (this.refreshing)     return;
    this.comitting=true;
    WSUniverse ws=(WSUniverse)(getXObject().getWsObject());
    ws.setName(universe.getName());
    ws.setDefaultItemsRevisionID(universe.getDefaultReversionID());
    ws.setDescription(universe.getDescription());
    List<WSUniverseXtentisObjectsRevisionIDs> xtentisObjectsRevisionIDs=new ArrayList<WSUniverseXtentisObjectsRevisionIDs>();
    for (    KeyValue line : universe.getXtentisObjectsList()) {
      xtentisObjectsRevisionIDs.add(new WSUniverseXtentisObjectsRevisionIDs(line.key,line.value));
    }
    ws.setXtentisObjectsRevisionIDs(xtentisObjectsRevisionIDs.toArray(new WSUniverseXtentisObjectsRevisionIDs[xtentisObjectsRevisionIDs.size()]));
    List<WSUniverseItemsRevisionIDs> itemIds=new ArrayList<WSUniverseItemsRevisionIDs>();
    for (    Line line : universe.getItemsList()) {
      itemIds.add(new WSUniverseItemsRevisionIDs(line.keyValues.get(0).value,line.keyValues.get(1).value));
    }
    ws.setItemsRevisionIDs(itemIds.toArray(new WSUniverseItemsRevisionIDs[itemIds.size()]));
    this.comitting=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 commit(){
  try {
    if (this.refreshing)     return;
    this.comitting=true;
    WSUniverse ws=(WSUniverse)(getXObject().getWsObject());
    ws.setName(universe.getName());
    ws.setDefaultItemsRevisionID(universe.getDefaultReversionID());
    ws.setDescription(universe.getDescription());
    List<WSUniverseXtentisObjectsRevisionIDs> xtentisObjectsRevisionIDs=new ArrayList<WSUniverseXtentisObjectsRevisionIDs>();
    for (    KeyValue line : universe.getXtentisObjectsList()) {
      String name=line.key;
      if (EXtentisObjects.Transformer.getDisplayName().equals(name)) {
        name=EXtentisObjects.Transformer.getName();
      }
      xtentisObjectsRevisionIDs.add(new WSUniverseXtentisObjectsRevisionIDs(name,line.value));
    }
    ws.setXtentisObjectsRevisionIDs(xtentisObjectsRevisionIDs.toArray(new WSUniverseXtentisObjectsRevisionIDs[xtentisObjectsRevisionIDs.size()]));
    List<WSUniverseItemsRevisionIDs> itemIds=new ArrayList<WSUniverseItemsRevisionIDs>();
    for (    Line line : universe.getItemsList()) {
      itemIds.add(new WSUniverseItemsRevisionIDs(line.keyValues.get(0).value,line.keyValues.get(1).value));
    }
    ws.setItemsRevisionIDs(itemIds.toArray(new WSUniverseItemsRevisionIDs[itemIds.size()]));
    this.comitting=false;
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(this.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 146099
Project: 146099
Buggy source:
public Universe(String defaultReversionID) throws RemoteException {
  this.defaultReversionID=defaultReversionID;
  for (  String str : getPort().getObjectsForUniverses(new WSGetObjectsForUniverses(new String[]{"String_Node_Str"})).getStrings()) {
    xtentisObjectsList.add(new KeyValue(str,"String_Node_Str"));
  }
}

Fixed version (ground truth):
public Universe(String defaultReversionID) throws RemoteException {
  this.defaultReversionID=defaultReversionID;
  for (  String str : getPort().getObjectsForUniverses(new WSGetObjectsForUniverses(new String[]{"String_Node_Str"})).getStrings()) {
    String name=str;
    if (EXtentisObjects.Transformer.getName().equals(name)) {
      name=EXtentisObjects.Transformer.getDisplayName();
    }
    xtentisObjectsList.add(new KeyValue(name,"String_Node_Str"));
  }
}
Program: 146101
Project: 146101
Buggy source:
protected void commit(){
  try {
    if (this.refreshing)     return;
    this.comitting=true;
    WSUniverse ws=(WSUniverse)(getXObject().getWsObject());
    ws.setName(universe.getName());
    ws.setDefaultItemsRevisionID(universe.getDefaultReversionID());
    ws.setDescription(universe.getDescription());
    List<WSUniverseXtentisObjectsRevisionIDs> xtentisObjectsRevisionIDs=new ArrayList<WSUniverseXtentisObjectsRevisionIDs>();
    for (    KeyValue line : universe.getXtentisObjectsList()) {
      xtentisObjectsRevisionIDs.add(new WSUniverseXtentisObjectsRevisionIDs(line.key,line.value));
    }
    ws.setXtentisObjectsRevisionIDs(xtentisObjectsRevisionIDs.toArray(new WSUniverseXtentisObjectsRevisionIDs[xtentisObjectsRevisionIDs.size()]));
    List<WSUniverseItemsRevisionIDs> itemIds=new ArrayList<WSUniverseItemsRevisionIDs>();
    for (    Line line : universe.getItemsList()) {
      itemIds.add(new WSUniverseItemsRevisionIDs(line.keyValues.get(0).value,line.keyValues.get(1).value));
    }
    ws.setItemsRevisionIDs(itemIds.toArray(new WSUniverseItemsRevisionIDs[itemIds.size()]));
    this.comitting=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 commit(){
  try {
    if (this.refreshing)     return;
    this.comitting=true;
    WSUniverse ws=(WSUniverse)(getXObject().getWsObject());
    ws.setName(universe.getName());
    ws.setDefaultItemsRevisionID(universe.getDefaultReversionID());
    ws.setDescription(universe.getDescription());
    List<WSUniverseXtentisObjectsRevisionIDs> xtentisObjectsRevisionIDs=new ArrayList<WSUniverseXtentisObjectsRevisionIDs>();
    for (    KeyValue line : universe.getXtentisObjectsList()) {
      String name=line.key;
      if (EXtentisObjects.Transformer.getDisplayName().equals(name)) {
        name=EXtentisObjects.Transformer.getName();
      }
      xtentisObjectsRevisionIDs.add(new WSUniverseXtentisObjectsRevisionIDs(name,line.value));
    }
    ws.setXtentisObjectsRevisionIDs(xtentisObjectsRevisionIDs.toArray(new WSUniverseXtentisObjectsRevisionIDs[xtentisObjectsRevisionIDs.size()]));
    List<WSUniverseItemsRevisionIDs> itemIds=new ArrayList<WSUniverseItemsRevisionIDs>();
    for (    Line line : universe.getItemsList()) {
      itemIds.add(new WSUniverseItemsRevisionIDs(line.keyValues.get(0).value,line.keyValues.get(1).value));
    }
    ws.setItemsRevisionIDs(itemIds.toArray(new WSUniverseItemsRevisionIDs[itemIds.size()]));
    this.comitting=false;
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(this.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 146102
Project: 146102
Buggy source:
public Universe(String defaultReversionID) throws RemoteException {
  this.defaultReversionID=defaultReversionID;
  for (  String str : getPort().getObjectsForUniverses(new WSGetObjectsForUniverses(new String[]{"String_Node_Str"})).getStrings()) {
    xtentisObjectsList.add(new KeyValue(str,"String_Node_Str"));
  }
}

Fixed version (ground truth):
public Universe(String defaultReversionID) throws RemoteException {
  this.defaultReversionID=defaultReversionID;
  for (  String str : getPort().getObjectsForUniverses(new WSGetObjectsForUniverses(new String[]{"String_Node_Str"})).getStrings()) {
    String name=str;
    if (EXtentisObjects.Transformer.getName().equals(name)) {
      name=EXtentisObjects.Transformer.getDisplayName();
    }
    xtentisObjectsList.add(new KeyValue(name,"String_Node_Str"));
  }
}
Program: 146108
Project: 146108
Buggy source:
public void run(){
  IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
  List list=selection.toList();
  for (  Object obj : list) {
    if (obj instanceof XSDElementDeclaration) {
      if (Util.getParent(obj) == obj)       declList.add((XSDElementDeclaration)obj);
    }
  }
  AddBrowseItemsWizard wizard=new AddBrowseItemsWizard(page,list);
  WizardDialog dialog=new WizardDialog(page.getSite().getShell(),wizard);
  dialog.open();
  dialog.setBlockOnOpen(true);
}

Fixed version (ground truth):
public void run(){
  IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
  declList.clear();
  List list=selection.toList();
  for (  Object obj : list) {
    if (obj instanceof XSDElementDeclaration) {
      if (Util.getParent(obj) == obj)       declList.add((XSDElementDeclaration)obj);
    }
  }
  AddBrowseItemsWizard wizard=new AddBrowseItemsWizard(page,declList);
  WizardDialog dialog=new WizardDialog(page.getSite().getShell(),wizard);
  dialog.open();
}
Program: 146109
Project: 146109
Buggy source:
private void newBrowseItemView(String browseItem) throws RemoteException {
  for (  XSDElementDeclaration decl : declList) {
    String fullName=BROWSE_ITEMS + decl.getName();
    if (fullName.equals(browseItem)) {
      XtentisPort port=getXtentisPort();
      WSView view=new WSView();
      WSPutView wrap=new WSPutView();
      view.setName(browseItem);
      EList<XSDIdentityConstraintDefinition> idtylist=decl.getIdentityConstraintDefinitions();
      List<String> keys=new ArrayList<String>();
      for (      XSDIdentityConstraintDefinition idty : idtylist) {
        EList<XSDXPathDefinition> xpathList=idty.getFields();
        for (        XSDXPathDefinition path : xpathList) {
          String key=decl.getName();
          key+="String_Node_Str" + path.getValue();
          keys.add(key);
        }
      }
      view.setSearchableBusinessElements(keys.toArray(new String[]{}));
      view.setViewableBusinessElements(keys.toArray(new String[]{}));
      view.setDescription("String_Node_Str" + decl.getName() + "String_Node_Str");
      wrap.setWsView(view);
      WSDeleteView delView=new WSDeleteView();
      WSViewPK viewPk=new WSViewPK();
      viewPk.setPk(browseItem);
      delView.setWsViewPK(viewPk);
      port.deleteView(delView);
      port.putView(wrap);
    }
  }
}

Fixed version (ground truth):
private void newBrowseItemView(String browseItem) throws RemoteException {
  for (  XSDElementDeclaration decl : declList) {
    String fullName=BROWSE_ITEMS + decl.getName();
    if (fullName.equals(browseItem)) {
      XtentisPort port=getXtentisPort();
      WSView view=new WSView();
      WSPutView wrap=new WSPutView();
      view.setName(browseItem);
      EList<XSDIdentityConstraintDefinition> idtylist=decl.getIdentityConstraintDefinitions();
      List<String> keys=new ArrayList<String>();
      for (      XSDIdentityConstraintDefinition idty : idtylist) {
        EList<XSDXPathDefinition> xpathList=idty.getFields();
        for (        XSDXPathDefinition path : xpathList) {
          String key=decl.getName();
          key+="String_Node_Str" + path.getValue();
          keys.add(key);
        }
      }
      view.setSearchableBusinessElements(keys.toArray(new String[]{}));
      view.setViewableBusinessElements(keys.toArray(new String[]{}));
      view.setDescription("String_Node_Str" + decl.getName() + "String_Node_Str");
      wrap.setWsView(view);
      WSViewPK viewPk=new WSViewPK();
      viewPk.setPk(browseItem);
      WSDeleteView delView=new WSDeleteView();
      delView.setWsViewPK(viewPk);
      WSGetView getView=new WSGetView();
      getView.setWsViewPK(viewPk);
      try {
        port.getView(getView);
        port.deleteView(delView);
      }
 catch (      RemoteException ex) {
      }
      port.putView(wrap);
    }
  }
}
Program: 146110
Project: 146110
Buggy source:
public void selectionChanged(SelectionChangedEvent event){
  String name=(String)((IStructuredSelection)event.getSelection()).getFirstElement();
  refreshRoleView(name);
}

Fixed version (ground truth):
public void selectionChanged(SelectionChangedEvent event){
  XSDElementDeclaration decl=(XSDElementDeclaration)((IStructuredSelection)event.getSelection()).getFirstElement();
  refreshRoleView(BROWSE_ITEMS + decl.getName());
  UpdateComplexViewButton(true);
}
Program: 146111
Project: 146111
Buggy source:
public Object[] getElements(Object inputElement){
  ArrayList<String> values=new ArrayList<String>();
  for (  XSDElementDeclaration decl : declList) {
    String name=decl.getName();
    name=BROWSE_ITEMS + name;
    values.add(name);
  }
  return values.toArray(new String[values.size()]);
}

Fixed version (ground truth):
public Object[] getElements(Object inputElement){
  ArrayList<XSDElementDeclaration> values=(ArrayList<XSDElementDeclaration>)inputElement;
  return values.toArray(new XSDElementDeclaration[values.size()]);
}
Program: 146112
Project: 146112
Buggy source:
public String getColumnText(Object element,int columnIndex){
  return element.toString();
}

Fixed version (ground truth):
public String getColumnText(Object element,int columnIndex){
  return BROWSE_ITEMS + ((XSDElementDeclaration)element).getName();
}
Program: 146118
Project: 146118
Buggy source:
public void run(){
  IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
  List list=selection.toList();
  for (  Object obj : list) {
    if (obj instanceof XSDElementDeclaration) {
      if (Util.getParent(obj) == obj)       declList.add((XSDElementDeclaration)obj);
    }
  }
  AddBrowseItemsWizard wizard=new AddBrowseItemsWizard(page,list);
  WizardDialog dialog=new WizardDialog(page.getSite().getShell(),wizard);
  dialog.open();
  dialog.setBlockOnOpen(true);
}

Fixed version (ground truth):
public void run(){
  IStructuredSelection selection=(IStructuredSelection)page.getTreeViewer().getSelection();
  declList.clear();
  List list=selection.toList();
  for (  Object obj : list) {
    if (obj instanceof XSDElementDeclaration) {
      if (Util.getParent(obj) == obj)       declList.add((XSDElementDeclaration)obj);
    }
  }
  AddBrowseItemsWizard wizard=new AddBrowseItemsWizard(page,declList);
  WizardDialog dialog=new WizardDialog(page.getSite().getShell(),wizard);
  dialog.open();
}
Program: 146119
Project: 146119
Buggy source:
private void newBrowseItemView(String browseItem) throws RemoteException {
  for (  XSDElementDeclaration decl : declList) {
    String fullName=BROWSE_ITEMS + decl.getName();
    if (fullName.equals(browseItem)) {
      XtentisPort port=getXtentisPort();
      WSView view=new WSView();
      WSPutView wrap=new WSPutView();
      view.setName(browseItem);
      EList<XSDIdentityConstraintDefinition> idtylist=decl.getIdentityConstraintDefinitions();
      List<String> keys=new ArrayList<String>();
      for (      XSDIdentityConstraintDefinition idty : idtylist) {
        EList<XSDXPathDefinition> xpathList=idty.getFields();
        for (        XSDXPathDefinition path : xpathList) {
          String key=decl.getName();
          key+="String_Node_Str" + path.getValue();
          keys.add(key);
        }
      }
      view.setSearchableBusinessElements(keys.toArray(new String[]{}));
      view.setViewableBusinessElements(keys.toArray(new String[]{}));
      view.setDescription("String_Node_Str" + decl.getName() + "String_Node_Str");
      wrap.setWsView(view);
      WSDeleteView delView=new WSDeleteView();
      WSViewPK viewPk=new WSViewPK();
      viewPk.setPk(browseItem);
      delView.setWsViewPK(viewPk);
      port.deleteView(delView);
      port.putView(wrap);
    }
  }
}

Fixed version (ground truth):
private void newBrowseItemView(String browseItem) throws RemoteException {
  for (  XSDElementDeclaration decl : declList) {
    String fullName=BROWSE_ITEMS + decl.getName();
    if (fullName.equals(browseItem)) {
      XtentisPort port=getXtentisPort();
      WSView view=new WSView();
      WSPutView wrap=new WSPutView();
      view.setName(browseItem);
      EList<XSDIdentityConstraintDefinition> idtylist=decl.getIdentityConstraintDefinitions();
      List<String> keys=new ArrayList<String>();
      for (      XSDIdentityConstraintDefinition idty : idtylist) {
        EList<XSDXPathDefinition> xpathList=idty.getFields();
        for (        XSDXPathDefinition path : xpathList) {
          String key=decl.getName();
          key+="String_Node_Str" + path.getValue();
          keys.add(key);
        }
      }
      view.setSearchableBusinessElements(keys.toArray(new String[]{}));
      view.setViewableBusinessElements(keys.toArray(new String[]{}));
      view.setDescription("String_Node_Str" + decl.getName() + "String_Node_Str");
      wrap.setWsView(view);
      WSViewPK viewPk=new WSViewPK();
      viewPk.setPk(browseItem);
      WSDeleteView delView=new WSDeleteView();
      delView.setWsViewPK(viewPk);
      WSGetView getView=new WSGetView();
      getView.setWsViewPK(viewPk);
      try {
        port.getView(getView);
        port.deleteView(delView);
      }
 catch (      RemoteException ex) {
      }
      port.putView(wrap);
    }
  }
}
Program: 146120
Project: 146120
Buggy source:
public void selectionChanged(SelectionChangedEvent event){
  String name=(String)((IStructuredSelection)event.getSelection()).getFirstElement();
  refreshRoleView(name);
}

Fixed version (ground truth):
public void selectionChanged(SelectionChangedEvent event){
  XSDElementDeclaration decl=(XSDElementDeclaration)((IStructuredSelection)event.getSelection()).getFirstElement();
  refreshRoleView(BROWSE_ITEMS + decl.getName());
  UpdateComplexViewButton(true);
}
Program: 146121
Project: 146121
Buggy source:
public Object[] getElements(Object inputElement){
  ArrayList<String> values=new ArrayList<String>();
  for (  XSDElementDeclaration decl : declList) {
    String name=decl.getName();
    name=BROWSE_ITEMS + name;
    values.add(name);
  }
  return values.toArray(new String[values.size()]);
}

Fixed version (ground truth):
public Object[] getElements(Object inputElement){
  ArrayList<XSDElementDeclaration> values=(ArrayList<XSDElementDeclaration>)inputElement;
  return values.toArray(new XSDElementDeclaration[values.size()]);
}
Program: 146122
Project: 146122
Buggy source:
public String getColumnText(Object element,int columnIndex){
  return element.toString();
}

Fixed version (ground truth):
public String getColumnText(Object element,int columnIndex){
  return BROWSE_ITEMS + ((XSDElementDeclaration)element).getName();
}
Program: 146124
Project: 146124
Buggy source:
/** 
 * give the children of a node
 * @param id the id of the node in yui
 * @param nodeCount the internal count of nodes in yui tree
 * @param language
 * @return an array of TreeNode
 */
public TreeNode[] getChildren(int id,int nodeCount,String language,boolean foreignKey,int docIndex){
  return getChildrenWithMask(id,nodeCount,language,foreignKey,docIndex,false);
}

Fixed version (ground truth):
/** 
 * give the children of a node
 * @param id the id of the node in yui
 * @param nodeCount the internal count of nodes in yui tree
 * @param language
 * @return an array of TreeNode
 */
public TreeNode[] getChildren(int id,int nodeCount,String language,boolean foreignKey,int docIndex){
  return getChildrenWithKeyMask(id,nodeCount,language,foreignKey,docIndex,false);
}
Program: 146126
Project: 146126
Buggy source:
/** 
 * give the children of a node
 * @param id the id of the node in yui
 * @param nodeCount the internal count of nodes in yui tree
 * @param language
 * @return an array of TreeNode
 */
public TreeNode[] getChildren(int id,int nodeCount,String language,boolean foreignKey,int docIndex){
  return getChildrenWithMask(id,nodeCount,language,foreignKey,docIndex,false);
}

Fixed version (ground truth):
/** 
 * give the children of a node
 * @param id the id of the node in yui
 * @param nodeCount the internal count of nodes in yui tree
 * @param language
 * @return an array of TreeNode
 */
public TreeNode[] getChildren(int id,int nodeCount,String language,boolean foreignKey,int docIndex){
  return getChildrenWithKeyMask(id,nodeCount,language,foreignKey,docIndex,false);
}