nus-yam/ex-repair huggingface dataset:
Program: 78377
Project: 78377
Buggy source:
/** 
 * Initializes the report design when it is just created. <p> Set the value to the properties on repot design element which need the initialize valuel.  All initialize operations will not go into the command stack and can not be undo redo.
 * @param properties the property name value pairs.Those properties in the map are which need to be initialized.
 * @throws SemanticException SemamticException will throw out when the give properties map contians invlid property name or property value.
 * @deprecated
 */
public void initializeModule(Map properties) throws SemanticException {
  if (isInitialized)   return;
  String name=null;
  Object value=null;
  Module module=(Module)getElement();
  Set propNames=properties.keySet();
  Iterator itre=propNames.iterator();
  while (itre.hasNext()) {
    name=(String)itre.next();
    value=PropertyValueValidationUtil.validateProperty(this,name,properties.get(name));
    module.setProperty(name,value);
  }
  isInitialized=true;
}

Fixed version (ground truth):
/** 
 * Initializes the report design when it is just created. <p> Set the value to the properties on repot design element which need the initialize valuel. All initialize operations will not go into the command stack and can not be undo redo.
 * @param properties the property name value pairs.Those properties in the map are which need to be initialized.
 * @throws SemanticException SemamticException will throw out when the give properties map contians invlid property name or property value.
 * @deprecated
 */
public void initializeModule(Map properties) throws SemanticException {
  if (isInitialized)   return;
  String name=null;
  Object value=null;
  Module module=(Module)getElement();
  Set propNames=properties.keySet();
  Iterator itre=propNames.iterator();
  while (itre.hasNext()) {
    name=(String)itre.next();
    value=PropertyValueValidationUtil.validateProperty(this,name,properties.get(name));
    module.setProperty(name,value);
  }
  isInitialized=true;
}
Program: 78379
Project: 78379
Buggy source:
/** 
 * Process http request with POST method. Four different servlet paths are expected: "/frameset", "/navigation", "/toolbar", and "/run".
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String requestType=request.getHeader(ParameterAccessor.HEADER_REQUEST_TYPE);
  if (ParameterAccessor.HEADER_REQUEST_TYPE_SOAP.equalsIgnoreCase(requestType)) {
    ReportEngineService.getInstance().setEngineContext(getServletContext(),request);
    BirtContext context=new BirtContext(request);
    if ("String_Node_Str".equalsIgnoreCase(request.getServletPath())) {
      if (context.getBean().getException() != null) {
        context.finalize();
        String target="String_Node_Str";
        request.setAttribute("String_Node_Str",context.getBean().getException());
        RequestDispatcher rd=request.getRequestDispatcher(target);
        rd.include(request,response);
      }
 else {
        try {
          engine.service(request,response);
        }
 catch (        BirtException e) {
          String target="String_Node_Str";
          request.setAttribute("String_Node_Str",e);
          RequestDispatcher rd=request.getRequestDispatcher(target);
          rd.include(request,response);
        }
 finally {
          context.finalize();
        }
      }
    }
 else {
      super.doPost(request,response);
      context.finalize();
    }
  }
 else {
    doGet(request,response);
  }
}

Fixed version (ground truth):
/** 
 * Process http request with POST method. Four different servlet paths are expected: "/frameset", "/navigation", "/toolbar", and "/run".
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String requestType=request.getHeader(ParameterAccessor.HEADER_REQUEST_TYPE);
  if (ParameterAccessor.HEADER_REQUEST_TYPE_SOAP.equalsIgnoreCase(requestType)) {
    ReportEngineService.getInstance().setEngineContext(getServletContext(),request);
    BirtContext context=new BirtContext(request);
    if ("String_Node_Str".equalsIgnoreCase(request.getServletPath())) {
      if (context.getBean().getException() != null) {
        context.finalize();
        displayException(request,response,context.getBean().getException());
      }
 else {
        try {
          engine.service(request,response);
        }
 catch (        BirtException e) {
          displayException(request,response,e);
        }
 finally {
          context.finalize();
        }
      }
    }
 else {
      super.doPost(request,response);
      context.finalize();
    }
  }
 else {
    doGet(request,response);
  }
}
Program: 78380
Project: 78380
Buggy source:
/** 
 * Process http request with GET method
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  ReportEngineService.getInstance().setEngineContext(getServletContext(),request);
  BirtContext context=new BirtContext(request);
  if (context.getBean().getException() != null) {
    context.finalize();
    String target="String_Node_Str";
    request.setAttribute("String_Node_Str",context.getBean().getException());
    RequestDispatcher rd=request.getRequestDispatcher(target);
    rd.include(request,response);
  }
 else {
    try {
      if ("String_Node_Str".equalsIgnoreCase(request.getServletPath())) {
        viewer.service(request,response);
      }
      if ("String_Node_Str".equalsIgnoreCase(request.getServletPath())) {
        preview.service(request,response);
      }
 else       if ("String_Node_Str".equalsIgnoreCase(request.getServletPath())) {
        engine.service(request,response);
      }
 else       if ("String_Node_Str".equalsIgnoreCase(request.getServletPath())) {
        parameter.service(request,response);
      }
    }
 catch (    BirtException e) {
      String target="String_Node_Str";
      request.setAttribute("String_Node_Str",e);
      RequestDispatcher rd=request.getRequestDispatcher(target);
      rd.include(request,response);
    }
 finally {
      context.finalize();
    }
  }
}

Fixed version (ground truth):
/** 
 * Process http request with GET method
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  ReportEngineService.getInstance().setEngineContext(getServletContext(),request);
  BirtContext context=new BirtContext(request);
  if (context.getBean().getException() != null) {
    context.finalize();
    displayException(request,response,context.getBean().getException());
  }
 else {
    try {
      if (SERVLET_PATH_FRAMESET.equalsIgnoreCase(request.getServletPath())) {
        viewer.service(request,response);
      }
 else       if (SERVLET_PATH_PREVIEW.equalsIgnoreCase(request.getServletPath())) {
        preview.service(request,response);
      }
 else       if (SERVLET_PATH_RUN.equalsIgnoreCase(request.getServletPath())) {
        engine.service(request,response);
      }
 else       if (SERVLET_PATH_PARAMETER.equalsIgnoreCase(request.getServletPath())) {
        parameter.service(request,response);
      }
    }
 catch (    BirtException e) {
      displayException(request,response,e);
    }
 finally {
      context.finalize();
    }
  }
}
Program: 78381
Project: 78381
Buggy source:
/** 
 * Returns the resource bundle with the locale.
 * @param locale the given locale
 * @return the resource bundle
 */
