rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
setTableColumnHeader(tcm.getColumn(ContextPane.BUTTON), rnd, null, null, | setTableColumnHeader(tcm.getColumn(ContextDialog.BUTTON), rnd, null, null, | private void setTableHeader(String s) { IconManager im = IconManager.getInstance(getRegistry()); TableIconRenderer rnd = new TableIconRenderer(); TableColumnModel tcm = table.getTableHeader().getColumnModel(); Icon up = im.getIcon(IconManager.UP), down = im.getIcon(IconManager.DOWN); setTableColumnHeader(tcm.getColumn(ContextPane.NAME), rnd, up, down, s); setTableColumnHeader(tcm.getColumn(ContextPane.BOOLEAN), rnd, up, down, ""); setTableColumnHeader(tcm.getColumn(ContextPane.BUTTON), rnd, null, null, ""); table.setDefaultRenderer(JComponent.class, new TableComponentCellRenderer()); table.setDefaultEditor(JComponent.class, new TableComponentCellEditor()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3db37517e6873d11567ee5822e769ab058e1abed/SelectionPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/results/stats/graphic/SelectionPane.java |
private void createWindowsMenuItems(JMenu menu) { Set viewers = ImViewerFactory.getViewers(); Iterator i = viewers.iterator(); menu.removeAll(); while (i.hasNext()) menu.add(new JMenuItem(new ActivationAction((ImViewer) i.next()))); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/54a6dc1cc81e06c2190546075a6c5a04f18d9bb5/ImViewerControl.java/clean/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerControl.java |
||
} else if (ImViewer.ICONIFIED_PROPERTY.equals(propName)) { view.onIconified(); if (timer != null) timer.stop(); | public void propertyChange(PropertyChangeEvent pce) { String propName = pce.getPropertyName(); if (ImViewer.Z_SELECTED_PROPERTY.equals(propName)) { view.setZSection(((Integer) pce.getNewValue()).intValue()); } else if (ImViewer.T_SELECTED_PROPERTY.equals(propName)) { view.setTimepoint(((Integer) pce.getNewValue()).intValue()); } else if (ChannelButton.CHANNEL_SELECTED_PROPERTY.equals(propName)) { Map map = (Map) pce.getNewValue(); if (map == null) return; if (map.size() != 1) return; Iterator i = map.keySet().iterator(); Integer index; while (i.hasNext()) { index = (Integer) i.next(); model.setChannelSelection(index.intValue(), ((Boolean) map.get(index)).booleanValue()); } } else if (ZoomAction.ZOOM_PROPERTY.equals(propName)) { view.setZoomFactor((ViewerAction) pce.getNewValue()); } else if (RateImageAction.RATE_IMAGE_PROPERTY.equals(propName)) { view.setRatingFactor((ViewerAction) pce.getNewValue()); } else if (LoadingWindow.CLOSED_PROPERTY.equals(propName)) { model.discard(); } else if (Renderer.RENDER_PLANE_PROPERTY.equals(propName)) { model.renderXYPlane(); } else if (Renderer.SELECTED_CHANNEL_PROPERTY.equals(propName)) { if (model.getColorModel().equals(ImViewer.GREY_SCALE_MODEL)) { int c = ((Integer) pce.getNewValue()).intValue(); for (int i = 0; i < model.getMaxC(); i++) model.setChannelActive(i, i == c); model.displayChannelMovie(); } } else if (ChannelButton.INFO_PROPERTY.equals(propName)) { int index = ((Integer) pce.getNewValue()).intValue(); ChannelMetadata data = model.getChannelMetadata(index); if (data != null) { InfoDialog dialog = new InfoDialog(model.getUI(), data); dialog.addPropertyChangeListener(this); UIUtilities.setLocationRelativeToAndShow(view, dialog); } else { UserNotifier un = ImViewerAgent.getRegistry().getUserNotifier(); un.notifyInfo("Channel info", "No metadata for the " + "selected channel."); } } else if (ChannelButton.CHANNEL_COLOR_PROPERTY.equals(propName) || ChannelColorMenuItem.CHANNEL_COLOR_PROPERTY.equals(propName)) { colorPickerIndex = ((Integer) pce.getNewValue()).intValue(); Color c = model.getChannelColor(colorPickerIndex); ColourPicker dialog = new ColourPicker(view, c); dialog.addPropertyChangeListener(this); UIUtilities.setLocationRelativeToAndShow(view, dialog); } else if (ColourPicker.COLOUR_PROPERTY.equals(propName)) { Color c = (Color) pce.getNewValue(); if (colorPickerIndex != -1) { model.setChannelColor(colorPickerIndex, c); } } else if (UnitBarSizeDialog.UNIT_BAR_VALUE_PROPERTY.equals(propName)) { double v = ((Double) pce.getNewValue()).doubleValue(); model.setUnitBarSize(v); } else if (InfoDialog.UPDATE_PROPERTY.equals(propName)) { //TODO: implement method } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/54a6dc1cc81e06c2190546075a6c5a04f18d9bb5/ImViewerControl.java/clean/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerControl.java |
|
view.setLensPlaneImage(model.getRenderedImage()); | view.setLensPlaneImage(model.getImage()); | private void updateLensImage() { if (view.isLensVisible()) view.setLensPlaneImage(model.getRenderedImage()); timer.stop(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/54a6dc1cc81e06c2190546075a6c5a04f18d9bb5/ImViewerControl.java/clean/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerControl.java |
setName(names[zoomingIndex]); | name = names[zoomingIndex]; | public ZoomAction(ImViewer model, int zoomingIndex) { super(model); controlsIndex(zoomingIndex); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); this.zoomingIndex = zoomingIndex; putValue(Action.NAME, names[zoomingIndex]); setName(names[zoomingIndex]); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3b273af3a5320ab0a054540f14a3c299ff01de69/ZoomAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/actions/ZoomAction.java |
UIUtilities.formatToolTipText(DESCRIPTION)); | UIUtilities.formatToolTipText(getDescription(modelIndex))); | public ColorModelAction(ImViewer model, int modelIndex) { super(model, NAME); controlIndex(modelIndex); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); this.modelIndex = modelIndex; putValue(Action.NAME, names[modelIndex]); putValue(Action.SMALL_ICON, getColorModelIcon(modelIndex)); setName(names[modelIndex]); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3b273af3a5320ab0a054540f14a3c299ff01de69/ColorModelAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/actions/ColorModelAction.java |
setName(names[modelIndex]); | name = names[modelIndex]; | public ColorModelAction(ImViewer model, int modelIndex) { super(model, NAME); controlIndex(modelIndex); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); this.modelIndex = modelIndex; putValue(Action.NAME, names[modelIndex]); putValue(Action.SMALL_ICON, getColorModelIcon(modelIndex)); setName(names[modelIndex]); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3b273af3a5320ab0a054540f14a3c299ff01de69/ColorModelAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/actions/ColorModelAction.java |
Header.print(System.out); | private void addFilenames(String[] filenames) { if (filenames.length == 0) { return; } for (int i = 0; i < filenames.length; i++) { getProject().log("Adding " + filenames[i] + " to list", Project.MSG_VERBOSE); addArg(filenames[i]); } Header.print(System.out);// System.out.println("instrumenting " + filenames.length + " "// + (filenames.length == 1 ? "class" : "classes")// + (toDir != null ? " to " + toDir : "")); } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/ReportTask.java/clean/cobertura/src/net/sourceforge/cobertura/ant/ReportTask.java |
|
addArg("--basedir"); | public void execute() throws BuildException { initArgs(); if (dataFile != null) { addArg("--datafile"); addArg(dataFile); } addArg("--destination"); addArg(this.destDir.getAbsolutePath()); addArg("--format"); addArg(format); if (srcDir != null) { addArg("--basedir"); addArg(srcDir); } handleFilesets(); saveArgs(); /** * TODO: Do something here so that we can set System.in and System.out on * getJava() to the one we're using now. So that when instrumentation calls * System.out, it will show up as "[instrument] doing stuff" instead of * "[java] doing stuff" in the ant output. */ if (getJava().executeJava() != 0) { throw new BuildException("Error running reports. See messages above."); } unInitArgs(); } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/ReportTask.java/clean/cobertura/src/net/sourceforge/cobertura/ant/ReportTask.java |
|
Set filenames = new HashSet(); | int numberOfClasses = 0; | private void handleFilesets() { Set filenames = new HashSet(); Iterator iter = fileSets.iterator(); while (iter.hasNext()) { FileSet fileSet = (FileSet)iter.next(); addArg("--basedir"); addArg(baseDir(fileSet)); filenames.addAll(Arrays.asList(getFilenames(fileSet))); } addFilenames((String[])filenames.toArray(new String[filenames.size()])); } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/ReportTask.java/clean/cobertura/src/net/sourceforge/cobertura/ant/ReportTask.java |
filenames.addAll(Arrays.asList(getFilenames(fileSet))); | String[] fileNames = getFilenames(fileSet); numberOfClasses += fileNames.length; addFilenames(fileNames); | private void handleFilesets() { Set filenames = new HashSet(); Iterator iter = fileSets.iterator(); while (iter.hasNext()) { FileSet fileSet = (FileSet)iter.next(); addArg("--basedir"); addArg(baseDir(fileSet)); filenames.addAll(Arrays.asList(getFilenames(fileSet))); } addFilenames((String[])filenames.toArray(new String[filenames.size()])); } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/ReportTask.java/clean/cobertura/src/net/sourceforge/cobertura/ant/ReportTask.java |
addFilenames((String[])filenames.toArray(new String[filenames.size()])); | private void handleFilesets() { Set filenames = new HashSet(); Iterator iter = fileSets.iterator(); while (iter.hasNext()) { FileSet fileSet = (FileSet)iter.next(); addArg("--basedir"); addArg(baseDir(fileSet)); filenames.addAll(Arrays.asList(getFilenames(fileSet))); } addFilenames((String[])filenames.toArray(new String[filenames.size()])); } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/ReportTask.java/clean/cobertura/src/net/sourceforge/cobertura/ant/ReportTask.java |
|
assertEquals("Concurrent access to command state.", ExecCommand.EXECUTING, tState); | assertTrue("Concurrent access to command state.", (tState == ExecCommand.EXECUTING || tState == ExecCommand.FINISHED)); | public void testEnterExecuting() { readPointID = ExecCommand.LOCK_ACQUIRED_BY_ENTER_EXECUTING; target.run(); threads.awaitAltFlow(); assertEquals("Concurrent access to command state.", ExecCommand.EXECUTING, tState); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f459458d835726ab1d75105d177832e1f8675ad/TestExecCommandSync.java/buggy/TEST/org/openmicroscopy/shoola/util/concur/tasks/TestExecCommandSync.java |
protected RubyModule(IRuby runtime, RubyClass metaClass, RubyClass superClass, SinglyLinkedList parentCRef, String name) { super(runtime, metaClass); this.superClass = superClass; //this.parentModule = parentModule; setBaseName(name); // If no parent is passed in, it is safe to assume Object. if (parentCRef == null) { if (runtime.getObject() != null) { parentCRef = runtime.getObject().getCRef(); } } this.cref = new SinglyLinkedList(this, parentCRef); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/10c73ed2ca5db89e8e32669e4a9d4a933d0f98ca/RubyModule.java/clean/src/org/jruby/RubyModule.java |
||
module.setParent(this); | public IRubyObject setConstant(String name, IRubyObject value) { IRubyObject result = setInstanceVariable(name, value, "Insecure: can't set constant", "class/module"); // if adding a module under a constant name, set that module's basename to the constant name if (value instanceof RubyModule) { RubyModule module = (RubyModule)value; if (module.getBaseName() == null) { module.setBaseName(name); } } return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/10c73ed2ca5db89e8e32669e4a9d4a933d0f98ca/RubyModule.java/clean/src/org/jruby/RubyModule.java |
|
if (executions.size() == 0) { firstExecTime = lastExecTime; return; } | public ChainExecutions(Collection executions) { Iterator iter = executions.iterator(); ChainExecutionData exec; while (iter.hasNext()) { exec = (ChainExecutionData) iter.next(); addChainExecution(exec); Date date = exec.getDate(); long time = date.getTime(); if (time < firstExecTime) firstExecTime = time; if (time >lastExecTime) lastExecTime = time; } // build list of chain names getChainNames(); // build list of dataset names. getDatasetNames(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/db0693a83244306101845a062e2581cca9b0690e/ChainExecutions.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/ChainExecutions.java |
|
MacroAdapter.createMacro(elseDir) : null; | MacroAdapter.createMacro(elseDir,rc.getEncoding()) : null; | public static final Object build(BuildContext rc, Condition cond, Macro body, Object elseDir) throws BuildException { if (cond instanceof Macro) { Macro elseMacro = (elseDir != null) ? MacroAdapter.createMacro(elseDir) : null; return new IfDirective(cond, body, elseMacro); } else { return (cond.test(rc)) ? body : elseDir; } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/9dc4324fb914abcbf2ec188e4eb77b1bf503f330/IfDirective.java/clean/webmacro/src/org/webmacro/engine/IfDirective.java |
FastWriter fw = new FastWriter(os, "UTF8"); | FastWriter fw = new FastWriter(os, context.getEncoding()); | public Object evaluate(Context context) throws ContextException { try { ByteArrayOutputStream os = new ByteArrayOutputStream(256); FastWriter fw = new FastWriter(os, "UTF8"); write(fw,context); fw.flush(); return os.toString("UTF8"); } catch (IOException e) { Engine.log.exception(e); Engine.log.error( "If: evaluate got IO exception on write to StringWriter"); return ""; } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/9dc4324fb914abcbf2ec188e4eb77b1bf503f330/IfDirective.java/clean/webmacro/src/org/webmacro/engine/IfDirective.java |
return os.toString("UTF8"); | return os.toString(context.getEncoding()); | public Object evaluate(Context context) throws ContextException { try { ByteArrayOutputStream os = new ByteArrayOutputStream(256); FastWriter fw = new FastWriter(os, "UTF8"); write(fw,context); fw.flush(); return os.toString("UTF8"); } catch (IOException e) { Engine.log.exception(e); Engine.log.error( "If: evaluate got IO exception on write to StringWriter"); return ""; } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/9dc4324fb914abcbf2ec188e4eb77b1bf503f330/IfDirective.java/clean/webmacro/src/org/webmacro/engine/IfDirective.java |
public static RubyBinding newBinding(IRuby runtime) { ThreadContext context = runtime.getCurrentContext(); RubyModule wrapper = context.getWrapper(); Iter iter = context.getCurrentIter(); Frame frame = context.getPreviousFrame(); if (frame == null) { frame = context.getCurrentFrame(); } DynamicVariableSet dynVars = context.getCurrentDynamicVars(); Block bindingBlock = Block.createBinding(wrapper, iter, frame, dynVars); RubyBinding newBinding = new RubyBinding(runtime, runtime.getClass("Binding"), bindingBlock, context.getRubyClass()); return newBinding; | public static RubyBinding newBinding(IRuby runtime, Block block) { return new RubyBinding(runtime, runtime.getClass("Binding"), block, block.getKlass()); | public static RubyBinding newBinding(IRuby runtime) { ThreadContext context = runtime.getCurrentContext(); // FIXME: We should be cloning, not reusing: frame, scope, dynvars, and potentially iter/block info RubyModule wrapper = context.getWrapper(); Iter iter = context.getCurrentIter(); Frame frame = context.getPreviousFrame(); // for TOPLEVEL_BINDING if (frame == null) { frame = context.getCurrentFrame(); } DynamicVariableSet dynVars = context.getCurrentDynamicVars(); Block bindingBlock = Block.createBinding(wrapper, iter, frame, dynVars); RubyBinding newBinding = new RubyBinding(runtime, runtime.getClass("Binding"), bindingBlock, context.getRubyClass()); return newBinding; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/62395b140d1fb0b5b75ba224eb0f4b564f70979b/RubyBinding.java/clean/src/org/jruby/RubyBinding.java |
return RubyArray.newArray(getRuby(), this, newFloat(getRuby(), other.getDoubleValue())); | return RubyArray.newArray(getRuby(), newFloat(getRuby(), other.getDoubleValue()), this); | public RubyArray coerce(RubyObject num) { RubyNumeric other = numericValue(num); return RubyArray.newArray(getRuby(), this, newFloat(getRuby(), other.getDoubleValue())); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/e3f72aab20ef1fc8576d8fa6823d9722ed33c55c/RubyFloat.java/buggy/org/jruby/RubyFloat.java |
if (mng.getCurrentROI() != null) mng.erase(); | ROIShape roi = mng.getCurrentROI(); if (roi != null && roi.getAnnotation() != null && mng.isAnnotationOnOff()) { setAnnotation(null); } if (roi != null) mng.erase(); | public void erase() { DrawingCanvasMng mng = drawingCanvas.getManager(); if (mng.getCurrentROI() != null) mng.erase(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5cbb9d6f888b330df5f864404990e547ea4b385a/ROIAgtCtrl.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/ROIAgtCtrl.java |
drawingCanvas.getManager().eraseAll(); | drawingCanvas.getManager().eraseAll(); setAnnotation(null); | public void eraseAll() { drawingCanvas.getManager().eraseAll(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5cbb9d6f888b330df5f864404990e547ea4b385a/ROIAgtCtrl.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/ROIAgtCtrl.java |
public void onOffDrawing(boolean b) { abstraction.onOffDrawing(b); } | public void onOffDrawing(boolean b) { abstraction.onOffDrawing(b); } | public void onOffDrawing(boolean b) { abstraction.onOffDrawing(b); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5cbb9d6f888b330df5f864404990e547ea4b385a/ROIAgtCtrl.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/ROIAgtCtrl.java |
postedAdd = true; | void onOffDrawing(boolean b) { drawOnOff = b; postedAdd = true; registry.getEventBus().post(new AddROICanvas(b)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5cbb9d6f888b330df5f864404990e547ea4b385a/ROIAgt.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/ROIAgt.java |
|
bignumClass.defineMethod("hash", CallbackFactory.getMethod(RubyBignum.class, "hash")); | public static RubyClass createBignumClass(Ruby ruby) { RubyClass bignumClass = ruby.defineClass("Bignum", ruby.getClasses().getIntegerClass()); //rb_define_method(rb_cBignum, "-@", rb_big_uminus, 0); //rb_define_method(rb_cBignum, "divmod", rb_big_divmod, 1); //rb_define_method(rb_cBignum, "modulo", rb_big_modulo, 1); //rb_define_method(rb_cBignum, "remainder", rb_big_remainder, 1); //rb_define_method(rb_cBignum, "&", rb_big_and, 1); // rb_define_method(rb_cBignum, "~", rb_big_neg, 0); // rb_define_method(rb_cBignum, "[]", rb_big_aref, 1); // //rb_define_method(rb_cBignum, "===", rb_big_eq, 1); // rb_define_method(rb_cBignum, "eql?", rb_big_eq, 1); bignumClass.defineMethod("-@", CallbackFactory.getMethod(RubyBignum.class, "op_uminus")); bignumClass.defineMethod("modulo", CallbackFactory.getMethod(RubyBignum.class, "op_mod", RubyObject.class)); bignumClass.defineMethod("remainder", CallbackFactory.getMethod(RubyBignum.class, "remainder", RubyObject.class)); bignumClass.defineMethod("to_s", CallbackFactory.getMethod(RubyBignum.class, "to_s")); bignumClass.defineMethod("coerce", CallbackFactory.getMethod(RubyBignum.class, "coerce", RubyObject.class)); bignumClass.defineMethod("to_f", CallbackFactory.getMethod(RubyBignum.class, "to_f")); bignumClass.defineMethod("+", CallbackFactory.getMethod(RubyBignum.class, "op_plus", RubyObject.class)); bignumClass.defineMethod("-", CallbackFactory.getMethod(RubyBignum.class, "op_minus", RubyObject.class)); bignumClass.defineMethod("*", CallbackFactory.getMethod(RubyBignum.class, "op_mul", RubyObject.class)); bignumClass.defineMethod("/", CallbackFactory.getMethod(RubyBignum.class, "op_div", RubyObject.class)); bignumClass.defineMethod("%", CallbackFactory.getMethod(RubyBignum.class, "op_mod", RubyObject.class)); bignumClass.defineMethod("&", CallbackFactory.getMethod(RubyBignum.class, "op_and", RubyObject.class)); bignumClass.defineMethod("**", CallbackFactory.getMethod(RubyBignum.class, "op_pow", RubyObject.class)); bignumClass.defineMethod("<<", CallbackFactory.getMethod(RubyBignum.class, "op_lshift", RubyObject.class)); bignumClass.defineMethod(">>", CallbackFactory.getMethod(RubyBignum.class, "op_rshift", RubyObject.class)); bignumClass.defineMethod("==", CallbackFactory.getMethod(RubyBignum.class, "op_equal", RubyObject.class)); bignumClass.defineMethod("<=>", CallbackFactory.getMethod(RubyBignum.class, "op_cmp", RubyObject.class)); bignumClass.defineMethod(">", CallbackFactory.getMethod(RubyBignum.class, "op_gt", RubyObject.class)); bignumClass.defineMethod(">=", CallbackFactory.getMethod(RubyBignum.class, "op_ge", RubyObject.class)); bignumClass.defineMethod("<", CallbackFactory.getMethod(RubyBignum.class, "op_lt", RubyObject.class)); bignumClass.defineMethod("<=", CallbackFactory.getMethod(RubyBignum.class, "op_le", RubyObject.class)); bignumClass.defineMethod("|", CallbackFactory.getMethod(RubyBignum.class, "op_or", RubyInteger.class)); bignumClass.defineMethod("^", CallbackFactory.getMethod(RubyBignum.class, "op_xor", RubyInteger.class)); bignumClass.defineMethod("[]", CallbackFactory.getMethod(RubyBignum.class, "aref", RubyInteger.class)); bignumClass.defineMethod("size", CallbackFactory.getMethod(RubyBignum.class, "size")); return bignumClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0907240b4b4a4379424377e971ed0ca23f1dcb/RubyBignum.java/buggy/org/jruby/RubyBignum.java |
|
dialogType = COMMENT_TYPE; | public MessengerDialog(JFrame parent, String title, String emailAddress) { super(parent); this.emailAddress = emailAddress; initialize(title); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/43f8c678f03aa7cac6a19865461c28a00cf7eb2b/MessengerDialog.java/buggy/SRC/org/openmicroscopy/shoola/util/ui/MessengerDialog.java |
|
commentArea.setOpaque(true); | private void initComponents() { cancelButton = new JButton("Cancel"); formatButton(cancelButton, 'C', CANCEL_TOOLTIP); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { close(); } }); sendButton = new JButton("Send"); formatButton(sendButton, 'S', SEND_TOOLTIP); sendButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { send(); } }); emailArea = new JTextField(20); emailArea.setToolTipText(EMAIL_TOOLTIP); emailArea.setText(emailAddress); commentArea = new MultilineLabel(); commentArea.setEditable(true); if (exception != null) { debugArea = buildExceptionArea(); copyButton = new JButton("Copy to Clipboard"); formatButton(cancelButton, 'C', COPY_TOOLTIP); copyButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { copy(); } }); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/43f8c678f03aa7cac6a19865461c28a00cf7eb2b/MessengerDialog.java/buggy/SRC/org/openmicroscopy/shoola/util/ui/MessengerDialog.java |
|
result = CommandLineBuilder.preprocessCommandLineArguments( args); | CommandLineBuilder.preprocessCommandLineArguments( args); | public void testCommandsFileOption() throws Exception { String[] args = { "Hello", "world" }; String[] result = CommandLineBuilder.preprocessCommandLineArguments( args); assertSame( args, result); try { args = new String[]{ "Hello", "--commandsfile" }; result = CommandLineBuilder.preprocessCommandLineArguments( args); fail( "IllegalArgumentException expected"); } catch( IllegalArgumentException ex) {} try { args = new String[]{ "Hello", "--commandsfile", "hello.cmd" }; result = CommandLineBuilder.preprocessCommandLineArguments( args); fail( "IO Exception expected"); } catch( IOException ex) {} } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/929ee7efcecd8f392160acb5bd9a106f9661b9ab/CommandLineBuilderTest.java/clean/cobertura/test/net/sourceforge/cobertura/util/CommandLineBuilderTest.java |
result = CommandLineBuilder.preprocessCommandLineArguments( args); | CommandLineBuilder.preprocessCommandLineArguments( args); | public void testCommandsFileOption() throws Exception { String[] args = { "Hello", "world" }; String[] result = CommandLineBuilder.preprocessCommandLineArguments( args); assertSame( args, result); try { args = new String[]{ "Hello", "--commandsfile" }; result = CommandLineBuilder.preprocessCommandLineArguments( args); fail( "IllegalArgumentException expected"); } catch( IllegalArgumentException ex) {} try { args = new String[]{ "Hello", "--commandsfile", "hello.cmd" }; result = CommandLineBuilder.preprocessCommandLineArguments( args); fail( "IO Exception expected"); } catch( IOException ex) {} } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/929ee7efcecd8f392160acb5bd9a106f9661b9ab/CommandLineBuilderTest.java/clean/cobertura/test/net/sourceforge/cobertura/util/CommandLineBuilderTest.java |
return ConfigHelper.getDaoConfigLocations(); | return ConfigHelper.getDbUnitConfigLocations(); | protected String[] getConfigLocations() { return ConfigHelper.getDaoConfigLocations(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1713e2c03207b5a19e514c71f0f3e4c76ef3e020/AbstractDbUnitTest.java/buggy/components/server/test/ome/server/itests/AbstractDbUnitTest.java |
public DataObject createDataObject(DataObject child, DataObject parent) throws DSOutOfServiceException, DSAccessException { if (child == null) throw new IllegalArgumentException("The child cannot be null."); IObject obj = ModelMapper.createIObject(child, parent); if (obj == null) throw new NullPointerException("Cannot convert object."); IObject created = gateway.createObject(obj, (new PojoOptions()).map()); //DataObject doCreated = PojoMapper.asDataObject(created); if (parent != null) ModelMapper.linkParentToChild(created, parent.asIObject()); return PojoMapper.asDataObject(created); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/40984700ba5db4e65aba265d499ced4afa7d4661/OmeroServiceImpl.java/clean/SRC/org/openmicroscopy/shoola/env/data/OmeroServiceImpl.java |
||
ModelMapper.linkParentToChild(created, parent.asIObject()); | ModelMapper.linkParentToChild(created, parent.asIObject()); | public DataObject createDataObject(DataObject child, DataObject parent) throws DSOutOfServiceException, DSAccessException { if (child == null) throw new IllegalArgumentException("The child cannot be null."); IObject obj = ModelMapper.createIObject(child, parent); if (obj == null) throw new NullPointerException("Cannot convert object."); IObject created = gateway.createObject(obj, (new PojoOptions()).map()); //DataObject doCreated = PojoMapper.asDataObject(created); if (parent != null) ModelMapper.linkParentToChild(created, parent.asIObject()); return PojoMapper.asDataObject(created); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/40984700ba5db4e65aba265d499ced4afa7d4661/OmeroServiceImpl.java/clean/SRC/org/openmicroscopy/shoola/env/data/OmeroServiceImpl.java |
IObject updated = gateway.updateObject(object.asIObject(), | IObject ob = object.asIObject(); IObject updated = gateway.updateObject(ob, | public DataObject updateDataObject(DataObject object) throws DSOutOfServiceException, DSAccessException { if (object == null) throw new DSAccessException("No object to update."); IObject updated = gateway.updateObject(object.asIObject(), (new PojoOptions()).map()); return PojoMapper.asDataObject(updated); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/40984700ba5db4e65aba265d499ced4afa7d4661/OmeroServiceImpl.java/clean/SRC/org/openmicroscopy/shoola/env/data/OmeroServiceImpl.java |
public static IObject createIObject(DataObject child, DataObject parent) { if (child instanceof ProjectData) { ProjectData data = (ProjectData) child; Project model = new Project(); model.setName(data.getName()); model.setDescription(data.getDescription()); return model; } else if (child instanceof CategoryGroupData) { CategoryGroupData data = (CategoryGroupData) child; CategoryGroup model = new CategoryGroup(); model.setName(data.getName()); model.setDescription(data.getDescription()); return model; } else if (child instanceof DatasetData) { if (!(parent instanceof ProjectData)) throw new IllegalArgumentException("Parent not valid."); DatasetData data = (DatasetData) child; Dataset model = new Dataset(); model.setName(data.getName()); model.setDescription(data.getDescription()); model.linkProject(new Project(new Long(parent.getId()), false)); return model; } else if (child instanceof CategoryData) { if (!(parent instanceof CategoryGroupData)) throw new IllegalArgumentException("Parent not valid."); CategoryData data = (CategoryData) child; Category model = new Category(); model.setName(data.getName()); model.setDescription(data.getDescription()); model.linkCategoryGroup(new CategoryGroup(new Long(parent.getId()), false)); return model; } else if (child instanceof ImageData) { if (!(parent instanceof CategoryData) && !(parent instanceof DatasetData)) throw new IllegalArgumentException("Parent not valid."); ImageData data = (ImageData) child; Image model = new Image(); model.setName(data.getName()); model.setDescription(data.getDescription()); if (parent instanceof CategoryData) model.linkCategory(new Category(new Long(parent.getId()), false)); else if (parent instanceof DatasetData) model.linkDataset(new Dataset(new Long(parent.getId()), false)); return model; } throw new IllegalArgumentException("DataObject not supported."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/40984700ba5db4e65aba265d499ced4afa7d4661/ModelMapper.java/buggy/SRC/org/openmicroscopy/shoola/env/data/util/ModelMapper.java |
||
Project p = ((Project) parent); Dataset d = ((Dataset) child); Set links = d.findProjectDatasetLink(p); if (links != null) { Iterator i = links.iterator(); int j = 0; while (i.hasNext()) { System.out.println("creation: "+j); p.addProjectDatasetLink((ProjectDatasetLink) i.next(), false); } | Project p = (Project) parent; Dataset d = (Dataset) child; ProjectDatasetLink link; Iterator it = d.iterateProjectLinks(); while (it.hasNext()) { link = (ProjectDatasetLink) it.next(); if (p.getId().equals(link.parent().getId())) p.addProjectDatasetLink(link, false); | public static void linkParentToChild(IObject child, IObject parent) { if (parent == null) return; if (child == null) throw new IllegalArgumentException("Child cannot" + "be null."); if (parent instanceof Project) { if (!(child instanceof Dataset)) throw new IllegalArgumentException("Child not valid."); Project p = ((Project) parent); Dataset d = ((Dataset) child); Set links = d.findProjectDatasetLink(p); if (links != null) { Iterator i = links.iterator(); int j = 0; while (i.hasNext()) { System.out.println("creation: "+j); p.addProjectDatasetLink((ProjectDatasetLink) i.next(), false); } } //((ProjectData) parent).getDatasets().add(child); // (parent.asProject()).linkDataset(child.asDataset()); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/40984700ba5db4e65aba265d499ced4afa7d4661/ModelMapper.java/buggy/SRC/org/openmicroscopy/shoola/env/data/util/ModelMapper.java |
} | } else if (parent instanceof CategoryGroup) { if (!(child instanceof Category)) throw new IllegalArgumentException("Child not valid."); CategoryGroup p = (CategoryGroup) parent; Category d = (Category) child; CategoryGroupCategoryLink link; Iterator it = d.iterateCategoryGroupLinks(); while (it.hasNext()) { link = (CategoryGroupCategoryLink) it.next(); if (p.getId().equals(link.parent().getId())) p.addCategoryGroupCategoryLink(link, false); } } else if (parent instanceof Dataset) { if (!(child instanceof Image)) throw new IllegalArgumentException("Child not valid."); Dataset p = (Dataset) parent; Image d = (Image) child; DatasetImageLink link; Iterator it = d.iterateDatasetLinks(); while (it.hasNext()) { link = (DatasetImageLink) it.next(); if (p.getId().equals(link.parent().getId())) p.addDatasetImageLink(link, false); } } else if (parent instanceof Category) { if (!(child instanceof Image)) throw new IllegalArgumentException("Child not valid."); Category p = (Category) parent; Image d = (Image) child; CategoryImageLink link; Iterator it = d.iterateCategoryLinks(); while (it.hasNext()) { link = (CategoryImageLink) it.next(); if (p.getId().equals(link.parent().getId())) p.addCategoryImageLink(link, false); } } | public static void linkParentToChild(IObject child, IObject parent) { if (parent == null) return; if (child == null) throw new IllegalArgumentException("Child cannot" + "be null."); if (parent instanceof Project) { if (!(child instanceof Dataset)) throw new IllegalArgumentException("Child not valid."); Project p = ((Project) parent); Dataset d = ((Dataset) child); Set links = d.findProjectDatasetLink(p); if (links != null) { Iterator i = links.iterator(); int j = 0; while (i.hasNext()) { System.out.println("creation: "+j); p.addProjectDatasetLink((ProjectDatasetLink) i.next(), false); } } //((ProjectData) parent).getDatasets().add(child); // (parent.asProject()).linkDataset(child.asDataset()); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/40984700ba5db4e65aba265d499ced4afa7d4661/ModelMapper.java/buggy/SRC/org/openmicroscopy/shoola/env/data/util/ModelMapper.java |
void deleteObject(IObject object, Map options) | void deleteObject(IObject object) | void deleteObject(IObject object, Map options) throws DSOutOfServiceException, DSAccessException { try { //IPojos service = getIPojosService(); IUpdate service = getIUpdateService(); service.deleteObject(object); } catch (Exception e) { handleException(e, "Cannot delete the object."); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3be9d381a3d593d28d0b987df4bc2963a9fa97b8/OMEROGateway.java/buggy/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java |
void deleteObject(IObject object, Map options) throws DSOutOfServiceException, DSAccessException { try { //IPojos service = getIPojosService(); IUpdate service = getIUpdateService(); service.deleteObject(object); } catch (Exception e) { handleException(e, "Cannot delete the object."); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3be9d381a3d593d28d0b987df4bc2963a9fa97b8/OMEROGateway.java/buggy/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java |
||
jidField = new JTextField(); ResourceUtils.resLabel(jidLabel, jidField, "&JID:"); add(jidLabel, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(jidField, new GridBagConstraints(1, 6, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); jidLabel.setVisible(false); jidField.setVisible(false); | public PersonalPanel() { setLayout(new GridBagLayout()); // Handle First Name JLabel firstNameLabel = new JLabel(); firstNameField = new JTextField(); ResourceUtils.resLabel(firstNameLabel, firstNameField, "&First Name:"); add(firstNameLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(firstNameField, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); // Handle Middle Name JLabel middleNameLabel = new JLabel(); middleNameField = new JTextField(); ResourceUtils.resLabel(middleNameLabel, middleNameField, "&Middle Name:"); add(middleNameLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(middleNameField, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); // Handle Last Name JLabel lastNameLabel = new JLabel(); lastNameField = new JTextField(); ResourceUtils.resLabel(lastNameLabel, lastNameField, "&Last Name:"); add(lastNameLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(lastNameField, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); // Handle Nickname JLabel nicknameLabel = new JLabel(); nicknameField = new JTextField(); ResourceUtils.resLabel(nicknameLabel, nicknameField, "&Nickname:"); add(nicknameLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(nicknameField, new GridBagConstraints(1, 4, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); // Handle Email Address JLabel emaiAddressLabel = new JLabel(); emailAddressField = new JTextField(); ResourceUtils.resLabel(emaiAddressLabel, emailAddressField, "&Email Address:"); add(emaiAddressLabel, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(emailAddressField, new GridBagConstraints(1, 5, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/0807e1b794eeaa6c07d31a5c351697146a85040b/PersonalPanel.java/buggy/src/java/org/jivesoftware/sparkimpl/profile/PersonalPanel.java |
|
System.err.println("notify"); | public void fireUpdated() { notifyUpdate(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0e4e3c4b5f21d2217fc02b1e6846dac6de60570f/ColorMapModel.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/colormap/ColorMapModel.java |
|
System.err.println("notifying"); | private void notifyUpdate() { for(Iterator iter = modelListeners.iterator(); iter.hasNext();) { ColorMapModelListener listener = (ColorMapModelListener)iter.next(); listener.modelUpdated(this); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0e4e3c4b5f21d2217fc02b1e6846dac6de60570f/ColorMapModel.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/colormap/ColorMapModel.java |
|
manager.setOutputStartBox(yStart); manager.setOutputEndBox(yEnd); | PlaneSlicingDialog(QuantumPaneManager control, PlaneSlicingContext psCtx) { super(control.getReferenceFrame(), "Plane Slicing", true); manager = new PlaneSlicingDialogManager(this, control, psCtx); int yStart, yEnd, s, e; s = control.getCodomainStart(); e = control.getCodomainEnd(); yStart = TB+manager.convertRealIntoGraphics(psCtx.getLowerLimit(), s-e, e); yEnd = TB+manager.convertRealIntoGraphics(psCtx.getUpperLimit(), s-e, e); psPanel = new PlaneSlicingPanel(yStart, yEnd); pssPanel = new PlaneSlicingStaticPanel(); boolean constant = psCtx.IsConstant(); psPanel.setIsSelected(constant); pssPanel.setIsSelected(!constant); manager.setOutputStartBox(yStart); manager.setOutputEndBox(yEnd); Integer pSelected = new Integer(psCtx.getPlaneSelected()); Integer j = (Integer) rBitPlanes.get(pSelected); int i = PlaneSlicingDialogManager.B_SEVEN; if (j != null) i = j.intValue(); initialize(i, constant); manager.attachListeners(); buildGUI(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6a28b54c142c80cf786f76c45b6be256d92fd0bb/PlaneSlicingDialog.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/PlaneSlicingDialog.java |
|
super.repaint(); | private void buildGUI() { Container contentPane = super.getContentPane(); contentPane.setLayout(null); psPanel.setBounds(0, 0, PlaneSlicingPanel.WIDTH, PlaneSlicingPanel.HEIGHT); pssPanel.setBounds(PlaneSlicingPanel.WIDTH, 0, PlaneSlicingPanel.WIDTH, PlaneSlicingPanel.HEIGHT); contentPane.add(psPanel); contentPane.add(pssPanel); contentPane.add(buildRadioGroupPanel()); setSize(WIDTH_WIN, HEIGHT_WIN); setResizable(false); super.repaint(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6a28b54c142c80cf786f76c45b6be256d92fd0bb/PlaneSlicingDialog.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/PlaneSlicingDialog.java |
|
{ return eventManager.getReferenceFrame(); } | { return eventManager.getReferenceFrame(); } | RenderingAgtUIF getReferenceFrame() { return eventManager.getReferenceFrame(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java |
super.repaint(); | repaint(); | PlaneSlicingPanel(int yStart, int yEnd) { isSelected = true; setKnobOutputStart(leftBorder-10, yStart); setKnobOutputEnd(lS+10, yEnd); startPt = new Point2D.Double(); endPt = new Point2D.Double(); startPt.setLocation((double) leftBorder, (double) yStart); endPt.setLocation((double) lS, (double) yEnd); super.repaint(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6a28b54c142c80cf786f76c45b6be256d92fd0bb/PlaneSlicingPanel.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/PlaneSlicingPanel.java |
chain.setID(e.getID()); | chain.setID(c.getID()); | public static List fillChainExecutions(List execs,ChainExecutionData ceProto, DatasetData dsProto,AnalysisChainData acProto,NodeExecutionData neProto,AnalysisNodeData anProto,ModuleData mProto,ModuleExecutionData meProto) { List execList= new ArrayList(); //The returned summary list. Iterator i = execs.iterator(); ChainExecution e; ChainExecutionData exec; Dataset d; DatasetData ds; AnalysisChain c; AnalysisChainData chain; while (i.hasNext()) { e = (ChainExecution) i.next(); //Make a new DataObject and fill it up. exec = (ChainExecutionData) ceProto.makeNew(); exec.setID(e.getID()); exec.setTimestamp(e.getTimestamp()); // dataset d = e.getDataset(); ds = (DatasetData) dsProto.makeNew(); ds.setID(d.getID()); exec.setDataset(ds); //chain c = e.getChain(); chain = (AnalysisChainData) acProto.makeNew(); chain.setID(e.getID()); exec.setChain(chain); //node executions getNodeExecutions(exec,e,neProto,anProto,mProto,meProto); execList.add(exec); } return execList; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0834b4fce155e5ccf4c79a468b33da5aa305540b/ChainExecutionMapper.java/clean/SRC/org/openmicroscopy/shoola/env/data/map/ChainExecutionMapper.java |
charWidth = getFontMetrics(getFont()).charWidth('m'); | ToolBar(ImViewerControl controller, ImViewerModel model) { if (controller == null) throw new NullPointerException("No control."); if (model == null) throw new NullPointerException("No model."); this.controller = controller; this.model = model; charWidth = getFontMetrics(getFont()).charWidth('m'); initComponents(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bbd964029121f2811ba2b7cf47a392087032888c/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ToolBar.java |
|
if (javaName.equals("getElementAt")) { | if (javaName.equals("get")) { return "[]"; } else if (javaName.equals("set")) { return "[]="; } else if (javaName.equals("getElementAt")) { | private String toRubyName(String javaName) { if (javaName.equals("getElementAt")) { return "[]"; } else if (javaName.equals("getValueAt")) { return "[]"; } else if (javaName.equals("setValueAt")) { return "[]="; } else if (javaName.startsWith("get")) { return Character.toLowerCase(javaName.charAt(3)) + javaName.substring(4); } else if (javaName.startsWith("is")) { return Character.toLowerCase(javaName.charAt(2)) + javaName.substring(3) + "?"; } else if (javaName.startsWith("can")) { return javaName + "?"; } else if (javaName.startsWith("has")) { return javaName + "?"; } else if (javaName.startsWith("set")) { return Character.toLowerCase(javaName.charAt(3)) + javaName.substring(4) + "="; } else if (javaName.equals("compareTo")) { return "<=>"; } return javaName; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/263d8797aa5be7bc604097d1d483cf474b827c91/JavaSupport.java/buggy/org/jruby/javasupport/JavaSupport.java |
public JavaEachMethod(String hasNextMethod, String nextMethod) { | public JavaEachMethod(String iteratorMethod, String hasNextMethod, String nextMethod) { this.iteratorMethod = iteratorMethod; | public JavaEachMethod(String hasNextMethod, String nextMethod) { this.hasNextMethod = hasNextMethod; this.nextMethod = nextMethod; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1ceedf02ac15d7325cfcf505ca74f35c5bc4a258/JavaEachMethod.java/buggy/org/jruby/javasupport/JavaEachMethod.java |
assertEscape("\u00F7","÷"); | public void testEscaping () throws Exception { assertEscape("<B>", "<B>"); assertEscape("\u00f6", "ö"); assertEscape("\u00a9", "©"); assertEscape("\u00a3", "£"); assertEscape("\u0080", "€"); assertEscape("This is a test: \u0080\u0080\u0080 is better than" + "\u00a3\u00a3\u00a3!", "This is a test: €€€ is better than" + "£££!" ); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/1393dc585a791b297d70264c35e139541f60d1a1/TestHTMLEscaper.java/clean/webmacro/test/unit/org/webmacro/util/TestHTMLEscaper.java |
|
} catch (EOFException e) { return getRuntime().getNil(); | public IRubyObject each_byte() { try { for (int c = handler.getc(); c != -1; c = handler.getc()) { assert c < 256; getRuntime().getCurrentContext().yield(getRuntime().newFixnum(c)); } return getRuntime().getNil(); } catch (IOHandler.BadDescriptorException e) { throw getRuntime().newErrnoEBADFError(); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyIO.java/clean/src/org/jruby/RubyIO.java |
|
} catch (IOHandler.BadDescriptorException e) { throw getRuntime().newErrnoEBADFError(); | public RubyFixnum fsync() { checkWriteable(); try { handler.sync(); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } return RubyFixnum.zero(getRuntime()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyIO.java/clean/src/org/jruby/RubyIO.java |
|
return handler.getInputStream(); | if (handler instanceof IOHandlerJavaIO) { return ((IOHandlerJavaIO) handler).getInputStream(); } else { return null; } | public InputStream getInStream() { return handler.getInputStream(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyIO.java/clean/src/org/jruby/RubyIO.java |
return handler.getOutputStream(); | if(handler instanceof IOHandlerJavaIO) { return ((IOHandlerJavaIO) handler).getOutputStream(); } else { return null; } | public OutputStream getOutStream() { return handler.getOutputStream(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyIO.java/clean/src/org/jruby/RubyIO.java |
} catch (EOFException e) { return getRuntime().getNil(); | public IRubyObject getc() { checkReadable(); try { int c = handler.getc(); return c == -1 ? getRuntime().getNil() : getRuntime().newFixnum(c); } catch (IOHandler.BadDescriptorException e) { throw getRuntime().newErrnoEBADFError(); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyIO.java/clean/src/org/jruby/RubyIO.java |
|
} catch (EOFException e) { return getRuntime().getNil(); | public IRubyObject read(IRubyObject[] args) { try { String buf = args.length > 0 ? handler.read(RubyNumeric.fix2int(args[0])) : handler.getsEntireStream(); if (buf == null) { if (args.length > 0) { return getRuntime().getNil(); } return getRuntime().newString(""); } return getRuntime().newString(buf); } catch (IOHandler.BadDescriptorException e) { throw getRuntime().newErrnoEBADFError(); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyIO.java/clean/src/org/jruby/RubyIO.java |
|
} catch (EOFException e) { throw getRuntime().newEOFError(); | public IRubyObject readchar() { checkReadable(); try { int c = handler.getc(); if (c == -1) { throw getRuntime().newEOFError(); } return getRuntime().newFixnum(c); } catch (IOHandler.BadDescriptorException e) { throw getRuntime().newErrnoEBADFError(); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyIO.java/clean/src/org/jruby/RubyIO.java |
|
throw getRuntime().newErrnoEBADFError(); | throw getRuntime().newErrnoEBADFError(); } catch (EOFException e) { return getRuntime().getNil(); | public IRubyObject reopen(IRubyObject[] args) { if (args.length < 1) { throw getRuntime().newArgumentError("wrong number of arguments"); } if (args[0].isKindOf(getRuntime().getClass("IO"))) { RubyIO ios = (RubyIO) args[0]; int keepFileno = handler.getFileno(); // close the old handler before it gets overwritten if (handler.isOpen()) { try { handler.close(); } catch (IOHandler.BadDescriptorException e) { throw getRuntime().newErrnoEBADFError(); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } } // When we reopen, we want our fileno to be preserved even // though we have a new IOHandler. // Note: When we clone we get a new fileno...then we replace it. // This ends up incrementing our fileno index up, which makes the // fileno we choose different from ruby. Since this seems a bit // too implementation specific, I did not bother trying to get // these to agree (what scary code would depend on fileno generating // a particular way?) try { handler = ios.handler.cloneIOHandler(); } catch (IOHandler.InvalidValueException e) { throw getRuntime().newErrnoEINVALError(); } catch (IOHandler.PipeException e) { throw getRuntime().newErrnoESPIPEError(); } catch (FileNotFoundException e) { throw getRuntime().newErrnoENOENTError(); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } handler.setFileno(keepFileno); // Update fileno list with our new handler registerIOHandler(handler); } else if (args[0].isKindOf(getRuntime().getClass("String"))) { String path = ((RubyString) args[0]).toString(); String mode = "r"; if (args.length > 1) { if (!args[1].isKindOf(getRuntime().getClass("String"))) { throw getRuntime().newTypeError(args[1], getRuntime().getClass("String")); } mode = ((RubyString) args[1]).toString(); } try { if (handler != null) { close(); } modes = new IOModes(getRuntime(), mode); handler = new IOHandlerSeekable(getRuntime(), path, modes); registerIOHandler(handler); } catch (IOHandler.InvalidValueException e) { throw getRuntime().newErrnoEINVALError(); } catch (IOException e) { throw getRuntime().newIOError(e.toString()); } } // A potentially previously close IO is being 'reopened'. isOpen = true; return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyIO.java/clean/src/org/jruby/RubyIO.java |
return newStruct(rbClass, values); | RubyStruct result = newStruct(rbClass, values); input.register(result); return result; | public static RubyStruct unmarshalFrom(UnmarshalStream input) throws java.io.IOException { Ruby ruby = input.getRuntime(); RubySymbol className = (RubySymbol) input.unmarshalObject(); RubyClass rbClass = pathToClass(ruby, className.toId()); if (rbClass == null) { throw new NameError(ruby, "uninitialized constant " + className); } int size = input.unmarshalInt(); IRubyObject[] values = new IRubyObject[size]; for (int i = 0; i < size; i++) { input.unmarshalObject(); // Read and discard a Symbol, which is the name values[i] = input.unmarshalObject(); } return newStruct(rbClass, values); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9db4d278a734c4fdfd9a83ed95575a45577f1e1b/RubyStruct.java/buggy/org/jruby/RubyStruct.java |
return "constant-property:" + _vname; | return "constant-property:" + getVariableName(); | public final String toString () { return "constant-property:" + _vname; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/976cc762ab65b58fbb5a81d83d913780b9d31fd4/ConstantPropertyVariable.java/clean/webmacro/src/org/webmacro/engine/ConstantPropertyVariable.java |
_vname = makeName(names).intern(); | Variable (Object names[]) { _vname = makeName(names).intern(); _names = names; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/976cc762ab65b58fbb5a81d83d913780b9d31fd4/Variable.java/buggy/webmacro/src/org/webmacro/engine/Variable.java |
|
public String getVariableName () | public synchronized String getVariableName () | public String getVariableName () { return _vname; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/976cc762ab65b58fbb5a81d83d913780b9d31fd4/Variable.java/buggy/webmacro/src/org/webmacro/engine/Variable.java |
return _vname; | if (_vname == null) { _vname = makeName(_names).intern(); } return _vname; | public String getVariableName () { return _vname; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/976cc762ab65b58fbb5a81d83d913780b9d31fd4/Variable.java/buggy/webmacro/src/org/webmacro/engine/Variable.java |
getLayer().addChild(foregroundNode); | private void init(BrowserTopModel topModel) { env = BrowserEnvironment.getInstance(); setBackground(new Color(192,192,192)); backgroundNode = new BackgroundNode(); getLayer().addChild(backgroundNode); layoutMap = new HashMap(); footprint = new Rectangle2D.Double(0,0,0,0); hoverSensitive = new HashSet(); regionSensitive = new HashSet(); zoomParamListeners = new HashSet(); oldModeMap = new HashMap(); removeInputEventListener(getZoomEventHandler()); removeInputEventListener(getPanEventHandler()); // default panning mode (may replace this, but probably not) overlayCamera = new BrowserCamera(topModel,getCamera()); hoverSensitive.add(overlayCamera); regionSensitive.add(overlayCamera); browserViewListeners = new HashSet(); scaleToShow = true; addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent me) { for(Iterator iter = hoverSensitive.iterator(); iter.hasNext();) { HoverSensitive hover = (HoverSensitive)iter.next(); hover.contextEntered(); } } public void mouseExited(MouseEvent me) { for(Iterator iter = hoverSensitive.iterator(); iter.hasNext();) { HoverSensitive hover = (HoverSensitive)iter.next(); hover.contextExited(); } } }); // OK, now, dispatch to the underlying nodes addInputEventListener(BrowserViewEventDispatcher.getDefaultMouseHandler()); addInputEventListener(BrowserViewEventDispatcher.getDefaultDragHandler()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java |
|
System.err.println("repainting..."); | public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D)g; // cheapo hack to prevent apparent delay in annotation loading if(firstTimeShown) { Font font = new Font(null,Font.PLAIN,10); AttributedString str = new AttributedString("hi"); g2.setFont(font); FontRenderContext frc = g2.getFontRenderContext(); LineBreakMeasurer measurer = new LineBreakMeasurer(str.getIterator(),frc); firstTimeShown = false; } g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR); super.paintComponent(g2); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java |
|
getLayer().addChild(foregroundNode); | public void thumbnailAdded(Thumbnail t) { // apply the current UI modes... t.setMouseDownActions(defaultTDownActions); t.setMouseOverActions(defaultTOverActions); getLayer().addChild(t); updateThumbnails(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java |
|
getLayer().removeChild(foregroundNode); getLayer().addChild(foregroundNode); | public void thumbnailsAdded(Thumbnail[] ts) { if(ts == null || ts.length == 0) return; for(int i=0;i<ts.length;i++) { ts[i].setMouseDownActions(defaultTDownActions); ts[i].setMouseOverActions(defaultTOverActions); getLayer().addChild(ts[i]); } updateThumbnails(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java |
|
PBounds bounds = getCamera().getViewBounds(); foregroundNode.setOffset(new Point2D.Double(bounds.getX(), bounds.getY())); | public void updateConstraints() { Dimension dimension = getSize(); double width = dimension.getWidth(); double height = dimension.getHeight(); double xRatio = width / footprint.getWidth(); double yRatio = height / footprint.getHeight(); if(Math.min(xRatio,yRatio) != minZoomLevel) { minZoomLevel = Math.min(xRatio,yRatio); if(minZoomLevel < 0.05) { minZoomLevel = 0.05; } else if(minZoomLevel > 0.75) { minZoomLevel = 0.75; } for(Iterator iter = zoomParamListeners.iterator(); iter.hasNext();) { ZoomParamListener listener = (ZoomParamListener)iter.next(); listener.minZoomLevelChanged(minZoomLevel); } } // for some reason, setting setViewScale(0) screws things up // in a big way. if(scaleToShow) { if((xRatio < 1 || yRatio < 1) && (xRatio != 0 && yRatio != 0)) { double min = Math.min(xRatio,yRatio); getCamera().setViewScale(min); } else { getCamera().setViewScale(1); } } boundCameraPosition(); double viewScale = getCamera().getViewScale(); backgroundNode.setBounds(0,0,10000,10000); // to be realistic... (hack) // update things for(Iterator iter = regionSensitive.iterator(); iter.hasNext();) { RegionSensitive rs = (RegionSensitive)iter.next(); rs.setActiveRegion(footprint); } overlayCamera.cameraResized(new Rectangle2D.Double(0,0,width,height)); for(Iterator iter = zoomParamListeners.iterator(); iter.hasNext();) { ZoomParamListener listener = (ZoomParamListener)iter.next(); listener.zoomLevelChanged(viewScale); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java |
|
return Collections.EMPTY_LIST; | return EMPTY_LIST; | public List childNodes() { return Collections.EMPTY_LIST; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/ConstNode.java/buggy/src/org/jruby/ast/ConstNode.java |
dd.getTree().disposeTreeEditor(); | tree.disposeTreeEditor(); | public void finishRenameNote(Event e) { if ((e.type == SWT.KeyDown && e.keyCode == SWT.CR) || e.type == SWT.FocusOut) { dd.getTree().disposeTreeEditor(); } } | 57508 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57508/57d4036eb7167d2d27117abe1f0280376377dbaa/TreeController.java/clean/trunk/src/de/berlios/koalanotes/controllers/TreeController.java |
String newName = dd.getTree().getTreeEditorText(); DisplayedNote dn = dd.getTree().getSelectedNote(); dn.getNote().setName(newName); | String newName = tree.getTreeEditorText(); DisplayedNote dn = tree.getSelectedNote(); | public void renameNote(Event e) { String newName = dd.getTree().getTreeEditorText(); DisplayedNote dn = dd.getTree().getSelectedNote(); dn.getNote().setName(newName); dn.setName(newName); } | 57508 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57508/57d4036eb7167d2d27117abe1f0280376377dbaa/TreeController.java/clean/trunk/src/de/berlios/koalanotes/controllers/TreeController.java |
protected static String getMethodDescriptor(Class clazz, String methodName) { return clazz.getCanonicalName() + SEPARATOR + methodName; | protected static String getMethodDescriptor(Class controllerClass, String methodName) { return controllerClass.getCanonicalName() + SEPARATOR + methodName; | protected static String getMethodDescriptor(Class clazz, String methodName) { return clazz.getCanonicalName() + SEPARATOR + methodName; } | 57508 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57508/57d4036eb7167d2d27117abe1f0280376377dbaa/Controller.java/buggy/trunk/src/de/berlios/koalanotes/controllers/Controller.java |
note.setName(name); | public void setName(String name) { treeNode.setName(name); if (tab != null) tab.setName(name); } | 57508 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57508/57d4036eb7167d2d27117abe1f0280376377dbaa/DisplayedNote.java/buggy/trunk/src/de/berlios/koalanotes/display/DisplayedNote.java |
|
public testBothWays() throws Exception | public void testBothWays() throws Exception | public testBothWays() throws Exception { DataObject dO = (DataObject) mapper.map( p ); Project test = (Project) reverse.map( dO ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/7b5c704279f82fa929138305f70f2f5e6b462c69/Model2PojosMapperTest.java/buggy/components/shoola-adapter/test/ome/adapters/pojos/utests/Model2PojosMapperTest.java |
bean.load(itemResourcePath); | bean.setResourcePath(itemResourcePath); bean.load(); | public ContentItem loadContentItem(String itemResourcePath) { try { ArticleItemBean bean = new ArticleItemBean(); bean.setAutoCreateResource(isAutoCreateResource()); bean.load(itemResourcePath); return bean; } catch (Exception e) { e.printStackTrace(); } return null; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/9dd8a7f9883fa3785baebfbed97ebf38eba1add9/ArticleItemViewer.java/buggy/src/java/com/idega/block/article/component/ArticleItemViewer.java |
assertEquals(pp.toLong(),-37); | assertEquals(pp.toLong(),-35); | public void testLongValues() throws Exception { Perms pp = new Perms(); assertEquals(pp.toLong(),-1); pp.revoke(GROUP, WRITE); pp.revoke(WORLD, WRITE); assertEquals(pp.toLong(),-37); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ceddf537b0e23903b744a7152b96e277348680c1/PermissionsTest.java/buggy/components/common/test/ome/model/utests/PermissionsTest.java |
return new BufferedReader(new FileReader(myFile)); | return new BufferedReader(new InputStreamReader( new FileInputStream(myFile), myEncoding)); | protected Reader getReader() throws IOException { return new BufferedReader(new FileReader(myFile)); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/88d36323ffe7fe0fb49ed32b696ba5e32dca3489/FileTemplate.java/buggy/webmacro/src/org/webmacro/engine/FileTemplate.java |
e.getKeyChar() == KeyEvent.VK_ENTER) { | e.getKeyChar() == KeyEvent.VK_ENTER) { | private void checkForEnter(KeyEvent e) { final KeyStroke keyStroke = KeyStroke.getKeyStroke(e.getKeyCode(), e.getModifiers()); if (!keyStroke.equals(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_DOWN_MASK)) && e.getKeyChar() == KeyEvent.VK_ENTER) { e.consume(); sendMessage(); getChatInputEditor().setText(""); getChatInputEditor().setCaretPosition(0); } else if (keyStroke.equals(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_DOWN_MASK))) { final Document document = getChatInputEditor().getDocument(); try { document.insertString(getChatInputEditor().getCaretPosition(), "\n", null); getChatInputEditor().requestFocusInWindow(); chatAreaButton.getButton().setEnabled(true); } catch (BadLocationException badLoc) { Log.error("Error when checking for enter:", badLoc); } } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d657ce06cb211de7a00e47df72ad0f160ca4ee/ChatRoom.java/buggy/src/java/org/jivesoftware/spark/ui/ChatRoom.java |
"Confirmation", JOptionPane.YES_NO_OPTION); | "Confirmation", JOptionPane.YES_NO_OPTION); | private void init() { setLayout(new GridBagLayout()); add(splitPane, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); add(notificationLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 2, 5, 0), 0, 0)); // Remove Default Beveled Borders splitPane.setBorder(null); verticalSplit.setBorder(null); splitPane.setLeftComponent(verticalSplit); textScroller.setAutoscrolls(true); // Speed up scrolling. It was way too slow. textScroller.getVerticalScrollBar().setBlockIncrement(50); textScroller.getVerticalScrollBar().setUnitIncrement(20); chatWindowPanel = new JPanel(); chatWindowPanel.setLayout(new GridBagLayout()); chatWindowPanel.add(textScroller, new GridBagConstraints(0, 10, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); chatWindowPanel.setOpaque(false); // Layout Components chatPanel.add(chatWindowPanel, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); // Add edit buttons to Chat Room editorBar.setOpaque(false); chatPanel.setOpaque(false); editorBar.add(new JSeparator(JSeparator.VERTICAL)); bottomPanel.setOpaque(false); splitPane.setOpaque(false); bottomPanel.setLayout(new GridBagLayout()); bottomPanel.add(chatAreaButton, new GridBagConstraints(0, 1, 5, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 30)); bottomPanel.add(editorBar, new GridBagConstraints(0, 0, 5, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); verticalSplit.setOpaque(false); verticalSplit.setTopComponent(chatPanel); verticalSplit.setBottomComponent(bottomPanel); verticalSplit.setResizeWeight(1.0); verticalSplit.setDividerSize(2); // Add listener to send button chatAreaButton.getButton().addActionListener(this); // Add Key Listener to Send Field getChatInputEditor().getDocument().addDocumentListener(this); // Add Key Listener to Send Field getChatInputEditor().addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { checkForEnter(e); } }); getChatInputEditor().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ctrl F4"), "closeTheRoom"); getChatInputEditor().getActionMap().put("closeTheRoom", new AbstractAction("closeTheRoom") { public void actionPerformed(ActionEvent evt) { final int ok = JOptionPane.showConfirmDialog(SparkManager.getMainWindow(), "Would you like to close this chat?", "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { // Leave this chat. closeChatRoom(); } } }); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d657ce06cb211de7a00e47df72ad0f160ca4ee/ChatRoom.java/buggy/src/java/org/jivesoftware/spark/ui/ChatRoom.java |
"Confirmation", JOptionPane.YES_NO_OPTION); | "Confirmation", JOptionPane.YES_NO_OPTION); | public void actionPerformed(ActionEvent evt) { final int ok = JOptionPane.showConfirmDialog(SparkManager.getMainWindow(), "Would you like to close this chat?", "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { // Leave this chat. closeChatRoom(); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d657ce06cb211de7a00e47df72ad0f160ca4ee/ChatRoom.java/buggy/src/java/org/jivesoftware/spark/ui/ChatRoom.java |
JScrollBar sb = textScroller.getVerticalScrollBar(); sb.setValue(sb.getMaximum()); | try { JScrollBar sb = textScroller.getVerticalScrollBar(); sb.setValue(sb.getMaximum()); } catch (Exception e) { Log.error(e); } | public void scrollToBottom() { if (mousePressed) { return; } int chatLength = transcriptWindow.getDocument().getLength(); transcriptWindow.setCaretPosition(chatLength); JScrollBar sb = textScroller.getVerticalScrollBar(); sb.setValue(sb.getMaximum()); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d657ce06cb211de7a00e47df72ad0f160ca4ee/ChatRoom.java/buggy/src/java/org/jivesoftware/spark/ui/ChatRoom.java |
semanticLayer = new SemanticLayer(); | semanticLayer = new HoverManager(); | private void initActions(BrowserModel targetModel) { // theoretically shouldn't happen if(targetModel == null) { return; } defaultTDownActions = new MouseDownActions(); defaultTOverActions = new MouseOverActions(); selectThumbnailAction = PiccoloActionFactory.getSelectThumbnailAction(targetModel); defaultTDownActions.setMouseClickAction(PiccoloModifiers.NORMAL, selectThumbnailAction); defaultTDownActions.setMouseClickAction(PiccoloModifiers.POPUP, PiccoloActions.POPUP_MENU_ACTION); semanticLayer = new SemanticLayer(); semanticHoverThumbnailAction = PiccoloActionFactory.getSemanticEnterAction(semanticLayer); semanticExitThumbnailAction = PiccoloActionFactory.getSemanticExitAction(semanticLayer); defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, semanticHoverThumbnailAction); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, semanticExitThumbnailAction); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserView.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java |
PiccoloActionFactory.getSemanticExitAction(semanticLayer); | PiccoloActionFactory.getOverlayExitAction(semanticLayer); | private void initActions(BrowserModel targetModel) { // theoretically shouldn't happen if(targetModel == null) { return; } defaultTDownActions = new MouseDownActions(); defaultTOverActions = new MouseOverActions(); selectThumbnailAction = PiccoloActionFactory.getSelectThumbnailAction(targetModel); defaultTDownActions.setMouseClickAction(PiccoloModifiers.NORMAL, selectThumbnailAction); defaultTDownActions.setMouseClickAction(PiccoloModifiers.POPUP, PiccoloActions.POPUP_MENU_ACTION); semanticLayer = new SemanticLayer(); semanticHoverThumbnailAction = PiccoloActionFactory.getSemanticEnterAction(semanticLayer); semanticExitThumbnailAction = PiccoloActionFactory.getSemanticExitAction(semanticLayer); defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, semanticHoverThumbnailAction); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, semanticExitThumbnailAction); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserView.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java |
HtmlPanelGrid p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "headline"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); | HtmlPanelGrid p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "headline"), WFUtil.getText(":"))); | private UIComponent getEditContainer() { String ref = ARTICLE_ITEM_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID); em.addErrorMessage(PUBLISHED_FROM_DATE_ID); em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "headline"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(40); p.getChildren().add(headlineInput); HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); localeMenu.setOnchange("document.forms[0].submit();"); p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "teaser"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "author"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "440px", "30px"); p.getChildren().add(teaserArea); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(22); p.getChildren().add(authorInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "body"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "images"), WFUtil.getText(":"))); // HtmlInputTextarea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "460px", "400px"); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "100%", "400px"); bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); bodyArea.setAllowFontSelection(false); //HtmlCommandButton editButton = WFUtil.getButtonVB(EDIT_HTML_ID, bref + "edit"); //editButton.setOnclick("wurl='htmlarea/webface/htmledit.jsp?" + PREVIEW_ARTICLE_ITEM_ID + // "='+this.tabindex;window.open(wurl,'Edit','height=450,width=600,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');return false;"); //p.getChildren().add(WFUtil.group(WFUtil.group(bodyArea, WFUtil.getBreak()), editButton)); p.getChildren().add(bodyArea); WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getText(": 4/20/04 3:04PM"))); p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(WFUtil.getHeaderTextVB(bref + "status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "current_version"), WFUtil.getText(": 1.5"))); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "comment"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "400px", "60px"); p.getChildren().add(commentArea); WFContainer attachmentContainer = new WFContainer(); attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this)); attachmentContainer.add(WFUtil.getBreak()); attachmentContainer.add(getAttachmentList()); p.getChildren().add(attachmentContainer); mainContainer.add(p); p = WFPanelUtil.getFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); WFContainer contentItemContainer = new WFContainer(); contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this)); contentItemContainer.add(WFUtil.getBreak()); contentItemContainer.add(getRelatedContentItemsList()); p.getChildren().add(contentItemContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate"); publishedFromInput.setShowTime(true); p.getChildren().add(publishedFromInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate"); publishedToInput.setShowTime(true); p.getChildren().add(publishedToInput); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this); p.getChildren().add(editCategoriesButton); p.getChildren().add(WFUtil.getBreak()); WFComponentSelector cs = new WFComponentSelector(); cs.setId(BUTTON_SELECTOR_ID); cs.setDividerText(" "); HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, bref + "save", this); cs.add(saveButton); cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this)); cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this)); cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this)); cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this)); cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this)); cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this)); cs.setSelectedId(CANCEL_ID, true); p.getChildren().add(cs); mainContainer.add(p); WFComponentSelector editorSelector = new WFComponentSelector(); editorSelector.setId(EDITOR_SELECTOR_ID); editorSelector.add(mainContainer); editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); FileUploadForm f = new FileUploadForm(); f.setId(FILE_UPLOAD_FORM_ID); editorSelector.add(f); editorSelector.add(getRelatedContentItemsContainer()); editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); return editorSelector; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/72fe15183822be99f6dfa9d697bce89864c5f7d8/ArticleBlock.java/buggy/src/java/com/idega/block/article/component/ArticleBlock.java |
HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); localeMenu.setOnchange("document.forms[0].submit();"); p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "teaser"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "author"), WFUtil.getText(":"))); | p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "teaser"), WFUtil.getText(":"))); | private UIComponent getEditContainer() { String ref = ARTICLE_ITEM_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID); em.addErrorMessage(PUBLISHED_FROM_DATE_ID); em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "headline"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(40); p.getChildren().add(headlineInput); HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); localeMenu.setOnchange("document.forms[0].submit();"); p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "teaser"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "author"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "440px", "30px"); p.getChildren().add(teaserArea); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(22); p.getChildren().add(authorInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "body"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "images"), WFUtil.getText(":"))); // HtmlInputTextarea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "460px", "400px"); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "100%", "400px"); bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); bodyArea.setAllowFontSelection(false); //HtmlCommandButton editButton = WFUtil.getButtonVB(EDIT_HTML_ID, bref + "edit"); //editButton.setOnclick("wurl='htmlarea/webface/htmledit.jsp?" + PREVIEW_ARTICLE_ITEM_ID + // "='+this.tabindex;window.open(wurl,'Edit','height=450,width=600,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');return false;"); //p.getChildren().add(WFUtil.group(WFUtil.group(bodyArea, WFUtil.getBreak()), editButton)); p.getChildren().add(bodyArea); WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getText(": 4/20/04 3:04PM"))); p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(WFUtil.getHeaderTextVB(bref + "status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "current_version"), WFUtil.getText(": 1.5"))); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "comment"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "400px", "60px"); p.getChildren().add(commentArea); WFContainer attachmentContainer = new WFContainer(); attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this)); attachmentContainer.add(WFUtil.getBreak()); attachmentContainer.add(getAttachmentList()); p.getChildren().add(attachmentContainer); mainContainer.add(p); p = WFPanelUtil.getFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); WFContainer contentItemContainer = new WFContainer(); contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this)); contentItemContainer.add(WFUtil.getBreak()); contentItemContainer.add(getRelatedContentItemsList()); p.getChildren().add(contentItemContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate"); publishedFromInput.setShowTime(true); p.getChildren().add(publishedFromInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate"); publishedToInput.setShowTime(true); p.getChildren().add(publishedToInput); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this); p.getChildren().add(editCategoriesButton); p.getChildren().add(WFUtil.getBreak()); WFComponentSelector cs = new WFComponentSelector(); cs.setId(BUTTON_SELECTOR_ID); cs.setDividerText(" "); HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, bref + "save", this); cs.add(saveButton); cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this)); cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this)); cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this)); cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this)); cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this)); cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this)); cs.setSelectedId(CANCEL_ID, true); p.getChildren().add(cs); mainContainer.add(p); WFComponentSelector editorSelector = new WFComponentSelector(); editorSelector.setId(EDITOR_SELECTOR_ID); editorSelector.add(mainContainer); editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); FileUploadForm f = new FileUploadForm(); f.setId(FILE_UPLOAD_FORM_ID); editorSelector.add(f); editorSelector.add(getRelatedContentItemsContainer()); editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); return editorSelector; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/72fe15183822be99f6dfa9d697bce89864c5f7d8/ArticleBlock.java/buggy/src/java/com/idega/block/article/component/ArticleBlock.java |
p.getChildren().add(teaserArea); | p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "author"), WFUtil.getText(":"))); | private UIComponent getEditContainer() { String ref = ARTICLE_ITEM_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID); em.addErrorMessage(PUBLISHED_FROM_DATE_ID); em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "headline"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(40); p.getChildren().add(headlineInput); HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); localeMenu.setOnchange("document.forms[0].submit();"); p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "teaser"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "author"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "440px", "30px"); p.getChildren().add(teaserArea); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(22); p.getChildren().add(authorInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "body"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "images"), WFUtil.getText(":"))); // HtmlInputTextarea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "460px", "400px"); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "100%", "400px"); bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); bodyArea.setAllowFontSelection(false); //HtmlCommandButton editButton = WFUtil.getButtonVB(EDIT_HTML_ID, bref + "edit"); //editButton.setOnclick("wurl='htmlarea/webface/htmledit.jsp?" + PREVIEW_ARTICLE_ITEM_ID + // "='+this.tabindex;window.open(wurl,'Edit','height=450,width=600,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');return false;"); //p.getChildren().add(WFUtil.group(WFUtil.group(bodyArea, WFUtil.getBreak()), editButton)); p.getChildren().add(bodyArea); WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getText(": 4/20/04 3:04PM"))); p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(WFUtil.getHeaderTextVB(bref + "status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "current_version"), WFUtil.getText(": 1.5"))); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "comment"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "400px", "60px"); p.getChildren().add(commentArea); WFContainer attachmentContainer = new WFContainer(); attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this)); attachmentContainer.add(WFUtil.getBreak()); attachmentContainer.add(getAttachmentList()); p.getChildren().add(attachmentContainer); mainContainer.add(p); p = WFPanelUtil.getFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); WFContainer contentItemContainer = new WFContainer(); contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this)); contentItemContainer.add(WFUtil.getBreak()); contentItemContainer.add(getRelatedContentItemsList()); p.getChildren().add(contentItemContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate"); publishedFromInput.setShowTime(true); p.getChildren().add(publishedFromInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate"); publishedToInput.setShowTime(true); p.getChildren().add(publishedToInput); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this); p.getChildren().add(editCategoriesButton); p.getChildren().add(WFUtil.getBreak()); WFComponentSelector cs = new WFComponentSelector(); cs.setId(BUTTON_SELECTOR_ID); cs.setDividerText(" "); HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, bref + "save", this); cs.add(saveButton); cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this)); cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this)); cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this)); cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this)); cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this)); cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this)); cs.setSelectedId(CANCEL_ID, true); p.getChildren().add(cs); mainContainer.add(p); WFComponentSelector editorSelector = new WFComponentSelector(); editorSelector.setId(EDITOR_SELECTOR_ID); editorSelector.add(mainContainer); editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); FileUploadForm f = new FileUploadForm(); f.setId(FILE_UPLOAD_FORM_ID); editorSelector.add(f); editorSelector.add(getRelatedContentItemsContainer()); editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); return editorSelector; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/72fe15183822be99f6dfa9d697bce89864c5f7d8/ArticleBlock.java/buggy/src/java/com/idega/block/article/component/ArticleBlock.java |
p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "images"), WFUtil.getText(":"))); | private UIComponent getEditContainer() { String ref = ARTICLE_ITEM_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID); em.addErrorMessage(PUBLISHED_FROM_DATE_ID); em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "headline"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(40); p.getChildren().add(headlineInput); HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); localeMenu.setOnchange("document.forms[0].submit();"); p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "teaser"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "author"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "440px", "30px"); p.getChildren().add(teaserArea); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(22); p.getChildren().add(authorInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "body"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "images"), WFUtil.getText(":"))); // HtmlInputTextarea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "460px", "400px"); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "100%", "400px"); bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); bodyArea.setAllowFontSelection(false); //HtmlCommandButton editButton = WFUtil.getButtonVB(EDIT_HTML_ID, bref + "edit"); //editButton.setOnclick("wurl='htmlarea/webface/htmledit.jsp?" + PREVIEW_ARTICLE_ITEM_ID + // "='+this.tabindex;window.open(wurl,'Edit','height=450,width=600,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');return false;"); //p.getChildren().add(WFUtil.group(WFUtil.group(bodyArea, WFUtil.getBreak()), editButton)); p.getChildren().add(bodyArea); WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getText(": 4/20/04 3:04PM"))); p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(WFUtil.getHeaderTextVB(bref + "status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "current_version"), WFUtil.getText(": 1.5"))); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "comment"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "400px", "60px"); p.getChildren().add(commentArea); WFContainer attachmentContainer = new WFContainer(); attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this)); attachmentContainer.add(WFUtil.getBreak()); attachmentContainer.add(getAttachmentList()); p.getChildren().add(attachmentContainer); mainContainer.add(p); p = WFPanelUtil.getFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); WFContainer contentItemContainer = new WFContainer(); contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this)); contentItemContainer.add(WFUtil.getBreak()); contentItemContainer.add(getRelatedContentItemsList()); p.getChildren().add(contentItemContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate"); publishedFromInput.setShowTime(true); p.getChildren().add(publishedFromInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate"); publishedToInput.setShowTime(true); p.getChildren().add(publishedToInput); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this); p.getChildren().add(editCategoriesButton); p.getChildren().add(WFUtil.getBreak()); WFComponentSelector cs = new WFComponentSelector(); cs.setId(BUTTON_SELECTOR_ID); cs.setDividerText(" "); HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, bref + "save", this); cs.add(saveButton); cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this)); cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this)); cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this)); cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this)); cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this)); cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this)); cs.setSelectedId(CANCEL_ID, true); p.getChildren().add(cs); mainContainer.add(p); WFComponentSelector editorSelector = new WFComponentSelector(); editorSelector.setId(EDITOR_SELECTOR_ID); editorSelector.add(mainContainer); editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); FileUploadForm f = new FileUploadForm(); f.setId(FILE_UPLOAD_FORM_ID); editorSelector.add(f); editorSelector.add(getRelatedContentItemsContainer()); editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); return editorSelector; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/72fe15183822be99f6dfa9d697bce89864c5f7d8/ArticleBlock.java/buggy/src/java/com/idega/block/article/component/ArticleBlock.java |
|
p.getChildren().add(bodyArea); WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); | private UIComponent getEditContainer() { String ref = ARTICLE_ITEM_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID); em.addErrorMessage(PUBLISHED_FROM_DATE_ID); em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "headline"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(40); p.getChildren().add(headlineInput); HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); localeMenu.setOnchange("document.forms[0].submit();"); p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "teaser"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "author"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "440px", "30px"); p.getChildren().add(teaserArea); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(22); p.getChildren().add(authorInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "body"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "images"), WFUtil.getText(":"))); // HtmlInputTextarea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "460px", "400px"); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "100%", "400px"); bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); bodyArea.setAllowFontSelection(false); //HtmlCommandButton editButton = WFUtil.getButtonVB(EDIT_HTML_ID, bref + "edit"); //editButton.setOnclick("wurl='htmlarea/webface/htmledit.jsp?" + PREVIEW_ARTICLE_ITEM_ID + // "='+this.tabindex;window.open(wurl,'Edit','height=450,width=600,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');return false;"); //p.getChildren().add(WFUtil.group(WFUtil.group(bodyArea, WFUtil.getBreak()), editButton)); p.getChildren().add(bodyArea); WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getText(": 4/20/04 3:04PM"))); p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(WFUtil.getHeaderTextVB(bref + "status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "current_version"), WFUtil.getText(": 1.5"))); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "comment"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "400px", "60px"); p.getChildren().add(commentArea); WFContainer attachmentContainer = new WFContainer(); attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this)); attachmentContainer.add(WFUtil.getBreak()); attachmentContainer.add(getAttachmentList()); p.getChildren().add(attachmentContainer); mainContainer.add(p); p = WFPanelUtil.getFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); WFContainer contentItemContainer = new WFContainer(); contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this)); contentItemContainer.add(WFUtil.getBreak()); contentItemContainer.add(getRelatedContentItemsList()); p.getChildren().add(contentItemContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate"); publishedFromInput.setShowTime(true); p.getChildren().add(publishedFromInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate"); publishedToInput.setShowTime(true); p.getChildren().add(publishedToInput); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this); p.getChildren().add(editCategoriesButton); p.getChildren().add(WFUtil.getBreak()); WFComponentSelector cs = new WFComponentSelector(); cs.setId(BUTTON_SELECTOR_ID); cs.setDividerText(" "); HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, bref + "save", this); cs.add(saveButton); cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this)); cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this)); cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this)); cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this)); cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this)); cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this)); cs.setSelectedId(CANCEL_ID, true); p.getChildren().add(cs); mainContainer.add(p); WFComponentSelector editorSelector = new WFComponentSelector(); editorSelector.setId(EDITOR_SELECTOR_ID); editorSelector.add(mainContainer); editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); FileUploadForm f = new FileUploadForm(); f.setId(FILE_UPLOAD_FORM_ID); editorSelector.add(f); editorSelector.add(getRelatedContentItemsContainer()); editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); return editorSelector; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/72fe15183822be99f6dfa9d697bce89864c5f7d8/ArticleBlock.java/buggy/src/java/com/idega/block/article/component/ArticleBlock.java |
|
p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "comment"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); | p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "comment"), WFUtil.getText(":"))); | private UIComponent getEditContainer() { String ref = ARTICLE_ITEM_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID); em.addErrorMessage(PUBLISHED_FROM_DATE_ID); em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "headline"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(40); p.getChildren().add(headlineInput); HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); localeMenu.setOnchange("document.forms[0].submit();"); p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "teaser"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "author"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "440px", "30px"); p.getChildren().add(teaserArea); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(22); p.getChildren().add(authorInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "body"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "images"), WFUtil.getText(":"))); // HtmlInputTextarea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "460px", "400px"); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "100%", "400px"); bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); bodyArea.setAllowFontSelection(false); //HtmlCommandButton editButton = WFUtil.getButtonVB(EDIT_HTML_ID, bref + "edit"); //editButton.setOnclick("wurl='htmlarea/webface/htmledit.jsp?" + PREVIEW_ARTICLE_ITEM_ID + // "='+this.tabindex;window.open(wurl,'Edit','height=450,width=600,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');return false;"); //p.getChildren().add(WFUtil.group(WFUtil.group(bodyArea, WFUtil.getBreak()), editButton)); p.getChildren().add(bodyArea); WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getText(": 4/20/04 3:04PM"))); p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(WFUtil.getHeaderTextVB(bref + "status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "current_version"), WFUtil.getText(": 1.5"))); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "comment"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "400px", "60px"); p.getChildren().add(commentArea); WFContainer attachmentContainer = new WFContainer(); attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this)); attachmentContainer.add(WFUtil.getBreak()); attachmentContainer.add(getAttachmentList()); p.getChildren().add(attachmentContainer); mainContainer.add(p); p = WFPanelUtil.getFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); WFContainer contentItemContainer = new WFContainer(); contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this)); contentItemContainer.add(WFUtil.getBreak()); contentItemContainer.add(getRelatedContentItemsList()); p.getChildren().add(contentItemContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate"); publishedFromInput.setShowTime(true); p.getChildren().add(publishedFromInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate"); publishedToInput.setShowTime(true); p.getChildren().add(publishedToInput); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this); p.getChildren().add(editCategoriesButton); p.getChildren().add(WFUtil.getBreak()); WFComponentSelector cs = new WFComponentSelector(); cs.setId(BUTTON_SELECTOR_ID); cs.setDividerText(" "); HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, bref + "save", this); cs.add(saveButton); cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this)); cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this)); cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this)); cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this)); cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this)); cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this)); cs.setSelectedId(CANCEL_ID, true); p.getChildren().add(cs); mainContainer.add(p); WFComponentSelector editorSelector = new WFComponentSelector(); editorSelector.setId(EDITOR_SELECTOR_ID); editorSelector.add(mainContainer); editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); FileUploadForm f = new FileUploadForm(); f.setId(FILE_UPLOAD_FORM_ID); editorSelector.add(f); editorSelector.add(getRelatedContentItemsContainer()); editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); return editorSelector; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/72fe15183822be99f6dfa9d697bce89864c5f7d8/ArticleBlock.java/buggy/src/java/com/idega/block/article/component/ArticleBlock.java |
WFContainer attachmentContainer = new WFContainer(); attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this)); attachmentContainer.add(WFUtil.getBreak()); attachmentContainer.add(getAttachmentList()); p.getChildren().add(attachmentContainer); | private UIComponent getEditContainer() { String ref = ARTICLE_ITEM_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID); em.addErrorMessage(PUBLISHED_FROM_DATE_ID); em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "headline"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(40); p.getChildren().add(headlineInput); HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); localeMenu.setOnchange("document.forms[0].submit();"); p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "teaser"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "author"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "440px", "30px"); p.getChildren().add(teaserArea); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(22); p.getChildren().add(authorInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "body"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "images"), WFUtil.getText(":"))); // HtmlInputTextarea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "460px", "400px"); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "100%", "400px"); bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); bodyArea.setAllowFontSelection(false); //HtmlCommandButton editButton = WFUtil.getButtonVB(EDIT_HTML_ID, bref + "edit"); //editButton.setOnclick("wurl='htmlarea/webface/htmledit.jsp?" + PREVIEW_ARTICLE_ITEM_ID + // "='+this.tabindex;window.open(wurl,'Edit','height=450,width=600,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');return false;"); //p.getChildren().add(WFUtil.group(WFUtil.group(bodyArea, WFUtil.getBreak()), editButton)); p.getChildren().add(bodyArea); WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getText(": 4/20/04 3:04PM"))); p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(WFUtil.getHeaderTextVB(bref + "status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "current_version"), WFUtil.getText(": 1.5"))); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "comment"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "400px", "60px"); p.getChildren().add(commentArea); WFContainer attachmentContainer = new WFContainer(); attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this)); attachmentContainer.add(WFUtil.getBreak()); attachmentContainer.add(getAttachmentList()); p.getChildren().add(attachmentContainer); mainContainer.add(p); p = WFPanelUtil.getFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); WFContainer contentItemContainer = new WFContainer(); contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this)); contentItemContainer.add(WFUtil.getBreak()); contentItemContainer.add(getRelatedContentItemsList()); p.getChildren().add(contentItemContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate"); publishedFromInput.setShowTime(true); p.getChildren().add(publishedFromInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate"); publishedToInput.setShowTime(true); p.getChildren().add(publishedToInput); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this); p.getChildren().add(editCategoriesButton); p.getChildren().add(WFUtil.getBreak()); WFComponentSelector cs = new WFComponentSelector(); cs.setId(BUTTON_SELECTOR_ID); cs.setDividerText(" "); HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, bref + "save", this); cs.add(saveButton); cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this)); cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this)); cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this)); cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this)); cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this)); cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this)); cs.setSelectedId(CANCEL_ID, true); p.getChildren().add(cs); mainContainer.add(p); WFComponentSelector editorSelector = new WFComponentSelector(); editorSelector.setId(EDITOR_SELECTOR_ID); editorSelector.add(mainContainer); editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); FileUploadForm f = new FileUploadForm(); f.setId(FILE_UPLOAD_FORM_ID); editorSelector.add(f); editorSelector.add(getRelatedContentItemsContainer()); editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); return editorSelector; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/72fe15183822be99f6dfa9d697bce89864c5f7d8/ArticleBlock.java/buggy/src/java/com/idega/block/article/component/ArticleBlock.java |
|
HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this); p.getChildren().add(editCategoriesButton); | p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "category"), WFUtil.getText(":"))); HtmlInputText categoryInput = WFUtil.getInputText(MAIN_CATEGORY_ID, ref + "mainCategory"); if(null==categoryInput.getValue() || "".equals(categoryInput.getValue())) { categoryInput.setValue(ROOT_CATEGORY); } categoryInput.setSize(40); p.getChildren().add(categoryInput); | private UIComponent getEditContainer() { String ref = ARTICLE_ITEM_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID); em.addErrorMessage(PUBLISHED_FROM_DATE_ID); em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "headline"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(40); p.getChildren().add(headlineInput); HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); localeMenu.setOnchange("document.forms[0].submit();"); p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "teaser"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "author"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "440px", "30px"); p.getChildren().add(teaserArea); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(22); p.getChildren().add(authorInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "body"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "images"), WFUtil.getText(":"))); // HtmlInputTextarea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "460px", "400px"); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "100%", "400px"); bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); bodyArea.setAllowFontSelection(false); //HtmlCommandButton editButton = WFUtil.getButtonVB(EDIT_HTML_ID, bref + "edit"); //editButton.setOnclick("wurl='htmlarea/webface/htmledit.jsp?" + PREVIEW_ARTICLE_ITEM_ID + // "='+this.tabindex;window.open(wurl,'Edit','height=450,width=600,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');return false;"); //p.getChildren().add(WFUtil.group(WFUtil.group(bodyArea, WFUtil.getBreak()), editButton)); p.getChildren().add(bodyArea); WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getText(": 4/20/04 3:04PM"))); p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(WFUtil.getHeaderTextVB(bref + "status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "current_version"), WFUtil.getText(": 1.5"))); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "comment"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "400px", "60px"); p.getChildren().add(commentArea); WFContainer attachmentContainer = new WFContainer(); attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this)); attachmentContainer.add(WFUtil.getBreak()); attachmentContainer.add(getAttachmentList()); p.getChildren().add(attachmentContainer); mainContainer.add(p); p = WFPanelUtil.getFormPanel(1); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); WFContainer contentItemContainer = new WFContainer(); contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this)); contentItemContainer.add(WFUtil.getBreak()); contentItemContainer.add(getRelatedContentItemsList()); p.getChildren().add(contentItemContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate"); publishedFromInput.setShowTime(true); p.getChildren().add(publishedFromInput); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate"); publishedToInput.setShowTime(true); p.getChildren().add(publishedToInput); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1); HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this); p.getChildren().add(editCategoriesButton); p.getChildren().add(WFUtil.getBreak()); WFComponentSelector cs = new WFComponentSelector(); cs.setId(BUTTON_SELECTOR_ID); cs.setDividerText(" "); HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, bref + "save", this); cs.add(saveButton); cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this)); cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this)); cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this)); cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this)); cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this)); cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this)); cs.setSelectedId(CANCEL_ID, true); p.getChildren().add(cs); mainContainer.add(p); WFComponentSelector editorSelector = new WFComponentSelector(); editorSelector.setId(EDITOR_SELECTOR_ID); editorSelector.add(mainContainer); editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); FileUploadForm f = new FileUploadForm(); f.setId(FILE_UPLOAD_FORM_ID); editorSelector.add(f); editorSelector.add(getRelatedContentItemsContainer()); editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); return editorSelector; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/72fe15183822be99f6dfa9d697bce89864c5f7d8/ArticleBlock.java/buggy/src/java/com/idega/block/article/component/ArticleBlock.java |
sFrame.toFront(); | public void showStaticWindow(String windowKey) { StandaloneFrame sFrame = (StandaloneFrame)staticWindowMap.get(windowKey); if(sFrame == null) return; if(!sFrame.isShowing()) { sFrame.show(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/95e7e114b070e42dde79595179071ffc91022a0f/BrowserManagerSFImpl.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserManagerSFImpl.java |
|
dropDownButton = new ToolBarButtonMenu(); | public TopWindowGroup(String name, Icon icon, TaskBar tb) { if (tb == null) throw new NullPointerException("No reference to the TaskBar."); if (name == null || name.length() == 0) throw new IllegalArgumentException("Must provide a name."); taskBar = tb; winSubMenu = new JMenu(name); winSubMenu.setIcon(icon); winSubMenu.setEnabled(false); dropDownButton = new ToolBarButtonMenu(); taskBar.addToMenu(TaskBar.WINDOW_MENU, winSubMenu); taskBar.addToToolBar(TaskBar.QUICK_LAUNCH_TOOLBAR, dropDownButton); windows = new HashMap(); makeCloseAllButtons(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3b273af3a5320ab0a054540f14a3c299ff01de69/TopWindowGroup.java/buggy/SRC/org/openmicroscopy/shoola/env/ui/TopWindowGroup.java |
|
taskBar.addToToolBar(TaskBar.QUICK_LAUNCH_TOOLBAR, dropDownButton); | public TopWindowGroup(String name, Icon icon, TaskBar tb) { if (tb == null) throw new NullPointerException("No reference to the TaskBar."); if (name == null || name.length() == 0) throw new IllegalArgumentException("Must provide a name."); taskBar = tb; winSubMenu = new JMenu(name); winSubMenu.setIcon(icon); winSubMenu.setEnabled(false); dropDownButton = new ToolBarButtonMenu(); taskBar.addToMenu(TaskBar.WINDOW_MENU, winSubMenu); taskBar.addToToolBar(TaskBar.QUICK_LAUNCH_TOOLBAR, dropDownButton); windows = new HashMap(); makeCloseAllButtons(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3b273af3a5320ab0a054540f14a3c299ff01de69/TopWindowGroup.java/buggy/SRC/org/openmicroscopy/shoola/env/ui/TopWindowGroup.java |
|
cfg.dropDownButtonEntry.setText(name); cfg.dropDownButtonEntry.setIcon(icon); | public void add(TopWindow window, String name, Icon icon) { if (window == null) return; if (name == null || name.length() == 0) throw new IllegalArgumentException("Must provide a name."); WindowConfig cfg = (WindowConfig) windows.get(window); if (cfg == null) { cfg = makeConfigFor(window); windows.put(window, cfg); } cfg.winSubMenuEntry.setText(name); cfg.winSubMenuEntry.setIcon(icon); cfg.dropDownButtonEntry.setText(name); cfg.dropDownButtonEntry.setIcon(icon); //NOTE: If window has already a cfg, then we simply overwrite the //previous text and icon of the display buttons. if (windows.size() == 1) addCloseAllButtons(); winSubMenu.setEnabled(true); winSubMenu.add(cfg.winSubMenuEntry); dropDownButton.addToMenu(cfg.dropDownButtonEntry, true); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3b273af3a5320ab0a054540f14a3c299ff01de69/TopWindowGroup.java/buggy/SRC/org/openmicroscopy/shoola/env/ui/TopWindowGroup.java |
|
dropDownButton.addToMenu(cfg.dropDownButtonEntry, true); | public void add(TopWindow window, String name, Icon icon) { if (window == null) return; if (name == null || name.length() == 0) throw new IllegalArgumentException("Must provide a name."); WindowConfig cfg = (WindowConfig) windows.get(window); if (cfg == null) { cfg = makeConfigFor(window); windows.put(window, cfg); } cfg.winSubMenuEntry.setText(name); cfg.winSubMenuEntry.setIcon(icon); cfg.dropDownButtonEntry.setText(name); cfg.dropDownButtonEntry.setIcon(icon); //NOTE: If window has already a cfg, then we simply overwrite the //previous text and icon of the display buttons. if (windows.size() == 1) addCloseAllButtons(); winSubMenu.setEnabled(true); winSubMenu.add(cfg.winSubMenuEntry); dropDownButton.addToMenu(cfg.dropDownButtonEntry, true); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3b273af3a5320ab0a054540f14a3c299ff01de69/TopWindowGroup.java/buggy/SRC/org/openmicroscopy/shoola/env/ui/TopWindowGroup.java |
|
public void remove(JFrame window, boolean dispose) | public void remove(JFrame window) | public void remove(JFrame window, boolean dispose) { if (window == null) return; remove(window); if (dispose) window.dispose(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3b273af3a5320ab0a054540f14a3c299ff01de69/TopWindowGroup.java/buggy/SRC/org/openmicroscopy/shoola/env/ui/TopWindowGroup.java |
if (window == null) return; remove(window); if (dispose) window.dispose(); | WindowConfig cfg = (WindowConfig) windows.get(window); if (cfg == null) return; windows.remove(window); if (windows.size() == 0) clearMenus(); winSubMenu.remove(cfg.winSubMenuEntry); | public void remove(JFrame window, boolean dispose) { if (window == null) return; remove(window); if (dispose) window.dispose(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3b273af3a5320ab0a054540f14a3c299ff01de69/TopWindowGroup.java/buggy/SRC/org/openmicroscopy/shoola/env/ui/TopWindowGroup.java |
private void initListener() | void initListener() | private void initListener() { tabPane.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { int index = -1; switch (tabPane.getSelectedIndex()) { case SEARCH_TAB: index = ClipBoard.SEARCH_PANEL; break; case ANNOTATE_TAB: index = ClipBoard.ANNOTATION_PANEL; break; }; controller.setPaneIndex(index); } }); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0c7517f5d0ece413452f58f3f0a071be2ccbee2e/ClipBoardUI.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/ClipBoardUI.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.