bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public RubyClass getNotImplementedError() { return notImplementedError; }
public RubyClass getNotImplementedError() { return notImplementedError; }
3,237,478
public RubyClass getRangeError() { return rangeError; }
public RubyClass getRangeError() { return rangeError; }
3,237,479
public RubyClass getRegexpError() { return regexpError; }
public RubyClass getRegexpError() { return regexpError; }
3,237,480
public RubyClass getScriptError() { return scriptError; }
public RubyClass getScriptError() { return scriptError; }
3,237,481
public RubyClass getSecurityError() { return securityError; }
public RubyClass getSecurityError() { return securityError; }
3,237,482
public RubyClass getSignalException() { return signalException; }
public RubyClass getSignalException() { return signalException; }
3,237,483
public RubyClass getStandardError() { return standardError; }
public RubyClass getStandardError() { return standardError; }
3,237,484
public RubyClass getSyntaxError() { return syntaxError; }
public RubyClass getSyntaxError() { return syntaxError; }
3,237,485
public RubyClass getSystemExit() { return systemExit; }
public RubyClass getSystemExit() { return systemExit; }
3,237,486
public RubyClass getTypeError() { return typeError; }
public RubyClass getTypeError() { return typeError; }
3,237,487
private void retrieveNotes() { final PrivateNotes privateNotes = PrivateNotes.getPrivateNotes(); String text = privateNotes.getNotes(); final JLabel titleLabel = new JLabel("Notepad"); titleLabel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.LIGHT_GRAY)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 13)); titleLabel.setHorizontalAlignment(JLabel.CENTER); final Image backgroundImage = SparkRes.getImageIcon(SparkRes.STICKY_NOTE_IMAGE).getImage(); final JTextPane pane = new JTextPane(); pane.setOpaque(false); final JScrollPane scrollPane = new JScrollPane(pane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setOpaque(false); scrollPane.getViewport().setOpaque(false); scrollPane.setBorder(null); pane.setText(text); final RolloverButton button = new RolloverButton("Save", null); final RolloverButton cancelButton = new RolloverButton("Cancel", null); final JFrame frame = new JFrame("Notes"); frame.setUndecorated(true); titleLabel.addMouseMotionListener(new DragWindowAdapter(frame)); final JPanel mainPanel = new JPanel() { public void paintComponent(Graphics g) { double scaleX = getWidth() / (double)backgroundImage.getWidth(null); double scaleY = getHeight() / (double)backgroundImage.getHeight(null); AffineTransform xform = AffineTransform.getScaleInstance(scaleX, scaleY); ((Graphics2D)g).drawImage(backgroundImage, xform, this); } }; pane.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { if (e.getKeyChar() == KeyEvent.VK_ESCAPE) { frame.dispose(); // Save it. String text = pane.getText(); privateNotes.setNotes(text); PrivateNotes.savePrivateNotes(privateNotes); } } }); mainPanel.setBackground(Color.white); mainPanel.setLayout(new GridBagLayout()); frame.setIconImage(SparkManager.getMainWindow().getIconImage()); frame.getContentPane().add(mainPanel); mainPanel.add(titleLabel, new GridBagConstraints(0, 0, 3, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(scrollPane, new GridBagConstraints(0, 1, 3, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(button, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(cancelButton, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); frame.pack(); frame.setSize(400, 400); GraphicUtils.centerWindowOnComponent(frame, SparkManager.getMainWindow()); frame.setVisible(true); pane.setCaretPosition(0); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { frame.dispose(); // Save it. String text = pane.getText(); privateNotes.setNotes(text); PrivateNotes.savePrivateNotes(privateNotes); } }); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { frame.dispose(); } }); }
private void retrieveNotes() { final PrivateNotes privateNotes = PrivateNotes.getPrivateNotes(); String text = privateNotes.getNotes(); final JLabel titleLabel = new JLabel("Notepad"); titleLabel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.LIGHT_GRAY)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 13)); titleLabel.setHorizontalAlignment(JLabel.CENTER); final JTextPane pane = new JTextPane(); pane.setOpaque(false); final JScrollPane scrollPane = new JScrollPane(pane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setOpaque(false); scrollPane.getViewport().setOpaque(false); scrollPane.setBorder(null); pane.setText(text); final RolloverButton button = new RolloverButton("Save", null); final RolloverButton cancelButton = new RolloverButton("Cancel", null); final JFrame frame = new JFrame("Notes"); frame.setUndecorated(true); titleLabel.addMouseMotionListener(new DragWindowAdapter(frame)); final JPanel mainPanel = new JPanel() { public void paintComponent(Graphics g) { double scaleX = getWidth() / (double)backgroundImage.getWidth(null); double scaleY = getHeight() / (double)backgroundImage.getHeight(null); AffineTransform xform = AffineTransform.getScaleInstance(scaleX, scaleY); ((Graphics2D)g).drawImage(backgroundImage, xform, this); } }; pane.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { if (e.getKeyChar() == KeyEvent.VK_ESCAPE) { frame.dispose(); // Save it. String text = pane.getText(); privateNotes.setNotes(text); PrivateNotes.savePrivateNotes(privateNotes); } } }); mainPanel.setBackground(Color.white); mainPanel.setLayout(new GridBagLayout()); frame.setIconImage(SparkManager.getMainWindow().getIconImage()); frame.getContentPane().add(mainPanel); mainPanel.add(titleLabel, new GridBagConstraints(0, 0, 3, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(scrollPane, new GridBagConstraints(0, 1, 3, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(button, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(cancelButton, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); frame.pack(); frame.setSize(400, 400); GraphicUtils.centerWindowOnComponent(frame, SparkManager.getMainWindow()); frame.setVisible(true); pane.setCaretPosition(0); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { frame.dispose(); // Save it. String text = pane.getText(); privateNotes.setNotes(text); PrivateNotes.savePrivateNotes(privateNotes); } }); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { frame.dispose(); } }); }
3,237,488
private void retrieveNotes() { final PrivateNotes privateNotes = PrivateNotes.getPrivateNotes(); String text = privateNotes.getNotes(); final JLabel titleLabel = new JLabel("Notepad"); titleLabel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.LIGHT_GRAY)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 13)); titleLabel.setHorizontalAlignment(JLabel.CENTER); final Image backgroundImage = SparkRes.getImageIcon(SparkRes.STICKY_NOTE_IMAGE).getImage(); final JTextPane pane = new JTextPane(); pane.setOpaque(false); final JScrollPane scrollPane = new JScrollPane(pane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setOpaque(false); scrollPane.getViewport().setOpaque(false); scrollPane.setBorder(null); pane.setText(text); final RolloverButton button = new RolloverButton("Save", null); final RolloverButton cancelButton = new RolloverButton("Cancel", null); final JFrame frame = new JFrame("Notes"); frame.setUndecorated(true); titleLabel.addMouseMotionListener(new DragWindowAdapter(frame)); final JPanel mainPanel = new JPanel() { public void paintComponent(Graphics g) { double scaleX = getWidth() / (double)backgroundImage.getWidth(null); double scaleY = getHeight() / (double)backgroundImage.getHeight(null); AffineTransform xform = AffineTransform.getScaleInstance(scaleX, scaleY); ((Graphics2D)g).drawImage(backgroundImage, xform, this); } }; pane.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { if (e.getKeyChar() == KeyEvent.VK_ESCAPE) { frame.dispose(); // Save it. String text = pane.getText(); privateNotes.setNotes(text); PrivateNotes.savePrivateNotes(privateNotes); } } }); mainPanel.setBackground(Color.white); mainPanel.setLayout(new GridBagLayout()); frame.setIconImage(SparkManager.getMainWindow().getIconImage()); frame.getContentPane().add(mainPanel); mainPanel.add(titleLabel, new GridBagConstraints(0, 0, 3, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(scrollPane, new GridBagConstraints(0, 1, 3, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(button, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(cancelButton, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); frame.pack(); frame.setSize(400, 400); GraphicUtils.centerWindowOnComponent(frame, SparkManager.getMainWindow()); frame.setVisible(true); pane.setCaretPosition(0); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { frame.dispose(); // Save it. String text = pane.getText(); privateNotes.setNotes(text); PrivateNotes.savePrivateNotes(privateNotes); } }); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { frame.dispose(); } }); }
private void retrieveNotes() { final PrivateNotes privateNotes = PrivateNotes.getPrivateNotes(); String text = privateNotes.getNotes(); final JLabel titleLabel = new JLabel("Notepad"); titleLabel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.LIGHT_GRAY)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 13)); titleLabel.setHorizontalAlignment(JLabel.CENTER); final Image backgroundImage = SparkRes.getImageIcon(SparkRes.STICKY_NOTE_IMAGE).getImage(); final JTextPane pane = new JTextPane(); pane.setOpaque(false); final JScrollPane scrollPane = new JScrollPane(pane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setOpaque(false); scrollPane.getViewport().setOpaque(false); scrollPane.setBorder(null); pane.setText(text); final RolloverButton button = new RolloverButton("Save", null); final RolloverButton cancelButton = new RolloverButton("Cancel", null); final JFrame frame = new JFrame("Notes"); frame.setUndecorated(true); titleLabel.addMouseMotionListener(new DragWindowAdapter(frame)); final JPanel mainPanel = new JPanel() { public void paintComponent(Graphics g) { double scaleX = getWidth() / (double)backgroundImage.getWidth(null); double scaleY = getHeight() / (double)backgroundImage.getHeight(null); AffineTransform xform = AffineTransform.getScaleInstance(scaleX, scaleY); ((Graphics2D)g).drawImage(backgroundImage, xform, this); } }; pane.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { if (e.getKeyChar() == KeyEvent.VK_ESCAPE) { frame.dispose(); // Save it. String text = pane.getText(); privateNotes.setNotes(text); PrivateNotes.savePrivateNotes(privateNotes); } } }); mainPanel.setBackground(Color.white); mainPanel.setLayout(new GridBagLayout()); frame.setIconImage(SparkManager.getMainWindow().getIconImage()); frame.getContentPane().add(mainPanel); mainPanel.add(titleLabel, new GridBagConstraints(0, 0, 3, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(scrollPane, new GridBagConstraints(0, 1, 3, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(button, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(cancelButton, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); frame.pack(); frame.setSize(400, 400); GraphicUtils.centerWindowOnComponent(frame, SparkManager.getMainWindow()); frame.setVisible(true); pane.setCaretPosition(0); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { frame.dispose(); // Save it. String text = pane.getText(); privateNotes.setNotes(text); PrivateNotes.savePrivateNotes(privateNotes); } }); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { frame.dispose(); } }); }
3,237,489
private void retrieveNotes() { final PrivateNotes privateNotes = PrivateNotes.getPrivateNotes(); String text = privateNotes.getNotes(); final JLabel titleLabel = new JLabel("Notepad"); titleLabel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.LIGHT_GRAY)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 13)); titleLabel.setHorizontalAlignment(JLabel.CENTER); final Image backgroundImage = SparkRes.getImageIcon(SparkRes.STICKY_NOTE_IMAGE).getImage(); final JTextPane pane = new JTextPane(); pane.setOpaque(false); final JScrollPane scrollPane = new JScrollPane(pane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setOpaque(false); scrollPane.getViewport().setOpaque(false); scrollPane.setBorder(null); pane.setText(text); final RolloverButton button = new RolloverButton("Save", null); final RolloverButton cancelButton = new RolloverButton("Cancel", null); final JFrame frame = new JFrame("Notes"); frame.setUndecorated(true); titleLabel.addMouseMotionListener(new DragWindowAdapter(frame)); final JPanel mainPanel = new JPanel() { public void paintComponent(Graphics g) { double scaleX = getWidth() / (double)backgroundImage.getWidth(null); double scaleY = getHeight() / (double)backgroundImage.getHeight(null); AffineTransform xform = AffineTransform.getScaleInstance(scaleX, scaleY); ((Graphics2D)g).drawImage(backgroundImage, xform, this); } }; pane.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { if (e.getKeyChar() == KeyEvent.VK_ESCAPE) { frame.dispose(); // Save it. String text = pane.getText(); privateNotes.setNotes(text); PrivateNotes.savePrivateNotes(privateNotes); } } }); mainPanel.setBackground(Color.white); mainPanel.setLayout(new GridBagLayout()); frame.setIconImage(SparkManager.getMainWindow().getIconImage()); frame.getContentPane().add(mainPanel); mainPanel.add(titleLabel, new GridBagConstraints(0, 0, 3, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(scrollPane, new GridBagConstraints(0, 1, 3, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(button, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(cancelButton, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); frame.pack(); frame.setSize(400, 400); GraphicUtils.centerWindowOnComponent(frame, SparkManager.getMainWindow()); frame.setVisible(true); pane.setCaretPosition(0); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { frame.dispose(); // Save it. String text = pane.getText(); privateNotes.setNotes(text); PrivateNotes.savePrivateNotes(privateNotes); } }); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { frame.dispose(); } }); }
private void retrieveNotes() { final PrivateNotes privateNotes = PrivateNotes.getPrivateNotes(); String text = privateNotes.getNotes(); final JLabel titleLabel = new JLabel("Notepad"); titleLabel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.LIGHT_GRAY)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 13)); titleLabel.setHorizontalAlignment(JLabel.CENTER); final Image backgroundImage = SparkRes.getImageIcon(SparkRes.STICKY_NOTE_IMAGE).getImage(); final JTextPane pane = new JTextPane(); pane.setOpaque(false); final JScrollPane scrollPane = new JScrollPane(pane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setOpaque(false); scrollPane.getViewport().setOpaque(false); scrollPane.setBorder(null); pane.setText(text); final RolloverButton button = new RolloverButton("Save", null); final RolloverButton cancelButton = new RolloverButton("Cancel", null); final JFrame frame = new JFrame("Notes"); frame.setUndecorated(true); titleLabel.addMouseMotionListener(new DragWindowAdapter(frame)); final JPanel mainPanel = new JPanel() { public void paintComponent(Graphics g) { double scaleX = getWidth() / (double)backgroundImage.getWidth(null); double scaleY = getHeight() / (double)backgroundImage.getHeight(null); AffineTransform xform = AffineTransform.getScaleInstance(scaleX, scaleY); ((Graphics2D)g).drawImage(backgroundImage, xform, this); } }; pane.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { if (e.getKeyChar() == KeyEvent.VK_ESCAPE) { frame.dispose(); // Save it. String text = pane.getText(); privateNotes.setNotes(text); PrivateNotes.savePrivateNotes(privateNotes); } } }); mainPanel.setBackground(Color.white); mainPanel.setLayout(new GridBagLayout()); frame.setIconImage(SparkManager.getMainWindow().getIconImage()); frame.getContentPane().add(mainPanel); mainPanel.add(scrollPane, new GridBagConstraints(0, 1, 3, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(button, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add(cancelButton, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); frame.pack(); frame.setSize(400, 400); GraphicUtils.centerWindowOnComponent(frame, SparkManager.getMainWindow()); frame.setVisible(true); pane.setCaretPosition(0); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { frame.dispose(); // Save it. String text = pane.getText(); privateNotes.setNotes(text); PrivateNotes.savePrivateNotes(privateNotes); } }); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { frame.dispose(); } }); }
3,237,490
public void actionPerformed(ActionEvent actionEvent) { frame.dispose(); // Save it. String text = pane.getText(); privateNotes.setNotes(text); PrivateNotes.savePrivateNotes(privateNotes); }
public void actionPerformed(ActionEvent actionEvent) { frame.dispose(); // Save it. String text = pane.getText(); privateNotes.setNotes(text); PrivateNotes.savePrivateNotes(privateNotes); }
3,237,491
public String toString(){ return "FormalInput"+(formalInputId==null ? ":Hash"+this.hashCode() : ":"+formalInputId); }
public String toString(){ return "FormalInput"+(formalInputId==null ? ":Hash_"+this.hashCode() : ":Id_"+formalInputId); }
3,237,492
public void testBuildDate() throws Exception { assert (!WebMacro.VERSION.equals("@BUILD_DATE")); }
public void testBuildDate() throws Exception { assert (!WebMacro.BUILD_DATE.equals("@BUILD_DATE@")); }
3,237,493
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
3,237,494
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
3,237,495
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
3,237,496
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
3,237,497
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
3,237,498
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
3,237,499
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
3,237,500
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
3,237,501
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { LinkedList executeConstructors = new LinkedList(Arrays.asList(constructors)); int argsLength = args != null ? args.length : 0; // remove constructors with wrong parameter count. Iterator iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); if (constructor.getParameterTypes().length != argsLength) { iter.remove(); } } // remove constructors with wrong parameter types. iter = executeConstructors.iterator(); while (iter.hasNext()) { Constructor constructor = (Constructor) iter.next(); for (int i = 0; i < constructor.getParameterTypes().length; i++) { if (!JavaUtil.isCompatible(args[i], constructor.getParameterTypes()[i])) { iter.remove(); break; } } } if (executeConstructors.isEmpty()) { throw new RubyArgumentException(ruby, "wrong arguments."); } // take the first constructor. Constructor constructor = (Constructor) executeConstructors.getFirst(); Object[] newArgs = new Object[argsLength]; for (int i = 0; i < argsLength; i++) { newArgs[i] = JavaUtil.convertRubyToJava(ruby, args[i], constructor.getParameterTypes()[i]); } try { Object javaValue = constructor.newInstance(newArgs); RubyJavaObject javaObject = new RubyJavaObject(ruby, (RubyModule) recv, javaValue); javaObject.callInit(args); return javaObject; } catch (IllegalAccessException iaExcptn) { } catch (InstantiationException iExcptn) { } catch (IllegalArgumentException iaExcptn) { } catch (InvocationTargetException itExcptn) { } return ruby.getNil(); }
3,237,502
final public String getDOCUMENT_ROOT() { return requst_.getRealPath("/"); }
final public String getDOCUMENT_ROOT() { return requst_.getRealPath("/"); }
3,237,503
protected void onSetUp() throws Exception { iQuery = (LocalQuery) applicationContext.getBean("queryService"); iUpdate = (LocalUpdate) applicationContext.getBean("updateService"); iAnalysis = (IAnalysis) applicationContext.getBean("analysisService"); iPojos = (IPojos) applicationContext.getBean("pojosService"); iPixels = (IPixels) applicationContext.getBean("pixelsService"); eContext = (EventContext) applicationContext.getBean("eventContext"); login("root","system","Test"); }
protected void onSetUp() throws Exception { iQuery = (LocalQuery) applicationContext.getBean("queryService"); iUpdate = (LocalUpdate) applicationContext.getBean("updateService"); iAnalysis = (IAnalysis) applicationContext.getBean("analysisService"); iPojos = (IPojos) applicationContext.getBean("pojosService"); iPixels = (IPixels) applicationContext.getBean("pixelsService"); eContext = (EventContext) applicationContext.getBean("eventContext"); loginRoot(); }
3,237,504
public void setUp() { runtime = Ruby.getDefaultInstance(); runtime.getLoadService().init(runtime, new ArrayList()); }
public void setUp() { runtime = Ruby.getDefaultInstance(); runtime.getLoadService().init(new ArrayList()); }
3,237,505
public static IRubyObject print(IRubyObject recv, IRubyObject args[]) { IRubyObject defout = recv.getRuntime().getGlobalVar("$>"); RubyIO.print(defout.toRubyObject(), args); return recv.getRuntime().getNil(); }
public static IRubyObject print(IRubyObject recv, IRubyObject args[]) { IRubyObject defout = recv.getRuntime().getGlobalVar("$>"); RubyIO.print(defout, args); return recv.getRuntime().getNil(); }
3,237,507
public static IRubyObject printf(IRubyObject recv, IRubyObject args[]) { if (args.length != 0) { IRubyObject defout = recv.getRuntime().getGlobalVar("$>"); if (!(args[0] instanceof RubyString)) { defout = args[0]; IRubyObject[] newArgs = new IRubyObject[args.length - 1]; System.arraycopy(args, 1, newArgs, 0, args.length - 1); args = newArgs; } RubyIO.printf(defout.toRubyObject(), args); } return recv.getRuntime().getNil(); }
public static IRubyObject printf(IRubyObject recv, IRubyObject args[]) { if (args.length != 0) { IRubyObject defout = recv.getRuntime().getGlobalVar("$>"); if (!(args[0] instanceof RubyString)) { defout = args[0]; IRubyObject[] newArgs = new IRubyObject[args.length - 1]; System.arraycopy(args, 1, newArgs, 0, args.length - 1); args = newArgs; } RubyIO.printf(defout, args); } return recv.getRuntime().getNil(); }
3,237,508
public static IRubyObject puts(IRubyObject recv, IRubyObject args[]) { IRubyObject defout = recv.getRuntime().getGlobalVar("$>"); RubyIO.puts(defout.toRubyObject(), args); return recv.getRuntime().getNil(); }
public static IRubyObject puts(IRubyObject recv, IRubyObject args[]) { IRubyObject defout = recv.getRuntime().getGlobalVar("$>"); RubyIO.puts(defout, args); return recv.getRuntime().getNil(); }
3,237,509
public Node appendToBlock(Node head, Node tail) { if (tail == null) { return head; } else if (head == null) { return tail; } if (!(head instanceof BlockNode)) { head = new BlockNode(head.getPosition()).add(head); } if (warnings.isVerbose() && new BreakStatementVisitor().isBreakStatement(((ListNode) head).getLast())) { warnings.warning(tail.getPosition(), "Statement not reached."); } if (tail instanceof BlockNode) { ((ListNode) head).addAll((ListNode) tail); } else { ((ListNode) head).add(tail); } return head; }
public Node appendToBlock(Node head, Node tail) { if (tail == null) { return head; } else if (head == null) { return tail; } if (!(head instanceof BlockNode)) { head = new BlockNode(union(head, tail)).add(head); } if (warnings.isVerbose() && new BreakStatementVisitor().isBreakStatement(((ListNode) head).getLast())) { warnings.warning(tail.getPosition(), "Statement not reached."); } if (tail instanceof BlockNode) { ((ListNode) head).addAll((ListNode) tail); } else { ((ListNode) head).add(tail); } return head; }
3,237,510
public Node new_fcall(String name, Node args, ISourcePosition iPosition) { if (args != null && args instanceof BlockPassNode) { ((BlockPassNode) args).setIterNode(new FCallNode(args.getPosition(), name, ((BlockPassNode) args).getArgsNode())); return args; } return new FCallNode(iPosition, name, args); }
public Node new_fcall(String name, Node args, Token operation) { if (args != null && args instanceof BlockPassNode) { ((BlockPassNode) args).setIterNode(new FCallNode(args.getPosition(), name, ((BlockPassNode) args).getArgsNode())); return args; } return new FCallNode(iPosition, name, args); }
3,237,511
public Node new_fcall(String name, Node args, ISourcePosition iPosition) { if (args != null && args instanceof BlockPassNode) { ((BlockPassNode) args).setIterNode(new FCallNode(args.getPosition(), name, ((BlockPassNode) args).getArgsNode())); return args; } return new FCallNode(iPosition, name, args); }
public Node new_fcall(String name, Node args, ISourcePosition iPosition) { if (args != null && args instanceof BlockPassNode) { ((BlockPassNode) args).setIterNode(new FCallNode(union(operation, args), name, ((BlockPassNode) args).getArgsNode())); return args; } return new FCallNode(iPosition, name, args); }
3,237,512
public Node new_fcall(String name, Node args, ISourcePosition iPosition) { if (args != null && args instanceof BlockPassNode) { ((BlockPassNode) args).setIterNode(new FCallNode(args.getPosition(), name, ((BlockPassNode) args).getArgsNode())); return args; } return new FCallNode(iPosition, name, args); }
public Node new_fcall(String name, Node args, ISourcePosition iPosition) { if (args != null && args instanceof BlockPassNode) { ((BlockPassNode) args).setIterNode(new FCallNode(args.getPosition(), name, ((BlockPassNode) args).getArgsNode())); return args; } return new FCallNode(operation.getPosition(), name, args); }
3,237,513
public Node new_super(Node args, ISourcePosition iPosition) { if (args != null && args instanceof BlockPassNode) { ((BlockPassNode) args).setIterNode(new SuperNode(args.getPosition(), ((BlockPassNode) args).getArgsNode())); return args; } return new SuperNode(iPosition, args); }
public Node new_super(Node args, Token operation) { if (args != null && args instanceof BlockPassNode) { ((BlockPassNode) args).setIterNode(new SuperNode(args.getPosition(), ((BlockPassNode) args).getArgsNode())); return args; } return new SuperNode(iPosition, args); }
3,237,514
public Node new_super(Node args, ISourcePosition iPosition) { if (args != null && args instanceof BlockPassNode) { ((BlockPassNode) args).setIterNode(new SuperNode(args.getPosition(), ((BlockPassNode) args).getArgsNode())); return args; } return new SuperNode(iPosition, args); }
public Node new_super(Node args, ISourcePosition iPosition) { if (args != null && args instanceof BlockPassNode) { ((BlockPassNode) args).setIterNode(new SuperNode(union(operation, args), ((BlockPassNode) args).getArgsNode())); return args; } return new SuperNode(iPosition, args); }
3,237,515
public Node new_super(Node args, ISourcePosition iPosition) { if (args != null && args instanceof BlockPassNode) { ((BlockPassNode) args).setIterNode(new SuperNode(args.getPosition(), ((BlockPassNode) args).getArgsNode())); return args; } return new SuperNode(iPosition, args); }
public Node new_super(Node args, ISourcePosition iPosition) { if (args != null && args instanceof BlockPassNode) { ((BlockPassNode) args).setIterNode(new SuperNode(args.getPosition(), ((BlockPassNode) args).getArgsNode())); return args; } return new SuperNode(operation.getPosition(), args); }
3,237,516
public String getFolderLocation() { String articlePath = getArticlePath(); return ContentUtil.getParentPath(articlePath); }
public String getFolderLocation() { String articlePath = getArticlePath(); return ContentUtil.getParentPath(articlePath); }
3,237,517
public DatasetLoader(HiViewer viewer, Set datasetsID) { super(viewer); this.datasetsID = datasetsID; }
public DatasetLoader(HiViewer viewer, Set datasetsID, boolean refresh) { super(viewer); this.datasetsID = datasetsID; }
3,237,518
public void handleResult(Object result) { if (viewer.getState() == HiViewer.DISCARDED) return; viewer.setHierarchyRoots((Set) result, false); }
public void handleResult(Object result) { if (viewer.getState() == HiViewer.DISCARDED) return; viewer.setHierarchyRoots((Set) result, false, refresh); }
3,237,520
public ContactList() { // Load Local Preferences localPreferences = SettingsManager.getLocalPreferences(); offlineGroup = new ContactGroup("Offline Group"); JToolBar toolbar = new JToolBar(); toolbar.setFloatable(false); addContactMenu = new JMenuItem(Res.getString("menuitem.add.contact"), SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); addContactGroupMenu = new JMenuItem(Res.getString("menuitem.add.contact.group"), SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE)); removeContactFromGroupMenu = new JMenuItem(Res.getString("menuitem.remove.from.group"), SparkRes.getImageIcon(SparkRes.SMALL_DELETE)); chatMenu = new JMenuItem(Res.getString("menuitem.start.a.chat"), SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_IMAGE)); renameMenu = new JMenuItem(Res.getString("menuitem.rename"), SparkRes.getImageIcon(SparkRes.DESKTOP_IMAGE)); addContactMenu.addActionListener(this); removeContactFromGroupMenu.addActionListener(this); chatMenu.addActionListener(this); renameMenu.addActionListener(this); setLayout(new BorderLayout()); addingGroupButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.ADD_CONTACT_IMAGE)); RolloverButton groupChatButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.JOIN_GROUPCHAT_IMAGE)); toolbar.add(addingGroupButton); toolbar.add(groupChatButton); addingGroupButton.addActionListener(this); mainPanel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true, false)); mainPanel.setBackground((Color)UIManager.get("List.background")); treeScroller = new JScrollPane(mainPanel); treeScroller.setBorder(BorderFactory.createEmptyBorder()); treeScroller.getVerticalScrollBar().setBlockIncrement(50); treeScroller.getVerticalScrollBar().setUnitIncrement(20); retryPanel = new RetryPanel(); workspace = SparkManager.getWorkspace(); workspace.getCardPanel().add(RETRY_PANEL, retryPanel); add(treeScroller, BorderLayout.CENTER); // Load Properties file props = new Properties(); // Save to properties file. propertiesFile = new File(new File(Spark.getUserHome(), "Spark"), "groups.properties"); try { props.load(new FileInputStream(propertiesFile)); } catch (IOException e) { // File does not exist. } // Add ActionListener(s) to menus addContactGroup(unfiledGroup); addContactGroup(offlineGroup); showHideMenu.setSelected(false); // Add KeyMappings getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control N"), "searchContacts"); getActionMap().put("searchContacts", new AbstractAction("searchContacts") { public void actionPerformed(ActionEvent evt) { // searchContacts(""); } }); // Save state on shutdown. SparkManager.getMainWindow().addMainWindowListener(new MainWindowListener() { public void shutdown() { saveState(); } public void mainWindowActivated() { } public void mainWindowDeactivated() { } }); SparkManager.getConnection().addConnectionListener(this); // Get command panel and add View Online/Offline, Add Contact StatusBar statusBar = SparkManager.getWorkspace().getStatusBar(); JPanel commandPanel = statusBar.getCommandPanel(); final RolloverButton addContactButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); commandPanel.add(addContactButton); addContactButton.setToolTipText(Res.getString("message.add.a.contact")); addContactButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new RosterDialog().showRosterDialog(); } }); }
public ContactList() { // Load Local Preferences localPreferences = SettingsManager.getLocalPreferences(); offlineGroup = new ContactGroup("Offline Group"); JToolBar toolbar = new JToolBar(); toolbar.setFloatable(false); addContactMenu = new JMenuItem(Res.getString("menuitem.add.contact"), SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); addContactGroupMenu = new JMenuItem(Res.getString("menuitem.add.contact.group"), SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE)); removeContactFromGroupMenu = new JMenuItem(Res.getString("menuitem.remove.from.group"), SparkRes.getImageIcon(SparkRes.SMALL_DELETE)); chatMenu = new JMenuItem(Res.getString("menuitem.start.a.chat"), SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_IMAGE)); renameMenu = new JMenuItem(Res.getString("menuitem.rename"), SparkRes.getImageIcon(SparkRes.DESKTOP_IMAGE)); addContactMenu.addActionListener(this); removeContactFromGroupMenu.addActionListener(this); chatMenu.addActionListener(this); renameMenu.addActionListener(this); setLayout(new BorderLayout()); addingGroupButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.ADD_CONTACT_IMAGE)); RolloverButton groupChatButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.JOIN_GROUPCHAT_IMAGE)); toolbar.add(addingGroupButton); toolbar.add(groupChatButton); addingGroupButton.addActionListener(this); mainPanel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true, false)); mainPanel.setBackground((Color)UIManager.get("List.background")); treeScroller = new JScrollPane(mainPanel); treeScroller.setBorder(BorderFactory.createEmptyBorder()); treeScroller.getVerticalScrollBar().setBlockIncrement(50); treeScroller.getVerticalScrollBar().setUnitIncrement(20); retryPanel = new RetryPanel(); workspace = SparkManager.getWorkspace(); workspace.getCardPanel().add(RETRY_PANEL, retryPanel); add(treeScroller, BorderLayout.CENTER); // Load Properties file props = new Properties(); // Save to properties file. propertiesFile = new File(new File(Spark.getUserHome(), "Spark"), "groups.properties"); try { props.load(new FileInputStream(propertiesFile)); } catch (IOException e) { // File does not exist. } // Add ActionListener(s) to menus addContactGroup(unfiledGroup); addContactGroup(offlineGroup); showHideMenu.setSelected(false); // Add KeyMappings getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control N"), "searchContacts"); getActionMap().put("searchContacts", new AbstractAction("searchContacts") { public void actionPerformed(ActionEvent evt) { // searchContacts(""); } }); // Save state on shutdown. SparkManager.getMainWindow().addMainWindowListener(new MainWindowListener() { public void shutdown() { saveState(); } public void mainWindowActivated() { } public void mainWindowDeactivated() { } }); SparkManager.getConnection().addConnectionListener(this); // Get command panel and add View Online/Offline, Add Contact StatusBar statusBar = SparkManager.getWorkspace().getStatusBar(); JPanel commandPanel = statusBar.getCommandPanel(); final RolloverButton addContactButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); commandPanel.add(addContactButton); addContactButton.setToolTipText(Res.getString("message.add.a.contact")); addContactButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new RosterDialog().showRosterDialog(); } }); }
3,237,521
public void actionPerformed(ActionEvent evt) { // searchContacts(""); }
public void actionPerformed(ActionEvent evt) { // searchContacts(""); }
3,237,522
private void updateUserPresence(Presence presence) { if (presence == null) { return; } Roster roster = SparkManager.getConnection().getRoster(); final String bareJID = StringUtils.parseBareAddress(presence.getFrom()); RosterEntry entry = roster.getEntry(bareJID); boolean isPending = entry != null && (entry.getType() == RosterPacket.ItemType.NONE || entry.getType() == RosterPacket.ItemType.FROM) && RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == entry.getStatus(); // If online, check to see if they are in the offline group. // If so, remove from offline group and add to all groups they // belong to. if (presence.getType() == Presence.Type.available && offlineGroup.getContactItemByJID(bareJID) != null) { changeOfflineToOnline(bareJID, entry, presence); } else if (presence.getFrom().indexOf("workgroup.") != -1) { changeOfflineToOnline(bareJID, entry, presence); } // If online, but not in offline group, update presence. else if (presence.getType() == Presence.Type.available) { final Iterator groupIterator = groupList.iterator(); while (groupIterator.hasNext()) { ContactGroup group = (ContactGroup)groupIterator.next(); ContactItem item = group.getContactItemByJID(bareJID); if (item != null) { item.setPresence(presence); group.fireContactGroupUpdated(); } } } // If not available, move to offline group. else if (presence.getType() == Presence.Type.unavailable && !isPending) { moveToOfflineGroup(bareJID); } }
private void updateUserPresence(Presence presence) { if (presence == null) { return; } Roster roster = SparkManager.getConnection().getRoster(); final String bareJID = StringUtils.parseBareAddress(presence.getFrom()); RosterEntry entry = roster.getEntry(bareJID); boolean isPending = entry != null && (entry.getType() == RosterPacket.ItemType.NONE || entry.getType() == RosterPacket.ItemType.FROM) && RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == entry.getStatus(); // If online, check to see if they are in the offline group. // If so, remove from offline group and add to all groups they // belong to. if (presence.getType() == Presence.Type.available && offlineGroup.getContactItemByJID(bareJID) != null) { changeOfflineToOnline(bareJID, entry, presence); } else if (presence.getFrom().indexOf("workgroup.") != -1) { changeOfflineToOnline(bareJID, entry, presence); } // If online, but not in offline group, update presence. else if (presence.getType() == Presence.Type.available) { final Iterator groupIterator = groupList.iterator(); while (groupIterator.hasNext()) { ContactGroup group = (ContactGroup)groupIterator.next(); ContactItem item = group.getContactItemByJID(bareJID); if (item != null) { item.setPresence(presence); group.fireContactGroupUpdated(); } } } // If not available, move to offline group. else if (presence.getType() == Presence.Type.unavailable && !isPending) { presence = roster.getPresence(bareJID); if (presence == null) { moveToOfflineGroup(bareJID); } } }
3,237,523
public static void main(String args[]) { //@START int i, j, k, n = Integer.parseInt(args[0]); int x[] = new int[n]; int y[] = new int[n]; for (i = 0; i < n; i++) x[i] = i + 1; for (k = 0; k < 1000; k++ ) for (j = n-1; j >= 0; j--) y[j] += x[j]; System.out.println(y[0] + " " + y[n-1]); //@END }
public static void main(String args[]) { //@START int i, j, k, n = Integer.parseInt(args[0]); int x[] = new int[n]; int y[] = new int[n]; for (i = 0; i < n; i++) x[i] = i + 1; for (k = 0; k < 1000; k++ ) for (j = n-1; j >= 0; j--) y[j] += x[j]; System.out.println(y[0] + " " + y[n-1]); //@END }
3,237,524
public void selfConfigure() { this.ctx = OmeroContext.getInternalServerContext(); this.ctx.applyBeanPropertyValues(this,getName()); }
public void selfConfigure() { this.ctx = OmeroContext.getInternalServerContext(); this.ctx.applyBeanPropertyValues(this,getServiceInterface()); }
3,237,525
public RubyNumeric[] coerce(RubyNumeric iNum) { RubyNumeric other = numericValue(iNum); if (!(iNum instanceof RubyInteger)) { return new RubyNumeric[]{this, other}; } return new RubyNumeric[] {RubyFloat.newFloat(getRuby(), getDoubleValue()), RubyFloat.newFloat(getRuby(), other.getDoubleValue())}; }
public RubyNumeric[] coerce(RubyNumeric iNum) { RubyNumeric other = numericValue(iNum); if (!(iNum instanceof RubyInteger)) { return new RubyNumeric[]{this, other}; } return new RubyNumeric[] {RubyFloat.newFloat(getRuby(), getDoubleValue()), RubyFloat.newFloat(getRuby(), other.getDoubleValue())}; }
3,237,526
public RubyNumeric[] coerce(RubyNumeric iNum) { RubyNumeric other = numericValue(iNum); if (!(iNum instanceof RubyInteger)) { return new RubyNumeric[]{this, other}; } return new RubyNumeric[] {RubyFloat.newFloat(getRuby(), getDoubleValue()), RubyFloat.newFloat(getRuby(), other.getDoubleValue())}; }
public RubyNumeric[] coerce(RubyNumeric iNum) { RubyNumeric other = numericValue(iNum); if (!(iNum instanceof RubyInteger)) { return new RubyNumeric[]{this, other}; } return new RubyNumeric[] {RubyFloat.newFloat(getRuby(), getDoubleValue()), RubyFloat.newFloat(getRuby(), other.getDoubleValue())}; }
3,237,527
public void visitForNode(ForNode iVisited) { threadContext.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self); threadContext.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { ISourcePosition position = threadContext.getPosition(); Block tmpBlock = ArgsUtil.beginCallArgs(runtime); IRubyObject recv = null; try { recv = eval(iVisited.getIterNode()); } finally { threadContext.setPosition(position); ArgsUtil.endCallArgs(runtime, tmpBlock); } result = recv.getInternalClass().call(recv, "each", null, CallType.NORMAL); return; } catch (RetryJump rExcptn) { } } } catch (ReturnJump rExcptn) { result = rExcptn.getReturnValue(); } catch (BreakJump bExcptn) { result = runtime.getNil(); } finally { runtime.getIterStack().pop(); runtime.getBlockStack().pop(); } }
public void visitForNode(ForNode iVisited) { threadContext.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self); threadContext.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { ISourcePosition position = threadContext.getPosition(); Block tmpBlock = ArgsUtil.beginCallArgs(runtime); IRubyObject recv = null; try { recv = eval(iVisited.getIterNode()); } finally { threadContext.setPosition(position); ArgsUtil.endCallArgs(runtime, tmpBlock); } result = recv.getInternalClass().call(recv, "each", null, CallType.NORMAL); return; } catch (RetryJump rExcptn) { } } } catch (ReturnJump rExcptn) { result = rExcptn.getReturnValue(); } catch (BreakJump bExcptn) { result = runtime.getNil(); } finally { runtime.getIterStack().pop(); runtime.getBlockStack().pop(); } }
3,237,529
public void visitForNode(ForNode iVisited) { threadContext.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self); threadContext.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { ISourcePosition position = threadContext.getPosition(); Block tmpBlock = ArgsUtil.beginCallArgs(runtime); IRubyObject recv = null; try { recv = eval(iVisited.getIterNode()); } finally { threadContext.setPosition(position); ArgsUtil.endCallArgs(runtime, tmpBlock); } result = recv.getInternalClass().call(recv, "each", null, CallType.NORMAL); return; } catch (RetryJump rExcptn) { } } } catch (ReturnJump rExcptn) { result = rExcptn.getReturnValue(); } catch (BreakJump bExcptn) { result = runtime.getNil(); } finally { runtime.getIterStack().pop(); runtime.getBlockStack().pop(); } }
public void visitForNode(ForNode iVisited) { threadContext.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self); threadContext.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { ISourcePosition position = threadContext.getPosition(); Block tmpBlock = ArgsUtil.beginCallArgs(runtime); IRubyObject recv = null; try { recv = eval(iVisited.getIterNode()); } finally { threadContext.setPosition(position); ArgsUtil.endCallArgs(runtime, tmpBlock); } result = recv.getInternalClass().call(recv, "each", null, CallType.NORMAL); return; } catch (RetryJump rExcptn) { } } } catch (ReturnJump rExcptn) { result = rExcptn.getReturnValue(); } catch (BreakJump bExcptn) { throw new ReturnJump(runtime.getNil()); } finally { runtime.getIterStack().pop(); runtime.getBlockStack().pop(); } }
3,237,530
public void visitIterNode(IterNode iVisited) { threadContext.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self); threadContext.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { result = eval(iVisited.getIterNode()); return; } catch (RetryJump rExcptn) { } } } catch (ReturnJump rExcptn) { result = rExcptn.getReturnValue(); } catch (BreakJump bExcptn) { result = runtime.getNil(); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().pop(); } }
public void visitIterNode(IterNode iVisited) { threadContext.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self); threadContext.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { result = eval(iVisited.getIterNode()); return; } catch (RetryJump rExcptn) { } } } catch (ReturnJump rExcptn) { result = rExcptn.getReturnValue(); } catch (BreakJump bExcptn) { result = runtime.getNil(); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().pop(); } }
3,237,531
public void visitIterNode(IterNode iVisited) { threadContext.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self); threadContext.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { result = eval(iVisited.getIterNode()); return; } catch (RetryJump rExcptn) { } } } catch (ReturnJump rExcptn) { result = rExcptn.getReturnValue(); } catch (BreakJump bExcptn) { result = runtime.getNil(); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().pop(); } }
public void visitIterNode(IterNode iVisited) { threadContext.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self); threadContext.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { result = eval(iVisited.getIterNode()); return; } catch (RetryJump rExcptn) { } } } catch (ReturnJump rExcptn) { result = rExcptn.getReturnValue(); } catch (BreakJump bExcptn) { throw new ReturnJump(runtime.getNil()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().pop(); } }
3,237,532
protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException { // Create a new XmlBeanDefinitionReader for the given BeanFactory. XmlBeanDefinitionReader beanDefinitionReader = createBeanDefinitionReader(beanFactory); // Configure the bean definition reader with this context's // resource loading environment. beanDefinitionReader.setResourceLoader(this); beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this)); // Allow a subclass to provide custom initialization of the reader, // then proceed with actually loading the bean definitions. initBeanDefinitionReader(beanDefinitionReader); loadBeanDefinitions(beanDefinitionReader); }
protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException { // Create a new XmlBeanDefinitionReader for the given BeanFactory. XmlBeanDefinitionReader beanDefinitionReader = XBeanHelper.createBeanDefinitionReader(this, beanFactory, xmlPreprocessors); // Configure the bean definition reader with this context's // resource loading environment. beanDefinitionReader.setResourceLoader(this); beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this)); // Allow a subclass to provide custom initialization of the reader, // then proceed with actually loading the bean definitions. initBeanDefinitionReader(beanDefinitionReader); loadBeanDefinitions(beanDefinitionReader); }
3,237,533
protected void setUp() { pixels = new Pixels(); pixels.setSizeX(512); pixels.setSizeY(512); pixels.setSizeZ(64); pixels.setSizeC(3); pixels.setSizeT(50); PixelsType type = new PixelsType(); pixels.setPixelsType(type); // FIXME pixelBuffer = new PixelBuffer(1, pixels); }
protected void setUp() { pixels = new Pixels(); pixels.setSizeX(512); pixels.setSizeY(512); pixels.setSizeZ(64); pixels.setSizeC(3); pixels.setSizeT(50); PixelsType type = new PixelsType(); pixels.setPixelsType(type); // FIXME PixelsService service = PixelsService.getInstance(); pixelBuffer = service.getPixelBuffer(pixels); }
3,237,534
public void testGetInitialPlaneOffset() { assertEquals(pixelBuffer.getPlaneOffset(0, 0, 0).longValue(), 0L); }
public void testGetInitialPlaneOffset() throws DimensionsOutOfBoundsException { assertEquals(pixelBuffer.getPlaneOffset(0, 0, 0).longValue(), 0L); }
3,237,535
public void testGetPlaneOffset1() { long offset = ((long)timepointSize * 25) + ((long)planeSize * 25); assertEquals(pixelBuffer.getPlaneOffset(25, 0, 25).longValue(), offset); }
public void testGetPlaneOffset1() throws DimensionsOutOfBoundsException { long offset = ((long)timepointSize * 25) + ((long)planeSize * 25); assertEquals(pixelBuffer.getPlaneOffset(25, 0, 25).longValue(), offset); }
3,237,536
public void testGetPlaneOffset2() { long offset = ((long)timepointSize * 25) + ((long)stackSize * 1) + ((long)planeSize * 25); assertEquals(pixelBuffer.getPlaneOffset(25, 1, 25).longValue(), offset); }
public void testGetPlaneOffset2() throws DimensionsOutOfBoundsException { long offset = ((long)timepointSize * 25) + ((long)stackSize * 1) + ((long)planeSize * 25); assertEquals(pixelBuffer.getPlaneOffset(25, 1, 25).longValue(), offset); }
3,237,537
public double computeValue(Attribute[] attributes, String elementName) throws IllegalArgumentException { double[] values = extractValues(attributes,elementName); double currentVal = Double.POSITIVE_INFINITY; for(int i=0;i<values.length;i++) { if(values[i] < currentVal) { currentVal = values[i]; } } return currentVal; }
public double computeValue(Attribute[] attributes, String elementName) throws IllegalArgumentException { double[] values = HeatMapUtils.extractValues(attributes,elementName); double currentVal = Double.POSITIVE_INFINITY; for(int i=0;i<values.length;i++) { if(values[i] < currentVal) { currentVal = values[i]; } } return currentVal; }
3,237,538
public double computeValue(Attribute[] attributes, String elementName) throws IllegalArgumentException { double[] values = extractValues(attributes,elementName); double currentVal = 0; for(int i=0;i<values.length;i++) { currentVal += values[i]; } return currentVal/(double)values.length; }
public double computeValue(Attribute[] attributes, String elementName) throws IllegalArgumentException { double[] values = HeatMapUtils.extractValues(attributes,elementName); double currentVal = 0; for(int i=0;i<values.length;i++) { currentVal += values[i]; } return currentVal/(double)values.length; }
3,237,539
public double computeValue(Attribute[] attributes, String elementName) throws IllegalArgumentException { double[] values = extractValues(attributes,elementName); Arrays.sort(values); if(values.length % 2 != 0) { return values[values.length/2]; } else { double value1 = values[values.length/2-1]; double value2 = values[values.length/2]; return (value1+value2)/2.0; } }
public double computeValue(Attribute[] attributes, String elementName) throws IllegalArgumentException { double[] values = HeatMapUtils.extractValues(attributes,elementName); Arrays.sort(values); if(values.length % 2 != 0) { return values[values.length/2]; } else { double value1 = values[values.length/2-1]; double value2 = values[values.length/2]; return (value1+value2)/2.0; } }
3,237,540
public double computeValue(Attribute[] attributes, String elementName) throws IllegalArgumentException { double[] values = extractValues(attributes,elementName); double currentVal = Double.NEGATIVE_INFINITY; for(int i=0;i<values.length;i++) { if(values[i] > currentVal) { currentVal = values[i]; } } return currentVal; }
public double computeValue(Attribute[] attributes, String elementName) throws IllegalArgumentException { double[] values = HeatMapUtils.extractValues(attributes,elementName); double currentVal = Double.NEGATIVE_INFINITY; for(int i=0;i<values.length;i++) { if(values[i] > currentVal) { currentVal = values[i]; } } return currentVal; }
3,237,541
public void updateDataModel(Integer start, Integer rows) { if (_dataModel == null) { _dataModel = new WFDataModel(); } int availableRows = 0; ArticleItemBean[] articleItemBean; try { articleItemBean = (ArticleItemBean[])loadAllArticlesInFolder(ContentUtil.ARTICLE_PATH).toArray(new ArticleItemBean[0]); availableRows = articleItemBean.length; int nrOfRows = rows.intValue(); if (nrOfRows == 0) { nrOfRows = availableRows; } int maxRow = Math.min(start.intValue() + nrOfRows,availableRows); for (int i = start.intValue(); i < maxRow; i++) { ArticleListBean a = new ArticleListBean(articleItemBean[i].getFolderLocation()+"/"+articleItemBean[i].getHeadline()+".xml", articleItemBean[i].getHeadline(), articleItemBean[i].getItemType(), articleItemBean[i].getAuthor(), articleItemBean[i].getStatus()); _dataModel.set(a, i); } } catch (XmlException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } _dataModel.setRowCount(availableRows); }
public void updateDataModel(Integer start, Integer rows) { if (_dataModel == null) { _dataModel = new WFDataModel(); } int availableRows = 0; ArticleItemBean[] articleItemBean; try { articleItemBean = (ArticleItemBean[])loadAllArticlesInFolder(ContentUtil.ARTICLE_PATH).toArray(new ArticleItemBean[0]); availableRows = articleItemBean.length; int nrOfRows = rows.intValue(); if (nrOfRows == 0) { nrOfRows = availableRows; } int maxRow = Math.min(start.intValue() + nrOfRows,availableRows); for (int i = start.intValue(); i < maxRow; i++) { ArticleListBean a = new ArticleListBean(articleItemBean[i].getFolderLocation()+"/"+articleItemBean[i].getHeadline()+".xml", articleItemBean[i].getHeadline(), articleItemBean[i].getItemType(), articleItemBean[i].getAuthor(), articleItemBean[i].getStatus()); _dataModel.set(a, i); } } catch (XmlException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } _dataModel.setRowCount(availableRows); }
3,237,542
public void actionPerformed(ActionEvent e) { String s = e.getActionCommand(); int index = Integer.parseInt(s); try { switch (index) { case FAMILY: JComboBox cbx = (JComboBox) e.getSource(); setFamily(cbx.getSelectedIndex()); break; case WAVELENGTH: JComboBox cbx1 = (JComboBox) e.getSource(); setWavelength(cbx1.getSelectedIndex()); break; case HISTOGRAM: popUpHistogram(); } } catch(NumberFormatException nfe) { throw new Error("Invalid Action ID "+index, nfe); } }
public void actionPerformed(ActionEvent e) { String s = e.getActionCommand(); int index = Integer.parseInt(s); try { switch (index) { case FAMILY: JComboBox cbx = (JComboBox) e.getSource(); setFamily(cbx.getSelectedIndex()); break; case WAVELENGTH: JComboBox cbx1 = (JComboBox) e.getSource(); setWavelength(cbx1.getSelectedIndex()); break; case HISTOGRAM: popUpHistogram(); } } catch(NumberFormatException nfe) { throw new Error("Invalid Action ID "+index, nfe); } }
3,237,543
private void popUpHistogram() { if (histogramDialog == null) { int w, start, end, min, max; w = view.getWavelengths().getSelectedIndex(); start = control.getChannelWindowStart(w); end = control.getChannelWindowEnd(w); min = control.getGlobalChannelWindowStart(w); max = control.getGlobalChannelWindowEnd(w); PixelsStatsEntry[] channelStats = control.getChannelStats(w); histogramDialog = new HistogramDialog(control, min, max, start, end, channelStats); } UIUtilities.centerAndShow(histogramDialog); }
private void popUpHistogram() { if (histogramDialog == null) { int w, start, end, min, max; w = view.getWavelengths().getSelectedIndex(); start = control.getChannelWindowStart(w); end = control.getChannelWindowEnd(w); min = control.getGlobalChannelWindowStart(w); max = control.getGlobalChannelWindowEnd(w); PixelsStatsEntry[] channelStats = control.getChannelStats(w); histogramDialog = new HistogramDialog(control, min, max, start, end, channelStats); } UIUtilities.centerAndShow(histogramDialog); }
3,237,544
private void resetDefaultBitResolution() { JSlider slider = view.getBitResolution(); //Remove temporarily the listener otherwise an event is fired. slider.removeChangeListener(this); slider.setValue(DomainPane.DEPTH_END); slider.addChangeListener(this); }
private void resetDefaultBitResolution() { JSlider slider = view.getBitResolution(); //Remove temporarily the listener otherwise an event is fired. slider.removeChangeListener(this); slider.setValue(DomainPane.DEPTH_END); slider.addChangeListener(this); }
3,237,545
private void setBitResolution(int v) { int k = view.getGamma().getValue(); //gamma int family = view.getTransformations().getSelectedIndex(); //family //bitResolution int br = ((Integer) resolutions.get(new Integer(v))).intValue(); control.setQuantumStrategy(k/10, family, br, BR); }
private void setBitResolution(int v) { int k = view.getGamma().getValue(); //gamma int family = view.getTransformations().getSelectedIndex(); //family //bitResolution int br = ((Integer) resolutions.get(new Integer(v))).intValue(); control.setQuantumStrategy(k/10, family, br, BR); }
3,237,546
private void setCurveCoefficient(int value) { double k = (double) value/10; view.getGammaLabel().setText(" Gamma: "+k); int family = view.getTransformations().getSelectedIndex(); //family int b = view.getBitResolution().getValue(); // bitResolution int br = ((Integer) resolutions.get(new Integer(b))).intValue(); control.setQuantumStrategy(k, family, br, GAMMA); }
private void setCurveCoefficient(int value) { double k = (double) value/10; view.getGammaLabel().setText(" Gamma: "+k); int family = view.getTransformations().getSelectedIndex(); //family int b = view.getBitResolution().getValue(); // bitResolution int br = ((Integer) resolutions.get(new Integer(b))).intValue(); control.setQuantumStrategy(k, family, br, GAMMA); }
3,237,547
private void setFamily(int family) { if (family == QuantumFactory.LOGARITHMIC || family == QuantumFactory.LINEAR) view.getGamma().setEnabled(false); else view.getGamma().setEnabled(true); resetDefaultGamma(); int b = view.getBitResolution().getValue(); // bitResolution int br = ((Integer) resolutions.get(new Integer(b))).intValue(); int k = view.getGamma().getValue(); //gamma control.setQuantumStrategy(k/10, family, br, FAMILY); }
private void setFamily(int family) { if (family == QuantumFactory.LOGARITHMIC || family == QuantumFactory.LINEAR) view.getGamma().setEnabled(false); else view.getGamma().setEnabled(true); resetDefaultGamma(); int b = view.getBitResolution().getValue(); // bitResolution int br = ((Integer) resolutions.get(new Integer(b))).intValue(); int k = view.getGamma().getValue(); //gamma control.setQuantumStrategy(k/10, family, br, FAMILY); }
3,237,548
private void setWavelength(int w) { disposeDialogs(); control.setWavelength(w); }
private void setWavelength(int w) { disposeDialogs(); control.setWavelength(w); }
3,237,549
public void stateChanged(ChangeEvent e) { JSlider source = (JSlider) e.getSource(); if (source == view.getGamma()) setCurveCoefficient(source.getValue()); else setBitResolution(source.getValue()); }
public void stateChanged(ChangeEvent e) { JSlider source = (JSlider) e.getSource(); if (source == view.getGamma()) setCurveCoefficient(source.getValue()); else setBitResolution(source.getValue()); }
3,237,550
void setInputWindowEnd(int v) { int gv = convertRealIntoGraphics(v); setInputEndBox(gv); view.getHistogramPanel().updateInputEnd(gv, v); }
void setInputWindowEnd(int v) { int gv = convertRealIntoGraphics(v); setInputEndBox(gv); view.getHistogramPanel().updateInputEnd(gv, v); }
3,237,551
void setInputWindowStart(int v) { int gv = convertRealIntoGraphics(v); setInputStartBox(gv); view.getHistogramPanel().updateInputStart(gv, v); }
void setInputWindowStart(int v) { int gv = convertRealIntoGraphics(v); setInputStartBox(gv); view.getHistogramPanel().updateInputStart(gv, v); }
3,237,552
public static final boolean isIdentChar(char ch) { return Character.isLetterOrDigit(ch) || ch == '_'; }
public static final boolean isIdentChar(char ch) { return Character.isLetterOrDigit(ch) || ch == '_'; }
3,237,553
public IRubyObject get() { IRubyObject errorInfo = runtime.getGlobalVariables().get("$!"); return errorInfo.isNil() ? runtime.getNil() : errorInfo.callMethod(errorInfo.getRuntime().getCurrentContext(), "backtrace"); }
public IRubyObject get() { IRubyObject errorInfo = runtime.getGlobalVariables().get("$!"); IRubyObject backtrace = errorInfo.isNil() ? runtime.getNil() : errorInfo.callMethod(errorInfo.getRuntime().getCurrentContext(), "backtrace"); if (!(backtrace instanceof RubyArray)) { backtrace = runtime.getNil(); } return backtrace; }
3,237,554
private NSImage getImage(String image) { InputStream in = this.getClass().getResourceAsStream(image); ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] buff = new byte[10 * 1024]; int len; try { while ((len = in.read(buff)) != -1) { out.write(buff, 0, len); } in.close(); out.close(); } catch (IOException e) { Logger.logError(e.getMessage(), e); } NSData data = new NSData(out.toByteArray()); return new NSImage(data); }
private NSImage getImage(String image) { InputStream in = this.getClass().getResourceAsStream(image); ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] buff = new byte[10 * 1024]; int len; try { while ((len = in.read(buff)) != -1) { out.write(buff, 0, len); } in.close(); out.close(); } catch (IOException e) { Log.error(e.getMessage(), e); } NSData data = new NSData(out.toByteArray()); return new NSImage(data); }
3,237,555
public boolean category(Category c) { List<CategoryImageLink> images = c.collectFromImageLinks( null ); List<CategoryGroupCategoryLink> cgs = c.collectFromCategoryGroupLinks( null ); // TODO return false; // TODO images.contains(i); }
public boolean category(Category c) { List<CategoryImageLink> images = c.collectFromImageLinks( null ); List<CategoryGroupCategoryLink> cgs = c.collectFromCategoryGroupLinks( null ); // TODO return false; // TODO images.contains(i); }
3,237,556
public void run() { target.addChild(node); awaitingDisplay = false; displayingNode = true; displayedNode = node; target.repaint(); // TODO fix this hack if(displayedNode instanceof SemanticZoomNode) { SemanticZoomNode node = (SemanticZoomNode)displayedNode; node.loadCompositeImages(); System.err.println(node.getOffset()); Point parentPoint = parentComponent.getLocationOnScreen(); Point2D offset = node.getOffset(); int x = (int)Math.round(offset.getX()); int y = (int)Math.round(offset.getY()); node.setAbsoluteLocation(new Point(parentPoint.x+x, parentPoint.y+y)); } }
public void run() { target.addChild(node); awaitingDisplay = false; displayingNode = true; displayedNode = node; target.repaint(); // TODO fix this hack if(displayedNode instanceof SemanticZoomNode) { SemanticZoomNode node = (SemanticZoomNode)displayedNode; node.loadCompositeImages(); Point parentPoint = parentComponent.getLocationOnScreen(); Point2D offset = node.getOffset(); int x = (int)Math.round(offset.getX()); int y = (int)Math.round(offset.getY()); node.setAbsoluteLocation(new Point(parentPoint.x+x, parentPoint.y+y)); } }
3,237,557
private UIComponent getSearchPanel() { String ref = SEARCH_ARTICLE_BEAN_ID + "."; WFContainer mainContainer = new WFContainer(); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(SEARCH_PUBLISHED_FROM_ID); em.addErrorMessage(SEARCH_PUBLISHED_TO_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getFormPanel(3); //adding myfaces component stuff IWMainApplication iwma = IWMainApplication.getDefaultIWMainApplication(); IWBundle myfacesBundle = iwma.getBundle("org.apache.myfaces"); String jsPath = myfacesBundle.getResourcesVirtualPath()+"/popcalendar.js"; String styleSheet1Path = myfacesBundle.getResourcesVirtualPath()+"/style/WH/theme.css"; String styleSheet2Path = myfacesBundle.getResourcesVirtualPath()+"/style/DB/theme.css"; Stylesheet stylesheet = new Stylesheet(); stylesheet.setPath(styleSheet1Path); stylesheet.setId("css1"); mainContainer.add(stylesheet); Stylesheet stylesheet2 = new Stylesheet(); stylesheet2.setPath(styleSheet2Path); stylesheet2.setId("css2"); mainContainer.add(stylesheet2); Script script = new Script(); script.setScriptSource(jsPath); mainContainer.add(script); //myfaces done p.getChildren().add(WFUtil.getText("Article text:")); p.getChildren().add(WFUtil.getText("Author:")); p.getChildren().add(WFUtil.getText("Category")); HtmlInputText searchTextInput = WFUtil.getInputText(SEARCH_TEXT_ID, ref + "searchText"); searchTextInput.setSize(40); p.getChildren().add(searchTextInput); HtmlInputText searchAuthorInput = WFUtil.getInputText(SEARCH_AUTHOR_ID, ref + "searchAuthor"); searchAuthorInput.setSize(30); p.getChildren().add(searchAuthorInput); HtmlSelectOneMenu searchCategoryMenu = WFUtil.getSelectOneMenu(SEARCH_CATEGORY_ID, ref + "categories", ref + "searchCategory"); p.getChildren().add(searchCategoryMenu); p.getChildren().add(WFUtil.getText("Published from:")); p.getChildren().add(WFUtil.getText("Published to:")); p.getChildren().add(WFUtil.getText(" ")); // HtmlInputText searchPublishedFromInput = WFUtil.getInputText(SEARCH_PUBLISHED_FROM_ID, ref + "searchPublishedFrom"); // searchPublishedFromInput.setSize(20);// searchPublishedFromInput.setConverter(new WFDateConverter());// HtmlInputCalendar searchPublishedFromInput = new HtmlInputCalendar(); searchPublishedFromInput.setId("fromDate"); searchPublishedFromInput.setRenderAsPopup(true); WFUtil.setValueBinding(searchPublishedFromInput,"value",ref + "searchPublishedFrom"); p.getChildren().add(searchPublishedFromInput); // HtmlInputText searchPublishedToInput = WFUtil.getInputText(SEARCH_PUBLISHED_TO_ID, ref + "searchPublishedTo"); // searchPublishedToInput.setSize(20);// searchPublishedToInput.setConverter(new WFDateConverter()); HtmlInputCalendar searchPublishedToInput = new HtmlInputCalendar(); searchPublishedToInput.setId("toDate"); searchPublishedToInput.setRenderAsPopup(true); WFUtil.setValueBinding(searchPublishedToInput,"value",ref + "searchPublishedTo"); p.getChildren().add(searchPublishedToInput); p.getChildren().add(WFUtil.getText(" ")); mainContainer.add(p); p = WFPanelUtil.getPlainFormPanel(1); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.getButton(SEARCH_BUTTON_ID, "Search", this)); mainContainer.add(p); return mainContainer; }
private UIComponent getSearchPanel() { String ref = SEARCH_ARTICLE_BEAN_ID + "."; WFContainer mainContainer = new WFContainer(); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(SEARCH_PUBLISHED_FROM_ID); em.addErrorMessage(SEARCH_PUBLISHED_TO_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getFormPanel(3); //adding myfaces component stuff IWMainApplication iwma = IWMainApplication.getDefaultIWMainApplication(); IWBundle myfacesBundle = iwma.getBundle("org.apache.myfaces"); String jsPath = myfacesBundle.getResourcesVirtualPath()+"/popcalendar.js"; String styleSheet1Path = myfacesBundle.getResourcesVirtualPath()+"/style/WH/theme.css"; String styleSheet2Path = myfacesBundle.getResourcesVirtualPath()+"/style/DB/theme.css"; Stylesheet stylesheet = new Stylesheet(); stylesheet.setPath(styleSheet1Path); stylesheet.setId("css1"); mainContainer.add(stylesheet); Stylesheet stylesheet2 = new Stylesheet(); stylesheet2.setPath(styleSheet2Path); stylesheet2.setId("css2"); mainContainer.add(stylesheet2); Script script = new Script(); script.setScriptSource(jsPath); mainContainer.add(script); //myfaces done p.getChildren().add(WFUtil.getText("Article text:")); p.getChildren().add(WFUtil.getText("Author:")); p.getChildren().add(WFUtil.getText("Category")); HtmlInputText searchTextInput = WFUtil.getInputText(SEARCH_TEXT_ID, ref + "searchText"); searchTextInput.setSize(40); p.getChildren().add(searchTextInput); HtmlInputText searchAuthorInput = WFUtil.getInputText(SEARCH_AUTHOR_ID, ref + "searchAuthor"); searchAuthorInput.setSize(30); p.getChildren().add(searchAuthorInput); HtmlSelectOneMenu searchCategoryMenu = WFUtil.getSelectOneMenu(SEARCH_CATEGORY_ID, ref + "categories", ref + "searchCategory"); p.getChildren().add(searchCategoryMenu); p.getChildren().add(WFUtil.getText("Published from:")); p.getChildren().add(WFUtil.getText("Published to:")); p.getChildren().add(WFUtil.getText(" ")); // HtmlInputText searchPublishedFromInput = WFUtil.getInputText(SEARCH_PUBLISHED_FROM_ID, ref + "searchPublishedFrom"); // searchPublishedFromInput.setSize(20);// searchPublishedFromInput.setConverter(new WFDateConverter());// HtmlInputCalendar searchPublishedFromInput = new HtmlInputCalendar(); searchPublishedFromInput.setId("fromDate"); searchPublishedFromInput.setRenderAsPopup(true); WFUtil.setValueBinding(searchPublishedFromInput,"value",ref + "searchPublishedFrom"); p.getChildren().add(searchPublishedFromInput); // HtmlInputText searchPublishedToInput = WFUtil.getInputText(SEARCH_PUBLISHED_TO_ID, ref + "searchPublishedTo"); // searchPublishedToInput.setSize(20);// searchPublishedToInput.setConverter(new WFDateConverter()); HtmlInputCalendar searchPublishedToInput = new HtmlInputCalendar(); searchPublishedToInput.setId("toDate"); searchPublishedToInput.setRenderAsPopup(true); WFUtil.setValueBinding(searchPublishedToInput,"value",ref + "searchPublishedTo"); p.getChildren().add(searchPublishedToInput); p.getChildren().add(WFUtil.getText(" ")); mainContainer.add(p); p = WFPanelUtil.getPlainFormPanel(1); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.getButton(SEARCH_BUTTON_ID, "Search", this)); mainContainer.add(p); return mainContainer; }
3,237,558
public Experimenter[] containedExperimenters(Long groupId) { ExperimenterGroup g = iQuery.execute(new GroupQ(new Parameters() .addId(groupId))); if (g == null) { throw new ApiUsageException("No such group: " + groupId); } int count = g.sizeOfGroupExperimenterMap(); if (count < 1) { return new Experimenter[] {}; } return (Experimenter[]) g.linkedExperimenterList().toArray( new Experimenter[count]); }
public Experimenter[] containedExperimenters(Long groupId) { ExperimenterGroup g = iQuery.execute(new GroupQ(new Parameters() .addId(groupId))); if (g == null) { throw new ApiUsageException("No such group: " + groupId); } int count = g.sizeOfGroupExperimenterMap(); if (count < 1) { return new Experimenter[] {}; } return (Experimenter[]) g.linkedExperimenterList().toArray( new Experimenter[count]); }
3,237,559
public ExperimenterGroup[] containedGroups(Long experimenterId) { Experimenter e = iQuery.execute(new UserQ(new Parameters() .addId(experimenterId))); if (e == null) { throw new ApiUsageException("No such user: " + experimenterId); } int count = e.sizeOfGroupExperimenterMap(); if (count < 1) { return new ExperimenterGroup[] {}; } return (ExperimenterGroup[]) e.linkedExperimenterGroupList().toArray( new ExperimenterGroup[count]); }
public ExperimenterGroup[] containedGroups(Long experimenterId) { Experimenter e = iQuery.execute(new UserQ(new Parameters() .addId(experimenterId))); if (e == null) { throw new ApiUsageException("No such user: " + experimenterId); } int count = e.sizeOfGroupExperimenterMap(); if (count < 1) { return new ExperimenterGroup[] {}; } return (ExperimenterGroup[]) e.linkedExperimenterGroupList().toArray( new ExperimenterGroup[count]); }
3,237,560
public static void testClazz() { Clazz clazz; clazz = new Clazz("HelloWorld"); assertEquals("HelloWorld", clazz.getName()); assertEquals("", clazz.getPackageName()); assertEquals("HelloWorld.java", clazz.getLongFileName()); assertEquals("HelloWorld", clazz.getLongName()); assertEquals(0, clazz.getBranchCoverageRate(), 0); assertEquals(1.0, clazz.getLineCoverageRate(), 0); assertFalse(clazz.isValidSourceLine(19)); clazz = new Clazz("com.example.HelloWorld"); assertEquals("HelloWorld", clazz.getName()); assertEquals("com.example", clazz.getPackageName()); assertEquals("com/example/HelloWorld.java", clazz.getLongFileName()); assertEquals("com.example.HelloWorld", clazz.getLongName()); try { new Clazz(null); fail("Expected an IllegalArgumentException but did not receive one!"); } catch (IllegalArgumentException e) { //Good } }
public static void testClazz() { Clazz clazz; clazz = new Clazz("HelloWorld"); assertEquals("HelloWorld", clazz.getName()); assertEquals("", clazz.getPackageName()); assertEquals("HelloWorld.java", clazz.getLongFileName()); assertEquals("HelloWorld", clazz.getLongName()); assertEquals(0, clazz.getBranchCoverageRate(), 0); assertEquals(1.0, clazz.getLineCoverageRate(), 0); assertFalse(clazz.isValidSourceLine(19)); clazz = new Clazz("com.example.HelloWorld"); assertEquals("HelloWorld", clazz.getName()); assertEquals("com.example", clazz.getPackageName()); assertEquals("com/example/HelloWorld.java", clazz.getLongFileName()); assertEquals("com.example.HelloWorld", clazz.getLongName()); try { new Clazz(null); fail("Expected an IllegalArgumentException but did not receive one!"); } catch (IllegalArgumentException e) { //Good } }
3,237,561
public static void testClazz() { Clazz clazz; clazz = new Clazz("HelloWorld"); assertEquals("HelloWorld", clazz.getName()); assertEquals("", clazz.getPackageName()); assertEquals("HelloWorld.java", clazz.getLongFileName()); assertEquals("HelloWorld", clazz.getLongName()); assertEquals(0, clazz.getBranchCoverageRate(), 0); assertEquals(1.0, clazz.getLineCoverageRate(), 0); assertFalse(clazz.isValidSourceLine(19)); clazz = new Clazz("com.example.HelloWorld"); assertEquals("HelloWorld", clazz.getName()); assertEquals("com.example", clazz.getPackageName()); assertEquals("com/example/HelloWorld.java", clazz.getLongFileName()); assertEquals("com.example.HelloWorld", clazz.getLongName()); try { new Clazz(null); fail("Expected an IllegalArgumentException but did not receive one!"); } catch (IllegalArgumentException e) { //Good } }
public static void testClazz() { Clazz clazz; clazz = new Clazz("HelloWorld"); assertEquals("HelloWorld", clazz.getName()); assertEquals("", clazz.getPackageName()); assertEquals("HelloWorld.java", clazz.getLongFileName()); assertEquals("HelloWorld", clazz.getLongName()); assertEquals(0, clazz.getBranchCoverageRate(), 0); assertEquals(1.0, clazz.getLineCoverageRate(), 0); assertFalse(clazz.isValidSourceLine(19)); clazz = new Clazz("com.example.HelloWorld"); assertEquals("HelloWorld", clazz.getName()); assertEquals("com.example", clazz.getPackageName()); assertEquals("com/example/HelloWorld.java", clazz.getLongFileName()); assertEquals("com.example.HelloWorld", clazz.getLongName()); try { new Clazz(null); fail("Expected an IllegalArgumentException but did not receive one!"); } catch (IllegalArgumentException e) { //Good } }
3,237,562
public static void testClazz() { Clazz clazz; clazz = new Clazz("HelloWorld"); assertEquals("HelloWorld", clazz.getName()); assertEquals("", clazz.getPackageName()); assertEquals("HelloWorld.java", clazz.getLongFileName()); assertEquals("HelloWorld", clazz.getLongName()); assertEquals(0, clazz.getBranchCoverageRate(), 0); assertEquals(1.0, clazz.getLineCoverageRate(), 0); assertFalse(clazz.isValidSourceLine(19)); clazz = new Clazz("com.example.HelloWorld"); assertEquals("HelloWorld", clazz.getName()); assertEquals("com.example", clazz.getPackageName()); assertEquals("com/example/HelloWorld.java", clazz.getLongFileName()); assertEquals("com.example.HelloWorld", clazz.getLongName()); try { new Clazz(null); fail("Expected an IllegalArgumentException but did not receive one!"); } catch (IllegalArgumentException e) { //Good } }
public static void testClazz() { Clazz clazz; clazz = new Clazz("HelloWorld"); assertEquals("HelloWorld", clazz.getName()); assertEquals("", clazz.getPackageName()); assertEquals("HelloWorld.java", clazz.getLongFileName()); assertEquals("HelloWorld", clazz.getLongName()); assertEquals(0, clazz.getBranchCoverageRate(), 0); assertEquals(1.0, clazz.getLineCoverageRate(), 0); assertFalse(clazz.isValidSourceLine(19)); clazz = new Clazz("com.example.HelloWorld"); assertEquals("HelloWorld", clazz.getName()); assertEquals("com.example", clazz.getPackageName()); assertEquals("com/example/HelloWorld.java", clazz.getLongFileName()); assertEquals("com.example.HelloWorld", clazz.getLongName()); try { new Clazz(null); fail("Expected an IllegalArgumentException but did not receive one!"); } catch (IllegalArgumentException e) { //Good } }
3,237,563
protected Object parseCustomMapElement(MappingMetaData metadata, Element element, String name) { Map map = new HashMap(); Element parent = (Element) element.getParentNode(); String entryName = metadata.getMapEntryName(getLocalName(parent), name); String keyName = metadata.getMapKeyName(getLocalName(parent), name); if (entryName == null) entryName = "property"; if (keyName == null) keyName = "key"; // TODO : support further customizations //String valueName = "value"; //boolean keyIsAttr = true; //boolean valueIsAttr = false; NodeList nl = element.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node node = nl.item(i); if (node instanceof Element) { Element childElement = (Element) node; String localName = childElement.getLocalName(); String uri = childElement.getNamespaceURI(); if (localName == null || localName.equals("xmlns") || localName.startsWith("xmlns:")) { continue; } // we could use namespaced attributes to differentiate real spring // attributes from namespace-specific attributes if (!isEmpty(uri) && localName.equals(entryName)) { String key = childElement.getAttribute(keyName); if (key == null) throw new RuntimeException("No key defined for map " + entryName); Object keyValue = getValue(key, null); Object value = getValue(getElementText(childElement), null); map.put(keyValue, value); } } } return map; }
protected Object parseCustomMapElement(MappingMetaData metadata, Element element, String name) { Map map = new HashMap(); Element parent = (Element) element.getParentNode(); String entryName = metadata.getMapEntryName(getLocalName(parent), name); String keyName = metadata.getMapKeyName(getLocalName(parent), name); if (entryName == null) entryName = "property"; if (keyName == null) keyName = "key"; // TODO : support further customizations //String valueName = "value"; //boolean keyIsAttr = true; //boolean valueIsAttr = false; NodeList nl = element.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node node = nl.item(i); if (node instanceof Element) { Element childElement = (Element) node; String localName = childElement.getLocalName(); String uri = childElement.getNamespaceURI(); if (localName == null || localName.equals("xmlns") || localName.startsWith("xmlns:")) { continue; } // we could use namespaced attributes to differentiate real spring // attributes from namespace-specific attributes if (!isEmpty(uri) && localName.equals(entryName)) { String key = childElement.getAttribute(keyName); if (key == null) throw new RuntimeException("No key defined for map " + entryName); Object keyValue = getValue(key, null); Element valueElement = getFirstChildElement(childElement); Object value; if (valueElement != null) { value = parsePropertySubElement(valueElement, ""); } else { value = getElementText(childElement); } map.put(keyValue, value); } } } return map; }
3,237,564
public BaseQ(Parameters params) { super(defs,new Parameters( new Filter().unique() ).addAll( params )); }
public BaseQ(Parameters params) { super(defs,new Parameters( new Filter().unique() ).addAll( params )); }
3,237,565
public GroupQ(Parameters params) { super(params); }
public GroupQ(Parameters params) { super(params); }
3,237,566
protected void buildQuery(Session session) throws HibernateException, SQLException { Criteria c = session.createCriteria(ExperimenterGroup.class); Criteria m = c.createCriteria("groupExperimenterMap",Query.LEFT_JOIN); Criteria e = m.createCriteria("child",Query.LEFT_JOIN); if (value("name") != null) { c.add( Restrictions.eq("name", value("name"))); } else if (value("id") != null) { c.add( Restrictions.eq("id", value("id"))); } else { throw new InternalException( "Name and id are both null for group query."); } setCriteria( c ); }
protected void buildQuery(Session session) throws HibernateException, SQLException { Criteria c = session.createCriteria(ExperimenterGroup.class); Criteria m = c.createCriteria("groupExperimenterMap",Query.LEFT_JOIN); Criteria e = m.createCriteria("child",Query.LEFT_JOIN); if (value("name") != null) { c.add( Restrictions.eq("name", value("name"))); } else if (value("id") != null) { c.add( Restrictions.eq("id", value("id"))); } else { throw new InternalException( "Name and id are both null for group query."); } setCriteria( c ); }
3,237,567
protected void buildQuery(Session session) throws HibernateException, SQLException { Criteria c = session.createCriteria(ExperimenterGroup.class); Criteria m = c.createCriteria("groupExperimenterMap",Query.LEFT_JOIN); Criteria e = m.createCriteria("child",Query.LEFT_JOIN); if (value("name") != null) { c.add( Restrictions.eq("name", value("name"))); } else if (value("id") != null) { c.add( Restrictions.eq("id", value("id"))); } else { throw new InternalException( "Name and id are both null for group query."); } setCriteria( c ); }
protected void buildQuery(Session session) throws HibernateException, SQLException { Criteria c = session.createCriteria(ExperimenterGroup.class); Criteria m = c.createCriteria("groupExperimenterMap",Query.LEFT_JOIN); Criteria e = m.createCriteria("child",Query.LEFT_JOIN); if (value("name") != null) { c.add( Restrictions.eq("name", value("name"))); } else if (value("id") != null) { c.add( Restrictions.eq("id", value("id"))); } else { throw new InternalException( "Name and id are both null for group query."); } setCriteria( c ); }
3,237,568
public UserQ(Parameters params) { super(params); }
public UserQ(Parameters params) { super(params); }
3,237,569
protected void buildQuery(Session session) throws HibernateException, SQLException { Criteria c = session.createCriteria(Experimenter.class); Criteria m = c.createCriteria("groupExperimenterMap",Query.LEFT_JOIN); Criteria g = m.createCriteria("parent",Query.LEFT_JOIN); if (value("name") != null) { c.add( Restrictions.eq("omeName", value("name"))); } else if (value("id") != null) { c.add( Restrictions.eq("id", value("id"))); } else { throw new InternalException( "Name and id are both null for user query."); } setCriteria( c ); }
protected void buildQuery(Session session) throws HibernateException, SQLException { Criteria c = session.createCriteria(Experimenter.class); Criteria m = c.createCriteria("groupExperimenterMap",Query.LEFT_JOIN); Criteria g = m.createCriteria("parent",Query.LEFT_JOIN); if (value("name") != null) { c.add( Restrictions.eq("omeName", value("name"))); } else if (value("id") != null) { c.add( Restrictions.eq("id", value("id"))); } else { throw new InternalException( "Name and id are both null for user query."); } setCriteria( c ); }
3,237,570
public void addGroups(Experimenter user, ExperimenterGroup... groups) { if (user == null) return; // Handled by annotations if (groups == null) return; Experimenter foundUser = userProxy(user.getId()); for (ExperimenterGroup group : groups) { ExperimenterGroup foundGroup = groupProxy(group.getId()); GroupExperimenterMap map = new GroupExperimenterMap(); map.link(foundGroup,foundUser); map.setDetails( getSecuritySystem().transientDetails(map)); getSecuritySystem().doAction(map,new SecureAction(){ public <T extends IObject> T updateObject(T obj) { return iUpdate.saveAndReturnObject( obj ); } }); } iUpdate.flush(); }
public void addGroups(Experimenter user, ExperimenterGroup... groups) { if (user == null) return; // Handled by annotations if (groups == null) return; Experimenter foundUser = userProxy(user.getId()); for (ExperimenterGroup group : groups) { ExperimenterGroup foundGroup = groupProxy(group.getId()); GroupExperimenterMap map = new GroupExperimenterMap(); map.link(foundGroup,foundUser); map.setDetails( getSecuritySystem().transientDetails(map)); getSecuritySystem().doAction(map,new SecureAction(){ public <T extends IObject> T updateObject(T obj) { return iUpdate.saveAndReturnObject( obj ); } }); } iUpdate.flush(); }
3,237,571
public void addGroups(Experimenter user, ExperimenterGroup... groups) { if (user == null) return; // Handled by annotations if (groups == null) return; Experimenter foundUser = userProxy(user.getId()); for (ExperimenterGroup group : groups) { ExperimenterGroup foundGroup = groupProxy(group.getId()); GroupExperimenterMap map = new GroupExperimenterMap(); map.link(foundGroup,foundUser); map.setDetails( getSecuritySystem().transientDetails(map)); getSecuritySystem().doAction(map,new SecureAction(){ public <T extends IObject> T updateObject(T obj) { return iUpdate.saveAndReturnObject( obj ); } }); } iUpdate.flush(); }
public void addGroups(Experimenter user, ExperimenterGroup... groups) { if (user == null) return; // Handled by annotations if (groups == null) return; Experimenter foundUser = userProxy(user.getId()); for (ExperimenterGroup group : groups) { ExperimenterGroup foundGroup = groupProxy(group.getId()); GroupExperimenterMap map = new GroupExperimenterMap(); map.link(foundGroup,foundUser); map.setDetails( getSecuritySystem().transientDetails(map)); getSecuritySystem().doAction(map,new SecureAction(){ public <T extends IObject> T updateObject(T obj) { return iUpdate.saveAndReturnObject( obj ); } }); } iUpdate.flush(); }
3,237,572
public <T extends IObject> T updateObject(T obj) { return iUpdate.saveAndReturnObject( obj ); }
public <T extends IObject> T updateObject(T obj) { return iUpdate.saveAndReturnObject( obj ); }
3,237,573
public void changeGroup(IObject iObject, String groupName) { final LocalUpdate update = iUpdate; // should take a group final IObject copy = iQuery.get(iObject.getClass(), iObject.getId()); ExperimenterGroup group = groupProxy(groupName); copy.getDetails().setGroup(group); getSecuritySystem().doAction(copy, new SecureAction(){ public IObject updateObject(IObject obj) { update.flush(); return null; } }); }
public void changeGroup(IObject iObject, String groupName) { final LocalUpdate update = iUpdate; // should take a group final IObject copy = iQuery.get(iObject.getClass(), iObject.getId()); ExperimenterGroup group = groupProxy(groupName); copy.getDetails().setGroup(group); getSecuritySystem().doAction(copy, new SecureAction(){ public IObject updateObject(IObject obj) { update.flush(); return null; } }); }
3,237,574
public IObject updateObject(IObject obj) { update.flush(); return null; }
public IObject updateObject(IObject obj) { update.flush(); return null; }
3,237,575
public void changeOwner(IObject iObject, String omeName) { // should take an Owner IObject copy = iQuery.get(iObject.getClass(), iObject.getId()); Experimenter owner = userProxy(omeName); copy.getDetails().setOwner(owner); iUpdate.saveObject(copy); }
public void changeOwner(IObject iObject, String omeName) { // should take an Owner IObject copy = iQuery.get(iObject.getClass(), iObject.getId()); Experimenter owner = userProxy(omeName); copy.getDetails().setOwner(owner); iUpdate.saveObject(copy); }
3,237,576
public void changePassword(String newPassword) { internalChangeUserPasswordById( getSecuritySystem().currentUserId(), newPassword); }
public void changePassword(String newPassword) { internalChangeUserPasswordById( getSecuritySystem().currentUserId(), newPassword); }
3,237,577
public void changePermissions(final IObject iObject, final Permissions perms) { final LocalUpdate update = iUpdate; final IObject copy = iQuery.get(iObject.getClass(), iObject.getId()); copy.getDetails().setPermissions(perms); getSecuritySystem().doAction(copy, new SecureAction(){ public <T extends IObject> T updateObject(T obj) { update.flush(); return null; } }); }
public void changePermissions(final IObject iObject, final Permissions perms) { final LocalUpdate update = iUpdate; final IObject copy = iQuery.get(iObject.getClass(), iObject.getId()); copy.getDetails().setPermissions(perms); getSecuritySystem().doAction(copy, new SecureAction(){ public <T extends IObject> T updateObject(T obj) { update.flush(); return null; } }); }
3,237,578
public void changeUserPassword(String omeName, String newPassword) { Experimenter e = lookupExperimenter(omeName); internalChangeUserPasswordById(e.getId(),newPassword); }
public void changeUserPassword(String omeName, String newPassword) { Experimenter e = lookupExperimenter(omeName); internalChangeUserPasswordById(e.getId(),newPassword); }
3,237,579
public Experimenter[] containedExperimenters(Long groupId) { ExperimenterGroup g = iQuery.execute( new GroupQ( new Parameters( ).addId(groupId))); if (g == null) { throw new ApiUsageException("No such group: "+groupId); } int count = g.sizeOfGroupExperimenterMap(); if ( count < 1 ) { return new Experimenter[]{}; } return (Experimenter[]) g.linkedExperimenterList() .toArray(new Experimenter[count]); }
public Experimenter[] containedExperimenters(Long groupId) { ExperimenterGroup g = iQuery.execute( new GroupQ( new Parameters( ).addId(groupId))); if (g == null) { throw new ApiUsageException("No such group: "+groupId); } int count = g.sizeOfGroupExperimenterMap(); if ( count < 1 ) { return new Experimenter[]{}; } return (Experimenter[]) g.linkedExperimenterList() .toArray(new Experimenter[count]); }
3,237,580