public ResourceBundle getResourceBundle(ULocale locale);

Fixed version (ground truth):
/** 
 * Returns the resource bundle with the locale.
 * @param locale the given locale
 * @return the resource bundle
 */
public UResourceBundle getResourceBundle(ULocale locale);
Program: 78383
Project: 78383
Buggy source:
public void dragSetData(DragSourceEvent event){
  if (TextTransfer.getInstance().isSupportedType(event.dataType)) {
    TreeItem[] selection=availableDbObjectsTree.getSelection();
    if (selection.length > 0) {
      Object obj=selection[0].getData();
      if (obj instanceof DbObject) {
        event.data=((DbObject)obj).getName();
      }
 else       if (obj instanceof Procedure) {
        event.data=((Procedure)obj).getProcedureNameWithSchema();
      }
 else       event.data=selection[0].getData();
    }
  }
}

Fixed version (ground truth):
public void dragSetData(DragSourceEvent event){
  if (TextTransfer.getInstance().isSupportedType(event.dataType)) {
    TreeItem[] selection=availableDbObjectsTree.getSelection();
    if (selection.length > 0) {
      Object obj=selection[0].getData();
      if (obj instanceof DbObject) {
        event.data=getDnDString(((DbObject)obj).getName());
      }
 else       if (obj instanceof Procedure) {
        event.data=getDnDString(((Procedure)obj).getProcedureNameWithSchema());
      }
 else {
        event.data=getDnDString(selection[0].getData());
      }
    }
  }
}
Program: 78386
Project: 78386
Buggy source:
public void widgetSelected(SelectionEvent e){
  intervalBaseText.setEnabled(intervalBaseButton.getSelection());
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  intervalRange.setEnabled(intervalType.getSelectionIndex() != 0);
  intervalBaseButton.setEnabled(intervalType.getSelectionIndex() != 0 && (getColumnType() != String.class));
  intervalBaseText.setEnabled(intervalBaseButton.getEnabled() && intervalBaseButton.getSelection());
}
Program: 78389
Project: 78389
Buggy source:
protected void createAndInitCustomControl(Composite parent,Properties profileProps){
  if (m_pageHelper == null)   m_pageHelper=new JDBCSelectionPageHelper(this);
  m_pageHelper.createCustomControl(parent);
  m_pageHelper.initCustomControl(profileProps);
}

Fixed version (ground truth):
protected void createAndInitCustomControl(Composite parent,Properties profileProps){
  if (m_pageHelper == null)   m_pageHelper=new JDBCSelectionPageHelper(this);
  m_pageHelper.createCustomControl(parent);
  this.setPingButtonVisible(false);
  m_pageHelper.initCustomControl(profileProps);
}
Program: 78390
Project: 78390
Buggy source:
public void createPageCustomControl(Composite parent){
  if (m_pageHelper == null)   m_pageHelper=new JDBCSelectionPageHelper(this);
  m_pageHelper.createCustomControl(parent);
  m_pageHelper.initCustomControl(m_folderProperties);
}

Fixed version (ground truth):
public void createPageCustomControl(Composite parent){
  if (m_pageHelper == null)   m_pageHelper=new JDBCSelectionPageHelper(this);
  m_pageHelper.createCustomControl(parent);
  m_pageHelper.initCustomControl(m_folderProperties);
  this.setPingButtonVisible(false);
}
Program: 78391
Project: 78391
Buggy source:
/** 
 * Get report parameters.
 * @return collection of report parameter definition.
 */
public Collection getReportParameters(){
  if (parameterTask != null) {
    return parameterTask.getParameterDefns(false);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Get report parameters.
 * @return collection of report parameter definition.
 */
public Collection getReportParameters(){
  if (parameterTask != null) {
    return parameterTask.getParameters().getContents();
  }
  return null;
}
Program: 78392
Project: 78392
Buggy source:
/** 
 * Initial the parameters class. Web.xml is in UTF-8 format. No need to do encoding convertion.
 * @param config Servlet configuration
 */
public synchronized static void initParameters(ServletConfig config){
  workingFolder=config.getServletContext().getInitParameter(INIT_PARAM_REPORT_DIR);
  if (workingFolder == null || workingFolder.trim().length() <= 0) {
    workingFolder=config.getServletContext().getRealPath("String_Node_Str");
  }
  if (workingFolder != null && workingFolder.trim().endsWith(File.separator)) {
    workingFolder=workingFolder.trim().substring(0,workingFolder.trim().length() - 1);
  }
  webAppLocale=getLocaleFromString(config.getServletContext().getInitParameter(INIT_PARAM_LOCALE));
}

Fixed version (ground truth):
/** 
 * Initial the parameters class. Web.xml is in UTF-8 format. No need to do encoding convertion.
 * @param config Servlet configuration
 */
public synchronized static void initParameters(ServletConfig config){
  ServletContext context=config.getServletContext();
  workingFolder=context.getInitParameter(INIT_PARAM_REPORT_DIR);
  if (workingFolder == null || workingFolder.trim().length() <= 0) {
    workingFolder=context.getRealPath("String_Node_Str");
  }
  if (workingFolder != null && workingFolder.trim().endsWith(File.separator)) {
    workingFolder=workingFolder.trim().substring(0,workingFolder.trim().length() - 1);
  }
  webAppLocale=getLocaleFromString(context.getInitParameter(INIT_PARAM_LOCALE));
  isWorkingFolderAccessOnly=Boolean.valueOf(context.getInitParameter(INIT_PARAM_WORKING_FOLDER_ACCESS_ONLY)).booleanValue();
}
Program: 78393
Project: 78393
Buggy source:
/** 
 * If a report file name is a relative path, it is relative to working folder. So if a report file path is relative path, it's absolute path is synthesized by appending file path to the working folder path.
 * @param file
 * @return
 */
private static String createAbsolutePath(String filePath){
  if (isRelativePath(filePath)) {
    filePath=workingFolder + File.separator + filePath;
  }
  return filePath;
}

Fixed version (ground truth):
/** 
 * If a report file name is a relative path, it is relative to working folder. So if a report file path is relative path, it's absolute path is synthesized by appending file path to the working folder path.
 * @param file
 * @return
 */
private static String createAbsolutePath(String filePath){
  if (isWorkingFolderAccessOnly || isRelativePath(filePath)) {
    return workingFolder + File.separator + filePath;
  }
  return filePath;
}
Program: 78395
Project: 78395
Buggy source:
public void layout(IFigure container){
  if (data != null && data.columnWidths != null && data.columnWidths.length == getColumnCount() && data.rowHeights != null && data.rowHeights.length == getRowCount() && !needlayout || !owner.isActive()) {
    return;
  }
  helper=new TableBorderHelper(owner);
  helper.updateCellBorderInsets();
  data=new WorkingData();
  data.columnWidths=new TableLayoutData.ColumnData[getColumnCount()];
  data.rowHeights=new TableLayoutData.RowData[getRowCount()];
  init(data.columnWidths,data.rowHeights);
  List children=container.getChildren();
  initMinSize(children);
  initMergeMinsize(children);
  caleLayoutData(container);
  layoutTable(container);
  resetRowMinSize(data.rowHeights);
  initRowMinSize(children);
  initRowMergeMinsize(children);
  caleRowData();
  layoutTable(container);
  setConstraint(container,data);
  needlayout=false;
  reselect();
}

Fixed version (ground truth):
public void layout(IFigure container){
  if (data != null && data.columnWidths != null && data.columnWidths.length == getColumnCount() && data.rowHeights != null && data.rowHeights.length == getRowCount() && !needlayout || !owner.isActive()) {
    return;
  }
  helper=new TableBorderHelper(owner);
  helper.updateCellBorderInsets();
  data=new WorkingData();
  data.columnWidths=new TableLayoutData.ColumnData[getColumnCount()];
  data.rowHeights=new TableLayoutData.RowData[getRowCount()];
  init(data.columnWidths,data.rowHeights);
  List children=container.getChildren();
  initMinSize(children);
  initMergeMinsize(children);
  caleLayoutData(container);
  layoutTable(container);
  resetRowMinSize(data.rowHeights);
  initRowMinSize(children);
  initRowMergeMinsize(children);
  caleRowData();
  layoutTable(container);
  setConstraint(container,data);
  needlayout=false;
  int containerWidth=getOwner().getFigure().getParent().getClientArea().getSize().width;
  if (containerWidth < 0) {
    Display.getCurrent().asyncExec(new Runnable(){
      public void run(){
        getOwner().markDirty(true,true);
      }
    }
);
    return;
  }
  reselect();
}
Program: 78396
Project: 78396
Buggy source:
/** 
 * Executes the Command. This method should not be called if the Command is not executable.
 */
public void execute(){
  DesignElementHandle newObject=(DesignElementHandle)extendsData.get(DesignerConstants.KEY_NEWOBJECT);
  if (DesignerConstants.TRACING_COMMANDS) {
    System.out.println("String_Node_Str");
  }
  try {
    if (parent instanceof SlotHandle) {
      if (after != null) {
        int pos=DEUtil.findInsertPosition(((SlotHandle)parent).getElementHandle(),(DesignElementHandle)after,((SlotHandle)parent).getSlotID());
        ((SlotHandle)parent).add(newObject,pos);
      }
 else {
        ((SlotHandle)parent).add(newObject);
      }
    }
 else     if (newObject instanceof DataSourceHandle) {
      ((DesignElementHandle)parent).addElement(newObject,ReportDesignHandle.DATA_SOURCE_SLOT);
    }
 else {
      if (after != null) {
        int pos=DEUtil.findInsertPosition((DesignElementHandle)parent,(DesignElementHandle)after);
        int slotID=DEUtil.findSlotID(parent,after);
        ((DesignElementHandle)parent).addElement(newObject,slotID,pos);
      }
 else {
        ((DesignElementHandle)parent).addElement(newObject,DEUtil.getDefaultSlotID(parent));
      }
    }
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str" + DEUtil.getDisplayLabel(newObject) + "String_Node_Str");
    }
  }
 catch (  SemanticException e) {
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str");
    }
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Executes the Command. This method should not be called if the Command is not executable.
 */
public void execute(){
  DesignElementHandle newObject=getNewObject();
  if (DesignerConstants.TRACING_COMMANDS) {
    System.out.println("String_Node_Str");
  }
  try {
    if (parent instanceof SlotHandle) {
      if (after != null) {
        int pos=DEUtil.findInsertPosition(((SlotHandle)parent).getElementHandle(),(DesignElementHandle)after,((SlotHandle)parent).getSlotID());
        ((SlotHandle)parent).add(newObject,pos);
      }
 else {
        ((SlotHandle)parent).add(newObject);
      }
    }
 else     if (newObject instanceof DataSourceHandle) {
      ((DesignElementHandle)parent).addElement(newObject,ReportDesignHandle.DATA_SOURCE_SLOT);
    }
 else {
      if (after != null) {
        int pos=DEUtil.findInsertPosition((DesignElementHandle)parent,(DesignElementHandle)after);
        int slotID=DEUtil.findSlotID(parent,after);
        ((DesignElementHandle)parent).addElement(newObject,slotID,pos);
      }
 else {
        ((DesignElementHandle)parent).addElement(newObject,DEUtil.getDefaultSlotID(parent));
      }
    }
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str" + DEUtil.getDisplayLabel(newObject) + "String_Node_Str");
    }
  }
 catch (  SemanticException e) {
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str");
    }
    e.printStackTrace();
  }
}
Program: 78397
Project: 78397
Buggy source:
public void run(){
  Object model=evt.getNewValue();
  Object editpart=getViewer().getEditPartRegistry().get(model);
  if (editpart instanceof EditPart) {
    getViewer().flush();
    if (!(editpart instanceof EmptyEditPart)) {
      getViewer().select((EditPart)editpart);
    }
  }
  if (editpart != null) {
    getViewer().reveal((EditPart)editpart);
  }
}

Fixed version (ground truth):
public void run(){
  SetCurrentEditModelCommand c=new SetCurrentEditModelCommand(getNewObject());
  c.execute();
}
Program: 78398
Project: 78398
Buggy source:
public void dragOver(DropTargetEvent event){
  super.dragOver(event);
  if (getTargetEditPart() == null || getTargetEditPart().getModel() instanceof LibraryHandle) {
    event.detail=DND.DROP_NONE;
  }
}

Fixed version (ground truth):
public void dragOver(DropTargetEvent event){
  super.dragOver(event);
  if (getTargetEditPart() == null) {
    event.detail=DND.DROP_NONE;
    return;
  }
  if (getTargetEditPart().getModel() instanceof LibraryHandle) {
    List list=getTargetEditPart().getChildren();
    if (list.size() > 0 && !(list.get(0) instanceof EmptyEditPart)) {
      event.detail=DND.DROP_NONE;
    }
  }
}
Program: 78399
Project: 78399
Buggy source:
protected boolean handleMove(){
  boolean validateTrue=false;
  if (isCreating) {
    return true;
  }
  updateTargetUnderMouse();
  if (getTargetEditPart().getModel() instanceof LibraryHandle) {
    return true;
  }
  if (getTargetEditPart() != null) {
    validateTrue=handleValidatePalette(getFactory().getObjectType(),getTargetEditPart());
  }
  if (validateTrue) {
    updateTargetRequest();
    setCurrentCommand(getCommand());
    showTargetFeedback();
  }
 else {
    setCurrentCommand(null);
  }
  return validateTrue;
}

Fixed version (ground truth):
protected boolean handleMove(){
  boolean validateTrue=false;
  if (isCreating) {
    return true;
  }
  updateTargetUnderMouse();
  if (getTargetEditPart().getModel() instanceof LibraryHandle) {
  }
  if (getTargetEditPart() != null) {
    validateTrue=handleValidatePalette(getFactory().getObjectType(),getTargetEditPart());
  }
  if (validateTrue) {
    updateTargetRequest();
    setCurrentCommand(getCommand());
    showTargetFeedback();
  }
 else {
    setCurrentCommand(null);
  }
  return validateTrue;
}
Program: 78400
Project: 78400
Buggy source:
private Object getTableParent(){
  DesignElementHandle element=getColumnHandle().getContainer();
  if (element instanceof TableGroupHandle) {
    element=element.getContainer();
  }
  return element;
}

Fixed version (ground truth):
public Object getTableParent(){
  DesignElementHandle element=getColumnHandle().getContainer();
  if (element instanceof TableGroupHandle) {
    element=element.getContainer();
  }
  return element;
}
Program: 78401
Project: 78401
Buggy source:
public int getColumnNumber(){
  return HandleAdapterFactory.getInstance().getColumnHandleAdapter(getModel()).getColumnNumber();
}

Fixed version (ground truth):
public int getColumnNumber(){
  ColumnHandleAdapter adapt=HandleAdapterFactory.getInstance().getColumnHandleAdapter(getModel());
  if (adapt.getTableParent() == null) {
    return -1;
  }
  return adapt.getColumnNumber();
}
Program: 78402
Project: 78402
Buggy source:
public int getRowNumber(){
  return HandleAdapterFactory.getInstance().getRowHandleAdapter(getModel()).getRowNumber();
}

Fixed version (ground truth):
public int getRowNumber(){
  RowHandleAdapter adapt=HandleAdapterFactory.getInstance().getRowHandleAdapter(getModel());
  if (adapt.getTableParent() == null) {
    return -1;
  }
  return adapt.getRowNumber();
}
Program: 78403
Project: 78403
Buggy source:
/** 
 * Get report parameters.
 * @return collection of report parameter definition.
 */
public Collection getReportParameters(){
  if (parameterTask != null) {
    return parameterTask.getParameters().getContents();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Get report parameters.
 * @return collection of report parameter definition.
 */
public Collection getReportParameters(){
  if (parameterTask != null) {
    return parameterTask.getParameterDefns(false);
  }
  return null;
}
Program: 78406
Project: 78406
Buggy source:
/** 
 * @see org.eclipse.gef.tools.DirectEditManager#bringDown()
 */
protected void bringDown(){
  Font disposeFont=scaledFont;
  scaledFont=null;
  super.bringDown();
  if (disposeFont != null)   disposeFont.dispose();
  if (getEditPart() instanceof PlaceHolderEditPart) {
    ((PlaceHolderEditPart)getEditPart()).perfrormLabelEdit(getChanged());
  }
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.gef.tools.DirectEditManager#bringDown()
 */
protected void bringDown(){
  if (actionHandler != null) {
    actionHandler.dispose();
    actionHandler=null;
  }
  if (actionBars != null) {
    restoreSavedActions(actionBars);
    actionBars.updateActionBars();
    actionBars=null;
  }
  Font disposeFont=scaledFont;
  scaledFont=null;
  super.bringDown();
  if (disposeFont != null)   disposeFont.dispose();
  if (getEditPart() instanceof PlaceHolderEditPart) {
    ((PlaceHolderEditPart)getEditPart()).perfrormLabelEdit(getChanged());
  }
}
Program: 78407
Project: 78407
Buggy source:
protected void initCellEditor(){
  Text text=(Text)getCellEditor().getControl();
  LabelFigure labelFigure=(LabelFigure)getEditPart().getFigure();
  String initialLabelText=((LabelHandle)getModel()).getText();
  if (initialLabelText == null) {
    initialLabelText="String_Node_Str";
  }
  getCellEditor().setValue(initialLabelText);
  IFigure figure=getEditPart().getFigure();
  scaledFont=figure.getFont();
  FontData data=scaledFont.getFontData()[0];
  Dimension fontSize=new Dimension(0,data.getHeight());
  labelFigure.translateToAbsolute(fontSize);
  data.setHeight(fontSize.height);
  scaledFont=new Font(null,data);
  text.setFont(scaledFont);
  text.selectAll();
}

Fixed version (ground truth):
protected void initCellEditor(){
  Text text=(Text)getCellEditor().getControl();
  LabelFigure labelFigure=(LabelFigure)getEditPart().getFigure();
  String initialLabelText=((LabelHandle)getModel()).getText();
  if (initialLabelText == null) {
    initialLabelText="String_Node_Str";
  }
  getCellEditor().setValue(initialLabelText);
  IFigure figure=getEditPart().getFigure();
  scaledFont=figure.getFont();
  FontData data=scaledFont.getFontData()[0];
  Dimension fontSize=new Dimension(0,data.getHeight());
  labelFigure.translateToAbsolute(fontSize);
  data.setHeight(fontSize.height);
  scaledFont=new Font(null,data);
  text.setFont(scaledFont);
  text.selectAll();
  actionBars=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getEditorSite().getActionBars();
  saveCurrentActions(actionBars);
  actionHandler=new CellEditorActionHandler(actionBars);
  actionHandler.addCellEditor(getCellEditor());
  actionBars.updateActionBars();
}
Program: 78408
Project: 78408
Buggy source:
/** 
 * Creates a new JDBC connection to the embedded sample database.
 * @see org.eclipse.birt.report.data.oda.jdbc.IConnectionFactory#getConnection(java.lang.String,java.lang.String,java.util.Properties)
 */
public Connection getConnection(String driverClass,String url,Properties connectionProperties) throws SQLException {
  if (!driverClass.equals(SampleDBConstants.DRIVER_CLASS)) {
    logger.log(Level.SEVERE,"String_Node_Str" + driverClass);
    throw new SQLException("String_Node_Str" + driverClass);
  }
  if (!url.equals(SampleDBConstants.DRIVER_URL)) {
    logger.log(Level.WARNING,"String_Node_Str" + url);
    throw new SQLException("String_Node_Str" + driverClass);
  }
  String dbUrl=getDbUrl();
  Properties props;
  if (connectionProperties != null)   props=(Properties)connectionProperties.clone();
 else   props=new Properties();
  props.put("String_Node_Str",SampleDBConstants.SAMPLE_DB_SCHEMA);
  props.put("String_Node_Str","String_Node_Str");
  try {
    return JDBCDriverManager.getInstance().getConnection(SampleDBConstants.DERBY_DRIVER_CLASS,dbUrl,props);
  }
 catch (  OdaException e) {
    throw new SQLException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
/** 
 * Creates a new JDBC connection to the embedded sample database.
 * @see org.eclipse.birt.report.data.oda.jdbc.IConnectionFactory#getConnection(java.lang.String,java.lang.String,java.util.Properties)
 */
public Connection getConnection(String driverClass,String url,Properties connectionProperties) throws SQLException {
  if (!driverClass.equals(SampleDBConstants.DRIVER_CLASS)) {
    logger.log(Level.SEVERE,"String_Node_Str" + driverClass);
    throw new SQLException("String_Node_Str" + driverClass);
  }
  if (!url.equals(SampleDBConstants.DRIVER_URL)) {
    logger.log(Level.WARNING,"String_Node_Str" + url);
    throw new SQLException("String_Node_Str" + driverClass);
  }
  String dbUrl=SampleDBConstants.getDBUrl();
  Properties props;
  if (connectionProperties != null)   props=(Properties)connectionProperties.clone();
 else   props=new Properties();
  props.put("String_Node_Str",SampleDBConstants.SAMPLE_DB_SCHEMA);
  props.put("String_Node_Str","String_Node_Str");
  try {
    return JDBCDriverManager.getInstance().getConnection(SampleDBConstants.DERBY_DRIVER_CLASS,dbUrl,props);
  }
 catch (  OdaException e) {
    throw new SQLException(e.getLocalizedMessage());
  }
}
Program: 78409
Project: 78409
Buggy source:
public void activate(){
  super.activate();
}

Fixed version (ground truth):
public void activate(){
  super.activate();
  addListBandEditPart();
}
Program: 78410
Project: 78410
Buggy source:
protected void paintFigure(Graphics graphics){
  IFigure figure=source.getLayer(LayerConstants.PRIMARY_LAYER);
  TableBorderHelper helper=((TableLayout)figure.getLayoutManager()).getBorderHelper();
  if (helper == null) {
    return;
  }
  borderData=helper.getBorderData();
  rowCount=source.getRowCount();
  colCount=source.getColumnCount();
  for (int i=0; i < rowCount; i++) {
    int y=TableUtil.caleY(source,i + 1);
    int h=caleVisualHeight(i + 1);
    for (int j=0; j < colCount; j++) {
      int bottomIndex=(i + 1) * (2 * colCount + 1) + j;
      int rightIndex=i * (2 * colCount + 1) + colCount + j + 1;
      int topIndex=i * (2 * colCount + 1) + j;
      int leftIndex=i * (2 * colCount + 1) + colCount + j;
      int x=TableUtil.caleX(source,j + 1);
      int w=caleVisualWidth(j + 1);
      if (j == 0) {
        drawLeft(graphics,i,j,x,y,w,h,borderData[leftIndex]);
      }
      drawRight(graphics,i,j,x,y,w,h,borderData[rightIndex]);
      if (i == 0) {
        drawTop(graphics,i,j,x,y,w,h,borderData[topIndex]);
      }
      drawBottom(graphics,i,j,x,y,w,h,borderData[bottomIndex]);
    }
  }
}

Fixed version (ground truth):
protected void paintFigure(Graphics graphics){
  IFigure figure=source.getLayer(LayerConstants.PRIMARY_LAYER);
  TableBorderHelper helper=((TableLayout)figure.getLayoutManager()).getBorderHelper();
  if (helper == null) {
    return;
  }
  borderData=helper.getBorderData();
  rowCount=source.getRowCount();
  colCount=source.getColumnCount();
  if (borderData == null || borderData.length != (2 * colCount * rowCount + colCount + rowCount)) {
    return;
  }
  for (int i=0; i < rowCount; i++) {
    int y=TableUtil.caleY(source,i + 1);
    int h=caleVisualHeight(i + 1);
    for (int j=0; j < colCount; j++) {
      int bottomIndex=(i + 1) * (2 * colCount + 1) + j;
      int rightIndex=i * (2 * colCount + 1) + colCount + j + 1;
      int topIndex=i * (2 * colCount + 1) + j;
      int leftIndex=i * (2 * colCount + 1) + colCount + j;
      int x=TableUtil.caleX(source,j + 1);
      int w=caleVisualWidth(j + 1);
      if (j == 0) {
        drawLeft(graphics,i,j,x,y,w,h,borderData[leftIndex]);
      }
      drawRight(graphics,i,j,x,y,w,h,borderData[rightIndex]);
      if (i == 0) {
        drawTop(graphics,i,j,x,y,w,h,borderData[topIndex]);
      }
      drawBottom(graphics,i,j,x,y,w,h,borderData[bottomIndex]);
    }
  }
}
Program: 78411
Project: 78411
Buggy source:
protected void setLabelInstanceId(ITextContent text){
  if (text instanceof LabelContent) {
    Object genBy=text.getGenerateBy();
    if (genBy != null && genBy instanceof LabelItemDesign) {
      boolean isTempValue=((LabelItemDesign)genBy).getHandle().isTemplateParameterValue();
      InstanceID iid=text.getInstanceID();
      if (isTempValue) {
        writer.attribute(HTMLTags.ATTR_TYPE,iid.toString());
        exportElementID(text,iid.toString(),"String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
protected void setLabelInstanceId(ITextContent text){
  if (text instanceof LabelContent) {
    Object genBy=text.getGenerateBy();
    if (genBy != null && genBy instanceof LabelItemDesign) {
      boolean isTempValue=((LabelItemDesign)genBy).getHandle().isTemplateParameterValue();
      InstanceID iid=text.getInstanceID();
      if (isTempValue) {
        writer.attribute("String_Node_Str",iid.toString());
        exportElementID(text,iid.toString(),"String_Node_Str");
      }
    }
  }
}
Program: 78412
Project: 78412
Buggy source:
protected void createDataSet(){
  dataSet=getElementFactory().newOdaDataSet(DATA_SET_NAME);
  HashMap map=new HashMap();
  map.put(DesignerConstants.KEY_NEWOBJECT,dataSet);
  CreateCommand command=new CreateCommand(map);
  SlotHandle parent=getReportDesignHandle().getDataSets();
  command.setParent(parent);
  command.execute();
  if (dataSource1 == null)   createDataSource1();
  try {
    dataSet.setDataSource(DATA_SOURCE_NAME);
  }
 catch (  SemanticException e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
protected void createDataSet(){
  dataSet=getElementFactory().newOdaDataSet(DATA_SET_NAME);
  HashMap map=new HashMap();
  map.put(DesignerConstants.KEY_NEWOBJECT,dataSet);
  CreateCommand command=new CreateCommand(map);
  SlotHandle parent=getReportDesignHandle().getDataSets();
  command.setParent(parent);
  command.execute();
  if (dataSource == null)   createDataSource();
  try {
    dataSet.setDataSource(DATA_SOURCE_NAME);
  }
 catch (  SemanticException e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
}
Program: 78413
Project: 78413
Buggy source:
protected void tearDown(){
  dataItem=null;
  firstColumn=null;
  firstCell=secondCell=null;
  firstRow=secondRow=null;
  adapter=null;
  table=null;
  dataSource1=null;
}

Fixed version (ground truth):
protected void tearDown() throws SemanticException {
  clearAll(getReportDesignHandle().getBody());
  clearAll(getReportDesignHandle().getDataSources());
  clearAll(getReportDesignHandle().getDataSets());
  dataItem=null;
  firstColumn=null;
  firstCell=secondCell=null;
  firstRow=secondRow=null;
  adapter=null;
  table=null;
  dataSource=null;
}
Program: 78414
Project: 78414
Buggy source:
public void testCreateDataSource(){
  SlotHandle parent=getReportDesignHandle().getDataSources();
  assertEquals(0,parent.getCount());
  createDataSource1();
  assertEquals(1,parent.getCount());
  assertEquals(dataSource1,parent.get(0));
}

Fixed version (ground truth):
public void testCreateDataSource(){
  SlotHandle parent=getReportDesignHandle().getDataSources();
  assertEquals(0,parent.getCount());
  createDataSource();
  assertEquals(1,parent.getCount());
  assertEquals(dataSource,parent.get(0));
}
Program: 78415
Project: 78415
Buggy source:
public void testCreateDataSourceWithSameName(){
  SlotHandle parent=getReportDesignHandle().getDataSources();
  assertEquals(0,parent.getCount());
  createDataSource1();
  assertEquals(1,parent.getCount());
  DataSourceHandle dataSource2=getElementFactory().newOdaDataSource(DATA_SOURCE_NAME);
  HashMap map=new HashMap();
  map.put(DesignerConstants.KEY_NEWOBJECT,dataSource2);
  CreateCommand command=new CreateCommand(map);
  command.setParent(parent);
  command.execute();
  assertEquals(2,parent.getCount());
  assertEquals(dataSource2,parent.get(1));
  assertTrue(!dataSource2.getName().equals(DATA_SOURCE_NAME));
}

Fixed version (ground truth):
public void testCreateDataSourceWithSameName(){
  SlotHandle parent=getReportDesignHandle().getDataSources();
  assertEquals(0,parent.getCount());
  createDataSource();
  assertEquals(1,parent.getCount());
  DataSourceHandle dataSource2=getElementFactory().newOdaDataSource(DATA_SOURCE_NAME);
  HashMap map=new HashMap();
  map.put(DesignerConstants.KEY_NEWOBJECT,dataSource2);
  CreateCommand command=new CreateCommand(map);
  command.setParent(parent);
  command.execute();
  assertEquals(2,parent.getCount());
  assertEquals(dataSource2,parent.get(1));
  assertTrue(!dataSource2.getName().equals(DATA_SOURCE_NAME));
}
Program: 78416
Project: 78416
Buggy source:
public void testDeleteDataSource(){
  SlotHandle parent=getReportDesignHandle().getDataSources();
  assertEquals(0,parent.getCount());
  createDataSource1();
  createDataSet();
  assertEquals(1,parent.getCount());
  assertEquals(dataSource1,parent.get(0));
  assertEquals(dataSource1,dataSet.getDataSource());
  DeleteCommand deleteCmd=new DeleteCommand(dataSource1);
  assertTrue(deleteCmd.canExecute());
  deleteCmd.execute();
  assertEquals(0,parent.getCount());
  assertNull(dataSet.getDataSource());
}

Fixed version (ground truth):
public void testDeleteDataSource(){
  SlotHandle parent=getReportDesignHandle().getDataSources();
  assertEquals(0,parent.getCount());
  createDataSource();
  createDataSet();
  assertEquals(1,parent.getCount());
  assertEquals(dataSource,parent.get(0));
  assertEquals(dataSource,dataSet.getDataSource());
  DeleteCommand deleteCmd=new DeleteCommand(dataSource);
  assertTrue(deleteCmd.canExecute());
  deleteCmd.execute();
  assertEquals(0,parent.getCount());
  assertNull(dataSet.getDataSource());
}
Program: 78417
Project: 78417
Buggy source:
private void createEmbeddedImage(){
  EmbeddedImageNode embeddedImgNode=new EmbeddedImageNode(getReportDesignHandle());
  embeddedImg=new EmbeddedImage(testImageName);
  try {
    embeddedImg.setData("String_Node_Str".getBytes(EmbeddedImage.CHARSET));
  }
 catch (  UnsupportedEncodingException e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
private void createEmbeddedImage(){
  embeddedImg=new EmbeddedImage(testImageName);
  try {
    embeddedImg.setData("String_Node_Str".getBytes(EmbeddedImage.CHARSET));
  }
 catch (  UnsupportedEncodingException e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
}
Program: 78418
Project: 78418
Buggy source:
protected void tearDown(){
  super.tearDown();
  embeddedImg=null;
}

Fixed version (ground truth):
protected void tearDown() throws SemanticException {
  super.tearDown();
  embeddedImg=null;
}
Program: 78419
Project: 78419
Buggy source:
/** 
 * Visits the template data set.
 * @param obj the template data set to traverse
 */
public void visitTemplateDataSet(TemplateDataSet obj){
  DesignVisitor.this.visitTemplateElement(obj.handle(module));
}

Fixed version (ground truth):
/** 
 * Visits the template data set.
 * @param obj the template data set to traverse
 */
public void visitTemplateDataSet(TemplateDataSet obj){
  DesignVisitor.this.visitTemplateDataSet(obj.handle(module));
}
Program: 78420
Project: 78420
Buggy source:
/** 
 * Visits the template element.
 * @param obj the template element to traverse
 */
public void visitTemplateElement(TemplateElementHandle obj){
  visitDesignElement(obj);
}

Fixed version (ground truth):
/** 
 * Visits the template element.
 * @param obj the template element to traverse
 */
protected void visitTemplateElement(TemplateElementHandle obj){
  visitDesignElement(obj);
}
Program: 78421
Project: 78421
Buggy source:
/** 
 * Visits the template report item.
 * @param obj the template report item to traverse
 */
public void visitTemplateReportItem(TemplateReportItem obj){
  DesignVisitor.this.visitTemplateElement(obj.handle(module));
}

Fixed version (ground truth):
/** 
 * Visits the template report item.
 * @param obj the template report item to traverse
 */
public void visitTemplateReportItem(TemplateReportItem obj){
  DesignVisitor.this.visitTemplateReportItem(obj.handle(module));
}
Program: 78422
Project: 78422
Buggy source:
public IExtractionResults extract() throws EngineException {
  if (currentResult != null)   return currentResult;
  if (instanceId != null) {
    return extractByInstanceId();
  }
 else   if (resultSetName != null) {
    return extractByResultSetName();
  }
  return null;
}

Fixed version (ground truth):
public IExtractionResults extract() throws EngineException {
  if (currentResult != null)   return currentResult;
  if (resultSetName != null) {
    return extractByResultSetName();
  }
  return null;
}
Program: 78423
Project: 78423
Buggy source:
public List getMetaData() throws EngineException {
  if (resultMetaList == null) {
    resultMetaList=new ArrayList();
    ResultMetaData metaData=null;
    if (selectedColumns == null && instanceId != null) {
      currentResult=extract();
      try {
        resultMetaList.add(currentResult.getResultMetaData());
      }
 catch (      BirtException be) {
        be.printStackTrace();
      }
    }
    if (selectedColumns == null) {
      return null;
    }
 else {
      metaData=new ResultMetaData(null,selectedColumns);
      resultMetaList.add(metaData);
    }
  }
  return resultMetaList;
}

Fixed version (ground truth):
public List getMetaData() throws EngineException {
  return resultMetaList;
}
Program: 78424
Project: 78424
Buggy source:
public static void handleOnCreate(CellContent content,IRowData rowData,ExecutionContext context,boolean fromGrid){
  try {
    ReportItemDesign cellDesign=(ReportItemDesign)content.getGenerateBy();
    ICellInstance cell=new CellInstance(content,rowData,context,fromGrid);
    if (handleJS(cell,cellDesign.getOnCreate(),context).didRun())     return;
    ICellEventHandler eh=getEventHandler(cellDesign,context);
    if (eh != null)     eh.onCreate(cell,context.getReportContext());
  }
 catch (  Exception e) {
    addException(context,e);
  }
}

Fixed version (ground truth):
public static void handleOnCreate(CellContent content,IRowData rowData,ExecutionContext context,boolean fromGrid){
  try {
    Object generateBy=content.getGenerateBy();
    if (generateBy == null) {
      return;
    }
    ReportItemDesign cellDesign=(ReportItemDesign)generateBy;
    ICellInstance cell=new CellInstance(content,rowData,context,fromGrid);
    if (handleJS(cell,cellDesign.getOnCreate(),context).didRun())     return;
    ICellEventHandler eh=getEventHandler(cellDesign,context);
    if (eh != null)     eh.onCreate(cell,context.getReportContext());
  }
 catch (  Exception e) {
    addException(context,e);
  }
}
Program: 78425
Project: 78425
Buggy source:
public static void handleOnRender(CellContent content,ExecutionContext context){
  try {
    ReportItemDesign cellDesign=(ReportItemDesign)content.getGenerateBy();
    ICellInstance cell=new CellInstance(content,null,context,false);
    if (handleJS(cell,cellDesign.getOnRender(),context).didRun())     return;
    ICellEventHandler eh=getEventHandler(cellDesign,context);
    if (eh != null)     eh.onRender(cell,context.getReportContext());
  }
 catch (  Exception e) {
    addException(context,e);
  }
}

Fixed version (ground truth):
public static void handleOnRender(CellContent content,ExecutionContext context){
  try {
    Object generateBy=content.getGenerateBy();
    if (generateBy == null) {
      return;
    }
    ReportItemDesign cellDesign=(ReportItemDesign)generateBy;
    ICellInstance cell=new CellInstance(content,null,context,false);
    if (handleJS(cell,cellDesign.getOnRender(),context).didRun())     return;
    ICellEventHandler eh=getEventHandler(cellDesign,context);
    if (eh != null)     eh.onRender(cell,context.getReportContext());
  }
 catch (  Exception e) {
    addException(context,e);
  }
}
Program: 78427
Project: 78427
Buggy source:
protected Image createImage(byte[] data){
  return null;
}

Fixed version (ground truth):
protected Image createImage(byte[] data){
  return new SVGImage(super.createImage(data),null,data);
}
Program: 78428
Project: 78428
Buggy source:
public void doSave(IProgressMonitor progressMonitor){
  super.doSave(progressMonitor);
  Object adapter=((IEditorPart)this).getAdapter(IReportProvider.class);
  if (adapter != null) {
    IReportProvider provider=(IReportProvider)adapter;
    ModuleHandle model=provider.getReportModuleHandle(getEditorInput(),true);
    SessionHandleAdapter.getInstance().setReportDesignHandle(model);
  }
}

Fixed version (ground truth):
public void doSave(IProgressMonitor progressMonitor){
  super.doSave(progressMonitor);
  Object adapter=((IEditorPart)this).getAdapter(IReportProvider.class);
  if (adapter != null && isValidModelFile()) {
    IReportProvider provider=(IReportProvider)adapter;
    ModuleHandle model=provider.getReportModuleHandle(getEditorInput(),true);
    SessionHandleAdapter.getInstance().setReportDesignHandle(model);
  }
}
Program: 78429
Project: 78429
Buggy source:
public boolean canLeaveThePage(){
  if (isDirty()) {
    MessageDialog prefDialog=new MessageDialog(UIUtil.getDefaultShell(),Messages.getString("String_Node_Str"),null,Messages.getString("String_Node_Str"),MessageDialog.INFORMATION,new String[]{Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")},0);
    int ret=prefDialog.open();
switch (ret) {
case 0:
      doSave(null);
    break;
case 1:
  if (getEditorInput() != null) {
    this.setInput(getEditorInput());
  }
break;
case 2:
return false;
}
}
IEditorInput input=getEditorInput();
boolean validModel=false;
if (input instanceof IPathEditorInput) {
IPath path=((IPathEditorInput)input).getPath();
try {
if (path.toOSString().endsWith(IReportEditorContants.LIBRARY_FILE_EXTENTION)) {
validModel=ModuleUtil.isValidLibrary(SessionHandleAdapter.getInstance().getSessionHandle(),path.toOSString(),new FileInputStream(new File(path.toOSString())));
}
 else {
validModel=ModuleUtil.isValidDesign(SessionHandleAdapter.getInstance().getSessionHandle(),path.toOSString(),new FileInputStream(new File(path.toOSString())));
}
}
 catch (FileNotFoundException e) {
ExceptionHandler.handle(e);
}
}
if (!validModel) {
Display.getCurrent().beep();
MessageDialog.openError(Display.getCurrent().getActiveShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
return false;
}
return true;
}

Fixed version (ground truth):
public boolean canLeaveThePage(){
  if (isDirty()) {
    MessageDialog prefDialog=new MessageDialog(UIUtil.getDefaultShell(),Messages.getString("String_Node_Str"),null,Messages.getString("String_Node_Str"),MessageDialog.INFORMATION,new String[]{Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")},0);
    int ret=prefDialog.open();
switch (ret) {
case 0:
      doSave(null);
    break;
case 1:
  if (getEditorInput() != null) {
    this.setInput(getEditorInput());
  }
break;
case 2:
return false;
}
}
boolean validModel=false;
validModel=isValidModelFile();
if (!validModel) {
Display.getCurrent().beep();
MessageDialog.openError(Display.getCurrent().getActiveShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
return false;
}
return true;
}
Program: 78431
Project: 78431
Buggy source:
public final void setProperty(String sProperty,Object oValue){
  super.setProperty(sProperty,oValue);
  if (sProperty.equals(IDeviceRenderer.UPDATE_NOTIFIER)) {
    _iun=(IUpdateNotifier)oValue;
  }
 else   if (sProperty.equals(IDeviceRenderer.EXPECTED_BOUNDS)) {
    final Bounds bo=(Bounds)oValue;
    try {
      dom=createSvgDocument(bo.getWidth(),bo.getHeight());
      svggc=new SVGGraphics2D(dom);
      hotspotLayer=createHotspotLayer(dom);
      super.setProperty(IDeviceRenderer.GRAPHICS_CONTEXT,svggc);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (sProperty.equals(IDeviceRenderer.FILE_IDENTIFIER)) {
    oOutputIdentifier=oValue;
  }
 else   if (sProperty.equals(ISVGConstants.JAVASCRIPT_CODE_LIST)) {
    scriptCodeList=(List)oValue;
  }
 else   if (sProperty.equals(ISVGConstants.JAVASCRIPT_URL_REF_LIST)) {
    scriptRefList=(List)oValue;
  }
}

Fixed version (ground truth):
public final void setProperty(String sProperty,Object oValue){
  super.setProperty(sProperty,oValue);
  if (sProperty.equals(IDeviceRenderer.UPDATE_NOTIFIER)) {
    _iun=(IUpdateNotifier)oValue;
  }
 else   if (sProperty.equals(IDeviceRenderer.EXPECTED_BOUNDS)) {
    final Bounds bo=(Bounds)oValue;
    try {
      dom=createSvgDocument(bo.getWidth(),bo.getHeight());
      svggc=new SVGGraphics2D(dom);
      hotspotLayer=createHotspotLayer(dom);
      super.setProperty(IDeviceRenderer.GRAPHICS_CONTEXT,svggc);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (sProperty.equals(IDeviceRenderer.FILE_IDENTIFIER)) {
    oOutputIdentifier=oValue;
  }
 else   if (sProperty.equals(ISVGConstants.JAVASCRIPT_CODE_LIST)) {
    scriptCodeList=(List)oValue;
  }
 else   if (sProperty.equals(ISVGConstants.JAVASCRIPT_URL_REF_LIST)) {
    scriptRefList=(List)oValue;
  }
 else   if (sProperty.equals(ISVGConstants.RESIZE_SVG)) {
    _resizeSVG=((Boolean)oValue).booleanValue();
  }
}